/* Archivo (SIL OFL, vendor/fonts/OFL.txt), self-hosted: no requests to Google */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(vendor/fonts/archivo-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url(vendor/fonts/archivo-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: oklch(1 0 0);
  --surface: oklch(0.968 0.006 115);
  --ink: oklch(0.2 0.015 115);
  --muted: oklch(0.45 0.014 115);
  --line: oklch(0.2 0.015 115 / 0.14);
  --laser: oklch(0.9 0.18 118);
  --laser-ink: oklch(0.46 0.1 118);
  --accent: oklch(0.52 0.19 264);
  --metal: oklch(0.86 0.004 115);
  --anodized: oklch(0.42 0.01 115);

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-3: clamp(2rem, 1.2rem + 3.4vw, 3.75rem);
  --step-4: clamp(2.5rem, 0.6rem + 5.2vw, 5.25rem);

  --gutter: clamp(1rem, 0.4rem + 3vw, 3.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --z-stage: 0;
  --z-content: 1;
  --z-bar: 2;
  --z-cursor: 3;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  margin: 0;
  font-weight: 300;
  font-stretch: 125%;
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: fixed; left: var(--gutter); top: 0.75rem; z-index: var(--z-bar);
  padding: 0.5rem 0.9rem; background: var(--ink); color: var(--bg); border-radius: 999px;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- stage ---------- */
#stage {
  position: fixed; inset: 0;
  width: 100%; height: 100lvh;
  z-index: var(--z-stage);
  display: block;
  cursor: grab;
  touch-action: pan-y;
}
#stage:active { cursor: grabbing; }
.no-gl #stage, .no-gl .hud { display: none; }

.dim {
  position: fixed; left: 0; top: 0; z-index: var(--z-stage);
  padding: 0.2rem 0.55rem;
  background: var(--laser); color: var(--ink);
  font-size: var(--step--1); font-weight: 500; font-variant-numeric: tabular-nums;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}

/* Tells first-time visitors the part can be turned; JS pins it under the part and drops it after the first drag. */
.spin-hint {
  position: fixed; left: 0; top: 0; z-index: var(--z-stage);
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.8rem 0.4rem 0.65rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: oklch(1 0 0 / 0.82);
  color: var(--ink);
  font-size: var(--step--1); font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  will-change: transform, opacity;
}
.spin-hint.on { opacity: 1; }
.spin-hint svg { flex: none; color: var(--laser-ink); animation: orbit-swing 2.6s ease-in-out infinite; }
@keyframes orbit-swing {
  0%, 100% { transform: translateX(-2px) rotate(-6deg); }
  50% { transform: translateX(2px) rotate(6deg); }
}

.hud {
  position: fixed; right: var(--gutter); bottom: 1.25rem; z-index: var(--z-stage);
  display: flex; gap: 1.25rem;
  color: var(--muted);
  font-size: var(--step--1); font-variant-numeric: tabular-nums;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.hud [data-k] { color: var(--ink); }
.hud.off { opacity: 0; }

/* ---------- bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: var(--z-bar);
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter);
  pointer-events: none;
}
.bar a { pointer-events: auto; }
.mark {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none;
  font-weight: 500; font-stretch: 125%; letter-spacing: -0.01em;
}
.mark svg { width: auto; height: 1.6rem; }
.bar-end { display: flex; align-items: center; gap: 1.25rem; }
.lang { font-size: var(--step--1); font-weight: 500; text-decoration: none; }
.lang:hover { text-decoration: underline; text-decoration-color: var(--laser-ink); text-underline-offset: 0.3em; }
.bar-cta {
  font-size: var(--step--1); font-weight: 500; text-decoration: none;
  padding: 0.45rem 0.95rem; border: 1px solid var(--line); border-radius: 999px;
  background: oklch(1 0 0 / 0.7);
  transition: border-color 0.3s var(--ease);
}
.bar-cta:hover { border-color: var(--ink); }

/* ---------- stage sections (the 3D shows through) ---------- */
main { position: relative; z-index: var(--z-content); pointer-events: none; } /* the canvas underneath takes the pointer */
.stage-track > section {
  min-height: 100svh;
  display: grid;
  padding: 6rem var(--gutter) 4rem;
}
.stage-track a { pointer-events: auto; }
.copy { max-width: min(30rem, 42vw); align-self: center; }

.hero { align-content: end; padding-bottom: clamp(3rem, 10vh, 7rem) !important; }
.hero h1 { font-size: var(--step-4); }
.hero h1 span { display: block; }
.lede { margin-top: 1.75rem; max-width: 34ch; font-size: var(--step-1); line-height: 1.45; color: var(--muted); }
.actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  height: 3.1rem; padding: 0 1.5rem;
  background: var(--ink); color: var(--bg);
  border-radius: 999px; text-decoration: none;
  font-weight: 500; font-stretch: 112%;
  transition: background-color 0.3s var(--ease);
}
.btn::after {
  content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--laser);
  transition: transform 0.4s var(--ease);
}
.btn:hover { background: oklch(0.32 0.015 115); }
.btn:hover::after { transform: scale(1.6); }
.ghost {
  font-weight: 500; text-decoration: none;
  background: linear-gradient(var(--laser), var(--laser)) 0 100% / 100% 0.35em no-repeat;
  transition: background-size 0.4s var(--ease);
}
.ghost:hover { background-size: 100% 100%; }

.step .copy { display: grid; gap: 1.25rem; }
.tool { display: flex; align-items: center; gap: 0.75rem; }
kbd {
  display: inline-grid; place-items: center;
  min-width: 2.4rem; height: 2.4rem; padding: 0 0.7rem;
  font: 500 var(--step--1) "Archivo", sans-serif; font-stretch: 112%;
  color: var(--ink); background: var(--bg);
  border: 1px solid oklch(0.2 0.015 115 / 0.22); border-bottom-width: 3px;
  border-radius: 7px;
}
.pro {
  font-size: var(--step--1); font-weight: 500; color: var(--laser-ink);
  padding: 0.15rem 0.55rem; border: 1px solid currentColor; border-radius: 999px;
}
.step h2 { font-size: var(--step-3); }
.step p { color: var(--muted); max-width: 34ch; }

/* ---------- paper sections (cover the stage) ---------- */
.paper { position: relative; pointer-events: auto; background: var(--bg); padding: clamp(5rem, 14vh, 10rem) var(--gutter); }
.paper h2 { font-size: var(--step-3); max-width: 18ch; }

.formats { border-top: 1px solid var(--line); }
.format-list {
  list-style: none; margin: clamp(2.5rem, 7vh, 5rem) 0 0; padding: 0;
  display: flex; flex-wrap: wrap; column-gap: clamp(1.5rem, 4vw, 4rem); row-gap: 1.5rem;
}
.format-list li { display: grid; gap: 0.35rem; }
.format-list b {
  font-weight: 200; font-stretch: 125%;
  font-size: clamp(2.75rem, 0.8rem + 6.4vw, 6rem); line-height: 1;
  letter-spacing: -0.02em;
}
.format-list small { color: var(--muted); font-size: var(--step--1); }
.format-list .next b { color: oklch(0.2 0.015 115 / 0.25); }

.local dl, .print dl {
  margin: clamp(2.5rem, 7vh, 5rem) 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2.5rem var(--gutter);
}
.local dl div, .print dl div { border-top: 1px solid var(--ink); padding-top: 1.1rem; }
.local dt, .print dt { font-size: var(--step-1); font-weight: 500; font-stretch: 112%; }
.local dd, .print dd { margin: 0.4rem 0 0; color: var(--muted); max-width: 30ch; }

.print { border-top: 1px solid var(--line); }
.print-more { margin-top: clamp(2rem, 5vh, 3.5rem); }

.pricing { background: var(--surface); }
.plans {
  margin-top: clamp(2.5rem, 7vh, 5rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 3rem var(--gutter);
  max-width: 64rem;
}
.plans h3 { font-size: var(--step-1); font-weight: 500; font-stretch: 112%; letter-spacing: 0; }
.plans ul { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.plans li { padding: 0.7rem 0; border-top: 1px solid var(--line); }
.plans .lead { color: var(--muted); }
.plans .pro-plan li::before {
  content: ""; display: inline-block; width: 0.45rem; height: 0.45rem; margin-right: 0.7rem;
  border-radius: 50%; background: var(--laser-ink); vertical-align: 0.12em;
}
.prices { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; font-variant-numeric: tabular-nums; }
.prices b { font-weight: 500; font-stretch: 112%; font-size: var(--step-1); }
.prices span { color: var(--muted); font-size: var(--step--1); }

.get { background: var(--laser); min-height: 85svh; display: grid; grid-template-rows: 1fr auto; }
.get .copy { align-self: center; max-width: none; }
.get h2 { font-size: var(--step-4); max-width: none; }
.get p { margin-top: 1.5rem; max-width: 36ch; font-size: var(--step-1); }
.get .actions { margin-top: 2.5rem; }
.get .btn {
  height: 4.25rem; width: min(30rem, 100%); padding: 0 1.25rem 0 1.75rem;
  justify-content: space-between;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--ink); border-radius: 14px;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.get .btn::after { content: attr(data-key); width: auto; height: auto; padding: 0.3rem 0.7rem; border-radius: 6px; background: var(--ink); color: var(--laser); font-size: var(--step--1); }
.get .btn:hover { background: var(--bg); }
.get .btn:hover::after { transform: none; }
.get .btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.get footer {
  margin-top: 5rem; padding-top: 1.25rem; border-top: 1px solid oklch(0.2 0.015 115 / 0.25);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  font-size: var(--step--1);
}

/* ---------- load choreography ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(0.35em); filter: blur(8px); }
}
.hero h1 span, .hero .lede, .hero .actions, .bar { animation: rise 1.2s var(--ease) backwards; }
.hero h1 span:nth-child(1) { animation-delay: 0.9s; }
.hero h1 span:nth-child(2) { animation-delay: 1.05s; }
.hero .lede { animation-delay: 1.35s; }
.hero .actions { animation-delay: 1.5s; }
.bar { animation-delay: 1.7s; }

/* ---------- precision cursor (fine pointers only, see cursor.js) ---------- */
html.has-cursor, html.has-cursor * { cursor: none !important; }
.cursor { position: fixed; inset: 0; z-index: var(--z-cursor); pointer-events: none; opacity: 0; transition: opacity 0.3s var(--ease); }
.cursor.on { opacity: 1; }
.cursor > * { position: absolute; left: 0; top: 0; will-change: transform; }
.cursor i {
  width: 9px; height: 9px;
  border: 0 solid var(--ink);
  transition: border-color 0.3s var(--ease);
}
.cursor i:nth-child(1) { border-width: 1.5px 0 0 1.5px; }
.cursor i:nth-child(2) { border-width: 1.5px 1.5px 0 0; }
.cursor i:nth-child(3) { border-width: 0 0 1.5px 1.5px; }
.cursor i:nth-child(4) { border-width: 0 1.5px 1.5px 0; }
.c-dot, .c-cross { display: block; }
.c-dot::before {
  content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 1.5px var(--bg);
  transition: transform 0.3s var(--ease);
}
.c-cross::before, .c-cross::after {
  content: ""; position: absolute; background: var(--ink);
  opacity: 0; transform: scale(0.3); transition: opacity 0.2s var(--ease), transform 0.3s var(--ease);
}
.c-cross::before { left: -11px; top: -0.5px; width: 22px; height: 1px; }
.c-cross::after { left: -0.5px; top: -11px; width: 1px; height: 22px; }
.c-tag {
  padding: 0.3rem 0.6rem; border-radius: 3px; white-space: nowrap;
  font-size: var(--step--1); font-weight: 500; line-height: 1.3; font-variant-numeric: tabular-nums;
  background: var(--ink); color: var(--bg);
  opacity: 0; transition: opacity 0.2s var(--ease);
}
.c-tag small { font-size: 0.75rem; font-weight: 400; opacity: 0.8; }
.cursor[data-mode="stage"] .c-tag, .cursor[data-mode="part"] .c-tag { opacity: 1; }
.cursor[data-mode="part"] .c-tag { background: var(--laser); color: var(--ink); }
.cursor[data-mode="part"] .c-dot::before, .cursor[data-mode="drag"] .c-dot::before { transform: scale(0); }
.cursor[data-mode="part"] .c-cross::before, .cursor[data-mode="part"] .c-cross::after { opacity: 1; transform: none; }
.cursor[data-mode="target"] .c-dot::before { transform: scale(0.5); }
.cursor[data-mode="part"] i { border-color: var(--accent); }

/* ---------- small screens: object on top, copy below ---------- */
@media (max-width: 52rem) {
  .copy { max-width: none; }
  .stage-track > section { padding-top: 0; padding-bottom: 2.5rem; }
  .step .copy, .hero { align-self: end; }
  .step .copy, .hero > * { position: relative; }
  .step .copy {
    margin: 0 calc(var(--gutter) * -1);
    padding: 3.5rem var(--gutter) 0;
    background: linear-gradient(oklch(1 0 0 / 0), var(--bg) 3rem);
  }
  .hud { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
