/* ============================================================
   platform.css — shared styles for the /platform/* engine pages
   Inherits the site theme from flow.css (cream bg, EB Garamond
   headings, Figtree body, lavender accent). Only adds what the
   platform pages need on top.
   ============================================================ */

/* ---- nav: dropdown + secondary links ---- */
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.nav-link {
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  color: var(--ink-dim); text-decoration: none; letter-spacing: -0.01em;
  transition: color .18s ease; white-space: nowrap;
}
.nav-link:hover { color: var(--ink); }

.nav-dd { position: relative; }
.nav-dd-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  color: var(--ink-dim); background: none; border: 0; cursor: pointer;
  padding: 8px 2px; letter-spacing: -0.01em; transition: color .18s ease;
}
.nav-dd-btn:hover, .nav-dd[data-open="true"] .nav-dd-btn { color: var(--ink); }
.nav-dd-caret { width: 11px; height: 11px; transition: transform .2s ease; }
.nav-dd[data-open="true"] .nav-dd-caret { transform: rotate(180deg); }

.nav-dd-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(-6px);
  width: 320px; background: var(--paper); border: 1px solid var(--line-ink);
  border-radius: 16px; padding: 8px; box-shadow: 0 24px 60px -30px rgba(26,26,26,0.32), 0 2px 8px rgba(26,26,26,0.06);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
  z-index: 60;
}
.nav-dd[data-open="true"] .nav-dd-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-dd-menu::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }

.dd-item {
  display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 11px; text-decoration: none; transition: background .15s ease;
}
.dd-item:hover { background: var(--paper-2); }
.dd-item.is-soon { cursor: default; opacity: .7; }
.dd-item.is-soon:hover { background: transparent; }
.dd-soon { font-family: 'Inter Tight', var(--font-body); font-size: 8.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); background: var(--paper-2); padding: 2px 6px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.dd-item[aria-current="page"] { background: var(--accent-soft); }
.dd-item[aria-current="page"] .dd-txt b { color: var(--accent-ink); }
.dd-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.dd-ico svg { width: 18px; height: 18px; }
.dd-txt b { display: block; font-family: var(--font-body); font-weight: 600; font-size: 14.5px; color: var(--ink); letter-spacing: -0.01em; }
.dd-txt span { display: block; font-size: 12.5px; color: var(--ink-faint); margin-top: 1px; line-height: 1.35; }

/* ---- engine hero ---- */
.eng-hero { padding: clamp(120px, 15vw, 190px) 0 clamp(40px, 6vw, 72px); text-align: center; }
.eng-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 13px; letter-spacing: 0.02em;
  color: var(--accent-ink); margin-bottom: 20px;
}
.eng-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.eng-eyebrow .num { color: var(--ink-faint); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.eng-hero h1 {
  font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; color: var(--ink); max-width: 15ch; margin: 0 auto;
}
.eng-hero h1 em { font-style: italic; color: var(--accent-ink); }
.eng-hero .lead { margin: 26px auto 0; text-align: center; color: var(--ink-dim); font-size: clamp(1.05rem, 1.8vw, 1.2rem); max-width: 58ch; }

/* ---- content blocks: "how it works" / "what comes out" ---- */
.eng-block { padding: clamp(48px, 7vw, 92px) 0; border-top: 1px solid var(--line-ink); }
.eng-block:nth-of-type(even) { background: var(--paper); }
.eng-block-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 44px); }
.eng-kicker {
  font-family: var(--font-body); font-weight: 700; font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent-ink);
}
.eng-block h2 {
  font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.06; color: var(--ink); margin: 10px 0 0;
}
.eng-block p.eng-block-lead { color: var(--ink-dim); font-size: clamp(1rem, 1.6vw, 1.12rem); max-width: 60ch; margin: 16px 0 0; line-height: 1.6; }

/* placeholder drop-zone: says what real content will land here */
.ph {
  border: 1.5px dashed var(--line-strong); border-radius: 16px; min-height: 300px;
  display: grid; place-items: center; text-align: center; padding: 40px; gap: 12px;
  background: repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(124,92,191,0.035) 12px, rgba(124,92,191,0.035) 24px);
  color: var(--ink-faint);
}
.ph svg { width: 34px; height: 34px; color: var(--accent-ink); opacity: .8; }
.ph b { font-family: var(--font-body); font-weight: 600; font-size: 15px; color: var(--ink-dim); }
.ph span { font-size: 13px; max-width: 40ch; line-height: 1.5; }

/* ---- prev / next engine nav ---- */
.eng-move { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line-ink); }
.eng-move a {
  display: flex; flex-direction: column; gap: 4px; padding: 22px 24px;
  border: 1px solid var(--line-ink); border-radius: 16px; text-decoration: none; background: var(--paper);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.eng-move a:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(124,92,191,0.5); }
.eng-move .dir { font-family: var(--font-body); font-weight: 600; font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0.02em; }
.eng-move .to { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; color: var(--ink); }
.eng-move a.is-next { text-align: right; }
.eng-move a.is-empty { visibility: hidden; }

/* ---- closing CTA ---- */
/* dark rounded-ribbon CTA (matches the landing's #book section) */
.pl-foot { padding: clamp(60px, 8vw, 104px) 0; text-align: center; background: #161613; color: #ffffeb; border-radius: clamp(26px, 3.4vw, 40px); margin: clamp(8px, 1.2vw, 16px) clamp(10px, 1.5vw, 16px) clamp(18px, 2.5vw, 28px); overflow: hidden; }
.pl-foot .why-eyebrow { justify-content: center; margin-bottom: 14px; }
.pl-foot h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 4.6vw, 3.2rem); color: #ffffeb; letter-spacing: -0.02em; margin: 0 0 26px; }
.pl-foot h2 .tone { color: rgba(255, 255, 235, 0.42); }
.pl-foot h2 .swing { font-style: italic; color: #ffffeb; }
.pl-foot h2 .fs { color: var(--accent-warm-bright, #ff5820); }
.pl-foot .btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pl-foot .btn-primary { border-color: var(--lav); }
.pl-foot .btn-ghost { border-color: rgba(255, 255, 235, 0.4); color: #ffffeb; }
.pl-foot .btn-ghost:hover { background: rgba(255, 255, 235, 0.08); border-color: rgba(255, 255, 235, 0.75); }

/* ---- proof: step flow (how it works) ---- */
.flow { display: grid; gap: 14px; }
.flow-step { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; padding: 22px 24px; border: 1px solid var(--line-ink); border-radius: 16px; background: var(--paper); }
.eng-block:nth-of-type(even) .flow-step { background: var(--bg); }
.flow-num { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--font-body); font-weight: 700; font-size: 15px; }
.flow-step h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; color: var(--ink); margin: 3px 0 6px; }
.flow-step p { color: var(--ink-dim); font-size: 15px; line-height: 1.55; margin: 0; max-width: 62ch; }

/* source lanes + voice rules */
.src-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.src-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--line-ink); border-radius: 999px; font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--ink); background: var(--paper); }
.src-chip.is-on { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.src-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .6; }

.rules { display: grid; gap: 11px; margin-top: 14px; }
.rule { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; color: var(--ink-dim); font-size: 15px; line-height: 1.5; }
.rule svg { width: 18px; height: 18px; color: var(--accent-ink); margin-top: 1px; flex: none; }
.rule b { color: var(--ink); font-weight: 600; }

/* ---- proof: idea cards (what comes out) ---- */
.idea-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .idea-cards { grid-template-columns: 1fr; } }
.idea-card { border: 1px solid var(--line-ink); border-radius: 16px; background: var(--paper); padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.eng-block:nth-of-type(even) .idea-card { background: var(--bg); }
.ic-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ic-chip { font-family: var(--font-body); font-weight: 600; font-size: 11.5px; letter-spacing: .01em; padding: 4px 9px; border-radius: 999px; background: var(--paper-2); color: var(--ink-dim); }
.eng-block:nth-of-type(even) .ic-chip { background: var(--paper); }
.ic-chip.is-angle { background: var(--accent-soft); color: var(--accent-ink); }
.ic-title { font-family: var(--font-display); font-weight: 400; font-size: 1.22rem; line-height: 1.2; color: var(--ink); }
.ic-cap { color: var(--ink-dim); font-size: 14px; line-height: 1.55; margin: 0; }
.ic-plat { margin-top: auto; padding-top: 6px; font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--ink-faint); display: flex; align-items: center; gap: 7px; }
.ic-plat svg { width: 14px; height: 14px; }

/* ---- proof: anatomy of one idea (caption + why-it's-on-brand notes) ---- */
.anatomy { margin-top: clamp(30px, 4vw, 48px); border: 1px solid var(--line-ink); border-radius: 20px; background: var(--paper); overflow: hidden; }
.anatomy-head { padding: 24px 28px; }
.anatomy-head .ic-chips { margin-bottom: 12px; }
.anatomy-head h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--ink); margin: 0; line-height: 1.15; }
.anatomy-body { display: grid; grid-template-columns: 1.05fr .95fr; }
@media (max-width: 820px) { .anatomy-body { grid-template-columns: 1fr; } }
.anatomy-cap { padding: 26px 28px; border-top: 1px solid var(--line-ink); }
.anatomy-cap p { color: var(--ink); font-size: 15px; line-height: 1.62; margin: 0 0 13px; }
.anatomy-cap p:last-child { margin-bottom: 0; }
.anatomy-cap mark { background: var(--accent-soft); color: var(--accent-ink); padding: 1px 4px; border-radius: 4px; font-weight: 600; }
.anatomy-notes { padding: 26px 28px; background: var(--bg); border-top: 1px solid var(--line-ink); border-left: 1px solid var(--line-ink); display: grid; gap: 18px; align-content: start; }
@media (max-width: 820px) { .anatomy-notes { border-left: 0; } }
.note-lab { display: inline-block; font-family: var(--font-body); font-weight: 700; font-size: 11.5px; color: var(--accent-ink); letter-spacing: .01em; background: var(--accent-soft); padding: 3px 9px; border-radius: 6px; }
.note-txt { color: var(--ink-dim); font-size: 13.5px; line-height: 1.55; margin-top: 7px; }
.anatomy-foot { padding: 15px 28px; border-top: 1px solid var(--line-ink); font-size: 13px; color: var(--ink-faint); display: flex; align-items: center; gap: 8px; }
.anatomy-foot svg { width: 15px; height: 15px; color: var(--accent-ink); flex: none; }

/* ---- proof: the matcher (four inputs -> one idea) ---- */
.mtiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 820px) { .mtiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .mtiles { grid-template-columns: 1fr; } }
.mtile { border: 1px solid var(--line-ink); border-radius: 14px; background: var(--paper); padding: 16px 16px 18px; }
.eng-block:nth-of-type(even) .mtile { background: var(--bg); }
.mtile-lab { display: flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 700; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-ink); }
.mtile-lab svg { width: 15px; height: 15px; flex: none; }
.mtile-val { margin-top: 10px; color: var(--ink); font-size: 14px; line-height: 1.5; }
.matcher-join { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0 6px; }
.matcher-join svg { width: 28px; height: 28px; color: var(--accent-ink); }
.matcher-join span { font-family: var(--font-body); font-weight: 600; font-size: 12.5px; color: var(--ink-faint); letter-spacing: .02em; }
.result { max-width: 660px; margin: 0 auto; border: 1.5px solid var(--accent); border-radius: 16px; background: var(--accent-soft); padding: 20px 24px 22px; }
.result .ic-chips { margin-bottom: 12px; }
.result .ic-title { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; line-height: 1.18; color: var(--ink); }
.result .ic-cap { color: var(--ink-dim); font-size: 14px; line-height: 1.55; margin: 10px 0 0; }
.matcher-note { text-align: center; color: var(--ink-dim); font-size: 14.5px; max-width: 62ch; margin: 22px auto 0; line-height: 1.6; }
.matcher-note b { color: var(--ink); font-weight: 600; }

/* ---- proof: generation modes ---- */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 820px) { .modes { grid-template-columns: 1fr; } }
.mode { border: 1px solid var(--line-ink); border-radius: 16px; background: var(--paper); padding: 24px; display: flex; flex-direction: column; gap: 13px; }
.eng-block:nth-of-type(even) .mode { background: var(--bg); }
.mode-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.mode-ico svg { width: 22px; height: 22px; }
.mode h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; color: var(--ink); margin: 0; letter-spacing: -0.01em; }
.mode p { color: var(--ink-dim); font-size: 14.5px; line-height: 1.55; margin: 0; }
.mode-badge { margin-top: auto; align-self: flex-start; font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--accent-ink); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; }

/* ---- voice supporting strip ---- */
.voice-strip { margin-top: clamp(28px, 4vw, 44px); border: 1px solid var(--line-ink); border-radius: 16px; background: var(--paper); padding: 20px 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.eng-block:nth-of-type(even) .voice-strip { background: var(--bg); }
.voice-strip > svg { width: 24px; height: 24px; color: var(--accent-ink); flex: none; }
.voice-strip p { margin: 0; color: var(--ink-dim); font-size: 14.5px; line-height: 1.55; flex: 1; min-width: 240px; }
.voice-strip b { color: var(--ink); font-weight: 600; }
.voice-strip a { color: var(--accent-ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.voice-strip a:hover { text-decoration: underline; }

/* ---- work-in-progress flag (remove when the pages go live) ---- */
.shell-flag {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 200;
  background: var(--ink); color: var(--bg); font-family: var(--font-body); font-weight: 600;
  font-size: 12.5px; padding: 8px 16px; border-radius: 999px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.5);
}

@media (max-width: 860px) { .eng-move { grid-template-columns: 1fr; } .eng-move a.is-empty { display: none; } .eng-move a.is-next { text-align: left; } }
@media (max-width: 720px) {
  .nav-dd-menu { position: fixed; left: 12px; right: 12px; top: 72px; width: auto; transform: none; }
  .nav-dd[data-open="true"] .nav-dd-menu { transform: none; }
  .nav-link--pricing { display: none; }
}

/* Engine hero title: gray setup + dark-ink emphasis (match home two-tone) */
.eng-hero h1 { color: rgba(26, 26, 26, 0.4); }
.eng-hero h1 em { color: var(--ink); }

/* ===== Dark-stage hero (Idea + Design) ===== */
.eng-hero.hero-dark { position: relative; background: #161613; border-radius: clamp(26px,3vw,40px); margin: 92px 14px 0; overflow: hidden; padding: clamp(48px,6vw,80px) 0 clamp(52px,6vw,88px); text-align: center; }
.eng-hero.hero-dark .wrap { position: relative; }
.eng-hero.hero-dark .eng-eyebrow { justify-content:center; margin:0 0 18px; }
.eng-hero.hero-dark .eng-eyebrow::before { display:none; }
.eng-hero.hero-dark .eng-eyebrow .num { font-family: "Gloria Hallelujah", "Comic Sans MS", cursive; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--accent-warm-bright); display: inline-block; transform: rotate(-3deg); }
.eng-hero.hero-dark h1 { font-size: clamp(2.8rem,6.5vw,5rem); line-height:.98; letter-spacing:-0.045em; color: rgba(255,255,235,.42); margin:0 auto; max-width:none; }
.eng-hero.hero-dark h1 em { color: #fffef7; }
.eng-hero.hero-dark .lead { color: rgba(255,255,235,.66); margin:20px auto 0; max-width:52ch; text-align:center; }
.eng-hero.hero-dark .promise { color: rgba(255,255,235,.9); margin:18px auto 0; max-width:44ch; text-align:center; }
.eng-hero.hero-dark .cta { display:flex; gap:12px; justify-content:center; margin:28px 0 0; flex-wrap:wrap; }
.eng-hero.hero-dark .btn-primary { border-color: var(--lav); }
.eng-hero.hero-dark .btn-ghost { border-color: rgba(255,255,235,.4); color:#fffef7; }
