/* Catalyne design system, measured from catalyne.ai/en and dealmaster.catalyne.ai:
   bg #fffcf8, ink #211c33, muted #4a4360, links #6b6699, amber #f59e0b,
   warm borders rgba(213,205,186,.7), Figtree-light headlines with DM Serif
   Display italic amber accents, Geist UI, deep soft shadows keyed to #14121f,
   amber glow on primary buttons, gradient logo tile 145deg #14121f->#1d1a2b. */

:root {
  --bg: #fffcf8;
  --cream: #f7f3ea;
  --ink: #211c33;
  --muted: #4a4360;
  --link: #6b6699;
  --amber: #f59e0b;
  --amber-hover: #e19110;
  --line: rgba(213, 205, 186, .7);
  --input-border: #d5cdba;
  --shadow-card: rgba(15, 13, 35, .1) 0 8px 24px;
  --shadow-deep: rgba(20, 18, 31, .3) 0 26px 52px -22px;
  --shadow-tile: rgba(20, 18, 31, .25) 0 4px 14px;
  --glow: rgba(245, 158, 11, .16) 0 3px 10px;
  --glow-big: rgba(245, 158, 11, .22) 0 6px 20px;
  --ring: rgba(245, 158, 11, .18) 0 0 0 4px;
}

* { box-sizing: border-box; margin: 0; }

body {
  font-family: "Geist", system-ui, sans-serif;
  background: linear-gradient(180deg, var(--cream) 0%, var(--bg) 320px);
  color: var(--ink);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

/* ---- Top nav (sticky, blurred, like catalyne.ai) ---- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 32px);
  background: rgba(255, 252, 248, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brandline {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}
.logo-tile {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #14121f, #1d1a2b);
  color: var(--amber);
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-tile);
}
.wordmark {
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
  font-size: 18px;
}
.wordmark em {
  font-family: "DM Serif Display", Georgia, serif;
  font-style: italic;
  color: var(--amber);
  font-size: 1.08em;
}

.navlinks { display: flex; align-items: center; gap: 22px; }
.navlinks a {
  font-size: 15.2px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.navlinks a:hover { color: var(--ink); }

.pill {
  background: var(--amber);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: background .15s, box-shadow .15s;
}
.pill:hover { background: var(--amber-hover); box-shadow: var(--glow-big); }

/* ---- Shell: intro state centers hero + composer; chat state docks it ---- */

.shell {
  width: min(760px, 100vw);
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  min-height: 0;
}

body.intro .shell { justify-content: center; gap: 26px; }

.hero { text-align: center; padding: 12px 8px 0; }
body.chatting .hero { display: none; }

.eyebrow {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}
h1 {
  font-family: "Figtree", "Montserrat", sans-serif;
  font-weight: 300;
  font-size: clamp(30px, 5.4vw, 42px);
  letter-spacing: -.02em;
  line-height: 1.24; /* 1.08 + 15% */
}
h1 em {
  font-family: "DM Serif Display", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--amber);
}
.tagline {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 54ch;
  margin: 14px auto 0;
}
.tagline em {
  font-family: "DM Serif Display", Georgia, serif;
  font-style: italic;
  color: var(--amber);
  font-size: 1.06em;
}

/* ---- Chat ---- */

.chat {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 14px 4px;
}
body.chatting .chat { display: flex; flex: 1; overflow-y: auto; }

.msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  line-height: 1.55;
  font-size: 15px;
  white-space: pre-wrap;
}
.msg.user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--bg);
  border-bottom-right-radius: 4px;
}
.msg.coach {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-card);
}
.msg.coach.thinking::after { content: "…"; opacity: .5; }

/* ---- Composer dock ---- */

.dock { padding: 8px 0 14px; }

.composer {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--shadow-deep);
  transition: box-shadow .15s;
}
.composer:focus-within { box-shadow: var(--shadow-deep), var(--ring); }
.composer textarea {
  flex: 1;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  padding: 6px 8px;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  max-height: 140px;
  overflow-y: auto;
}
.composer textarea::placeholder { color: rgba(74, 67, 96, .55); }
.composer button {
  background: var(--amber);
  color: var(--ink);
  border: 0;
  border-radius: 12px;
  padding: 11px 22px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: background .15s, box-shadow .15s;
}
.composer button:hover { background: var(--amber-hover); box-shadow: var(--glow-big); }
.composer button:disabled { opacity: .5; cursor: default; box-shadow: none; }

.examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
body.chatting .examples { display: none; }
.examples button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 15px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.examples button:hover { border-color: var(--amber); background: #fffaf1; color: var(--ink); }

.langlink {
  display: block;
  margin: 14px auto 0;
  border: 0;
  background: none;
  padding: 4px 8px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--link);
  cursor: pointer;
}
.langlink:hover { text-decoration: underline; }
body.chatting .langlink { display: none; }

/* ---- Gate (Deal Master card pattern) ---- */

.gate {
  align-self: stretch;
  background: rgba(255, 252, 248, .95);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-deep);
}
.gate h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  margin-bottom: 6px;
}
.gate > p { font-size: 14px; color: var(--muted); margin-bottom: 16px; line-height: 1.55; }
.gate .field {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.gate input[type=email] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  margin-bottom: 12px;
}
.gate input[type=email]:focus { outline: none; box-shadow: var(--ring); border-color: var(--amber); }
.gate label.consent {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  align-items: flex-start;
}
.gate label.consent input { accent-color: var(--amber); margin-top: 2px; }
.gate button {
  width: 100%;
  background: var(--amber);
  color: var(--ink);
  border: 0;
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: background .15s, box-shadow .15s;
}
.gate button:hover { background: var(--amber-hover); box-shadow: var(--glow-big); }
.gate .error { color: #b3261e; font-size: 13px; margin-top: 8px; }

/* ---- Footnote + notice bar ---- */

.footnote {
  text-align: center;
  font-size: 12px;
  color: rgba(74, 67, 96, .75);
  padding: 0 16px 12px;
}
.footnote a { color: var(--link); font-weight: 600; text-decoration: none; }
.footnote a:hover { text-decoration: underline; }

.notice[hidden] { display: none; }
.notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 32px);
  background: rgba(255, 252, 248, .97);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.notice a { color: var(--link); font-weight: 600; }
.notice .pill { flex-shrink: 0; }

@media (max-width: 640px) {
  .navlinks a { display: none; }
  .msg { max-width: 92%; }
  .notice { flex-direction: column; align-items: flex-start; }
}
