:root {
  color-scheme: dark;
  --background: #101012;
  --surface: #1b1b1e;
  --surface-raised: #232326;
  --line: #353539;
  --text: #fbfaf9;
  --muted: #bbb9be;
  --accent: #ff514f;
  --red: #d91824;
  --green: #54df83;
  --orange: #ffb000;
  --offer: #efff61;
  --radius: 20px;
  font: 100%/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, figure { margin: 0; }
img, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
[id] { scroll-margin-top: 5.8rem; }
h1, h2, h3, h4 { line-height: 1.08; letter-spacing: -.032em; }
h2 { font-size: clamp(2rem, 4.1vw, 3.4rem); font-weight: 820; }
h3 { font-size: clamp(1.35rem, 2.6vw, 2rem); font-weight: 780; }
h4 { font-size: 1.1rem; }
p { color: var(--muted); }

.container { width: min(100% - 3.5rem, 74rem); margin-inline: auto; }
.skip-link { position: fixed; z-index: 5; left: 1rem; top: 1rem; transform: translateY(-180%); background: var(--surface); padding: .65rem 1rem; }
.skip-link:focus { transform: none; }
.site-header { position: sticky; z-index: 3; top: 0; background: #101012f5; border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.header-inner { min-height: 4.65rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-size: 1.26rem; font-weight: 800; letter-spacing: -.05em; white-space: nowrap; }
.brand > span > span { color: var(--accent); }
.brand img { border-radius: 8px; }
.site-nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 1.75rem; }
.site-nav a, .site-footer nav a { color: var(--muted); text-decoration: none; font-weight: 620; font-size: .95rem; }
.site-nav a:hover, .site-footer nav a:hover { color: var(--text); text-decoration: underline; text-underline-offset: .25rem; }

.button { display: inline-flex; place-content: center; align-items: center; min-height: 3.15rem; border: 1px solid transparent; border-radius: .72rem; padding: .7rem 1.28rem; white-space: nowrap; font-weight: 760; font-size: 1rem; line-height: 1.2; text-decoration: none; color: var(--text); transition: background-color .16s, border-color .16s; }
.button-primary { background: var(--red); border-color: #ed3440; }
.button-primary:hover { background: #bd101b; border-color: #ff6060; }
.button-green { background: var(--green); border-color: var(--green); color: #102017; }
.button-green:hover { background: #78e99b; border-color: #78e99b; }
.button-outline { background: transparent; border-color: #5b585e; }
.button-outline:hover, .button-subtle:hover:not(:disabled) { background: #29282d; border-color: #7c767f; }
.button-subtle { background: var(--surface-raised); border-color: var(--line); }
.button-compact, .header-login { min-height: 2.65rem; padding: .58rem .8rem; font-size: .95rem; }
.button:disabled { opacity: .52; cursor: default; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }

.hero { overflow: clip; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .82fr; align-items: center; gap: clamp(2rem, 4vw, 4rem); padding-block: 3.1rem; min-height: 36.5rem; }
.hero-copy { padding-block: 1rem; }
.hero h1 { font-size: clamp(3rem, 4.7vw, 4.35rem); font-weight: 860; letter-spacing: -.065em; }
.hero h1 span { color: var(--accent); }
.hero-copy > p:not(.hero-offer) { margin-top: 1.35rem; max-width: 29rem; font-size: clamp(1.1rem, 1.8vw, 1.29rem); }
.hero .actions { margin-top: 1.55rem; }
.hero .hero-offer {
  display: grid;
  place-items: center;
  max-width: 29rem;
  min-height: clamp(3.6rem, 7.9vw, 5.35rem);
  margin-top: 1rem;
  border-radius: .8rem;
  padding: .7rem .9rem;
  color: #17180a;
  background: var(--offer);
  font-size: clamp(1.18rem, 2.45vw, 1.75rem);
  font-weight: 850;
  line-height: 1.17;
  text-align: center;
}
.hero-capture { display: grid; place-items: center; align-content: center; gap: .65rem; min-height: 31rem; position: relative; isolation: isolate; padding: 1rem; }
.hero-capture::before {
  position: absolute;
  inset: 3% -5% 6% 1%;
  z-index: -1;
  border-radius: 1.25rem;
  clip-path: polygon(34% 0, 100% 0, 100% 100%, 3% 100%);
  background: linear-gradient(145deg, #571c27, #a9242e 45%, #650d1e);
  content: "";
}
.phone { width: min(100%, 17.7rem); padding: .35rem; background: #202023; border: 1px solid #625057; border-radius: 1.45rem; box-shadow: 0 1rem 3.5rem #000a; }
.phone img { width: 100%; height: auto; aspect-ratio: 7 / 12; object-fit: cover; border-radius: 1.12rem; background: #161618; }
.capture-controls { display: flex; gap: .25rem; padding: .18rem; border-radius: .6rem; border: 1px solid #625057; background: #18171a; }
.capture-controls button { padding: .35rem .65rem; min-height: 2.4rem; border: 0; border-radius: .4rem; background: transparent; color: var(--muted); font-weight: 700; }
.capture-controls button[aria-pressed="true"] { background: #3d272c; color: var(--text); }

.section { padding-block: clamp(3.15rem, 6.5vw, 6.1rem); }
.section-heading { margin-bottom: 1.8rem; }
.section-heading p { margin-top: .75rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.05rem; margin-top: 1.7rem; }
.feature { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: clamp(1.1rem, 2.5vw, 1.65rem); }
.feature h3 { font-size: 1.35rem; margin-top: .85rem; }
.feature p { margin-top: .55rem; }
.feature-icon { display: block; width: 2.05rem; height: 1.8rem; border-radius: .4rem; position: relative; color: var(--accent); }
.icon-video { border: 2px solid currentColor; }
.icon-video::after { content: ""; position: absolute; left: .65rem; top: .36rem; border-block: .43rem solid transparent; border-left: .62rem solid currentColor; }
.icon-series { border: 2px solid var(--green); }
.icon-series::after { content: ""; position: absolute; left: .52rem; top: .33rem; width: .73rem; height: .48rem; border: solid var(--green); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.icon-history { border: solid var(--orange); border-width: 0 0 2px 2px; border-radius: 0; }
.icon-history::after { content: ""; position: absolute; left: .33rem; bottom: .2rem; width: .31rem; height: .53rem; background: var(--orange); box-shadow: .53rem -.23rem var(--orange), 1.06rem -.45rem var(--orange); }

.demo-section { background: #141416; border-block: 1px solid var(--line); }
.demo-card { border: 1px solid #464147; border-radius: var(--radius); background: var(--surface); overflow: clip; }
.demo-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; margin: 0; padding: .7rem; list-style: none; border-bottom: 1px solid var(--line); background: #151517; }
.demo-nav button { width: 100%; min-height: 3rem; display: flex; align-items: center; justify-content: center; gap: .5rem; color: var(--muted); border: 1px solid transparent; border-radius: .65rem; background: transparent; font-size: .96rem; font-weight: 650; }
.demo-nav button span { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; flex: none; border-radius: 50%; background: #2b2a2e; color: var(--text); font-size: .86rem; }
.demo-nav button[aria-current="step"] { color: var(--text); background: #362122; border-color: #783537; }
.demo-nav button[aria-current="step"] span { background: var(--red); }
.demo-nav button:disabled { color: #98959a; cursor: default; }
.demo-nav button:not(:disabled):hover { border-color: #8b5255; }
.demo-panel { display: grid; grid-template-columns: .88fr 1fr; gap: clamp(1.25rem, 4vw, 3rem); padding: clamp(1.1rem, 3.4vw, 2.5rem); align-items: center; min-height: 24.5rem; }
.demo-copy h4 { margin-top: 1rem; }
.demo-copy h3 { scroll-margin-top: 5.6rem; }
.demo-copy p { margin-block: 1rem 1.25rem; max-width: 32rem; }
.step-list { margin-block: .7rem 1.25rem; padding-left: 1.55rem; color: #dedce1; }
.step-list li { padding-left: .28rem; margin-bottom: .5rem; }
.step-list li::marker { color: var(--accent); font-weight: 760; }
.movement { overflow: clip; border-radius: 1rem; border: 1px solid var(--line); background: #131315; }
.movement-stage { position: relative; }
.movement-stage canvas { width: 100%; height: auto; }
.movement-label { position: absolute; bottom: .7rem; left: .8rem; color: var(--text); background: #161618; border: 1px solid #51494e; border-radius: .45rem; padding: .28rem .6rem; font-size: .95rem; }
.movement-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; padding: .65rem .8rem .25rem; }
.position-toggle { display: inline-flex; align-items: center; gap: .38rem; min-height: 2.6rem; color: #dedce1; cursor: pointer; }
.position-toggle input { width: 1.15rem; height: 1.15rem; accent-color: var(--red); margin: 0; }
.position-buttons { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .25rem; }
.position-buttons button { min-height: 2.65rem; border: 1px solid #565259; color: var(--text); background: var(--surface-raised); border-radius: .5rem; padding: .35rem .65rem; }
.position-buttons button[aria-pressed="true"] { border-color: var(--accent); background: #402123; }
.movement figcaption { padding: .42rem .8rem .72rem; color: var(--muted); font-size: .88rem; }
.correction-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.pose { border: 1px solid var(--line); border-radius: .8rem; overflow: clip; background: #141416; }
.pose canvas { width: 100%; height: auto; }
.pose figcaption { padding: .5rem; text-align: center; font-size: .9rem; font-weight: 700; }
.pose-error figcaption { color: #ff807d; }
.pose-ok figcaption { color: var(--green); }
.series-card { background: #141416; border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 2.4vw, 1.5rem); }
.series-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: .35rem .9rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.series-heading span { color: var(--muted); }
.series-heading span.is-complete { color: var(--green); font-weight: 700; }
.series-card form { margin-top: 1rem; }
.series-card label { display: block; margin-bottom: .35rem; font-weight: 660; }
.series-entry { display: flex; gap: .7rem; flex-wrap: wrap; }
.series-entry input { min-height: 3.15rem; width: 5.6rem; padding: .35rem .55rem; border: 1px solid #666068; border-radius: .62rem; background: #242326; color: var(--text); font-weight: 750; font-size: 1.2rem; }
.series-entry input[readonly] { background: var(--orange); color: #15130e; border-color: var(--orange); }
.rest { margin-top: .95rem; padding: .7rem .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; border: 1px solid #2d7750; border-radius: .72rem; background: #183323; }
.rest span { display: block; color: #d6f5e0; font-size: .9rem; }
.rest strong { color: var(--green); font-size: 1.65rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.state-feedback:not(:empty) { margin-top: .7rem; color: var(--green); }
.history h4 { margin-bottom: .9rem; }
.history-row { padding: .8rem 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.history-row div span { display: block; color: var(--muted); font-size: .92rem; }
.history-row > strong { white-space: nowrap; }
.recorded { color: var(--orange); }

.help-section { display: grid; grid-template-columns: .75fr 1fr; gap: 1rem clamp(1.5rem, 6vw, 5rem); }
.help-section .section-heading a { text-underline-offset: .2rem; color: var(--text); }
.questions { border-top: 1px solid var(--line); }
.questions details { border-bottom: 1px solid var(--line); }
.questions summary { cursor: pointer; padding: 1rem .2rem; color: var(--text); font-weight: 700; }
.questions details p { padding: 0 .2rem 1rem; }
.signup-wrap { padding-bottom: clamp(3rem, 6vw, 5.4rem); }
.signup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  border: 1px solid #ef4b56;
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2.9rem);
  background: linear-gradient(116deg, #ad1929, #991626 72%, #7d1423 72%, #721222);
}
.signup h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
.signup h2 span { color: var(--offer); }
.signup p { margin-top: .75rem; max-width: 43rem; color: #fff2f2; }
.button-signup { min-height: 3.4rem; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { padding-block: 1.4rem; flex-wrap: wrap; }
.site-footer .brand { font-size: 1.15rem; }
.site-footer nav { gap: .7rem 1.3rem; }

@media (max-width: 55rem) {
  .hero-grid { gap: 1.3rem; min-height: unset; }
  .hero h1 { font-size: clamp(2.6rem, 6vw, 3.7rem); }
  .hero-capture { min-height: unset; }
  .phone { width: min(100%, 16rem); }
  .help-section { grid-template-columns: 1fr; }
}

@media (max-width: 41rem) {
  .container { width: calc(100% - 2rem); }
  .header-inner { min-height: 4.05rem; }
  .brand img { width: 2rem; height: 2rem; }
  .site-nav { gap: .72rem; }
  .site-nav a { font-size: .87rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 1rem; padding-block: 2.75rem 1.6rem; }
  .hero h1 { font-size: clamp(2.3rem, 9.35vw, 3.4rem); }
  .hero-copy { padding: 0; }
  .hero-copy > p:not(.hero-offer) { margin-top: 1rem; }
  .hero-capture { padding: .2rem 0 .2rem; }
  .phone { width: min(100%, 15rem); }
  .feature-grid, .demo-panel { grid-template-columns: 1fr; }
  .feature-grid { gap: .75rem; }
  .demo-panel { min-height: unset; }
  .demo-nav { gap: .15rem; padding: .4rem; }
  .demo-nav button { flex-direction: column; gap: .16rem; font-size: .82rem; padding: .35rem .12rem; }
  .signup { flex-direction: column; align-items: flex-start; }
  .signup .button-signup { width: 100%; }
}

@media (max-width: 27rem) {
  .site-nav a:first-child { display: none; }
  .header-inner { gap: .55rem; }
  .header-login { min-height: 2.5rem; padding-inline: .65rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
