/* Layout: a dark screening room. Full-bleed loop up top behind a reeded-glass pane, poster-style type,
   technical spec labels in mono, and a library grid where every card plays its loop. Single dark theme by design. */
:root {
  --ink: #0a090c;          /* page ground */
  --char: #141218;         /* raised surfaces */
  --char-2: #1c1921;       /* hover / inputs */
  --bone: #ece5da;         /* primary text */
  --ash: #9a929e;          /* secondary text */
  --line: rgba(236, 229, 218, 0.12);
  --ember: #ff6a2c;        /* accent, used sparingly */
  --ember-soft: #ffb07c;
  --font-display: "Gloock", "Didot", Georgia, serif;
  --font-accent: "Instrument Serif", "Didot", Georgia, serif;
  --font-body: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0: clamp(0.98rem, 0.95rem + 0.15vw, 1.06rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.6rem, 1.35rem + 1.1vw, 2.3rem);
  --step-3: clamp(2.3rem, 1.6rem + 3vw, 4.6rem);
  --step-4: clamp(3rem, 1.6rem + 6.2vw, 7.4rem);
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--ink);
}
/* film grain over everything, like the loops themselves */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 40; pointer-events: none; opacity: 0.09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
a { color: inherit; }
img, video { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }
.wrap {
  width: 100%; max-width: 1240px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.mono { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.04em; }
.label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 0.98; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  /* solid, not frosted: Safari re-blurs everything scrolling under a backdrop-filter, and the first scroll hitches */
  background: rgba(10, 9, 12, 0.94);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.wordmark i { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--ember-soft), var(--ember) 55%, #6a1606); box-shadow: 0 0 18px var(--ember); }
.nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ash); font-size: 0.92rem; }
.nav a:hover { color: var(--bone); }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  font: 600 0.95rem/1 var(--font-body); padding: 13px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--char); color: var(--bone);
}
.btn:hover { background: var(--char-2); }
.btn.primary { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.btn.primary:hover { background: #fff; }
@media (max-width: 720px) { .nav a:not(.btn):not(.nav-signin) { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,9,12,0.85) 0%, rgba(10,9,12,0.35) 55%, rgba(10,9,12,0.1) 100%), linear-gradient(0deg, var(--ink) 0%, transparent 35%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); padding-block: clamp(72px, 12vw, 150px) clamp(48px, 7vw, 90px); }
.pane {
  position: relative; max-width: 760px; padding: clamp(22px, 3.5vw, 40px); border-radius: var(--radius);
  background: repeating-linear-gradient(90deg, rgba(236,229,218,0.07) 0 1px, rgba(236,229,218,0.0) 1px 9px, rgba(10,9,12,0.18) 9px 14px),
              rgba(14, 13, 18, 0.62);
  /* no backdrop-filter: over a live background Safari re-blurs it every frame, which stalls the intro */
  border: 1px solid rgba(236,229,218,0.14);
  display: grid; gap: 22px;
}
.hero h1 { font-size: var(--step-4); }
.hero h1 em { font-style: normal; color: var(--ember-soft); }
.hero .lede { font-size: var(--step-1); line-height: 1.45; color: #ddd5ca; max-width: 34ch; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.spec {
  display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 18px; border-top: 1px dashed rgba(236,229,218,0.2);
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ash);
}
.spec b { color: var(--bone); font-weight: 500; }
.spec .ok { color: var(--ember-soft); }

/* ---------- facts ---------- */
.facts { border-bottom: 1px solid var(--line); }
.facts .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: 0; }
.fact { padding: 26px 18px 26px 0; display: grid; gap: 6px; }
.fact + .fact { padding-left: 18px; border-left: 1px solid var(--line); }
.fact strong { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); font-variant-numeric: tabular-nums; line-height: 1; }
@media (max-width: 760px) {
  .facts .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}

section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { display: grid; gap: 14px; margin-bottom: 36px; max-width: 760px; }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--ash); max-width: 60ch; }

/* ---------- library ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip {
  font: 500 0.88rem/1 var(--font-body); color: var(--ash); background: transparent; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px;
}
.chip[aria-pressed="true"] { color: var(--ink); background: var(--bone); border-color: var(--bone); }
.chip:hover:not([aria-pressed="true"]) { color: var(--bone); border-color: rgba(236,229,218,0.3); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card { display: grid; gap: 12px; min-width: 0; }
.thumb {
  position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 10px; overflow: hidden;
  background: var(--char); border: 1px solid var(--line); cursor: pointer;
}
.thumb img, .thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s ease, transform 0.6s ease; }
.thumb video { opacity: 0; }
.thumb.playing video { opacity: 1; }
.thumb:hover img, .thumb:hover video { transform: scale(1.03); }
.thumb .badge {
  position: absolute; left: 10px; bottom: 10px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 5px 8px; border-radius: 6px; background: rgba(10,9,12,0.78); color: var(--bone);
}
.thumb .play {
  position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(10,9,12,0.72); display: grid; place-items: center;
}
.thumb .play::before { content: ""; border-left: 9px solid var(--bone); border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.thumb.playing .play::before { border: 0; width: 9px; height: 10px; margin: 0; background: linear-gradient(90deg, var(--bone) 0 3px, transparent 3px 6px, var(--bone) 6px 9px); }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card h3 { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }
.card .mono { color: var(--ash); white-space: nowrap; }
.empty { color: var(--ash); padding: 30px 0; }

/* ---------- why ---------- */
.why { background: var(--char); border-block: 1px solid var(--line); }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.point { background: var(--char); padding: clamp(22px, 3vw, 34px); display: grid; gap: 10px; align-content: start; min-width: 0; }
.point h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.point p { color: var(--ash); }
@media (max-width: 760px) { .points { grid-template-columns: minmax(0, 1fr); } }
.seam { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.seam span { font-family: var(--font-mono); font-size: 0.72rem; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--bone); }
.seam span.hot { border-color: var(--ember); color: var(--ember-soft); }
.seam svg { flex: none; }

/* ---------- pack contents ---------- */
.pack { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 860px) { .pack { grid-template-columns: minmax(0, 1fr); } }
.tree {
  margin: 0; font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.75; color: var(--ash);
  background: var(--char); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; overflow-x: auto;
}
.tree b { color: var(--bone); font-weight: 500; }
.tree em { color: var(--ember-soft); font-style: normal; }
.swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.swatches div { aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--line); max-width: 100%; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 18px; align-content: start; background: var(--ink); min-width: 0; }
.plan.feature { background: linear-gradient(160deg, rgba(255,106,44,0.14), rgba(255,106,44,0.02) 55%), var(--char); border-color: rgba(255,106,44,0.45); }
.plan h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
.price { font-family: var(--font-display); font-size: var(--step-3); font-weight: 700; line-height: 1; }
.price small { font-family: var(--font-body); font-size: 0.95rem; font-weight: 500; color: var(--ash); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plan li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; color: #d8d0c5; }
.plan li::before { content: ""; width: 8px; height: 8px; margin-top: 9px; border-radius: 50%; background: var(--ember); }
.plan .btn { justify-content: center; }
.note { margin-top: 18px; color: var(--ash); font-size: var(--step--1); }

/* ---------- license + faq ---------- */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); }
@media (max-width: 860px) { .two { grid-template-columns: minmax(0, 1fr); } }
.rules { display: grid; gap: 10px; margin-top: 8px; }
.rule { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rule .label { padding-top: 3px; }
.rule .yes { color: var(--ember-soft); }
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--font-mono); color: var(--ash); }
details[open] summary::after { content: "–"; }
details p { color: var(--ash); margin-top: 10px; max-width: 62ch; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 32px; color: var(--ash); font-size: var(--step--1); }
.big-mark { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 15vw, 13rem); line-height: 0.85; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1px rgba(236,229,218,0.18); padding-block: 30px 0; overflow: hidden; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .thumb img, .thumb video { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- store: shared ---------- */
.nav a[aria-current="page"] { color: var(--bone); }
.btn[disabled], .btn.busy { opacity: 0.55; pointer-events: none; }
.btn.small { padding: 9px 14px; font-size: 0.85rem; }
.btn.ember { background: var(--ember); border-color: var(--ember); color: #1a0700; }
.btn.ember:hover { background: var(--ember-soft); }
.page-head { padding-block: clamp(48px, 7vw, 88px) clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--step-3); }
.page-head p { color: var(--ash); max-width: 62ch; margin-top: 14px; }
.crumbs { display: flex; gap: 8px; margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--bone); }
.notice {
  border: 1px solid rgba(255,106,44,0.45); background: rgba(255,106,44,0.08); color: var(--bone);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 24px; display: flex; gap: 12px; align-items: flex-start;
}
.notice::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); margin-top: 8px; }
.notice.quiet { border-color: var(--line); background: var(--char); }
.notice.quiet::before { background: var(--ash); }
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50;
  background: var(--bone); color: var(--ink); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
  max-width: calc(100vw - 32px); box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer nav a { text-decoration: none; }
footer nav a:hover { color: var(--bone); }

/* forms */
.field { display: grid; gap: 7px; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field .hint { color: var(--ash); font-size: var(--step--1); }
input, select, textarea {
  font: 400 1rem/1.4 var(--font-body); color: var(--bone); background: var(--char-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%; min-width: 0;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ember); outline-offset: 1px; border-color: transparent; }
.form { display: grid; gap: 18px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.panel { background: var(--char); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); min-width: 0; }

/* library search */
.lib-tools { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.lib-tools .filters { margin: 0; }
.lib-tools input { max-width: 280px; border-radius: 999px; padding: 10px 16px; }
.card a.cover { display: block; text-decoration: none; }
.card .swatch-row { display: flex; gap: 4px; }
.card .swatch-row i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line); }
.owned { color: var(--ember-soft); }

/* plans: 3 core + 2 custom */
.plans.custom { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
@media (max-width: 900px) { .plans.custom { grid-template-columns: minmax(0, 1fr); } }
.plan .blurb { color: var(--ash); }
.plan .tag { justify-self: start; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ember-soft); border: 1px solid rgba(255,106,44,0.45); border-radius: 6px; padding: 4px 8px; }

/* pack page */
.pack-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
@media (max-width: 920px) { .pack-layout { grid-template-columns: minmax(0, 1fr); } }
.stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--char); border: 1px solid var(--line); }
.stage video, .stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage .badge { position: absolute; left: 12px; bottom: 12px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; padding: 6px 9px; border-radius: 6px; background: rgba(10,9,12,0.78); }
.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.strip button { position: relative; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--char); }
.strip button img { width: 100%; height: 100%; object-fit: cover; }
.strip button[aria-pressed="true"] { outline: 2px solid var(--ember); outline-offset: 2px; }
.strip button span { position: absolute; left: 5px; top: 4px; font-family: var(--font-mono); font-size: 0.62rem; color: var(--bone); text-shadow: 0 1px 3px #000; }
.side { display: grid; gap: 18px; position: sticky; top: 90px; }
@media (max-width: 920px) { .side { position: static; } }
.side h2 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.side .price-line { display: flex; align-items: baseline; gap: 8px; }
.side .price-line strong { font-family: var(--font-display); font-size: var(--step-2); }
.side .stack { display: grid; gap: 10px; }
.side .stack .btn { justify-content: center; }
.side .or { color: var(--ash); font-size: var(--step--1); text-align: center; }
.specs { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; font-size: 0.9rem; }
.specs dt { color: var(--ash); }
.specs dd { margin: 0; }
.files { margin-top: 36px; }
.files table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.files th { text-align: left; font-weight: 500; }
.files th, .files td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.files td.dl { white-space: nowrap; text-align: right; }
.files td.dl a { margin-left: 6px; }
.files .mono { color: var(--ash); }
.table-scroll { overflow-x: auto; }
.lock { color: var(--ash); font-size: var(--step--1); }

/* account */
.acct { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 860px) { .acct { grid-template-columns: minmax(0, 1fr); } }
.acct .panel { display: grid; gap: 14px; align-content: start; }
.acct h2 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
.signin { max-width: 520px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list a { text-decoration: none; display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list a:hover { color: var(--ember-soft); }

/* legal */
.prose { max-width: 72ch; }
.prose h2 { font-size: var(--step-2); margin: 48px 0 14px; }
.prose h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; letter-spacing: 0; margin: 26px 0 8px; line-height: 1.3; }
.prose p, .prose li { color: #d8d0c5; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; display: grid; gap: 6px; }

/* ---------- type: from the BRAND IDENTETY inspo ----------
   Gloock = condensed high-contrast display serif ("abcdefg"), Instrument Serif italic = flowing accent words
   ("club lith", "Monochromatic Colorways"), Inter Tight = the plain Helvetica-style text. Gloock has one weight. */
h1, h2, h3, .wordmark, .fact strong, .price, .big-mark, .side .price-line strong { font-weight: 400; }
h1, h2 { letter-spacing: -0.015em; line-height: 0.95; }
h1 em, h2 em, .accent {
  font-family: var(--font-accent); font-style: italic; font-weight: 400; letter-spacing: -0.01em;
  font-size: 1.08em; color: var(--ember-soft);
}
.wordmark { font-size: 1.35rem; letter-spacing: 0; }
.card h3, .point h3, .plan h3, .side h2, .acct h2 { letter-spacing: 0; }
.big-mark { letter-spacing: -0.02em; -webkit-text-stroke: 1px rgba(236,229,218,0.22); }
.card h3 { font-size: 1.22rem; letter-spacing: 0.01em; }
.point h3, .plan h3, .side h2, .acct h2 { letter-spacing: 0.005em; }
.preview-tag { font-family: var(--font-mono); font-size: 0.62rem; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; color: var(--ember-soft); }

/* ---------- motion ----------
   One orchestrated opening (hero words rise, pane settles, a light sweep crosses the reeds), then quiet
   continuity: scroll reveals that never fully hide, pointer light on glass, cross-fading colorways. */
:root { --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-io: cubic-bezier(0.65, 0, 0.35, 1); }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.35s var(--ease-io) both; }
::view-transition-new(root) { animation: vt-in 0.55s var(--ease-out) both; }
/* opacity only: blurring or moving whole-page snapshots is heavy in Safari and can still be running on the first scroll */
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* hero intro */
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.hero h1 .w > span { display: inline-block; }
.intro .hero h1 .w > span { animation: word-rise 0.9s var(--ease-out) both; }
@keyframes word-rise { from { transform: translateY(70%); opacity: 0; } }
/* The glass pane itself never animates: anything that moves or fades a backdrop-filter element makes the blur flicker. */
.intro .hero .pane > .label { animation: fade-up 0.9s var(--ease-out) 0.1s both; }
.intro .hero .lede { animation: fade-up 1s var(--ease-out) 0.85s both; }
.intro .hero .ctas { animation: fade-up 1s var(--ease-out) 1s both; }
.intro .hero .spec span { animation: fade-up 0.8s var(--ease-out) both; }
.intro .hero .spec span:nth-child(1) { animation-delay: 1.15s; } .intro .hero .spec span:nth-child(2) { animation-delay: 1.22s; }
.intro .hero .spec span:nth-child(3) { animation-delay: 1.29s; } .intro .hero .spec span:nth-child(4) { animation-delay: 1.36s; }
.intro .hero .spec span:nth-child(5) { animation-delay: 1.5s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } }
.intro .hero video { animation: hero-bloom 2.4s var(--ease-out) both; }
@keyframes hero-bloom { from { opacity: 0; filter: blur(14px) saturate(0.6); } }
.hero video { will-change: transform; transform: scale(1.06); }

/* light sweep across the reeded pane, once on load */
.pane { overflow: hidden; isolation: isolate; }
.pane::before {
  content: ""; position: absolute; inset: -20% auto -20% 0; width: 45%; z-index: -1; pointer-events: none; will-change: transform;
  background: linear-gradient(100deg, transparent, rgba(255,176,124,0.10) 40%, rgba(236,229,218,0.16) 50%, rgba(255,176,124,0.08) 60%, transparent);
  transform: translateX(-140%) skewX(-12deg); opacity: 0;
}
/* (no load sweep across the pane: Safari repaints the whole blurred pane under it, which reads as a flash) */
@keyframes sweep { 0% { transform: translateX(-140%) skewX(-12deg); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateX(300%) skewX(-12deg); opacity: 0; } }

/* pointer light on glass surfaces */
.pane::after, .thumb::after, .plan::after, .stage::after, .side::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255,176,124,0.13), transparent 60%);
  transition: opacity 0.5s ease;
}
.thumb::after, .stage::after { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.14), transparent 60%); mix-blend-mode: screen; z-index: 1; }
.pane:hover::after, .thumb:hover::after, .plan:hover::after, .stage:hover::after, .side:hover::after { opacity: 1; }
.plan { position: relative; }
.side { overflow: hidden; }

/* library cards */
.thumb { transition: border-color 0.5s ease, box-shadow 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.thumb img, .thumb video { transition: opacity 0.6s ease, transform 1.4s var(--ease-out), filter 0.8s ease; }
.thumb:hover { border-color: rgba(236,229,218,0.28); box-shadow: 0 24px 60px -24px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,106,44,0.08); transform: translateY(-3px); }
.thumb:hover img, .thumb:hover video { transform: scale(1.06); }
.thumb .play { transition: transform 0.5s var(--ease-out), background 0.3s ease; }
.thumb:hover .play { transform: scale(1.12); background: rgba(255,106,44,0.85); }
.card h3 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.5s var(--ease-out); }
.card:hover h3 a { background-size: 100% 1px; }

/* plans lift */
.plan { transition: transform 0.6s var(--ease-out), border-color 0.4s ease, box-shadow 0.6s var(--ease-out); }
.plan:hover { transform: translateY(-4px); border-color: rgba(236,229,218,0.24); box-shadow: 0 30px 70px -30px rgba(0,0,0,0.9); }
.plan.feature:hover { border-color: rgba(255,106,44,0.7); }

/* buttons: light sweep on hover */
.btn { position: relative; overflow: hidden; transition: background 0.3s ease, transform 0.4s var(--ease-out), box-shadow 0.4s ease; }
.btn:active { transform: scale(0.97); }
.btn.primary::after, .btn.ember::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 50%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent); transform: skewX(-18deg);
}
.btn.primary:hover::after, .btn.ember:hover::after { animation: btn-sweep 0.9s var(--ease-io); }
@keyframes btn-sweep { to { left: 130%; } }
.btn.ember:hover { box-shadow: 0 10px 40px -10px rgba(255,106,44,0.7); }

/* breathing ember */
.wordmark i { animation: breathe 4.5s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 28px 2px var(--ember); transform: scale(1.08); } }

/* scroll reveal: never fully hidden. Opacity + transform only: a blur filter here makes Safari repaint every card
   (videos included) on the first scroll, which shows as a glitch. */
.rv { transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); }
.rv.pre { opacity: 0.18; transform: translateY(34px); }

/* pack page: cross-fading colorways */
.stage .stage-vid { opacity: 0; transition: opacity 0.75s var(--ease-io); }
.stage .stage-vid.on { opacity: 1; }
.stage img#stage-img { transition: opacity 0.4s ease; }
.strip button { transition: transform 0.4s var(--ease-out), border-color 0.3s ease; }
.strip button:hover { transform: translateY(-2px); border-color: rgba(236,229,218,0.3); }
.strip button img { transition: transform 0.8s var(--ease-out); }
.strip button:hover img { transform: scale(1.08); }
.stage .badge { transition: opacity 0.3s ease; }

details summary::after { transition: transform 0.4s var(--ease-out); }
details[open] p { animation: fade-up 0.5s var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero video { transform: none; }
}

/* ---------- logo (brand/make_logo.py): halftone "altar" + grain-sprayed ember "loops" ---------- */
.wordmark { gap: 12px; }
.wordmark .logo { height: 38px; width: auto; display: block; transition: filter 0.6s ease; }
.wordmark:hover .logo { filter: drop-shadow(0 0 14px rgba(255, 176, 124, 0.35)); }
@media (max-width: 560px) { .wordmark .logo { height: 32px; } }
.big-mark { color: inherit; -webkit-text-stroke: 0; padding-block: clamp(32px, 6vw, 72px) 8px; white-space: normal; }
.big-mark img { width: 100%; height: auto; opacity: 0.92; }

/* live hero background (app.js heroShader) */
.hero .hero-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transform: scale(1.06); will-change: transform; }
.intro .hero .hero-gl { animation: gl-in 1.8s var(--ease-out) both; }
@keyframes gl-in { from { opacity: 0; } }

/* ---------- footer: a closing scene under the same silk light ---------- */
.site-foot { position: relative; overflow: hidden; isolation: isolate; border-top: 1px solid var(--line); }
.site-foot .foot-gl {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%); mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
}
.site-foot::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; z-index: -1; background: linear-gradient(to top, rgba(10,9,12,0.85), transparent); pointer-events: none; }
.site-foot .wrap { display: grid; }
.foot-cta { gap: 18px; padding-block: clamp(80px, 12vw, 160px) clamp(48px, 7vw, 88px); max-width: 1240px; }
.foot-cta h2 { font-size: var(--step-4); color: var(--bone); }
.foot-cta p { color: #d8d0c5; font-size: var(--step-1); line-height: 1.45; }
@media (min-width: 600px) { .foot-cta p { white-space: nowrap; } }
.foot-cta .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.foot-grid { grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 32px; padding-block: 40px; border-top: 1px solid rgba(236,229,218,0.14); }
.foot-brand { display: grid; gap: 14px; align-content: start; }
.foot-brand img { height: 44px; width: auto; }
.foot-brand p { color: var(--ash); font-size: var(--step--1); max-width: 30ch; }
.foot-col { display: grid; gap: 10px; align-content: start; }
.foot-col .label { margin-bottom: 4px; }
.foot-col a { text-decoration: none; color: #d8d0c5; font-size: 0.94rem; justify-self: start;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.45s var(--ease-out), color 0.3s ease; }
.foot-col a:hover { color: var(--ember-soft); background-size: 100% 1px; }
.foot-bar { display: flex !important; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 22px 28px; border-top: 1px solid rgba(236,229,218,0.1); color: var(--ash); font-size: var(--step--1); }
@media (max-width: 960px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}


/* hold the headline words hidden until the fonts are in, then .intro plays */
.pre-intro .hero h1 .w > span, .pre-intro .hero .lede, .pre-intro .hero .ctas, .pre-intro .hero .spec span, .pre-intro .hero .pane > .label { opacity: 0; }
.hero .hero-gl { image-rendering: auto; }

/* intro on its own compositor layers, so Safari keeps animating even while the page is busy */
.hero h1 .w > span, .hero .lede, .hero .ctas, .hero .spec span, .hero .pane > .label { will-change: transform, opacity; }
.hero h1 .w { transform: translateZ(0); }

/* ---------- sign in: one card over the silk light ---------- */
.auth { position: relative; isolation: isolate; overflow: hidden; min-height: calc(100svh - 70px); display: grid; align-items: center; padding-block: clamp(40px, 8vw, 96px); }
.auth .auth-gl {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; opacity: 0;
  animation: auth-gl-in 1.6s var(--ease-out) 0.1s forwards;
}
@keyframes auth-gl-in { to { opacity: 1; } }
.auth::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, rgba(10,9,12,0.15), rgba(10,9,12,0.75) 70%); }
.auth-wrap { display: grid; justify-items: center; }
.auth-card {
  width: 100%; max-width: 460px; display: grid; gap: 16px;
  background: rgba(20, 18, 24, 0.86); border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(24px, 5vw, 40px); box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8);
  animation: card-in 0.7s var(--ease-out) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } }
.auth-card h1 { font-size: var(--step-3); }
.auth-card h1 em { font-family: var(--font-accent); font-style: italic; font-weight: 400; color: var(--ember-soft); }
.auth-card .notice { margin: 0; }
.auth-sub { color: #d8d0c5; }
.auth-sub b { color: var(--bone); font-weight: 600; overflow-wrap: anywhere; }
.auth-card .form { gap: 14px; margin-top: 4px; }
.auth-card .btn { justify-content: center; }
.auth-msg { color: var(--ember-soft); font-size: 0.92rem; min-height: 1.4em; }
.auth-msg:empty { display: none; }
.code-input { font-family: var(--font-mono); font-size: 1.7rem; letter-spacing: 0.3em; text-align: center; padding: 14px 10px; }
.code-input::placeholder { color: rgba(236,229,218,0.18); }
.auth-alt { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--ash); font-size: 0.92rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--bone); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish[disabled] { color: var(--ash); text-decoration: none; cursor: default; }
.auth-foot { color: var(--ash); font-size: var(--step--1); border-top: 1px solid var(--line); padding-top: 14px; }
.auth-foot a { color: var(--bone); }
@media (prefers-reduced-motion: reduce) { .auth .auth-gl { opacity: 1; animation: none; } .auth-card { animation: none; } }

/* ---------- account menu in the header ---------- */
.acct-menu { position: relative; border: 0; padding: 0; }
.acct-menu summary { list-style: none; cursor: pointer; gap: 9px; padding: 7px 18px 7px 7px; justify-content: center; }
.acct-menu summary::after, .acct-menu[open] summary::after { content: none; }
.acct-menu summary::-webkit-details-marker { display: none; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: 0.8rem; color: #1a0700; background: radial-gradient(circle at 35% 35%, var(--ember-soft), var(--ember) 70%); }
.acct-menu .menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; width: min(280px, calc(100vw - 32px));
  background: var(--char); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.9); display: grid;
  animation: menu-in 0.18s ease-out both;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.acct-menu .who { display: grid; gap: 4px; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; min-width: 0; }
.acct-menu .who .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bone); }
.acct-menu .menu a, .acct-menu .menu button {
  display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit; font-size: 0.92rem;
  color: var(--bone); text-decoration: none; padding: 10px 12px; border-radius: 8px; cursor: pointer;
}
.acct-menu .menu a:hover, .acct-menu .menu button:hover { background: var(--char-2); }
.nav .acct-menu .menu a[role] { color: var(--bone); display: block; }

/* ---------- section pages: library, plans, license ---------- */
.more { display: flex; justify-content: center; margin-top: 36px; }
.next-step { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: end; justify-content: space-between; }
.next-step .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.compare { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 0.95rem; }
.compare th, .compare td { padding: 15px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); letter-spacing: -0.01em; padding-bottom: 18px; }
.compare tbody th { font-weight: 500; color: #d8d0c5; width: 34%; }
.compare td { color: var(--bone); }
.compare .hot { color: var(--ember-soft); }
.compare td:last-child { background: rgba(255,106,44,0.05); }
.compare .yes { color: var(--ember-soft); font-weight: 600; }
.compare .no { color: var(--ash); }
