/* Odysxi — quiet luxury/refined minimal. One accent: none (ink only).
   Dark default; [data-theme="light"] swaps tokens. Instant swap, no transition. */

@font-face {
  font-family: 'Newsreader';
  src: url('vendor/newsreader-roman.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('vendor/newsreader-italic.woff2') format('woff2');
  font-weight: 100 900; font-style: italic; font-display: swap;
}

:root {
  --bg: #0c0a09;
  --panel: #161413;
  --raised: #262322;
  --raised-hover: #2e2b29;
  --ink: #f2efec;
  --muted: #a8a29b;
  --line: rgba(242, 239, 236, .10);
  --line-soft: rgba(242, 239, 236, .07);
  --shadow: 0 4px 4px rgba(0, 0, 0, .04), 0 0 1px rgba(0, 0, 0, .5);
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease-hov: cubic-bezier(.215, .61, .355, 1);
  --ease-med: cubic-bezier(.19, 1, .22, 1);
}
[data-theme="light"] {
  --bg: #f4f2ef;
  --panel: #ffffff;
  --raised: #e9e6e1;
  --raised-hover: #dfdcd6;
  --ink: #161413;
  --muted: #6b6660;
  --line: rgba(22, 20, 19, .12);
  --line-soft: rgba(22, 20, 19, .08);
  --shadow: 0 4px 4px rgba(0, 0, 0, .03), 0 0 1px rgba(0, 0, 0, .25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--ink); color: var(--bg); }
img { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; appearance: none; -webkit-appearance: none; cursor: pointer; }

.mono {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
}

/* ---------- XI house mark: near-black dither → flips on light ---------- */
.xi-mark { width: 34px; height: auto; aspect-ratio: 199 / 147; }
[data-theme="light"] .xi-mark { filter: invert(1); }

/* ---------- label-roll: the ONE hover grammar ---------- */
[data-roll] { display: inline-block; }
[data-roll] .roll-w { position: relative; display: inline-block; overflow: clip; vertical-align: top; }
[data-roll] .roll-t { display: inline-block; transition: transform .45s var(--ease-hov); }
[data-roll] .roll-t.dup { position: absolute; left: 0; top: 100%; }
[data-roll]:hover .roll-t, [data-roll]:focus-visible .roll-t { transform: translate3d(0, -100%, 0); }
a:focus-visible, button:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; border-radius: 1px; }

/* ---------- header ---------- */
.hd {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 20px clamp(20px, 3.5vw, 40px);
}
.hd-brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.hd-word { font-family: var(--serif); font-size: 19px; letter-spacing: .01em; }
.hd-nav { display: flex; gap: 26px; justify-self: center; }
.hd-nav a { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .55; transition: opacity .3s var(--ease-hov); }
.hd-nav a:hover, .hd-nav a:focus-visible { opacity: 1; }
.theme-btn {
  justify-self: end; display: grid; place-items: center;
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 999px;
  opacity: .6; transition: opacity .3s var(--ease-hov), border-color .3s var(--ease-hov);
}
.theme-btn:hover { opacity: 1; border-color: var(--ink); }
[data-theme="dark"] .ic-moon { display: none; }
[data-theme="light"] .ic-sun { display: none; }

/* ---------- hero: exactly one viewport ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; position: relative;
  padding: 0 clamp(20px, 4vw, 48px);
}
.kick { color: var(--muted); opacity: .6; margin-bottom: 26px; }
.hero-h {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 6.8vw, 100px);
  line-height: 1.06; letter-spacing: -.032em;
  max-width: 16em; text-wrap: balance;
}
.hero-h em { font-style: italic; letter-spacing: -.02em; }
.hero-sub {
  margin-top: 26px; font-size: 16px; line-height: 1.65; color: var(--muted);
  max-width: 46ch; text-wrap: pretty;
}
.meta-row { margin-top: 34px; color: var(--muted); opacity: .55; }
.hero-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--muted); opacity: .5;
}
.hint-line { width: 1px; height: 34px; background: linear-gradient(var(--ink), transparent); }

/* ---------- sections ---------- */
.sec { padding: 130px clamp(20px, 4vw, 48px) 40px; max-width: 1320px; margin: 0 auto; }
.sec-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: 44px;
}
.sec-label { color: var(--muted); }
.sec-note { color: var(--muted); opacity: .55; text-align: right; }
.noscript-note { color: var(--muted); padding: 30px 0; }

/* ---------- template grid: crossing hairlines (Polestar synthesis) ---------- */
.tpl-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--line);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  width: 100vw; margin-left: calc(50% - 50vw);
}
.tpl {
  background: var(--bg); display: flex; flex-direction: column;
  padding: clamp(26px, 3.2vw, 46px) clamp(20px, 3.6vw, 52px) clamp(22px, 2.8vw, 38px);
}
.tpl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; }
.tpl-name { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.5vw, 34px); letter-spacing: -.02em; line-height: 1.1; }
.tpl-name em { font-style: italic; }
.tpl-link { color: var(--muted); opacity: .65; transition: opacity .3s var(--ease-hov); white-space: nowrap; }
.tpl-link:hover, .tpl-link:focus-visible, .tpl-soon:hover .tpl-link { opacity: 1; }
.tpl-media { display: block; margin-top: clamp(20px, 2.6vw, 34px); }
.tpl-media img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center;
  border: 1px solid var(--line-soft);
  transition: transform .6s var(--ease-med);
}
.tpl:hover .tpl-media img, .tpl:focus-within .tpl-media img { transform: translateY(-4px); }
.tpl-meta {
  margin-top: 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  color: var(--muted); opacity: .8;
}
.tpl-deal { white-space: nowrap; }
.tpl-price { margin-right: 16px; color: var(--ink); opacity: .75; }

/* filler cell — the next bench slot */
.tpl-soon { justify-content: center; align-items: flex-start; gap: 16px; }
.soon-k { color: var(--muted); opacity: .6; }
.soon-p { color: var(--muted); max-width: 32ch; text-wrap: pretty; }

/* pills — declared radius exception (Details synthesis) */
.pill {
  display: inline-flex; align-items: center; border-radius: 999px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: 10px 18px; background: var(--raised);
  transition: background .3s var(--ease-hov);
}
.pill:hover { background: var(--raised-hover); }
.pill-solid { background: var(--ink); color: var(--bg); }
.pill-solid:hover { background: var(--ink); }

/* ---------- bundle ---------- */
.bundle { border-top: 1px solid var(--line); padding: 70px 0 90px; max-width: 760px; }
.bundle-h { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.6vw, 62px); letter-spacing: -.028em; line-height: 1.08; }
.bundle-h em { font-style: italic; }
.bundle-note { margin-top: 18px; color: var(--muted); max-width: 44ch; text-wrap: pretty; }
.bundle-list { margin-top: 30px; list-style: none; color: var(--muted); opacity: .75; display: grid; gap: 8px; }
.bundle-row { margin-top: 40px; display: flex; align-items: center; gap: 26px; }
.bundle-price { font-size: 14px; }

/* ---------- footer: wireframe workshop panel (Polestar synthesis) ---------- */
.ft { border-top: 1px solid var(--line); }
.ft-panel {
  position: relative; overflow: hidden;
  background: var(--panel); border-bottom: 1px solid var(--line);
  min-height: clamp(420px, 36vw, 500px);
  display: flex; align-items: center;
}
.ft-copy { position: relative; z-index: 2; padding: clamp(44px, 6vw, 90px) clamp(20px, 4vw, 48px); max-width: 500px; }
.ft-k { color: var(--muted); opacity: .6; margin-bottom: 20px; }
.ft-h { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.8vw, 54px); letter-spacing: -.026em; line-height: 1.1; }
.ft-h em { font-style: italic; }
.ft-p { margin-top: 18px; color: var(--muted); max-width: 42ch; text-wrap: pretty; }
.ft-copy .pill { margin-top: 30px; }
.ft-scene {
  position: absolute; right: 0; bottom: 0;
  width: min(66%, 980px); height: auto;
  color: var(--ink); opacity: .4;
}
.ft-scene text {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  fill: currentColor; stroke: none;
}
[data-theme="light"] .ft-sun { filter: invert(1); }
.ft-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 26px clamp(20px, 4vw, 48px) 30px;
  color: var(--muted);
}
.ft-link { text-transform: uppercase; }

/* ---------- scroll reveal (IO-driven, CSS-animated) ---------- */
.rev { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-hov), transform .8s var(--ease-hov); }
.rev.in { opacity: 1; transform: none; }

/* ---------- aperture veil (created by JS only — fail-open without it) ---------- */
.veil { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.veil-h { position: absolute; left: 0; width: 100%; height: 50.5%; background: var(--bg); }
.veil-h.top { top: 0; } .veil-h.bot { bottom: 0; }
.veil-line { position: absolute; top: calc(50% + 54px); left: 10%; right: 10%; height: 1px; background: var(--ink); opacity: .5; transform: scaleX(0); transform-origin: left center; }
.veil-line.l2 { top: calc(50% + 66px); transform-origin: right center; }
.veil-mark { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; }
.veil-mark img { position: absolute; inset: 0; width: 64px; height: auto; }
.veil-eye-open { opacity: 0; }
[data-theme="dark"] .veil-mark { filter: invert(1); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .hd-nav { display: none; }
  .sec { padding-top: 100px; }
  .sec-head { flex-direction: column; gap: 8px; }
  .sec-note { text-align: left; }
  .tpl-grid { grid-template-columns: 1fr; }
  .ft-panel { flex-direction: column; align-items: stretch; min-height: 0; }
  .ft-copy { max-width: none; }
  .ft-scene { position: static; width: 100%; margin-top: 10px; }
  .ft-bar { flex-direction: column; }
}

/* ---------- reduced motion: the still page is complete ---------- */
@media (prefers-reduced-motion: reduce) {
  .rev { opacity: 1; transform: none; transition: none; }
  .tpl-media img, [data-roll] .roll-t { transition: none; }
  .tpl:hover .tpl-media img { transform: none; }
  .hero-hint { display: none; }
}
