/* Meteor website
   Layout: dark charcoal pasteboard; content floats on rounded panels like the
   studio's, periwinkle reserved for actions and thread. Sections alternate
   between the pasteboard and a slightly raised band; feature deep dives
   alternate text and a live stage left and right. */
:root {
  --charcoal: #17181c;      /* page, as the app's window frame */
  --pasteboard: #1e1f24;    /* raised bands */
  --panel: #26272d;         /* floating panels and cards */
  --raised: #30313a;        /* hovered rows, chips */
  --line: #393a44;          /* hairlines */
  --text: #e7e7ef;
  --text-2: #b0b1bf;
  --text-3: #80818f;
  --peri: #8e97f7;          /* brand periwinkle */
  --peri-light: #b9c0ff;    /* filled buttons */
  --on-peri: #1a2266;       /* text on filled buttons */
  --peri-container: #353c86;/* selection, pills */
  --on-container: #dee0ff;
  --fabric: #f3f1ea;        /* light stages: thread on fabric */
  --amber: #f5c242;
  --orange: #f0862e;
  --red: #e5383b;
  --good: #7fd1b9;
  --glow: rgba(142, 151, 247, 0.18);

  --display: "Unbounded", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.5rem);
  --step-3: clamp(2.2rem, 1.4rem + 3.2vw, 4rem);

  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(0.2, 0, 0, 1);          /* emphasized */
  --ease-out: cubic-bezier(0.05, 0.7, 0.1, 1); /* emphasized decelerate */
  color-scheme: dark;
}

@font-face { font-family: "Figtree"; src: url("../fonts/figtree-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--charcoal);
  color: var(--text);
  font: 400 var(--step-0)/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--peri-light); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--peri-light); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 30;
  padding: 8px 14px; border-radius: 999px;
  background: var(--peri-light); color: var(--on-peri); font-weight: 600;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 var(--step--1)/1.2 var(--body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--peri);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(127, 209, 185, 0.18); }
@media (prefers-reduced-motion: no-preference) {
  .dot { animation: pulse 2.4s var(--ease) infinite; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(127, 209, 185, 0); } }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 var(--step-0)/1 var(--body); text-decoration: none;
  transition: transform 220ms var(--ease), background-color 220ms var(--ease), color 220ms var(--ease), box-shadow 220ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--peri-light); color: var(--on-peri); box-shadow: 0 6px 24px -8px rgba(185, 192, 255, 0.55); }
.btn-primary:hover { background: #cfd4ff; color: var(--on-peri); box-shadow: 0 10px 32px -8px rgba(185, 192, 255, 0.7); }
.btn-ghost { background: var(--raised); color: var(--text); }
.btn-ghost:hover { background: var(--line); color: var(--text); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: var(--step--1); }
.btn-large { min-height: 52px; padding: 0 26px; }

/* -------------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(23, 24, 28, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(57, 58, 68, 0.6);
}
.nav-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; }
.wordmark { font: 600 1.15rem/1 var(--display); letter-spacing: -0.01em; }
.pill {
  font: 600 0.7rem/1 var(--body); letter-spacing: 0.04em;
  padding: 4px 8px; border-radius: 999px;
  background: var(--peri-container); color: var(--on-container);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) {
  color: var(--text-2); text-decoration: none; font-weight: 500; font-size: var(--step--1);
  padding: 8px 12px; border-radius: 999px; transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.nav-links a:not(.btn):hover { background: var(--raised); color: var(--text); }
.nav-cta { margin-left: 8px; }
.menu-button { display: none; }
@media (max-width: 820px) {
  .menu-button {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
    background: var(--raised); border: 0; color: var(--text); cursor: pointer;
  }
  .menu-icon, .menu-icon::before, .menu-icon::after {
    display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform 260ms var(--ease), opacity 200ms var(--ease);
  }
  .menu-icon { position: relative; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -6px; }
  .menu-icon::after { top: 6px; }
  .menu-button[aria-expanded="true"] .menu-icon { background: transparent; }
  .menu-button[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
  .menu-button[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }
  /* With script the menu folds away behind the button; without, it stays open */
  .js .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px));
    background: var(--charcoal); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.8);
    transform-origin: top; transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform 260ms var(--ease-out), opacity 200ms var(--ease), visibility 0s linear 260ms;
  }
  .js .nav-links.is-open { transform: none; opacity: 1; visibility: visible; transition: transform 260ms var(--ease-out), opacity 200ms var(--ease), visibility 0s; }
  .js .nav-links a:not(.btn) { padding: 12px 14px; font-size: var(--step-0); }
  .nav-cta { margin: 8px 0 0; }
  html:not(.js) .nav-links { flex-wrap: wrap; }
  html:not(.js) .menu-button { display: none; }
}

/* ------------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 7vw, 96px) clamp(40px, 5vw, 64px); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 120%; z-index: -1;
  background: radial-gradient(closest-side, rgba(142, 151, 247, 0.16), transparent 70%);
}
.sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero-copy { display: grid; gap: 22px; min-width: 0; justify-items: start; }
.hero h1 { font: 600 var(--step-3)/1.04 var(--display); letter-spacing: -0.04em; max-width: 13ch; }
.lede { color: var(--text-2); font-size: var(--step-1); line-height: 1.55; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { color: var(--text-3); font-size: var(--step--1); }

/* The hoop: a round frame the mark is sewn in */
.hoop { margin: 0; display: grid; justify-items: center; gap: 18px; min-width: 0; }
.hoop-ring {
  position: relative; width: min(100%, 460px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #2a2c3a 0%, #1e1f26 62%, #17181c 100%);
  box-shadow:
    0 0 0 10px #2b2c34,
    0 0 0 11px #3e3f4a,
    0 0 0 22px #24252c,
    0 30px 80px -20px rgba(0, 0, 0, 0.7),
    0 0 120px -10px var(--glow);
  display: grid; place-items: center;
  max-width: calc(100% - 44px);
}
.hoop-ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 4px),
                    repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 4px);
}
.sew-canvas { width: 100%; height: 100%; display: block; }
.hoop .sew-canvas { width: 86%; height: 86%; }
.readout { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; font-size: var(--step--1); margin-top: 14px; }
.readout-row { display: inline-flex; gap: 8px; align-items: baseline; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.readout-label { color: var(--text-3); }

.formats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px;
  margin: clamp(48px, 6vw, 72px) 0 0; padding: 20px 0 0; list-style: none;
  border-top: 1px solid rgba(57, 58, 68, 0.6);
  color: var(--text-3); font-size: var(--step--1);
}
.formats strong { color: var(--text); font-weight: 600; margin-right: 4px; }

/* ---------------------------------------------------------------- bands */
.band { padding-block: clamp(72px, 9vw, 128px); }
.band-alt { background: var(--pasteboard); border-block: 1px solid rgba(57, 58, 68, 0.5); }
.section-head { display: grid; gap: 14px; max-width: 46rem; margin-bottom: clamp(32px, 4vw, 52px); justify-items: start; }
.section-head h2, .art-copy h2, .closing h2 { font: 600 var(--step-2)/1.12 var(--display); letter-spacing: -0.035em; }
.section-lede { color: var(--text-2); font-size: var(--step-1); line-height: 1.55; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }

/* ---------------------------------------------------------- how it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step {
  position: relative; display: grid; gap: 10px; align-content: start; min-width: 0;
  padding: 24px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--line);
}
.step-num {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--peri-container); color: var(--on-container); font: 600 0.95rem/1 var(--display);
}
.step h3 { font: 600 var(--step-0)/1.3 var(--body); margin-top: 6px; }
.step p { color: var(--text-2); font-size: var(--step--1); line-height: 1.6; }
/* A running stitch joins the steps on wide screens */
@media (min-width: 1001px) {
  .step:not(:last-child)::after {
    content: ""; position: absolute; top: 41px; left: calc(24px + 36px + 10px); right: -6px; height: 2px;
    background: repeating-linear-gradient(90deg, var(--peri) 0 7px, transparent 7px 12px); opacity: 0.45;
  }
}

/* ---------------------------------------------------------- stitch library */
.library { display: grid; gap: 18px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  appearance: none; border: 1px solid var(--line); background: transparent; color: var(--text-2);
  font: 500 var(--step--1)/1 var(--body); padding: 10px 16px; border-radius: 999px; cursor: pointer;
  transition: background-color 220ms var(--ease), color 220ms var(--ease), border-color 220ms var(--ease);
}
.tab:hover { color: var(--text); background: var(--raised); }
.tab[aria-selected="true"] { background: var(--peri-container); border-color: transparent; color: var(--on-container); }
.library-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); padding: clamp(18px, 3vw, 36px); align-items: center; }
@media (max-width: 820px) { .library-panel { grid-template-columns: minmax(0, 1fr); } }
.swatch {
  position: relative; aspect-ratio: 1; width: 100%; max-width: 460px; justify-self: center;
  border-radius: var(--radius); background: var(--fabric); overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.swatch::after, .stage-light::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,0.035) 0 1px, transparent 1px 3px),
                    repeating-linear-gradient(90deg, rgba(0,0,0,0.03) 0 1px, transparent 1px 3px);
}
.library-text { display: grid; gap: 14px; min-width: 0; }
.library-text h3 { font: 600 var(--step-1)/1.2 var(--display); letter-spacing: -0.02em; }
.library-text p { color: var(--text-2); max-width: 36em; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 0; }
.stats div { background: var(--raised); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.stats dt { color: var(--text-3); font-size: var(--step--1); }
.stats dd { margin: 4px 0 0; font: 600 var(--step-0)/1.2 var(--body); }
.type-cloud { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.type-cloud li { font-size: var(--step--1); color: var(--text-2); padding: 6px 12px; border-radius: 999px; border: 1px dashed var(--line); }

/* ------------------------------------------------------------ deep dives */
.dive {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-block: clamp(36px, 5vw, 64px);
}
.dive + .dive { border-top: 1px solid rgba(57, 58, 68, 0.6); }
.dive-flip { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
.dive-flip .dive-copy { order: 2; }
@media (max-width: 900px) {
  .dive { grid-template-columns: minmax(0, 1fr); }
  /* the demo is the point: show it before the text on narrow screens */
  .picture-dive .stage { order: -1; }
  .dive-flip .dive-copy { order: 0; }
}
.dive-copy { display: grid; gap: 16px; min-width: 0; justify-items: start; }
.dive-copy h3, .dive-copy .dive-title { font: 600 var(--step-2)/1.12 var(--display); letter-spacing: -0.035em; font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.2rem); }
.dive-copy > p { color: var(--text-2); font-size: var(--step-0); line-height: 1.65; max-width: 34em; }
.ticks { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; color: var(--text-2); }
.ticks li::before {
  content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: linear-gradient(var(--peri), var(--peri)) center / 10px 2px no-repeat, var(--peri-container);
}
.note { color: var(--text-3); font-size: var(--step--1); min-height: 3.2em; max-width: 34em; }

.stage { position: relative; margin: 0; padding: 14px; display: grid; gap: 12px; min-width: 0; }
.stage-canvas { width: 100%; height: auto; aspect-ratio: 7 / 5; border-radius: 14px; display: block; background: #101116; }
.stage-light .stage-canvas { background: var(--fabric); }
.stage-light::after { inset: 14px; border-radius: 14px; }
.stage-wide { aspect-ratio: 5 / 2; }
.stage-square { aspect-ratio: 1; max-width: 520px; justify-self: center; }
.stage-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stage-steps span {
  text-align: center; font-size: var(--step--1); color: var(--text-3);
  padding: 8px 6px; border-radius: 999px; background: var(--charcoal);
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.stage-steps span.is-on { background: var(--peri-container); color: var(--on-container); }

/* Segmented control, as the app's PanelSegmented */
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--charcoal); border: 1px solid var(--line); }
.segmented button {
  appearance: none; border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  font: 600 var(--step--1)/1 var(--body); padding: 10px 18px; border-radius: 999px;
  transition: background-color 240ms var(--ease), color 240ms var(--ease);
}
.segmented button[aria-checked="true"] { background: var(--peri-container); color: var(--on-container); }
.toggle { min-height: 40px; font-size: var(--step--1); }
.toggle[aria-pressed="true"] { background: var(--peri-container); color: var(--on-container); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 0; color: var(--text-3); font-size: var(--step--1); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.swatch-dot { width: 12px; height: 12px; border-radius: 4px; }
.swatch-dot.amber { background: var(--amber); }
.swatch-dot.orange { background: var(--orange); }
.swatch-dot.red { background: var(--red); }

/* Design check demo, styled as the app's dialog */
.check-demo { margin: 0; padding: clamp(18px, 3vw, 28px); display: grid; gap: 16px; min-width: 0; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9); }
.check-head { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.check-head strong { font: 600 var(--step-1)/1.2 var(--display); letter-spacing: -0.02em; }
.check-sub { color: var(--text-3); font-size: var(--step--1); }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.check-item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: start; transition: opacity 400ms var(--ease); }
.check-mark {
  width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; position: relative;
  background: var(--orange); transition: background-color 300ms var(--ease), transform 300ms var(--ease);
}
.check-item.note .check-mark { background: var(--text-3); }
.check-text { display: grid; gap: 2px; color: var(--text-2); font-size: var(--step--1); min-width: 0; }
.check-text b { color: var(--text); font-weight: 600; font-size: var(--step-0); }
.check-fix { color: var(--peri-light); font-size: var(--step--1); font-weight: 600; white-space: nowrap; }
.check-item.is-fixed { opacity: 0.55; }
.check-item.is-fixed .check-mark { background: var(--good); transform: scale(1.25); }
.check-item.is-fixed .check-fix { visibility: hidden; }
.check-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding-top: 6px; }
.check-done { color: var(--good); font-weight: 600; font-size: var(--step--1); opacity: 0; transition: opacity 400ms var(--ease); margin-right: auto; }
.check-demo.is-clear .check-done { opacity: 1; }
.check-all { cursor: default; }
.check-all.is-pressed { transform: scale(0.95); }

/* ----------------------------------------------------------------- studio */
.window {
  margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  background: var(--charcoal);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.02), 0 0 160px -40px var(--glow);
  transform-origin: 50% 0;
}
.window-bar { display: flex; gap: 8px; padding: 12px 14px; background: #1b1c21; border-bottom: 1px solid var(--line); }
.window-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--raised); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .window { animation: window-in linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    @keyframes window-in {
      from { transform: perspective(1400px) rotateX(14deg) scale(0.94); }
      to { transform: none; }
    }
  }
}
.devices { position: relative; padding-bottom: clamp(40px, 7vw, 90px); }
.devices .window { width: 86%; }
.tablet {
  position: absolute; right: 0; bottom: 0; width: 40%; margin: 0;
  padding: clamp(6px, 0.9vw, 12px); border-radius: clamp(14px, 1.8vw, 24px);
  background: #0e0f12; border: 1px solid #3a3b46;
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.tablet img { display: block; width: 100%; height: auto; border-radius: clamp(6px, 0.8vw, 12px); }
@media (max-width: 720px) {
  .devices { padding-bottom: 0; display: grid; gap: 20px; }
  .devices .window { width: 100%; }
  .tablet { position: static; width: 78%; justify-self: center; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .tablet { animation: tablet-in linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
    @keyframes tablet-in {
      from { transform: translateY(70px) rotate(-3deg); }
      to { transform: none; }
    }
  }
}
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(40px, 5vw, 64px); }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feature {
  display: grid; gap: 10px; align-content: start; min-width: 0;
  padding: 24px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--line);
  transition: transform 260ms var(--ease), border-color 260ms var(--ease), background-color 260ms var(--ease);
}
.feature:hover { transform: translateY(-3px); border-color: #4a4c5c; background: #2a2b32; }
.feature h3 { font: 600 var(--step-0)/1.3 var(--body); }
.feature p { color: var(--text-2); font-size: var(--step--1); line-height: 1.6; }
.feature-icon, .platform-icon { width: 44px; height: 44px; fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature-icon .stitch { stroke: var(--peri); stroke-dasharray: 4 3; stroke-width: 2.4; }
@media (prefers-reduced-motion: no-preference) {
  .feature:hover .feature-icon .stitch { animation: run 900ms linear infinite; }
}
@keyframes run { to { stroke-dashoffset: -14; } }

/* ------------------------------------------------------------------ specs */
.machine-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; margin-bottom: 16px; }
.machine-pick button {
  display: grid; gap: 2px; justify-items: start; text-align: left; min-height: 56px; padding: 10px 14px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text-2);
  font: inherit; cursor: pointer; transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}
.machine-pick button b { font-weight: 600; color: var(--text); }
.machine-pick button span { font-size: var(--step--1); color: var(--text-3); }
.machine-pick button:hover { background: var(--raised); }
.machine-pick button[aria-checked="true"] { background: var(--peri-container); border-color: var(--peri); }
.machine-pick button[aria-checked="true"] b, .machine-pick button[aria-checked="true"] span { color: var(--on-container); }
.machine-pick button:focus-visible { outline: 3px solid var(--peri); outline-offset: 2px; }
.spec dd.is-changed { animation: spec-flash 500ms var(--ease); }
@keyframes spec-flash { from { color: var(--peri-light); transform: translateY(4px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 720px) { .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.spec { background: var(--panel); padding: clamp(18px, 3vw, 30px); min-width: 0; }
.spec dt { color: var(--text-3); font-size: var(--step--1); }
.spec dd { margin: 6px 0 0; font: 600 var(--step-1)/1.25 var(--display); letter-spacing: -0.02em; overflow-wrap: anywhere; }

/* -------------------------------------------------------------------- art */
.art { padding-block: clamp(72px, 9vw, 120px); }
.art-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (max-width: 900px) { .art-grid { grid-template-columns: minmax(0, 1fr); } }
.art-figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.9); }
.art-figure img { width: 100%; }
.art-copy { display: grid; gap: 14px; min-width: 0; justify-items: start; }
.art-copy p:last-child { color: var(--text-2); }

/* -------------------------------------------------------------- download */
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .platforms { grid-template-columns: minmax(0, 1fr); } }
.platform { display: grid; gap: 12px; align-content: start; padding: 26px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.platform h3 { font: 600 var(--step-1)/1.2 var(--display); letter-spacing: -0.02em; }
.reqs { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; color: var(--text-2); font-size: var(--step--1); }
.reqs li { display: flex; gap: 8px; align-items: baseline; }
.reqs li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); transform: translateY(-2px); }
.platform-get { justify-self: start; margin-top: 6px; }
.platform.is-yours { border-color: var(--peri); box-shadow: 0 0 0 1px var(--peri) inset; }
.platform-yours {
  justify-self: start; padding: 4px 10px; border-radius: 999px; font-size: var(--step--1); font-weight: 600;
  background: var(--peri-container); color: var(--on-container);
}
.platforms.has-yours .platform:not(.is-yours) .platform-get { background: var(--raised); color: var(--text); box-shadow: none; }
.platforms.has-yours .platform:not(.is-yours) .platform-get:hover { background: #3b3c47; }
.hero-other a { color: var(--peri-light); white-space: nowrap; }
.platform-note { margin: 0; color: var(--text-3); font-size: var(--step--1); line-height: 1.5; }
.platform-note a, .platform-more a { color: var(--peri-light); white-space: nowrap; }
.platform-note code { font-size: 0.95em; color: var(--text-2); }
.platform-more { margin: 24px 0 0; text-align: center; color: var(--text-3); font-size: var(--step--1); }
.status { justify-self: start; margin-top: 6px; font-size: var(--step--1); font-weight: 600; padding: 8px 14px; border-radius: 999px; background: var(--raised); color: var(--text-2); }


/* --------------------------------------------- picture to stitches compare */
.compare { --pos: 50%; }
.compare-frame {
  position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; justify-self: center;
  border-radius: 14px; overflow: hidden; background: #ffffff; isolation: isolate;
  touch-action: pan-y;
}
.compare-frame > img, .compare-sew { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.compare-before { transition: opacity 600ms var(--ease); }
.compare-after { opacity: 0; transition: opacity 700ms var(--ease); }
.compare-sew { opacity: 0; transition: opacity 500ms var(--ease); }
.compare.is-sewing .compare-sew { opacity: 1; }
.compare.is-sewing .compare-before { opacity: 0.32; }
.compare.is-thread .compare-after,
.compare.is-done .compare-after { opacity: 1; }
.compare.is-thread .compare-sew,
.compare.is-done .compare-sew { opacity: 0; }
.compare.is-done .compare-before { opacity: 1; }
.compare.is-done .compare-after { clip-path: inset(0 0 0 var(--pos)); }
.compare-line, .compare-tag, .compare-range { opacity: 0; pointer-events: none; transition: opacity 400ms var(--ease); }
.compare.is-done .compare-line, .compare.is-done .compare-tag { opacity: 1; }
.compare.is-done .compare-range { pointer-events: auto; }
.compare-line {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: var(--peri-light); box-shadow: 0 0 0 1px rgba(23, 24, 28, 0.25);
}
.compare-knob {
  position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  background: var(--peri-light); box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.6);
}
.compare-knob::before, .compare-knob::after {
  content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -5px;
  border-block: 5px solid transparent;
}
.compare-knob::before { left: 9px; border-right: 7px solid var(--on-peri); }
.compare-knob::after { right: 9px; border-left: 7px solid var(--on-peri); }
.compare-range:focus-visible ~ .compare-line .compare-knob,
.compare-frame:has(.compare-range:focus-visible) .compare-knob { outline: 3px solid var(--peri); outline-offset: 3px; }
.compare-tag {
  position: absolute; bottom: 12px; padding: 5px 10px; border-radius: 999px; font-size: var(--step--1); font-weight: 600;
  background: rgba(23, 24, 28, 0.72); color: var(--text);
}
.compare-tag-before { left: 12px; }
.compare-tag-after { right: 12px; }
.compare-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
  -webkit-appearance: none; appearance: none; background: transparent;
}
.compare.is-done .compare-range { opacity: 0; }

/* -------------------------------------------------------------------- faq */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } }
.faq { display: grid; gap: 10px; min-width: 0; }
.faq details { border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); transition: border-color 220ms var(--ease); }
.faq details[open] { border-color: #4a4c5c; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg) translateY(-3px); transition: transform 240ms var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.faq details p { padding: 0 20px 20px; color: var(--text-2); max-width: 44em; }

/* --------------------------------------------------------------- closing */
.closing { padding-block: clamp(80px, 10vw, 140px); position: relative; overflow: hidden; isolation: isolate; text-align: center; }
.closing::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: min(900px, 120vw); aspect-ratio: 1; z-index: -1;
  transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(142, 151, 247, 0.2), transparent 70%);
}
.closing-inner { display: grid; justify-items: center; gap: 24px; }
.closing-mark { border-radius: 18px; box-shadow: 0 20px 60px -20px rgba(142, 151, 247, 0.6); }
.closing h2 { max-width: 18ch; }

/* ---------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--line); padding-block: 48px calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--text-3); font-size: var(--step--1); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
.footer-brand { display: grid; gap: 12px; align-content: start; justify-items: start; }
.footer-brand .brand-mark { width: 28px; height: 28px; border-radius: 7px; }
.footer-brand p { max-width: 26em; }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col h2 { font: 600 var(--step--1)/1.2 var(--body); color: var(--text); margin-bottom: 4px; }
.footer-col a { color: var(--text-2); text-decoration: none; }
.footer-col a:hover { color: var(--text); }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(57, 58, 68, 0.6); }

/* ------------------------------------------------------------ reveal-in */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Content lifts in as it enters; it is visible at rest without it */
    .section-head, .feature, .platform, .spec, .art-copy, .dive-copy, .step, .faq details {
      animation: lift linear both; animation-timeline: view(); animation-range: entry 0% entry 60%;
    }
    @keyframes lift { from { transform: translateY(18px); opacity: 0.4; } to { transform: none; opacity: 1; } }
  }
}

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

/* --------------------------------------------------- privacy and 404 pages */
.legal { padding-block: clamp(56px, 8vw, 104px); max-width: 760px; display: grid; gap: 18px; justify-items: start; }
.legal h1 { font: 600 var(--step-3)/1.05 var(--display); letter-spacing: -0.04em; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); }
.legal h2 { font: 600 var(--step-1)/1.25 var(--display); letter-spacing: -0.02em; margin-top: 20px; }
.legal p { color: var(--text-2); max-width: 40em; }
.legal-updated { color: var(--text-3); font-size: var(--step--1); }
.notfound { min-height: 60vh; align-content: center; }
