@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600&family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #050505;
  --text: #f4f1ea;
  --muted: rgba(244,241,234,.62);
  --line: rgba(255,255,255,.12);
  --panel: rgba(255,255,255,.035);
  --accent: #c7aa6a;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 10%, rgba(255,255,255,.08), transparent 30%),
    radial-gradient(circle at 10% 90%, rgba(199,170,106,.08), transparent 35%),
    var(--bg);
  color: var(--text);
  font-family: Inter, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .06;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  z-index: 999;
}

.app {
  padding: 70px 6vw;
}

.intro {
  max-width: 980px;
  margin-bottom: 70px;
}

.eyebrow,
.card-label {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
}

.intro h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(5rem, 13vw, 13rem);
  line-height: .75;
  font-weight: 500;
  letter-spacing: -6px;
  margin: 20px 0 35px;
}

.intro p:last-child {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  align-items: start;
}

.panel,
.card,
.preview,
.mini-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.panel {
  padding: 28px;
  position: sticky;
  top: 30px;
}

label {
  display: block;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

input,
select {
  width: 100%;
  padding: 16px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.25);
  color: var(--text);
  outline: none;
}

select option {
  background: #111;
}

button {
  cursor: pointer;
  border: none;
  transition: .35s ease;
}

.panel button,
.card-head button {
  width: 100%;
  padding: 16px;
  background: var(--text);
  color: #050505;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 11px;
  font-weight: 700;
}

.panel button:hover,
.card-head button:hover {
  transform: translateY(-4px);
  opacity: .82;
}

.panel .ghost {
  margin-top: 12px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.output {
  display: grid;
  gap: 28px;
}

.brand-header {
  min-height: 300px;
  padding: 42px;
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.05), transparent),
    rgba(255,255,255,.025);
}

.brand-header h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(4rem, 9vw, 10rem);
  line-height: .8;
  font-weight: 500;
  letter-spacing: -4px;
  margin: 20px 0;
}

.brand-header p:last-child {
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.score {
  width: 150px;
  height: 150px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.score span {
  font-family: "Cormorant Garamond", serif;
  font-size: 58px;
}

.score small {
  display: block;
  margin-top: -30px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 9px;
}

.grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
}

.card {
  padding: 32px;
  min-height: 250px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.card-head p {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
}

.card-head button {
  width: auto;
  padding: 12px 18px;
  font-size: 9px;
}

.palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: 210px;
  overflow: hidden;
}

.color {
  display: flex;
  align-items: flex-end;
  padding: 14px;
  min-height: 210px;
  position: relative;
  transition: .45s ease;
}

.color:hover {
  transform: scale(1.04);
  z-index: 4;
}

.color span {
  font-size: 10px;
  letter-spacing: 2px;
  background: rgba(0,0,0,.35);
  padding: 8px;
  backdrop-filter: blur(8px);
}

.card h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: .85;
  font-weight: 500;
  margin: 22px 0;
}

.card p {
  color: var(--muted);
  line-height: 1.75;
}

.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.keywords span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 10px;
}

.preview {
  min-height: 640px;
  padding: 36px;
  background:
    radial-gradient(circle at 70% 20%, var(--preview-light, rgba(199,170,106,.25)), transparent 35%),
    linear-gradient(135deg, var(--preview-bg, #070707), #111);
  color: var(--preview-text, #f4f1ea);
  position: relative;
  overflow: hidden;
}

.preview::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -150px;
  bottom: -180px;
  background: var(--preview-accent, #c7aa6a);
  opacity: .12;
  filter: blur(90px);
  border-radius: 50%;
}

.preview-nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.preview-nav nav {
  display: flex;
  gap: 30px;
  color: rgba(255,255,255,.65);
}

.preview-hero {
  position: relative;
  z-index: 2;
  margin-top: 160px;
  max-width: 760px;
}

.preview-hero p:first-child {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-bottom: 20px;
}

.preview-hero h2 {
  font-family: var(--preview-font, "Cormorant Garamond");
  font-size: clamp(4rem, 9vw, 9rem);
  line-height: .82;
  font-weight: 500;
  letter-spacing: -5px;
  margin-bottom: 30px;
}

.preview-hero p {
  max-width: 560px;
  line-height: 1.8;
  color: rgba(255,255,255,.72);
}

.preview-hero button,
.demo-btn {
  margin-top: 36px;
  padding: 17px 28px;
  background: var(--preview-accent, #c7aa6a);
  color: #080808;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 10px;
}

.components {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.mini-card {
  padding: 28px;
  min-height: 220px;
}

.mini-card p {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}

.mini-card h4 {
  font-family: "Cormorant Garamond", serif;
  font-size: 38px;
  line-height: .9;
  margin-bottom: 18px;
}

.mini-card small {
  color: var(--muted);
  line-height: 1.7;
}

#savedList {
  list-style: none;
  display: grid;
  gap: 12px;
}

#savedList li {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}

.export pre {
  white-space: pre-wrap;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

#toast {
  position: fixed;
  right: 30px;
  bottom: 30px;
  padding: 14px 20px;
  background: var(--text);
  color: #050505;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 11px;
  opacity: 0;
  transform: translateY(20px);
  transition: .35s ease;
  z-index: 1000;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1050px) {
  .workspace,
  .grid,
  .components {
    grid-template-columns: 1fr;
  }

  .panel {
    position: relative;
    top: 0;
  }

  .brand-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 650px) {
  .app {
    padding: 45px 20px;
  }

  .palette {
    grid-template-columns: 1fr;
  }

  .color {
    min-height: 90px;
  }

  .preview {
    padding: 24px;
  }

  .preview-nav nav {
    display: none;
  }
}