:root {
  --bg: #f7f5ee;
  --ink: #151515;
  --muted: #5f5c55;
  --line: rgba(21, 21, 21, 0.12);
  --panel: rgba(255, 255, 255, 0.58);
  --accent: #0e6f5c;
  --accent-2: #9b4b34;
  --gold: #c89a32;
  --shadow: 0 24px 80px rgba(28, 28, 26, 0.12);
  --header-min: 74px; /* the header's own minimum height */
  --header-h: 74px;  /* measured total of bar + header, set by landing.js */
  --gutter: clamp(20px, 5vw, 56px);
  --sans: "Instrument Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; min-width: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(21, 21, 21, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(21, 21, 21, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: 88px 88px;
  font-family: var(--sans);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select { font: inherit; }

/* ---------- header ---------- */

.site-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
}

.site-header {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 40px);
  min-height: var(--header-min);
  padding: 10px var(--gutter);
  background: rgba(247, 245, 238, 0.82);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: border-color 200ms ease, background 200ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(247, 245, 238, 0.96);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-logo {
  width: clamp(112px, 12vw, 150px);
  height: 40px;
  object-fit: contain;
  object-position: left center;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 30px);
  margin-right: auto;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.desktop-nav a { padding: 6px 0; border-bottom: 1px solid transparent; }
.desktop-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.header-link:hover { background: var(--ink); color: var(--bg); transform: translateY(-1px); }

.auth-area { display: flex; align-items: center; min-height: 38px; }
.auth-signed-in { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.auth-avatar { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; }
.auth-name {
  color: var(--ink);
  max-width: 13ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-signout {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 12px;
  cursor: pointer;
  font-family: var(--sans);
  white-space: nowrap;
}
.auth-signout:hover { border-color: var(--ink); color: var(--ink); }

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
  transition: transform 200ms ease, opacity 200ms ease;
}

.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 10px var(--gutter) 26px;
  background: rgba(247, 245, 238, 0.99);
  border-bottom: 1px solid var(--line);
}

.mobile-menu a {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(22px, 5.5vw, 30px);
}

.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu.is-open { display: block; }

/* ---------- hero ---------- */

.hero {
  padding: calc(var(--header-h) + clamp(44px, 8vh, 92px)) var(--gutter) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding-bottom: clamp(48px, 7vh, 88px);
}

.hero-plain .hero-grid { grid-template-columns: minmax(0, 1fr); }
.hero-content { max-width: 820px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.eyebrow span { width: 30px; height: 1px; background: currentColor; flex: 0 0 auto; }

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 22px;
  font-family: var(--serif);
  font-size: clamp(38px, 5.6vw, 84px);
  font-weight: 400;
  line-height: 1.02;
  overflow-wrap: break-word;
}

.hero-copy {
  max-width: 62ch;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(16.5px, 1.35vw, 20px);
  line-height: 1.55;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  text-align: center;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--ink); color: var(--bg); }
.button.secondary { background: rgba(255, 255, 255, 0.4); color: var(--ink); }

.hero-visual {
  width: min(100%, 460px);
  margin-left: auto;
  aspect-ratio: 1;
}

.trend-radar {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(21, 21, 21, 0.16);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.radar-core, .radar-ring, .radar-panel { position: absolute; }

.radar-core {
  inset: 42%;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 16px rgba(14, 111, 92, 0.1);
}

.radar-ring { border: 1px solid rgba(21, 21, 21, 0.16); border-radius: 50%; }
.ring-one { inset: 22%; }
.ring-two { inset: 10%; }

.radar-panel {
  min-width: 118px;
  padding: 12px 14px;
  background: rgba(247, 245, 238, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.radar-panel span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
}

.radar-panel strong { font-family: var(--serif); font-size: 26px; font-weight: 400; }

.panel-one { left: -6%; top: 16%; }
.panel-two { right: -6%; top: 50%; }
.panel-three { left: 16%; bottom: 2%; }

.ticker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 calc(var(--gutter) * -1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.ticker div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 84px;
  padding: 18px clamp(18px, 3vw, 40px);
  background: rgba(247, 245, 238, 0.92);
}

.ticker strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 400;
}

.ticker span { color: var(--muted); font-size: 13px; line-height: 1.4; }

/* ---------- sections ---------- */

.section,
.generator-section,
.pricing {
  padding: clamp(64px, 9vw, 108px) var(--gutter);
}

.section-heading { max-width: 860px; margin-bottom: clamp(36px, 5vw, 60px); }
.free-start-banner { margin: 0 var(--gutter); padding: 16px 20px; border: 1px solid rgba(14,111,92,.25); border-radius: 14px; background: rgba(14,111,92,.08); color: var(--ink); font-size: 15px; line-height: 1.55; }
.free-start-banner strong { color: var(--accent, #0e6f5c); }

.landing-products { padding-top: 24px; }
.landing-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.landing-product-card { position: relative; display: block; padding: 14px; border: 1px solid rgba(21,21,21,.12); border-radius: 18px; background: rgba(255,255,255,.72); color: inherit; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.landing-product-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(21,21,21,.1); }
.landing-product-cover { min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; border-radius: 12px; background: linear-gradient(135deg, #151515, var(--accent, #0e6f5c)); color: #fff; }
.landing-product-cover span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .76; }
.landing-product-cover strong { max-width: 16ch; font-family: Georgia, serif; font-size: 23px; line-height: 1.05; }
.landing-product-card p { min-height: 48px; margin: 16px 2px 10px; color: #5f625d; font-size: 14px; line-height: 1.5; }
.landing-product-link { margin: 0 2px; color: var(--accent, #0e6f5c); font-size: 13px; font-weight: 700; }
.landing-product-badge { position: absolute; top: 24px; right: 24px; padding: 5px 8px; border-radius: 999px; background: #fff; color: var(--accent, #0e6f5c); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.section-lede { max-width: 62ch; margin: 16px 0 0; color: var(--muted); font-size: 17px; line-height: 1.6; }

h2 {
  max-width: 20ch;
  font-family: var(--serif);
  font-size: clamp(30px, 4.4vw, 62px);
  font-weight: 400;
  line-height: 1.04;
  overflow-wrap: break-word;
}

h3 { overflow-wrap: break-word; }

.feature-list article {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 240px);
  gap: clamp(18px, 4vw, 56px);
  align-items: center;
  padding: clamp(28px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}

.number, .steps span, .label, .price-box span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.feature-list h3,
.steps h3,
.result-block h3 {
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 400;
}

.feature-list p,
.steps p,
.generator-intro p,
.pricing p,
.price-box p,
.result-block p,
.result-grid,
.control-panel span {
  color: var(--muted);
  line-height: 1.65;
}

.line-art svg { width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- slider ---------- */

.slider-section { border-top: 1px solid var(--line); }

.slider {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
}

.slider-track { position: relative; width: 100%; aspect-ratio: 16 / 8; }

.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 500ms ease;
}

.slide.is-active { opacity: 1; visibility: visible; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(18px, 3vw, 36px);
  color: #f7f5ee;
  background: linear-gradient(to top, rgba(12, 12, 12, 0.88), rgba(12, 12, 12, 0.1));
}

.slide-caption h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 400;
}

.slide-caption p { max-width: 60ch; margin-bottom: 14px; color: rgba(247, 245, 238, 0.86); line-height: 1.5; }
.slide-caption .button { border-color: #f7f5ee; background: #f7f5ee; color: #151515; min-height: 44px; }

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
  background: rgba(247, 245, 238, 0.9);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.slider-arrow:hover { background: var(--bg); }
.slider-arrow.prev { left: 14px; }
.slider-arrow.next { right: 14px; }

.slider-dots { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }

.slider-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.slider-dots button.is-active { background: var(--ink); }

/* ---------- generator ---------- */

.generator-section { background: #151515; color: #f7f5ee; }
.generator-intro { max-width: 840px; margin-bottom: clamp(32px, 5vw, 52px); }
.generator-intro h2 { color: #f7f5ee; }

.generator-section .eyebrow,
.generator-section p,
.output-panel .label { color: rgba(247, 245, 238, 0.68); }

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 1px;
  background: rgba(247, 245, 238, 0.18);
  border: 1px solid rgba(247, 245, 238, 0.18);
}

.control-panel, .output-panel { background: #191919; }

.output-panel.is-locked .result-grid,
.output-panel.is-locked .evidence-block,
.output-panel.is-locked .chapters-block { opacity: 0.35; pointer-events: none; }

.output-panel.is-locked [data-title] { color: var(--gold); }

.control-panel { display: grid; gap: 18px; padding: clamp(20px, 3vw, 28px); align-content: start; }
.control-panel label { display: grid; gap: 8px; }

.control-panel input,
.control-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: #f7f5ee;
  background: #101010;
  border: 1px solid rgba(247, 245, 238, 0.2);
  border-radius: 0;
}

.control-panel input:focus,
.control-panel select:focus { outline: 2px solid rgba(200, 154, 50, 0.55); outline-offset: 2px; }

.output-panel { min-width: 0; padding: clamp(20px, 3vw, 28px); }

.score-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 26px;
  background: rgba(247, 245, 238, 0.14);
}

.score-strip div { padding: 16px; background: #101010; }

.score-strip span {
  display: block;
  margin-bottom: 8px;
  color: rgba(247, 245, 238, 0.62);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.score-strip strong { font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); font-weight: 400; }

.score-note { margin: -12px 0 22px; font-size: 12.5px; line-height: 1.5; color: rgba(247, 245, 238, 0.55); }

.evidence-block, .chapters-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(247, 245, 238, 0.16);
}

.evidence-block ul { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.evidence-block li { font-size: 12.5px; line-height: 1.5; color: rgba(247, 245, 238, 0.78); }
.chapters-block .score-note { margin: 10px 0 0; }

.result-block { padding-bottom: 24px; border-bottom: 1px solid rgba(247, 245, 238, 0.16); }
.result-block h3 { color: #f7f5ee; }

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 34px);
  padding-top: 26px;
}

.result-grid ol, .result-grid ul { display: grid; gap: 10px; margin: 0; padding-left: 20px; }

/* ---------- steps + pricing ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.steps article { min-height: 220px; padding: clamp(20px, 2.6vw, 28px); background: rgba(247, 245, 238, 0.92); }
.steps span { display: block; margin-bottom: 12px; }

.pricing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  gap: clamp(28px, 6vw, 88px);
  align-items: center;
  border-top: 1px solid var(--line);
}

.pricing-copy p { max-width: 58ch; }

.price-box {
  padding: clamp(24px, 3vw, 34px);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.price-box strong {
  display: block;
  margin: 12px 0 14px;
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 400;
}

.price-box .button { margin-top: 8px; }

/* ---------- footer ---------- */

.footer {
  display: grid;
  gap: 24px;
  padding: clamp(36px, 5vw, 56px) var(--gutter);
  border-top: 1px solid var(--line);
}

.footer-main strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
}

.footer-main p { max-width: 46ch; margin: 0 0 18px; color: var(--muted); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 14px;
  color: var(--muted);
}

.footer-links a:hover { color: var(--ink); text-decoration: underline; }

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(14px); }
}

@media (prefers-reduced-motion: reduce) {
  .trend-radar { animation: none; }
  html { scroll-behavior: auto; }
  .slide { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .desktop-nav { gap: 16px; font-size: 13.5px; }
  .radar-panel { min-width: 104px; padding: 10px 12px; }
  .radar-panel strong { font-size: 22px; }
}

@media (max-width: 1040px) {
  .desktop-nav, .header-link { display: none; }
  .menu-button { display: block; }
  .header-actions { margin-left: auto; }

  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { width: min(100%, 420px); margin: 12px auto 0; }
  .hero-content { max-width: none; }

  .feature-list article { grid-template-columns: 48px minmax(0, 1fr); }
  .landing-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .line-art { display: none; }

  .workspace, .pricing { grid-template-columns: minmax(0, 1fr); }
  .ticker, .steps, .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  :root { --header-min: 62px; }
  .site-logo { height: 34px; }
  .hero-visual { width: min(100%, 320px); }
  .radar-panel { min-width: 92px; padding: 9px 10px; }
  .radar-panel strong { font-size: 19px; }
  .panel-one { left: -4%; }
  .panel-two { right: -4%; }

  .hero-actions, .button-row, .score-strip, .steps, .result-grid, .ticker { grid-template-columns: minmax(0, 1fr); }
  .hero-actions, .button-row { display: grid; }
  .button, .button-row .button { width: 100%; }

  .slider-track { aspect-ratio: 4 / 3; }
  .slider-arrow { width: 38px; height: 38px; font-size: 22px; }
  .slide-caption { position: static; background: #151515; }
  .slide-caption .button { width: auto; }

  .feature-list article { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .landing-product-grid { grid-template-columns: 1fr; }
  .footer-meta { flex-direction: column; }
}

/* Announcement bar (admin: Pages & slider -> Branding) */
.announce { padding: 9px var(--gutter); text-align: center; font-size: 14px; }
.announce p { margin: 0; }
.announce a { text-decoration: underline; font-weight: 600; }

.footer-social { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 16px; font-size: 14px; color: var(--muted); }
.footer-social a:hover { color: var(--ink); text-decoration: underline; }
