/* Enzale — static site. Norrsken-style hairline grid + Dream Recorder / Essential / Stripe Press touches. */
:root {
  --black: #000;
  --white: #fff;
  --grey: #8e8e8e;
  --soft: #c9c9c9;
  --line: rgba(255, 255, 255, 0.16);
  --bone: #efede6;
  --mint: #e6eee3;
  --mint-card: #d6e2d0;
  --forest: #16301f;
  --signal: #e9e36c;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --sans: "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --dot: "Doto", var(--mono);
  --pad: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-optical-sizing: auto;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
body.is-ready { opacity: 1; transform: none; }
body.is-leaving { opacity: 0; transform: translateY(-12px); transition-duration: 0.35s; }
a { color: inherit; text-decoration: none; }
img, video, svg { display: block; max-width: 100%; }
::selection { background: var(--white); color: var(--black); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

/* ---------- type ---------- */
.grey { color: var(--grey); }
.soft { color: var(--soft); }
.mono { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.3; color: var(--grey); }
.t-sm { font-size: 14px; line-height: 1.4; }
.t-md { font-size: 15px; line-height: 1.45; }
.t-lg { font-size: 18px; line-height: 1.35; }
.t-xl { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.12; letter-spacing: -0.02em; }
.t-2xl { font-size: clamp(28px, 3vw, 40px); line-height: 1.1; letter-spacing: -0.02em; }
.t-3xl { font-size: clamp(36px, 4.6vw, 64px); line-height: 1; letter-spacing: -0.035em; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.dot { font-family: var(--dot); font-weight: 800; letter-spacing: -0.02em; line-height: 0.95; }
.strong { font-weight: 600; }
.balance { text-wrap: balance; }
.pretty { text-wrap: pretty; }
.ulink { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; transition: color 0.2s; }
.ulink:hover { color: var(--grey); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px var(--pad); pointer-events: none;
}
.nav > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; mix-blend-mode: difference; }
.brand svg { width: 34px; height: 34px; transition: transform 0.5s var(--ease); }
.brand:hover svg { transform: rotate(-12deg) translateY(-2px); }
.brand img { width: 72px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 26px; padding: 10px 14px; background: var(--black); font-size: 13px; font-weight: 500; }
.nav-links a { transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--grey); }
.nav-links .cta { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- floating pill ---------- */
.pill-float {
  position: fixed; left: 50%; bottom: 20px; z-index: 50;
  transform: translate(-50%, 60px); opacity: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px;
  background: rgba(28, 28, 28, 0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px; font-weight: 500; color: #b0b0b0;
  transition: transform 0.9s var(--ease) 1.4s, opacity 0.9s var(--ease) 1.4s, background 0.3s, color 0.3s;
}
.is-ready .pill-float { transform: translate(-50%, 0); opacity: 1; }
.pill-float:hover { background: var(--white); color: var(--black); }
.pill-float i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); animation: pulse 0.9s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: 0.2; } }

/* ---------- sheet + grid ---------- */
.sheet { display: flex; flex-direction: column; gap: 1px; background: var(--line); }
.grid {
  display: grid; gap: 1px; background: var(--line);
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  grid-auto-rows: var(--row, auto);
  position: relative;
}
.cell {
  background: var(--black); padding: var(--pad);
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  position: relative; overflow: hidden; min-height: var(--min, 0);
}
.cell.start { justify-content: flex-start; }
.cell.end { justify-content: flex-end; }
.cell.center { justify-content: center; align-items: center; }
.cell.right { align-items: flex-end; }
.span-2 { grid-column: span 2; }
.rows-3 { grid-row: span 3; }
.media { padding: 0; }
.media > .fill, .media > .grow > .fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.media > .grow { position: absolute; inset: 0; overflow: hidden; }
.media:hover .fill { transform: scale(1.06); }
.hover-dim { transition: background 0.25s; }
.hover-dim:hover { background: #111; }
.cross { position: absolute; z-index: 3; font-size: 18px; line-height: 1; transform: translate(-50%, -50%); pointer-events: none; }

/* ---------- blocks ---------- */
.page-title { background: var(--black); padding: 128px var(--pad) 24px; }
.page-title h1 { font-weight: 700; font-size: clamp(56px, 13vw, 160px); line-height: 0.9; letter-spacing: -0.045em; }
.head { background: var(--black); padding: 80px var(--pad) 20px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.head .ttl { display: flex; flex-direction: column; gap: 6px; max-width: 70%; }
.head .ttl b { font-weight: 600; font-size: 14px; }
.head .ttl span:last-child { font-size: 14px; }
.stat-n { font-family: var(--dot); font-weight: 800; font-size: clamp(44px, 5.5vw, 80px); line-height: 1; letter-spacing: -0.02em; }

.ticker { overflow: hidden; background: var(--black); padding: 18px 0; display: flex; }
.ticker-track { display: flex; align-items: center; gap: 48px; padding-right: 48px; flex-shrink: 0; animation: tick var(--dur, 40s) linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-100%); } }

.typing-card { background: #f2f2f0; color: #111; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.typing-card p { font-family: var(--mono); font-size: 12px; line-height: 1.55; }
.typing-card .foot { display: flex; justify-content: space-between; align-items: center; }

.list-row { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 18px; line-height: 1.35; }
.list-row .mono { width: 40px; flex-shrink: 0; padding-top: 4px; }

.band { padding: 120px var(--pad) var(--pad); display: flex; flex-direction: column; gap: 72px; }
.band.black { background: var(--black); }
.band.bone { background: var(--bone); color: #000; }
.band.mint { background: var(--mint); color: var(--forest); align-items: center; }
.two-tone { font-weight: 500; font-size: clamp(40px, 7.4vw, 88px); line-height: 0.95; letter-spacing: -0.035em; text-transform: uppercase; }
.two-tone .dim { color: rgba(255, 255, 255, 0.32); display: block; }
.rule-row { border-top: 1px solid var(--line); padding-top: 20px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.sora-h { font-weight: 300; font-size: clamp(36px, 4.6vw, 56px); line-height: 1.02; letter-spacing: -0.03em; max-width: 620px; }
.sora-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.sora-cols > div { border-top: 1px solid #000; padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.sora-cols h3 { font-weight: 400; font-size: 24px; line-height: 1.1; letter-spacing: -0.02em; }

.banner { position: relative; height: 600px; background: var(--black); overflow: hidden; display: flex; align-items: flex-end; padding: var(--pad); }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.75)); pointer-events: none; }
.banner .txt { position: relative; z-index: 1; max-width: 760px; display: flex; flex-direction: column; gap: 12px; }
.banner h2 { font-weight: 700; font-size: clamp(36px, 5vw, 64px); line-height: 0.98; letter-spacing: -0.035em; }

.story-media { position: relative; height: 260px; overflow: hidden; }
.story-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.story:hover .story-media img { transform: scale(1.06); }

.equation .cell { --min: 440px; }
.mascot-big { width: 150px; height: 150px; animation: chomp 1.1s var(--ease) infinite alternate; }
@keyframes chomp { to { transform: scale(0.9) rotate(-8deg); } }

/* Dream Recorder interlude */
.interlude { background: #0c0b0a; padding: 128px var(--pad) 104px; display: flex; flex-direction: column; align-items: center; gap: 34px; text-align: center; }
.interlude .glyph { width: 46px; height: 46px; animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.interlude h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.12; color: #eceae4; max-width: 880px; text-wrap: balance; }
.pill-outline { padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(236, 234, 228, 0.55); font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: #eceae4; transition: background 0.25s, color 0.25s; }
.pill-outline:hover { background: #eceae4; color: #0c0b0a; }
.soft-screen { position: relative; width: 100%; max-width: 1000px; height: 480px; border-radius: 36px; overflow: hidden; }
.soft-screen video { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(5px) saturate(1.2); }
.soft-screen::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, rgba(12, 11, 10, 0) 55%, rgba(12, 11, 10, 0.85)); box-shadow: inset 0 0 80px 20px rgba(12, 11, 10, 0.9); }
.soft-screen figcaption { position: absolute; left: 0; right: 0; bottom: 26px; z-index: 2; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--signal); }

/* contact mascot */
.drag-mascot { width: 200px; height: 200px; cursor: grab; touch-action: none; animation: bob 1.6s ease-in-out infinite alternate; }
.drag-mascot.dragging { animation: none; cursor: grabbing; }
.drag-mascot.release { transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes bob { to { transform: translateY(-8px) rotate(-4deg); } }

/* glossary */
.term-row { background: var(--black); display: grid; grid-template-columns: 64px minmax(220px, 1fr) minmax(260px, 460px); gap: 20px; padding: 22px var(--pad); align-items: start; transition: background 0.2s; }
.term-row:hover { background: #111; }
.term-row h3 { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.05; }

/* collaborate */
.role-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: 100%; padding-top: 40px; }
.role { background: var(--mint-card); border-radius: 16px; padding: 20px; min-height: 340px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center; transition: transform 0.4s var(--ease), background 0.3s; }
.role:hover { transform: translateY(-4px); background: #ccdac5; }
.role h3 { font-weight: 400; font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; }
.role svg { width: 88px; height: 88px; }
.pill-forest { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--forest); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; transition: transform 0.3s var(--ease); }
.pill-forest:hover { transform: translateY(-2px); }
.pill-forest.solid { background: var(--forest); color: var(--mint); }

/* press */
.press-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: var(--pad); background: var(--black); }
.press-card { background: #f2f2f0; color: #111; border-radius: 14px; padding: 14px 16px 16px; min-height: 380px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.press-card.dark { background: #111; color: #fff; }
.press-card .ticks { display: flex; justify-content: space-between; align-items: center; color: #9a9a9a; }
.swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.swatches > div { height: 96px; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid rgba(0, 0, 0, 0.08); }
.fact { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(0, 0, 0, 0.12); }
.fact .mono { width: 72px; flex-shrink: 0; color: #7a7a7a; }

/* stories index */
.index-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 240px; gap: 1px; background: rgba(255, 255, 255, 0.5); }
.index-grid a { background: var(--black); padding: 14px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; transition: background 0.25s; }
.index-grid a:hover { background: #141414; }

/* legal */
.legal-row { display: grid; grid-template-columns: 1fr 2fr; background: var(--black); }
.legal-row > div { padding: var(--pad) var(--pad) 36px; display: flex; flex-direction: column; gap: 12px; }
.legal-row > div + div { border-left: 1px solid var(--line); color: var(--soft); max-width: none; }
.legal-row p, .legal-row li { max-width: 720px; font-size: 16px; line-height: 1.55; }
.legal-row ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.legal-row li { display: flex; gap: 12px; }
.legal-row li::before { content: "—"; color: var(--grey); }

/* footer */
.footer { background: var(--black); border-top: 1px solid var(--line); padding: 56px var(--pad) 28px; display: flex; flex-direction: column; gap: 96px; font-size: 13px; }
.ruler { height: 10px; background:
  repeating-linear-gradient(90deg, #8e8e8e 0 1px, transparent 1px 80px) top left / 100% 10px no-repeat,
  repeating-linear-gradient(90deg, #4a4a4a 0 1px, transparent 1px 8px) top left / 100% 5px no-repeat; }
.foot-row { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)) minmax(280px, 2fr); gap: 20px; }
.foot-row .col { display: flex; flex-direction: column; gap: 10px; }
.foot-row a { transition: color 0.2s; }
.foot-row a:hover { color: var(--grey); }
.foot-brand { display: flex; align-items: center; gap: 10px; align-self: flex-start; }
.foot-brand svg { width: 40px; height: 40px; }
.foot-brand img { width: 72px; }
.field { display: flex; justify-content: space-between; align-items: center; padding: 6px 6px 6px 14px; border: 1px solid rgba(255, 255, 255, 0.3); margin-top: 56px; }
.field span:last-child { background: var(--white); color: var(--black); padding: 9px 16px; font-weight: 500; transition: opacity 0.2s; }
.field:hover span:last-child { opacity: 0.75; }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--grey); font-size: 12px; }
.foot-bottom nav { display: flex; gap: 14px; }
.foot-bottom a:hover { color: var(--white); }

/* ---------- motion ---------- */
[data-reveal] { opacity: 0; transform: translateY(var(--y, 18px)); transition: opacity 0.9s var(--ease) var(--d, 0s), transform 0.9s var(--ease) var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }
/* Surfaces keep their background; only their contents fade, so grid lines never show through. */
:is(.cell, .head, .term-row, .legal-row)[data-reveal] { opacity: 1; transform: none; }
:is(.cell, .head, .term-row, .legal-row)[data-reveal] > * { opacity: 0; transform: translateY(var(--y, 18px)); transition: opacity 0.9s var(--ease) var(--d, 0s), transform 0.9s var(--ease) var(--d, 0s); }
:is(.cell, .head, .term-row, .legal-row)[data-reveal].in > * { opacity: 1; transform: none; }
.w { display: inline-block; opacity: 0; transform: translateY(0.5em); filter: blur(var(--blur, 0px)); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); transition-delay: calc(var(--d, 0s) + var(--i) * 35ms); }
.in .w { opacity: 1; transform: none; filter: none; }
.ch { opacity: 0; transition: opacity 0.05s linear; transition-delay: calc(var(--d, 0s) + var(--i) * 14ms); }
.in .ch { opacity: 1; }
[data-grow] { transform: scale(0.08); transition: transform 1.5s var(--ease-io) var(--d, 0s); }
[data-grow].in { transform: none; }

/* custom cursor */
.cursor { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; mix-blend-mode: difference; display: grid; place-items: center; transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease); }
.cursor span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: #000; opacity: 0; transition: opacity 0.2s; }
.cursor.view { width: 72px; height: 72px; margin: -36px 0 0 -36px; mix-blend-mode: normal; }
.cursor.view span { opacity: 1; }
.cursor.down { transform: scale(0.8); }
@media (pointer: fine) { .has-cursor, .has-cursor a { cursor: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  body, [data-reveal], .w, .ch, [data-grow] { opacity: 1 !important; transform: none !important; filter: none !important; }
  .cursor { display: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1199px) {
  .grid[style*="--cols:4"] { --cols: 2 !important; }
  .sora-cols, .role-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .press-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-row { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .cross { display: none; }
}

/* ---------- phone ---------- */
@media (max-width: 809px) {
  :root { --pad: 16px; }
  .nav { padding: 14px 16px; align-items: center; }
  .brand img, .nav-links .wide { display: none; }
  .nav-links { gap: 14px; padding: 8px 0 8px 8px; }
  .grid { grid-template-columns: 1fr !important; grid-auto-rows: auto !important; }
  .grid > * { grid-column: auto !important; grid-row: auto !important; }
  .cell { min-height: 200px; }
  .cell.empty { display: none; }
  .cell.media { min-height: 280px; }
  .span-2 { grid-column: auto; }
  .page-title { padding: 104px 16px 16px; }
  .head { padding: 56px 16px 16px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .head .ttl { max-width: none; }
  .band { padding: 72px 16px 16px; gap: 48px; }
  .sora-cols, .role-cards, .press-cards, .index-grid { grid-template-columns: 1fr; }
  .index-grid { grid-auto-rows: 160px; }
  .banner { height: 520px; }
  .soft-screen { height: 300px; border-radius: 24px; }
  .soft-screen figcaption { font-size: 17px; bottom: 16px; }
  .interlude { padding: 88px 16px 72px; gap: 26px; }
  .term-row { grid-template-columns: 1fr; gap: 8px; padding: 18px 16px; }
  .legal-row { grid-template-columns: 1fr; }
  .legal-row > div + div { border-left: 0; padding-top: 0; }
  .foot-row { grid-template-columns: 1fr 1fr; }
  .foot-row .news { grid-column: 1 / -1; }
  .rule-row, .head { gap: 12px; }
  .equation .cell { --min: 240px; }
  .eq-arrow { transform: rotate(90deg); }
  .hero-headline { padding-top: 104px !important; }
}
