/* Shoko — the app's Ensō Paper theme, with Ensō Ink behind the switch in the nav.
   Colours come from the app's Theme.swift. Type follows EditorialHeadline: serif (New York)
   headlines over a rounded (SF Pro Rounded) body. Apple devices render those faces natively;
   everything else falls back to Newsreader and Nunito. */

:root {
  --paper: #F2EEE5;
  --paper-deep: #EAE5DA;
  --card: #FBF9F4;
  --ink: #1E1C1A;
  --ink-2: #5A554E;
  --ink-3: #6B655D;     /* a shade darker than the app's #736D65 so small text passes 4.5:1 */
  --link: #9E3B29;
  --vermilion: #B94B37;
  --accent-text: #B94B37;     /* large type only; small vermilion text uses --link */
  --halo: #E5DDCF;
  --hair: rgba(30, 28, 26, 0.09);
  --shadow: rgba(30, 28, 26, 0.07);
  --bezel: #1E1C1A;
  --bezel-edge: rgba(30, 28, 26, 0.0);
  --nav-bg: rgba(242, 238, 229, 0.82);

  --serif: ui-serif, "New York", "Newsreader", Georgia, "Times New Roman", serif;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, system-ui, "Segoe UI", sans-serif;

  --page: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);

  color-scheme: light;
}

/* Ensō Ink. Paper is the default; the nav switch sets data-theme on <html> and remembers it. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151413;
  --paper-deep: #100F0E;
  --card: #22201E;
  --ink: #F2EEE5;
  --ink-2: #BDB6AA;
  --ink-3: #9A9389;
  --link: #E0745E;
  --accent-text: #E0745E;
  --halo: #2C2926;
  --hair: rgba(242, 238, 229, 0.09);
  --shadow: rgba(0, 0, 0, 0.35);
  --bezel: #0B0A0A;
  --bezel-edge: rgba(242, 238, 229, 0.14);
  --nav-bg: rgba(21, 20, 19, 0.8);
}

/* ---------- Fallback fonts ----------
   Only downloaded by browsers that don't have ui-serif / ui-rounded (anything not Apple). */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/newsreader-600.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/nunito.woff2") format("woff2");
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--round);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--vermilion);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.wrap {
  width: 100%;
  max-width: calc(var(--page) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.kicker {
  font-family: var(--round);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--link);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.is-stuck { border-bottom-color: var(--hair); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand .enso { width: 30px; height: 30px; transition: transform 0.6s var(--ease-out); }
.brand:hover .enso { transform: rotate(-24deg); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 600;
}
.nav-links a:not(.pill) { color: var(--ink-2); text-decoration: none; }
.nav-links a:not(.pill):hover { color: var(--ink); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}
.pill:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -6px var(--shadow); }
.pill:active { transform: scale(0.96); }
.pill-arrow { transition: transform 0.25s var(--ease-out); }
.pill:hover .pill-arrow { transform: translate(2px, -2px); }

@media (max-width: 640px) {
  .nav-links .nav-text { display: none; }
}

/* Paper / Ink switch. The knob slides to the side that's on and carries its icon; it overshoots
   a little, like the app's springs. Hidden without JS, since it couldn't do anything. */
.theme-switch {
  position: relative;
  display: none;
  flex: none;
  width: 56px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-3);
  cursor: pointer;
}
.js .theme-switch { display: inline-block; }
.theme-switch svg {
  position: absolute;
  z-index: 1;
  top: 7px;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color 0.35s ease, transform 0.5s var(--ease-out);
}
.theme-switch .ts-sun { left: 7px; color: var(--paper); }
.theme-switch .ts-moon { right: 7px; }
.theme-switch .ts-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 2px 6px -2px var(--shadow);
  transition: transform 0.45s cubic-bezier(0.5, 1.6, 0.4, 1), background 0.35s ease;
}
.theme-switch[aria-checked="true"] .ts-knob { transform: translateX(26px); }
.theme-switch[aria-checked="true"] .ts-sun { color: var(--ink-3); transform: rotate(-90deg); }
.theme-switch[aria-checked="true"] .ts-moon { color: var(--paper); transform: rotate(-20deg); }
.theme-switch:hover .ts-knob { box-shadow: 0 2px 10px -2px var(--shadow), 0 0 0 4px var(--hair); }

/* Switching themes crossfades the whole page (View Transitions, where supported). */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.45s; }

/* ---------- Ensō mark ---------- */

.enso { overflow: visible; }
.enso .e-ink { fill: var(--ink); }
.enso .e-check { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.enso .e-seal { fill: var(--vermilion); }
.enso .e-drop, .enso .e-seal { transform-box: fill-box; transform-origin: center; }

/* Hidden only once JS is here to draw them in; without JS the mark is simply finished. */
.js .enso[data-draw]:not(.is-drawn) .e-ring,
.js .enso[data-draw]:not(.is-drawn) .e-check { opacity: 0; }
.js .enso[data-draw]:not(.is-drawn) .e-drop,
.js .enso[data-draw]:not(.is-drawn) .e-seal { transform: scale(0); }

.js .enso[data-draw].is-drawn .e-drop { animation: e-touch 0.1s ease-out both; }
.js .enso[data-draw].is-drawn .e-check {
  stroke-dasharray: 1;
  animation: e-check 0.3s ease-out 0.5s both;
}
.js .enso[data-draw].is-drawn .e-seal { animation: e-stamp 0.55s linear 0.8s both; }

@keyframes e-touch { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes e-check {
  from { stroke-dashoffset: 1; opacity: 0; }
  1%   { opacity: 1; }
  to   { stroke-dashoffset: 0; opacity: 1; }
}
/* A spring like the app's (response 0.32, damping 0.5): overshoot, settle. */
@keyframes e-stamp {
  0%   { transform: scale(0); }
  35%  { transform: scale(1.32); }
  58%  { transform: scale(0.9); }
  78%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ---------- Phone ---------- */

.phone {
  --w: 300px;
  width: var(--w);
  margin: 0;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.168);
  background: var(--bezel);
  box-shadow:
    0 0 0 1px var(--bezel-edge),
    0 2px 0 0 rgba(255, 255, 255, 0.06) inset,
    0 40px 80px -30px var(--shadow),
    0 18px 36px -18px var(--shadow);
}
.phone img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--w) * 0.137);
  background: var(--card);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: clamp(40px, 8vw, 88px);
  text-align: center;
  border-bottom: 1px solid var(--hair);
}

.hero .kicker { animation: rise 0.8s var(--ease-out) 0.05s both; }

.hero h1 {
  margin-top: 18px;
  font-size: clamp(3.1rem, 10.5vw, 7.4rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.hero h1 .line { display: block; }
.hero h1 .w { display: inline-block; animation: rise 0.9s var(--ease-out) calc(0.12s + var(--i) * 0.08s) both; }
.hero h1 .accent { color: var(--accent-text); }

.hero .lede {
  max-width: 34ch;
  margin: 26px auto 0;
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--ink-2);
  animation: rise 0.9s var(--ease-out) 0.5s both;
}

.get {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}
.hero .get { animation: rise 0.9s var(--ease-out) 0.62s both; }

.get-note { font-size: 14px; color: var(--ink-3); }

.badge {
  display: inline-block;
  border-radius: 12px;
  transition: opacity 0.2s ease;
}
/* Apple's artwork stays untouched: no shadows, glows or scaling, only a fade on hover. */
.badge img { height: 54px; width: auto; }
/* Apple's black badge on Paper, its white badge on Ink. */
.badge .badge-ink, [data-theme="dark"] .badge .badge-paper { display: none; }
[data-theme="dark"] .badge .badge-ink { display: block; }
.badge:hover { opacity: 0.82; }

/* The whole phone floats inside a large, quiet ensō. --pw is the phone's width; a phone with
   its frame is about 2.1 times as tall as it is wide. Only the bottom is clipped, so the ring
   can spread past the column on wide screens. */
.stage {
  --pw: clamp(220px, 60vw, 290px);
  --top: 40px;
  position: relative;
  height: calc(var(--pw) * 2.1 + var(--top) + 48px);
  margin-top: clamp(40px, 6vw, 64px);
  clip-path: inset(-50% -100vw 0 -100vw);
}
.stage .halo {
  position: absolute;
  left: 50%;
  top: calc(var(--top) - var(--pw) * 0.31);
  width: calc(var(--pw) * 2);
  height: auto;
  translate: -50% 0;
}
.halo .e-ink { fill: var(--halo); }
.stage .halo-front { z-index: 2; }

.stage .phone {
  --w: var(--pw);
  position: absolute;
  z-index: 1;
  left: 50%;
  top: var(--top);
  translate: -50% 0;
  animation: phone-in 1.1s var(--ease-out) 0.35s both, float 7s ease-in-out 1.6s infinite;
}

@media (min-width: 1000px) {
  .hero { padding-top: 0; text-align: left; }
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    align-items: end;
    column-gap: 32px;
  }
  .hero-copy { align-self: center; padding-block: 48px 96px; }
  .hero h1 { font-size: clamp(4.4rem, 6.6vw, 6.2rem); }
  .hero .lede { margin-left: 0; }
  .hero .get { align-items: flex-start; }
  .stage { --pw: 300px; --top: 96px; margin-top: 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.45em); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes phone-in {
  from { opacity: 0; transform: translateY(70px); }
  to   { opacity: 1; transform: none; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(80px, 12vw, 140px); }
.flush-top { padding-top: 0; }
.section-head { max-width: 640px; }
.section-head h2 {
  margin-top: 14px;
  font-size: clamp(2.3rem, 5.4vw, 3.7rem);
  line-height: 1.04;
}
.section-head p { margin-top: 18px; font-size: 19px; color: var(--ink-2); }

/* Reveal on scroll */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- How it works ---------- */

.steps {
  --gap: clamp(24px, 4vw, 48px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin: clamp(48px, 7vw, 72px) 0 0;
  padding: 0;
  list-style: none;
}

/* The path from locked to unlocked, drawn across as the steps arrive. */
.steps::before {
  content: "";
  position: absolute;
  left: 32px;
  right: calc((100% - 2 * var(--gap)) / 3 - 32px);
  top: 31px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--ink-3) 0 6px, transparent 6px 14px);
  opacity: 0.45;
  transform-origin: left;
}
.js .steps::before { transform: scaleX(0); transition: transform 1.6s var(--ease-in-out) 0.3s; }
.js .steps.is-in::before { transform: scaleX(1); }

/* A vermilion seal walks the path: it leaves the lock in step 1, slips behind step 2 and
   arrives at step 3, which opens as it lands. Then it repeats the trip now and then.
   site.js measures the first and last icon centres into --x1/--y1 and --x3/--y3, so the
   same path works across the row on desktop and down the column on phones. */
.steps::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--vermilion);
  box-shadow: 0 0 0 4px var(--paper), 0 6px 14px -4px rgba(185, 75, 55, 0.6);
  opacity: 0;
  pointer-events: none;
}
.js .steps.is-in::after {
  animation:
    walk 1.8s var(--ease-in-out) 0.9s both,
    walk-again 6.5s var(--ease-in-out) 4.4s infinite;
}
@keyframes walk {
  0%   { opacity: 1; transform: translate(var(--x1), var(--y1)); }
  98%  { opacity: 1; transform: translate(var(--x3), var(--y3)); }
  100% { opacity: 0; transform: translate(var(--x3), var(--y3)); }
}
@keyframes walk-again {
  0%        { opacity: 1; transform: translate(var(--x1), var(--y1)); }
  30%       { opacity: 1; transform: translate(var(--x3), var(--y3)); }
  31%, 100% { opacity: 0; transform: translate(var(--x3), var(--y3)); }
}

.step h3 { margin-top: 22px; font-size: 1.6rem; line-height: 1.15; }
.step p { margin-top: 10px; color: var(--ink-2); }
.step .kicker { display: block; margin-top: 24px; font-size: 12px; }

.icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--hair);
  color: var(--ink);
  z-index: 1;
  transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}
.icon svg { width: 28px; height: 28px; overflow: visible; }
.icon .stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Step 1: the shackle drops shut. */
.lock-close .shackle { transform: translateY(0); }
.js .lock-close .shackle { transform: translateY(-5px); }
.js .is-in .lock-close .shackle { animation: shut 0.6s var(--ease-out) 0.5s both; }
@keyframes shut {
  0%   { transform: translateY(-5px); }
  60%  { transform: translateY(1px); }
  100% { transform: translateY(0); }
}

/* Step 2: three ways, popping in one by one as the seal passes. */
.pick .dot { fill: currentColor; transform-box: fill-box; transform-origin: center; }
.js .pick .dot { transform: scale(0); }
.js .is-in .pick .dot { animation: e-stamp 0.5s linear both; }
.js .is-in .pick .dot:nth-child(1) { animation-delay: 1.6s; }
.js .is-in .pick .dot:nth-child(2) { animation-delay: 1.75s; }
.js .is-in .pick .dot:nth-child(3) { animation-delay: 1.9s; }

/* Step 3: as the seal lands, the shackle lifts and swings open and the step turns vermilion. */
.lock-open .shackle { transform-box: view-box; transform-origin: 16px 11px; transform: translateY(-3px) rotate(28deg); }
.js .lock-open .shackle { transform: none; }
.js .is-in .lock-open .shackle { animation: unlock 0.9s var(--ease-out) 2.65s both; }
.js .is-in .icon-open { animation: glow 0.5s ease 2.65s both; }
@keyframes unlock {
  0%   { transform: none; }
  45%  { transform: translateY(-3px); }
  100% { transform: translateY(-3px) rotate(28deg); }
}
@keyframes glow {
  to { background: var(--vermilion); border-color: var(--vermilion); color: #FBF9F4; }
}

/* ---------- Ways to prove it ---------- */

.ways { display: grid; gap: 24px; margin-top: clamp(48px, 7vw, 72px); }

.way {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 540px;
  border-radius: 36px;
  background: var(--card);
  border: 1px solid var(--hair);
  overflow: hidden;
}
.ways > .way:nth-child(even) .way-visual { order: -1; }

.way-text {
  align-self: center;
  padding: clamp(32px, 5vw, 64px);
}
.way-text h3 { margin-top: 14px; font-size: clamp(2rem, 3.6vw, 2.75rem); line-height: 1.06; }
.way-text h3 .accent { color: var(--accent-text); }
.way-text p { margin-top: 16px; font-size: 18px; color: var(--ink-2); max-width: 36ch; }
.way-text .fits { margin-top: 22px; font-size: 15px; color: var(--ink-3); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--hair);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.tag svg { width: 18px; height: 18px; color: var(--vermilion); }
.tag .stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.way-visual {
  --pw: 250px;
  position: relative;
  align-self: end;
  height: calc(var(--pw) * 2.1 + 112px);
  overflow: hidden;
  background: radial-gradient(60% 55% at 50% 100%, var(--paper-deep), transparent 70%);
}
.way-visual .phone {
  --w: var(--pw);
  position: absolute;
  left: 50%;
  top: 56px;
  translate: -50% 0;
  transition: transform 0.9s var(--ease-out);
}
.js .way[data-reveal] .phone { transform: translateY(60px); }
.js .way[data-reveal].is-in .phone { transform: none; transition-delay: 0.15s; }
.way:hover .phone,
.js .way[data-reveal].is-in:hover .phone { transform: translateY(-6px); transition-delay: 0s; }

/* ---------- Seals & stats ---------- */

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: clamp(48px, 7vw, 72px);
}
.pair .way { grid-template-columns: 1fr; min-height: 0; }
.pair .way-text { align-self: start; padding-bottom: 0; }
.pair .way-text h3 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.pair .way-visual { --pw: 230px; height: calc(var(--pw) * 2.1 + 96px); }
.pair .way-visual .phone { top: 44px; }

/* A seal stamped onto the card, like the month seals in the app. */
.stamp {
  position: absolute;
  z-index: 2;
  right: clamp(20px, 8%, 56px);
  top: 70px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--vermilion);
  box-shadow: 0 0 0 5px var(--card), 0 10px 24px -8px rgba(185, 75, 55, 0.55);
  rotate: -12deg;
}
.stamp .enso { width: 50px; height: 50px; }
.stamp .enso .e-ink { fill: #FBF9F4; }
.stamp .enso .e-check { stroke: #FBF9F4; }
.js .stamp { opacity: 0; transform: scale(1.8); }
.js .is-in .stamp { animation: thunk 0.7s var(--ease-out) 0.9s both; }
@keyframes thunk {
  0%   { opacity: 0; transform: scale(1.8); }
  45%  { opacity: 1; transform: scale(0.92); }
  70%  { transform: scale(1.04) rotate(3deg); }
  100% { opacity: 1; transform: scale(1); }
}

/* ---------- Closing ---------- */

.closing { text-align: center; }
.closing .enso { width: clamp(120px, 18vw, 168px); height: auto; margin-inline: auto; }
.closing h2 { margin-top: 36px; font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1; }
.closing p { margin-top: 18px; font-size: 19px; color: var(--ink-2); }
.closing .get { margin-top: 30px; }
.closing .ask { margin-top: 40px; font-size: 15px; color: var(--ink-3); }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--hair); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 36px 44px;
  font-size: 15px;
  color: var(--ink-3);
}
.footer .brand { font-size: 18px; }
.footer .brand .enso { width: 24px; height: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Text pages (privacy, terms, support) ---------- */

.doc { padding-block: clamp(48px, 9vw, 96px) clamp(80px, 12vw, 128px); }
.doc-inner { max-width: 720px; margin-inline: auto; }
.doc h1 { font-size: clamp(2.6rem, 7vw, 4rem); line-height: 1.02; margin-top: 14px; }
.doc .updated { margin-top: 14px; color: var(--ink-3); font-size: 15px; }
.doc .updated strong { font-weight: 600; }
.doc h2 { margin-top: 56px; font-size: 1.75rem; line-height: 1.15; }
.doc h3 { margin-top: 32px; font-size: 1.3rem; }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin-top: 14px; }
.doc strong { color: var(--ink); font-weight: 700; }
.doc ul { margin: 14px 0 0; padding-left: 1.2em; }
.doc li { margin-top: 8px; padding-left: 4px; }
.doc li::marker { color: var(--vermilion); }
.doc a { word-break: break-word; }
.doc .lede { margin-top: 18px; font-size: 19px; }

.table-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid var(--hair); border-radius: 18px; background: var(--card); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--hair); }
.doc th { font-weight: 700; color: var(--ink); }
.doc td { color: var(--ink-2); }
.doc tr:last-child td { border-bottom: 0; }

/* Support */
.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 36px;
  padding: 28px;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--hair);
}
.contact h2 { margin: 0; font-size: 1.5rem; }
.contact p { margin-top: 6px; }
.faq { margin-top: 24px; border-top: 1px solid var(--hair); }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  rotate: 45deg;
  translate: 0 -3px;
  transition: rotate 0.3s var(--ease-out), translate 0.3s var(--ease-out);
}
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq details p { margin: 0 0 22px; }

/* 404 */
.lost { text-align: center; }
.lost .enso { width: 120px; height: auto; margin-inline: auto; }
.lost h1 { margin-top: 32px; }
.lost p { margin-top: 14px; }
.lost .pill { margin-top: 28px; }

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 40px; }
  /* Stacked, the path runs down from each step's icon to the next one. */
  .steps::before { content: none; }
  .step { position: relative; }
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 31px;
    top: 72px;
    bottom: -32px;
    width: 2px;
    background: repeating-linear-gradient(180deg, var(--ink-3) 0 6px, transparent 6px 14px);
    opacity: 0.45;
    transform-origin: top;
  }
  .js .step:not(:last-child)::after { transform: scaleY(0); transition: transform 0.8s var(--ease-in-out); }
  .js .steps.is-in .step:nth-child(1)::after { transform: scaleY(1); transition-delay: 0.4s; }
  .js .steps.is-in .step:nth-child(2)::after { transform: scaleY(1); transition-delay: 0.9s; }
  .step { display: grid; grid-template-columns: 64px 1fr; column-gap: 22px; }
  .step .icon { grid-row: span 3; position: relative; z-index: 1; }
  .step .kicker { margin-top: 2px; }
  .step h3 { margin-top: 6px; }

  .way, .pair { grid-template-columns: 1fr; }
  .way { min-height: 0; border-radius: 28px; }
  .ways > .way:nth-child(even) .way-visual { order: 0; }
  .way-text { padding-bottom: 8px; }
  .way-visual, .pair .way-visual { --pw: 220px; height: calc(var(--pw) * 2.1 + 88px); }
  .way-visual .phone, .pair .way-visual .phone { top: 40px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: clamp(2.7rem, 13.4vw, 3.6rem); }
  .stamp { width: 64px; height: 64px; top: 56px; }
  .stamp .enso { width: 42px; height: 42px; }
}

/* ---------- Print: everything visible ---------- */

@media print {
  .js [data-reveal] { opacity: 1; transform: none; }
  .nav { position: static; }
}

/* ---------- Reduced motion: everything arrives finished ---------- */

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