@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,600&display=swap');

/* ===== Instrument panel system =====
   Direction: the site reads as an instrument panel, not a storefront. The
   wine/rose accent is an ARMED/ACTIVE status color — it only appears where
   something is live, never as decoration. DM Mono renders real stage and
   status readouts; Playfair Display is spent sparingly, on the handful of
   moments that earn editorial weight. See .impeccable/surfaces/index-html.md
   for the full direction contract this build is held to. */

:root {
  --ink: #0a090b;
  --panel: #131116;
  --panel-raised: #19161b;
  --armed: #8c2f42;
  --armed-bright: #c9657c;
  --armed-deep: #5c1f2c;
  --paper: #eee9e6;
  --muted: #8f858a;
  --muted-dim: #625a5e;
  --line: rgba(238, 233, 230, 0.12);
  --line-strong: rgba(238, 233, 230, 0.22);
  --idle: #8f858a;
  --warn: #d7ac68;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--ink); color: var(--paper); font-family: Manrope, Arial, sans-serif; }
a { color: inherit; }
button { font: inherit; }
::selection { background: var(--armed); color: #fff; }

/* ---- Reusable instrument components ---- */

.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border: 1px solid var(--line-strong); border-radius: 999px; font: 11px "DM Mono", monospace; letter-spacing: .07em; text-transform: uppercase; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-armed { color: var(--armed-bright); border-color: rgba(201, 101, 124, .4); background: rgba(140, 47, 66, .12); }
.status-armed .status-dot { box-shadow: 0 0 4px 1px var(--armed); }
.status-idle { color: var(--idle); }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-name { font: 11px "DM Mono", monospace; letter-spacing: .05em; text-transform: uppercase; color: var(--paper); }

/* ---- Header ---- */

.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 32px; max-width: var(--max); min-height: 112px; margin: 0 auto; padding: 0 30px; background: color-mix(in srgb, var(--ink) 92%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--paper); font-size: 18px; font-weight: 800; letter-spacing: -0.06em; text-decoration: none; }
.wordmark-logo { display: block; height: 92px; width: auto; }
.wordmark-led { width: 6px; height: 6px; border-radius: 50%; background: var(--armed); }
.site-nav { display: flex; gap: 25px; margin-left: auto; }
.site-nav a, .text-link { color: var(--muted); font: 11px "DM Mono", monospace; letter-spacing: 0.06em; text-decoration: none; text-transform: uppercase; transition: color 160ms ease; }
.site-nav a:hover, .text-link:hover { color: var(--paper); }
.text-link { color: var(--paper); padding: 9px 11px; border: 1px solid var(--line); border-radius: 2px; }
.menu-toggle { display: none; margin-left: auto; border: 0; background: none; color: var(--paper); cursor: pointer; font: 11px "DM Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---- Hero ---- */

.hero { position: relative; max-width: var(--max); min-height: 560px; margin: 0 auto; padding: 150px 30px 80px; background: var(--ink); border-bottom: 1px solid var(--line); }
.hero-copy-col { max-width: 640px; }
.hero h1 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-weight: 600; letter-spacing: -0.04em; font-size: clamp(50px, 5.6vw, 82px); line-height: 0.94; }
.hero-copy { max-width: 440px; margin: 26px 0 0; color: #c2babd; font-size: 14px; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; gap: 13px; min-height: 45px; padding: 0 16px; font: 11px "DM Mono", monospace; letter-spacing: 0.06em; text-decoration: none; text-transform: uppercase; border-radius: 2px; }
.button-primary { color: #fff; background: var(--armed); border: 1px solid var(--armed); transition: background 160ms ease, box-shadow 180ms ease, transform 160ms ease; }
.button-primary:hover, .button-primary:focus-visible { background: #77283a; box-shadow: 0 14px 28px rgba(140, 47, 66, .32); transform: translateY(-2px); outline: none; }
.button-quiet { color: var(--paper); border: 1px solid var(--line); }
.button-quiet span { color: var(--armed-bright); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 40px; margin: 62px 0 0; }
.hero-meta dt { color: var(--muted); font: 11px "DM Mono", monospace; letter-spacing: 0.1em; text-transform: uppercase; }
.hero-meta dd { margin: 5px 0 0; color: var(--paper); font-size: 12px; }

/* ---- Latest note ---- */

.latest-note { max-width: var(--max); margin: 0 auto; padding: 0 30px; border-bottom: 1px solid var(--line); }
.latest-note a { display: grid; grid-template-columns: 140px minmax(0, 1fr) 130px 20px; gap: 18px; align-items: center; min-height: 66px; color: var(--muted); text-decoration: none; transition: color 160ms ease; }
.latest-note span, .latest-note time { font: 11px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.latest-note strong { color: var(--paper); font-size: 12px; font-weight: 600; letter-spacing: -.02em; }
.latest-note i { color: var(--armed-bright); font-style: normal; }
.latest-note a:hover { color: var(--paper); }
.latest-note a:hover i { transform: translate(2px, 2px); }

/* ---- Section shell ---- */

.section { max-width: var(--max); margin: 0 auto; padding: 130px 30px; border-bottom: 1px solid var(--line); }
.section > h2 { margin: 0 0 50px; max-width: 640px; font-family: "Playfair Display", Georgia, serif; font-weight: 600; letter-spacing: -.045em; font-size: clamp(36px, 4.4vw, 58px); line-height: .98; }
.section-lede { max-width: 420px; margin: -34px 0 46px; color: var(--muted); font-size: 13px; line-height: 1.8; }

/* ---- Stage list (features / steps) ---- */

.stage-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.stage-list > li { display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.stage-list-num { font: 12px "DM Mono", monospace; letter-spacing: .04em; color: var(--muted-dim); }
.stage-list h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -.02em; }
.stage-list p { margin: 0; max-width: 520px; color: var(--muted); font-size: 12.5px; line-height: 1.75; }

/* ---- Modules ---- */

.mode-layout { position: relative; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--panel); overflow: hidden; isolation: isolate; }
.mode-layout::before { position: absolute; inset: -10% -20% auto -20%; height: 60%; z-index: 0; content: ""; background: radial-gradient(circle, rgba(140, 47, 66, .14), transparent 62%); filter: blur(24px); opacity: .3; animation: module-glow-breathe 6s ease-in-out infinite; pointer-events: none; }
.mode-controls { position: relative; z-index: 1; display: flex; flex-direction: column; }
.mode-controls button { display: flex; align-items: center; gap: 15px; min-height: 92px; padding: 0 24px; border: 0; border-bottom: 1px solid var(--line); border-right: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; text-align: left; font-family: "Playfair Display", Georgia, serif; font-size: 24px; letter-spacing: -.04em; transition: color 220ms ease, background 220ms ease, border-color 220ms ease; }
.mode-controls button:last-child { border-bottom: 0; }
.mode-controls button[aria-selected="true"] { color: var(--paper); background: rgba(238, 233, 230, .03); border-right-color: var(--armed); }
.mode-icon { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; }
.mode-icon img { width: 32px; height: 32px; image-rendering: pixelated; object-fit: contain; opacity: .55; }
.mode-controls button[aria-selected="true"] .mode-icon img { opacity: 1; filter: drop-shadow(0 0 7px rgba(213, 71, 112, .32)); }
.mode-panel { position: relative; z-index: 1; min-height: 280px; padding: 30px 32px; border-left: 1px solid var(--line); overflow: hidden; transition: height 360ms cubic-bezier(.22,.8,.24,1), opacity 320ms ease, transform 320ms cubic-bezier(.22,.8,.24,1); }
.mode-panel > p:not(.panel-head *) { max-width: 340px; margin: 16px 0 0; color: #c2b9bc; font-size: 13px; line-height: 1.7; }
.mode-panel.is-switching { opacity: 0; transform: translateY(9px); }
#mode-modules { display: grid; gap: 22px; margin-top: 24px; }
.module-group { display: grid; gap: 10px; }
.module-group h3 { margin: 0; color: var(--armed-bright); font: 11px "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.module-list { display: flex; flex-wrap: wrap; gap: 0; margin: 0; color: #b9afb2; font: 11px "DM Mono", monospace; letter-spacing: .04em; animation: module-list-settle 480ms cubic-bezier(.22,.8,.24,1) both; }
.module-list span { white-space: normal; }
.module-list span + span::before { margin: 0 10px; color: var(--muted-dim); content: "/"; }

@keyframes module-glow-breathe { 0%, 100% { opacity: .22; transform: scale(.96); } 50% { opacity: .42; transform: scale(1.04); } }
@keyframes module-list-settle { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Updates ---- */

.update-list { border-top: 1px solid var(--line-strong); }
.update-list article { display: grid; grid-template-columns: 110px 1fr; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.update-list time { color: var(--muted); font: 11px "DM Mono", monospace; }
.update-list p { margin: 0 0 6px; color: var(--armed-bright); font: 11px "DM Mono", monospace; letter-spacing: .1em; text-transform: uppercase; }
.update-list h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; letter-spacing: -.03em; }
.update-list span { color: var(--muted); font-size: 12px; }

/* ---- Pricing ---- */

.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.price-card { display: flex; flex-direction: column; min-height: 340px; padding: 24px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 4px; }
.price-card.featured { background: var(--panel-raised); border-color: rgba(201, 101, 124, .5); box-shadow: inset 0 1px 0 rgba(238, 233, 230, .05); }
.price-amount { display: block; margin: 22px 0 8px; color: var(--paper); font-family: "Playfair Display", Georgia, serif; font-size: 28px; font-weight: 600; letter-spacing: -.05em; }
.price-card ul { display: grid; gap: 10px; min-height: 110px; margin: 20px 0 22px; padding: 0; list-style: none; color: var(--muted); font-size: 12px; }
.price-card li::before { margin-right: 9px; color: var(--armed-bright); content: "—"; }
.price-card button { width: 100%; min-height: 46px; padding: 12px 15px; border: 1px solid var(--line); color: var(--paper); background: transparent; cursor: pointer; font-family: Manrope, Arial, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .01em; text-align: left; transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.price-card button:hover { border-color: rgba(201, 101, 124, .64); background: rgba(201, 101, 124, .08); box-shadow: 0 8px 16px rgba(140, 47, 66, .12); transform: translateY(-1px); }
.price-card button:focus-visible { border-color: var(--armed-bright); background: rgba(201, 101, 124, .08); box-shadow: 0 0 0 3px rgba(201, 101, 124, .14); outline: none; }
.price-card.featured button { border-color: var(--armed); background: var(--armed); color: #fff; }
.price-card.featured button:hover { border-color: #77283a; background: #77283a; box-shadow: 0 10px 22px rgba(140, 47, 66, .28); }
.purchase-status { min-height: 20px; margin: 16px 0 0; color: var(--armed-bright); font: 10px "DM Mono", monospace; }

/* ---- Footer ---- */

.site-footer { display: grid; grid-template-columns: 1fr 1.8fr auto; gap: 25px; align-items: end; max-width: var(--max); margin: 0 auto; padding: 55px 30px 34px; color: var(--muted); font-size: 12px; }
.site-footer .wordmark { align-self: start; }
.site-footer p { margin: 0; }
.site-footer div { display: flex; justify-content: flex-end; gap: 18px; }
.site-footer a:not(.wordmark) { color: inherit; text-decoration: none; }
.site-footer small { grid-column: 1 / -1; padding-top: 32px; border-top: 1px solid var(--line); color: #8f858a; font: 10px "DM Mono", monospace; }

/* ---- Focus / responsive / motion ---- */

:focus-visible { outline: 2px solid var(--armed-bright); outline-offset: 4px; }

@media (max-width: 900px) {
  .hero { min-height: auto; padding: 112px 24px 60px; }
}

@media (max-width: 820px) {
  .site-header { padding: 0 20px; }
  .site-nav { position: absolute; top: 75px; right: 0; left: 0; display: none; flex-direction: column; gap: 0; background: #100e10; border-bottom: 1px solid var(--line); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 17px 20px; border-bottom: 1px solid var(--line); }
  .menu-toggle { display: block; }
  .text-link { margin-left: 0; }
  .latest-note { padding: 0 20px; }
  .latest-note a { grid-template-columns: 1fr auto; gap: 4px 16px; min-height: 78px; }
  .latest-note span { grid-column: 1 / -1; }
  .latest-note time { display: none; }
  .section { padding: 84px 20px; }
  .stage-list > li { grid-template-columns: 1fr; gap: 6px; }
  .mode-layout { grid-template-columns: 1fr; }
  .mode-panel { border-top: 1px solid var(--line); border-left: 0; }
  .price-grid { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; gap: 18px; }
  .site-footer div { justify-content: flex-start; flex-wrap: wrap; }
  .site-footer small { padding-top: 24px; }
}

@media (max-width: 460px) {
  .text-link { display: none; }
  .mode-controls button { min-height: 78px; gap: 12px; padding: 0 18px; font-size: 22px; }
  .mode-icon { flex-basis: 30px; width: 30px; height: 30px; }
  .mode-icon img { width: 28px; height: 28px; }
  .mode-panel { padding: 26px 20px; }
  .update-list article { grid-template-columns: 1fr; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) { scroll-behavior: auto; }
  html:not(.force-motion) *, html:not(.force-motion) *::before, html:not(.force-motion) *::after { transition: none !important; animation: none !important; }
}

/* ---- Reveal / stagger / scroll-progress (behavior owned by app.js) ---- */

html.motion-ready [data-reveal] { opacity: 0; filter: blur(10px); transform: translateY(22px); transition: opacity 640ms ease, transform 640ms cubic-bezier(.22,.8,.24,1), filter 640ms ease; will-change: opacity, transform, filter; }
html.motion-ready [data-reveal].is-visible { opacity: 1; filter: blur(0); transform: translateY(0); will-change: auto; }

.scroll-progress { position: fixed; inset: 0 0 auto; z-index: 40; height: 2px; pointer-events: none; }
.scroll-progress span { display: block; width: 100%; height: 100%; background: var(--armed-bright); transform: scaleX(var(--scroll-progress, 0)); transform-origin: left; }
.site-nav a { position: relative; }
.site-nav a::after { position: absolute; right: 0; bottom: -8px; left: 0; height: 1px; content: ""; background: var(--armed-bright); transform: scaleX(0); transform-origin: left; transition: transform 180ms ease; }
.site-nav a[aria-current="location"]::after { transform: scaleX(1); }

html.motion-ready [data-stagger] > * { opacity: 0; transform: translateY(12px); }
html.motion-ready [data-reveal].is-visible [data-stagger] > * { opacity: 1; transform: translateY(0); animation: stagger-reveal 420ms cubic-bezier(.22,.8,.24,1) var(--stagger-delay, 0ms) backwards; }
@keyframes stagger-reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.button-primary { position: relative; overflow: hidden; }
.button-primary::after { position: absolute; inset: 0; content: ""; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.2), transparent 70%); transform: translateX(-120%); transition: transform 420ms ease; }
.button-primary:hover::after, .button-primary:focus-visible::after { transform: translateX(120%); }

@media (max-width: 820px) {
  html.motion-ready [data-reveal].is-visible [data-stagger] > * { animation-delay: 0ms; }
  .site-nav a::after { bottom: 8px; left: 20px; right: auto; width: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) .scroll-progress { display: none; }
  html:not(.force-motion).motion-ready [data-stagger] > * { opacity: 1; transform: none; }
  html:not(.force-motion) .mode-layout::before, html:not(.force-motion) .mode-controls button[aria-selected="true"] .mode-icon img, html:not(.force-motion) .wordmark-led, html:not(.force-motion) .status-armed .status-dot { animation: none; opacity: 1; transform: none; }
  html:not(.force-motion) .mode-panel { transform: none; }
  html:not(.force-motion) .button-primary:hover, html:not(.force-motion) .button-primary:focus-visible { box-shadow: none; transform: none; }
}
