/* main-layout.css
   Extracted from site/deviant/index.html so every subpage can use the
   same hero-grid + positioning-section + pathways-grid shape as the
   landing. Palette + starfield + fixed site-header live in shared-
   theme.css / shared-header.css. */

:root {
  --header-h: 58px;
  --rust-deep: #6b2a1c;
}

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

/* ---------------- Starfield (tape animation — subpage parity w/ main) ---- */
.stars {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.star {
  position: absolute;
  top: var(--y, 50%);
  left: 0;
  background: #ffffff;
  border-radius: 50%;
  /* Shinier default: a wider, warmer glow so individual stars pop on the
     dark sky. Per-star opacity still comes from the generator. */
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.75), 0 0 10px rgba(255, 255, 255, 0.25);
  opacity: var(--star-opacity, 0.8);
  animation: tape var(--tape-duration, 120s) linear infinite;
  animation-delay: var(--tape-delay, 0s);
  will-change: transform;
}
@keyframes tape {
  0%   { transform: translate(-4vw, 0); }
  50%  { transform: translate(50vw, calc(var(--tape-rise, 0px) * -1)); }
  100% { transform: translate(104vw, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .star { animation: none; transform: translate(50vw, 0); opacity: 0.4; }
}

html, body {
  color: var(--ink);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}
html { scroll-padding-top: calc(var(--header-h) + 14px); }

.container {
  position: relative; z-index: 1;
  max-width: 1180px; margin: 0 auto;
  padding: 0 32px;
}

/* ---------------- Hero ---------------- */
.hero {
  min-height: calc(100vh - var(--header-h) - 24px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px 0 96px; position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center; width: 100%;
}
.hero-left .opening { max-width: none; }
.hero-left .opening p { font-size: clamp(17px, 2.295vw, 26.35px); margin-bottom: 0; }
.hero-left .response { margin-top: 32px; }
.hero-right { display: flex; flex-direction: column; gap: 30px; }

/* Inline SVG utilities used by hero-right visuals */
.traj { width: 100%; height: auto; display: block; overflow: visible; }
.traj .traj-default { stroke: var(--muted); stroke-width: 1.4; fill: none; opacity: .6; stroke-dasharray: 3 6; stroke-linecap: round; }
.traj .traj-dev { stroke: var(--acid); stroke-width: 2.4; fill: none; stroke-linecap: round; filter: drop-shadow(0 0 5px var(--acid-halo)); }
.traj .traj-node { fill: var(--acid); filter: drop-shadow(0 0 7px var(--acid-glow)); }
.traj .traj-branch { fill: var(--muted); }
.traj text { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.traj .traj-lbl-muted { fill: var(--muted); }
.traj .traj-lbl-acid { fill: var(--acid); }

.hero-cta { display: flex; flex-direction: column; gap: 12px; }
.btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; padding: 15px 18px; border-radius: 11px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: border-color .25s ease, color .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-primary { color: var(--sky-deep); background: var(--acid); font-weight: 600; box-shadow: 0 0 16px var(--acid-dim, rgba(198,255,0,0.16)); }
.btn-primary:hover { box-shadow: 0 0 28px var(--acid-halo); }
.btn-ghost { color: var(--ink); background: transparent; border: 1px solid rgba(184,194,212,0.22); }
.btn-ghost:hover { border-color: var(--acid); color: var(--ink-bright); }

/* ---------------- Section furniture ---------------- */
.label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 48px;
  display: flex; align-items: center; gap: 12px;
}
.label::before { content: ""; width: 22px; height: 1px; background: var(--muted); }

.opening { max-width: 920px; }
.opening p {
  font-family: 'Fraunces', serif; font-weight: 300;
  font-size: clamp(22px, 3.2vw, 36px); line-height: 1.42;
  letter-spacing: -0.012em; color: var(--ink); margin-bottom: 28px;
  font-variation-settings: "opsz" 96;
}
.opening p:last-child { margin-bottom: 0; }

.deviation {
  color: var(--acid); font-style: italic; font-weight: 500;
  text-shadow:
    0 0 4px var(--acid-glow),
    0 0 14px var(--acid-halo),
    0 0 32px var(--acid-dim, rgba(198,255,0,0.16));
}

.response {
  margin-top: 56px; max-width: 760px; position: relative; padding-left: 24px;
}
.response::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 2px; background: var(--acid);
  box-shadow: 0 0 6px var(--acid-glow), 0 0 14px var(--acid-halo);
}
.response p {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: clamp(18px, 1.9vw, 22px); line-height: 1.55;
  letter-spacing: -0.005em; color: var(--ink);
}
.response strong { color: var(--ink-bright); font-weight: 500; }

/* ---------------- Positioning blocks ---------------- */
.positioning {
  padding: 112px 0 96px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.pathways-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 56px;
}
.pos-statement { max-width: 980px; margin-top: 8px; }

.surfaces {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 44px 48px; margin-top: 80px;
}
.surface-name {
  font-family: 'Fraunces', serif; font-weight: 400; font-size: 22px;
  color: var(--ink-bright); margin-bottom: 8px; letter-spacing: -0.012em;
  font-variation-settings: "opsz" 72;
}
.surface-desc {
  font-family: 'Fraunces', serif; font-weight: 300; font-size: 15px;
  line-height: 1.6; color: var(--ink-soft); font-variation-settings: "opsz" 14;
}
.surface-link {
  display: block; text-decoration: none; color: inherit;
  transition: transform 140ms ease;
}
.surface-link:hover { transform: translateX(3px); }
.surface-link:hover .surface-name { color: var(--acid); }

.clean-note { margin-top: 80px; }
.clean-tags { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.clean-tags span {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--acid);
}
.clean-note p {
  margin-top: 24px; max-width: 720px;
  font-family: 'Fraunces', serif; font-weight: 300; font-size: 16px;
  line-height: 1.62; color: var(--ink-soft);
}

/* Proof metrics */
.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 28px; margin-top: 64px;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 36px 0;
}
.metric-n {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: clamp(30px, 4vw, 46px); line-height: 1;
  color: var(--acid);
  text-shadow: 0 0 6px var(--acid-glow), 0 0 18px var(--acid-halo);
  font-variation-settings: "opsz" 96;
}
.metric-l {
  margin-top: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}

/* Contrast grid */
.vs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 44px 48px; margin-top: 72px; }
.vs-col .vs-head {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.vs-col.is-acid .vs-head { color: var(--acid); }
.vs-col .vs-body {
  font-family: 'Fraunces', serif; font-weight: 300; font-size: 16px;
  line-height: 1.62; color: var(--ink-soft);
}
.vs-col .vs-body strong { color: var(--ink-bright); font-weight: 500; }

/* ---------------- Pathways grid ---------------- */
.pathways {
  padding: 112px 0 96px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.path {
  text-decoration: none; color: inherit; display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.path:hover { transform: translateY(-4px); }
.path-num {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.22em; color: var(--muted); margin-bottom: 18px;
}
.path-title {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: 26px; line-height: 1.25; letter-spacing: -0.012em;
  color: var(--ink-bright); margin-bottom: 14px;
  font-variation-settings: "opsz" 72;
}
.path-desc {
  font-family: 'Fraunces', serif; font-weight: 300; font-size: 15px;
  line-height: 1.6; color: var(--ink-soft); font-variation-settings: "opsz" 14;
}
.path-arrow {
  display: inline-block; margin-top: 18px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  transition: color 0.4s ease, gap 0.4s ease;
}
.path:hover .path-arrow { color: var(--acid); }
.path-arrow::after { content: " →"; display: inline-block; transition: transform 0.4s ease; }
.path:hover .path-arrow::after { transform: translateX(4px); }

/* ---------------- Footer ---------------- */
footer.site-footer {
  padding: 56px 0 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; flex-wrap: wrap;
}
.footer-mark {
  font-family: 'Fraunces', serif; font-weight: 400; font-size: 15px;
  color: var(--muted); max-width: 480px; line-height: 1.55;
}
.footer-mark strong { color: var(--ink); font-weight: 500; }
.footer-meta {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
  text-align: right;
}
.footer-meta div { margin-bottom: 6px; }
.footer-meta div:last-child { margin-bottom: 0; }
.footer-meta a { color: var(--ink-soft, var(--muted)); text-decoration: none; border-bottom: 1px dotted currentColor; transition: color .2s; }
.footer-meta a:hover { color: var(--acid); border-bottom-color: var(--acid); }

/* ---------------- Breakpoints ---------------- */
/* The floating sub-nav lives in the right gutter at >=901px. Below
   ~1200px the hero-right visual starts colliding with it, so hide
   hero-right there and let hero-left stretch full-width. The CTAs
   still live in the floating sub-nav (Launch app →). */
@media (max-width: 1200px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-right { display: none; }
}

@media (max-width: 880px) {
  .container { padding: 0 22px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-right { order: 2; max-width: 440px; }
  .opening p { font-size: clamp(20px, 5.4vw, 28px); }
  .hero { min-height: calc(100vh - var(--header-h)); padding: 40px 0 72px; }
  .response { margin-top: 56px; padding-left: 22px; }
  .response p { font-size: 17px; }
  .pathways { padding: 88px 0 72px; }
  .path-grid { grid-template-columns: 1fr; gap: 56px; }
  .pathways-label { margin-bottom: 40px; }
  footer.site-footer { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
  .positioning { padding: 88px 0 72px; }
  .surfaces { grid-template-columns: 1fr; gap: 44px; margin-top: 56px; }
  .clean-note { margin-top: 56px; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .vs-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .label { font-size: 9px; margin-bottom: 32px; }
  .label::before { width: 14px; }
  .opening p { font-size: 19px; line-height: 1.45; }
  .response p { font-size: 16px; }
  .path-title { font-size: 22px; }
}

/* Signal theme — font/weight overrides (same as main landing) */
[data-theme="signal"] .label,
[data-theme="signal"] .pathways-label,
[data-theme="signal"] .vs-head,
[data-theme="signal"] .metric-l,
[data-theme="signal"] .clean-tags span,
[data-theme="signal"] .kicker,
[data-theme="signal"] .footer-meta,
[data-theme="signal"] .btn { font-family: 'DM Mono', ui-monospace, monospace !important; letter-spacing: 0.12em; }

[data-theme="signal"] .label,
[data-theme="signal"] .pathways-label,
[data-theme="signal"] .vs-head,
[data-theme="signal"] .metric-l,
[data-theme="signal"] .clean-tags span,
[data-theme="signal"] .opening p { font-weight: 700 !important; }

[data-theme="signal"] .path-title,
[data-theme="signal"] .surface-name,
[data-theme="signal"] .metric-n,
[data-theme="signal"] .footer-mark strong { font-weight: 800 !important; }

[data-theme="signal"] .deviation,
[data-theme="signal"] .metric-n {
  text-shadow: 0 0 6px rgba(198,255,0,0.55), 0 0 18px rgba(198,255,0,0.35), 0 0 40px rgba(198,255,0,0.18) !important;
}
