/* VAEL — story pages (Story, Archive, Garment, Manifesto) + the site menu.
   Loaded after store.css, which holds the colours and type. */

/* ---------------------------------------------------- site nav (all pages) */
.site-nav { display: flex; gap: 28px; justify-content: center; }
.site-nav a { color: var(--mute); text-decoration: none; transition: color 0.3s; }
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--silver); }
.bar-right { justify-self: end; display: flex; align-items: center; gap: 22px; }
.menu-btn { display: none; height: 36px; padding: 0 2px; }
.menu { position: fixed; inset: 0; z-index: 80; background: rgba(255, 255, 255, 0.98); display: grid; align-content: center; gap: 6px; padding: 90px var(--pad) 40px; }
.menu a { font-family: var(--serif); font-size: clamp(44px, 12vw, 72px); line-height: 1.05; text-decoration: none; color: var(--silver); }
.menu a small { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--faint); margin-left: 10px; vertical-align: middle; }
.menu-close { position: absolute; top: 18px; right: var(--pad); height: 36px; }
@media (max-width: 960px) {
  .site-nav { display: none; }
  .menu-btn { display: inline-block; }
  .bar { grid-template-columns: 1fr auto; }
}

/* ---------------------------------------------------- page scaffolding */
.page-head { position: relative; min-height: 86svh; display: grid; align-content: end; padding: 140px var(--pad) 9vh; overflow: hidden; }
.page-head .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.page-head .bg-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,5,5,0.35), rgba(5,5,5,0.2) 40%, var(--black)); }
.page-head > *:not(.bg):not(.bg-shade) { position: relative; z-index: 2; }
.page-kicker { color: var(--mute); }
.page-title { font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 11vw, 190px); line-height: 0.88; letter-spacing: -0.02em; margin: 18px 0 26px; }
.page-title em { font-style: italic; }
.page-lede { max-width: 52ch; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.6; color: var(--mute); }

.block { padding: clamp(80px, 14vh, 160px) var(--pad); border-top: 1px solid var(--line); }
.block-title { font-family: var(--serif); font-size: clamp(44px, 6vw, 96px); line-height: 0.95; letter-spacing: -0.01em; margin-bottom: 28px; }
.block-title em { font-style: italic; }
.prose { max-width: 60ch; font-size: 18px; line-height: 1.75; color: var(--mute); }
.prose p + p { margin-top: 1.1em; }
.prose strong { color: var(--silver); font-weight: 500; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 90px); align-items: center; }
.split.flip > :first-child { order: 2; }
.frame { position: relative; overflow: hidden; background: #000; }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; }
.frame figcaption { position: absolute; left: 14px; bottom: 12px; z-index: 2; color: var(--mute); }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(26px); transition: opacity 1.1s var(--ease), transform 1.3s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ---------------------------------------------------- STORY: the name */
.name-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-top: 40px; }
.name-grid div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px 24px 34px; display: grid; gap: 14px; }
.name-grid b { font-family: var(--serif); font-weight: 400; font-size: clamp(90px, 10vw, 170px); line-height: 0.8; }
.name-grid span { font-family: var(--serif); font-size: 30px; }
.name-grid p { color: var(--mute); font-size: 15px; line-height: 1.6; }

/* STORY: the three stages */
.stages { display: grid; gap: clamp(70px, 12vh, 140px); }
.stage-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 60px); align-items: center; }
.stage-no { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--faint); align-self: start; padding-top: 14px; }
.stage-name { font-family: var(--serif); font-size: clamp(56px, 7vw, 120px); line-height: 0.9; }
.stage-state { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 18px; color: var(--mute); }
.stage-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.stage-state.active i { background: #4ade80; }
.stage-row .frame { aspect-ratio: 4 / 3; }

.lineage { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 3vw, 40px); flex-wrap: wrap; font-family: var(--serif); font-size: clamp(36px, 5.5vw, 92px); }
.lineage span { color: var(--faint); }
.lineage b { font-weight: 400; }
.lineage b.now { color: var(--silver); font-style: italic; }
.lineage i { font-style: normal; font-family: var(--mono); font-size: 14px; color: var(--faint); }

/* ---------------------------------------------------- ARCHIVE: case files */
.files { display: grid; gap: 0; }
.file { display: grid; grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 60px); padding: clamp(60px, 10vh, 110px) var(--pad); border-top: 1px solid var(--line); align-items: center; }
.file-no { align-self: start; display: grid; gap: 8px; }
.file-no b { font-family: var(--mono); font-weight: 400; font-size: 13px; letter-spacing: 0.16em; color: var(--silver); }
.file-no span { color: var(--faint); }
.file h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 6vw, 100px); line-height: 0.92; }
.file .line { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.3; margin-top: 18px; color: var(--silver); }
.file .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.file .tags span { border: 1px solid var(--line); padding: 6px 10px; color: var(--mute); }
.file .frame { aspect-ratio: 4 / 3; }
.file .frame.tall { aspect-ratio: 9 / 13; max-height: 78vh; justify-self: center; width: min(100%, 420px); }
.file .frame.square { aspect-ratio: 1; }
/* files without footage: a redacted card */
.redacted { aspect-ratio: 4 / 3; border: 1px solid var(--line); display: grid; align-content: center; gap: 12px; padding: 8%; background: var(--coal); }
.redacted p { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.redacted i { display: block; height: 12px; background: var(--smoke); }
.redacted i:nth-child(2) { width: 82%; } .redacted i:nth-child(3) { width: 64%; } .redacted i:nth-child(4) { width: 90%; } .redacted i:nth-child(5) { width: 40%; }
.wave { height: 60px; display: flex; align-items: center; gap: 3px; }
.wave u { display: block; flex: 1; background: var(--faint); height: 10%; animation: wave 1.6s ease-in-out infinite; }
@keyframes wave { 0%, 100% { height: 8%; } 50% { height: 70%; } }

/* ---------------------------------------------------- GARMENT: product file */
.specs-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.specs-grid div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 22px 30px; display: grid; gap: 12px; align-content: start; }
.specs-grid dt { color: var(--faint); }
.specs-grid dd { font-family: var(--serif); font-size: 26px; line-height: 1.25; }
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.note-card { border: 1px solid var(--line); padding: 26px; display: grid; gap: 14px; align-content: start; }
.note-card .mono { color: var(--faint); }
.note-card h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; }
.note-card p { color: var(--mute); line-height: 1.6; }
.colors-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.color-card { border: 1px solid var(--line); padding: 26px; display: grid; gap: 10px; }
.color-card .chip { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); }
.color-card h3 { font-family: var(--serif); font-weight: 400; font-size: 34px; }
.color-card p { color: var(--mute); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }

/* ---------------------------------------------------- MANIFESTO */
.manifesto { min-height: 100svh; display: grid; align-content: center; justify-items: center; text-align: center; padding: 140px var(--pad) 90px; }
.manifesto .big { font-family: var(--serif); font-size: clamp(48px, 7vw, 120px); line-height: 1; letter-spacing: -0.015em; max-width: 14ch; }
.manifesto .big em { font-style: italic; }
.acrostic { display: grid; gap: 4px; margin: 9vh 0 0; }
.acrostic p { font-family: var(--serif); font-size: clamp(44px, 6vw, 96px); line-height: 1; color: var(--faint); }
.acrostic p b { font-weight: 400; color: var(--silver); }
.words { margin-top: 7vh; color: var(--mute); }
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.principles div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 34px 30px 38px; display: grid; gap: 14px; align-content: start; }
.principles .mono { color: var(--faint); }
.principles h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3vw, 44px); line-height: 1.05; }
.principles p { color: var(--mute); line-height: 1.65; max-width: 48ch; }

/* ---------------------------------------------------- next-page link + footer */
.next { display: grid; justify-items: center; text-align: center; gap: 14px; padding: clamp(90px, 16vh, 170px) var(--pad); border-top: 1px solid var(--line); text-decoration: none; }
.next .mono { color: var(--faint); }
.next b { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 9vw, 150px); line-height: 0.9; transition: color 0.3s; }
.next:hover b { color: var(--silver); font-style: italic; }
.site-foot { border-top: 1px solid var(--line); padding: 50px var(--pad) 34px; display: grid; gap: 22px; }
.site-foot .foot-links { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.site-foot a { color: var(--mute); text-decoration: none; }
.site-foot a:hover { color: var(--silver); }
.site-foot .foot-biz { color: var(--faint); text-transform: none; letter-spacing: 0.04em; line-height: 1.7; }

@media (max-width: 860px) {
  .split, .stage-row, .file { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  .name-grid, .specs-grid { grid-template-columns: 1fr 1fr; }
  .notes, .colors-row, .principles { grid-template-columns: 1fr; }
  .stage-no, .file-no { padding-top: 0; }
  .file-no { grid-auto-flow: column; justify-content: start; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .wave u { animation: none; height: 30%; }
}

/* ===================================================== frame (Project Cult) */
.frame-ui { position: fixed; inset: 0; z-index: 60; pointer-events: none; mix-blend-mode: difference; color: #fff; }
.frame-ui .c { position: absolute; width: 9px; height: 9px; border: 1px solid currentColor; }
.frame-ui .tl { left: 10px; top: 10px; } .frame-ui .tr { right: 10px; top: 10px; }
.frame-ui .bl { left: 10px; bottom: 10px; } .frame-ui .br { right: 10px; bottom: 10px; }
.frame-ui .fr-l, .frame-ui .fr-r { position: absolute; top: 50%; font-size: 9px; letter-spacing: 0.22em; opacity: 0.55; }
.frame-ui .fr-l { left: 14px; transform: translateY(-50%) rotate(-90deg); transform-origin: left center; translate: 6px 0; }
.frame-ui .fr-r { right: 14px; transform: translateY(-50%) rotate(90deg); transform-origin: right center; translate: -6px 0; }
@media (max-width: 860px) { .frame-ui .fr-l, .frame-ui .fr-r { display: none; } }

/* ===================================================== echo headlines (Santioni) */
.echo { position: relative; }
.echo-ghost { position: absolute; inset: 0; z-index: -1; color: transparent; -webkit-text-stroke: 1px rgba(220, 218, 212, 0.32); pointer-events: none; user-select: none; will-change: transform; transition: transform 0.25s linear; }
.echo-ghost em { color: transparent; }
.echo-ghost .echo-ghost { display: none; }

/* ===================================================== the archive terminal (Lisa) */
.term-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line); color: var(--silver); }
.term-btn i { font-style: normal; color: #4ade80; }
.term-btn:hover, .term-btn[aria-expanded='true'] { border-color: var(--silver); }
.menu-term { justify-self: start; margin-top: 18px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; border: 1px solid var(--line); padding: 14px 18px; color: var(--silver); }
@media (max-width: 960px) { .term-btn { display: none; } }
.term { position: fixed; right: 18px; bottom: 18px; z-index: 110; width: min(400px, calc(100vw - 36px)); height: min(560px, calc(100svh - 110px)); display: grid; grid-template-rows: auto 1fr auto auto; background: #fff; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18); animation: term-in 0.5s var(--ease); }
@keyframes term-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.term-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--mute); }
.term-x { width: 28px; height: 28px; color: var(--silver); }
.term-log { list-style: none; overflow-y: auto; padding: 16px; display: grid; align-content: start; gap: 12px; font-size: 14px; line-height: 1.55; }
.term-log li.arc { color: var(--silver); font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
.term-log li.arc::before { content: 'archive › '; color: #16a34a; }
.term-log li.you { justify-self: end; max-width: 85%; padding: 8px 12px; border: 1px solid var(--line); color: var(--mute); }
.term-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--line); }
.term-chips button { border: 1px solid var(--line); padding: 6px 9px; font-size: 9px; color: var(--mute); }
.term-chips button:hover { color: var(--silver); border-color: var(--faint); }
.term-form { display: grid; grid-template-columns: 1fr auto; border-top: 1px solid var(--line); }
.term-form input { background: transparent; border: 0; padding: 14px 16px; color: var(--silver); font-size: 11px; text-transform: none; letter-spacing: 0.04em; }
.term-form input:focus { outline: none; }
.term-form button { padding: 0 16px; color: var(--silver); border-left: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { .term { animation: none; } }

/* ===================================================== trace the mark (Zero) */
.trace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 90px); align-items: center; }
.trace-pad { position: relative; aspect-ratio: 16 / 10; border: 1px solid var(--line); background: radial-gradient(120% 120% at 30% 20%, #1c1b19, #0a0a0a 70%); overflow: hidden; touch-action: none; }
.trace-pad::before { content: ''; position: absolute; inset: 14px; border: 1px dashed rgba(220, 218, 212, 0.14); pointer-events: none; }
.trace-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.trace-hud { position: absolute; left: 22px; bottom: 18px; color: var(--faint); pointer-events: none; }
.trace-clear { position: absolute; right: 18px; bottom: 14px; color: var(--mute); height: 30px; }
.trace-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--serif); font-style: italic; font-size: clamp(26px, 3vw, 44px); color: var(--silver); opacity: 0; transition: opacity 1.2s var(--ease); pointer-events: none; text-align: center; text-shadow: 0 0 30px #000; }
.trace-msg.on { opacity: 1; }
@media (max-width: 860px) { .trace { grid-template-columns: 1fr; } }

/* ===================================================== light theme for the story pages */
.page-head { min-height: auto; padding-top: 150px; }
.page-head .bg, .page-head .bg-shade { display: none; }
.trace-msg { text-shadow: none; color: #f1efe8; }
.trace-hud, .trace-clear { color: rgba(241, 239, 232, 0.55); }
.stage-state.active i { background: #16a34a; }
.bar { background: rgba(255, 255, 255, 0.96); }
.bar .word { font-weight: 900; font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -0.045em; }
.bar .bar-shop { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--silver); color: #fff; }
