/*
 * lapsy.app. The tokens are the app's (docs/LAPSY.md, section 8; src/constants/theme.ts):
 * scripts/lib/web-site.test.js fails if a color, size or duration here stops matching them.
 * Sizes are in rem, so the page grows with the browser's text size (16 px = 1 rem).
 * No inline styles anywhere: the site's policy (web/public/_headers) only allows this file.
 */

@font-face {
  font-family: 'Figtree';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/figtree-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Figtree';
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/figtree-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Figtree';
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/figtree-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Figtree';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/figtree-700.woff2') format('woff2');
}

/* Bricolage Grotesque, cut at the optical size of each title (assets/fonts/README.md). */
@font-face {
  font-family: 'Bricolage Grotesque 64pt';
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/bricolage-64-extrabold.woff2') format('woff2');
}

@font-face {
  font-family: 'Bricolage Grotesque 44pt';
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/bricolage-44-extrabold.woff2') format('woff2');
}

@font-face {
  font-family: 'Bricolage Grotesque 28pt';
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/bricolage-28-extrabold.woff2') format('woff2');
}

@font-face {
  font-family: 'Bricolage Grotesque 22pt';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/bricolage-22-bold.woff2') format('woff2');
}

:root {
  color-scheme: light dark;

  --background: #FFFFFF;
  --surface: #F4F4F5;
  --surface-elevated: #F4F4F5;
  --elevated: #FFFFFF;
  --border: #E4E4E7;
  --text: #111111;
  --text-secondary: #6B6B70;
  --accent: #E23C69;
  --accent-button: #E23C69;
  --text-accent: #C42F59;
  --accent-soft: #FDEBF0;
  --accent-soft-text: #9E2447;
  --success: #1A7F54;
  --on-fill: #FFFFFF;
  --viewfinder: #2C2C2E;
  --camera-control: rgba(11, 11, 12, 0.35);
  /* The floating bar is the app's tab bar (TabBarColors, tabBarShadow): background at
     tabBarFill in light, surface in dark, a border at 90 % and its shadow. */
  --bar-fill: rgba(255, 255, 255, 0.72);
  --bar-border: rgba(255, 255, 255, 0.9);
  --bar-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  /* Something raised on top of `surface`: the language button and the notification. */
  --on-surface: var(--elevated);

  --screen-margin: 1.25rem; /* screenMargin 20 */
  --space-xxs: 0.25rem; /* spaceXxs 4 */
  --space-xs: 0.5rem; /* spaceXs 8 */
  --space-sm: 0.75rem; /* spaceSm 12 */
  --space-md: 1rem; /* spaceMd 16 */
  --space-lg: 1.5rem; /* spaceLg 24 */
  --space-xl: 2rem; /* spaceXl 32 */
  --gap-tight: 0.125rem; /* gapTight 2 */
  --gap-icon: 0.375rem; /* gapIcon 6 */
  --card-padding: 1rem; /* cardPadding 16 */
  --badge-padding-x: 0.625rem; /* badgePaddingX 10 */
  --empty-state-padding-top: 3.5rem; /* emptyStatePaddingTop 56 */
  --radius-card: 1.75rem; /* radiusCard 28 */
  --radius-card-photo: 0.75rem; /* radiusCardPhoto 12 */
  --radius-chip: 1.25rem; /* radiusChip 20 */
  --radius-group: 1.25rem; /* radiusGroup 20 */
  --radius-badge: 0.75rem; /* radiusBadge 12 */
  --radius-photo: 2rem; /* radiusPhoto 32 */
  --radius-tab-bar: 2.25rem; /* radiusTabBar 36 */
  --radius-progress: 0.25rem; /* radiusProgress 4 */
  --radius-end-card-preview: 1.5rem; /* radiusEndCardPreview 24: the 9:16 previews */
  --min-touch: 2.75rem; /* minTouch 44 */
  --chip-height: 2.5rem; /* chipHeight 40 */
  --progress-height: 0.5rem; /* progressHeight 8 */
  --video-preview-width: 12.5rem; /* videoPreviewWidth 200 */
  --tab-bar-padding: 0.5rem; /* tabBarPadding 8 */
  --hairline: 1px; /* hairline 1 */
  --border-focus: 2px; /* borderFocus 2 */
  --border-outline: 1.5px; /* borderOutline 1.5 */
  --ghost-opacity: 0.35; /* ghostOpacity */
  --tab-bar-blur: 24px; /* tabBarBlur */
  --pop-scale: 1.03; /* popScale */

  /* Web only: the width of the home page and the space above each of its sections
     (2 × spaceXl on a phone, 3 × spaceXl on a wide screen). */
  --content-width: 42.5rem;
  --landing-width: 70rem;
  --section-space: 4rem;

  --font-display-web: 800 4rem/4.25rem 'Bricolage Grotesque 64pt', system-ui, sans-serif; /* displayWeb 64/68 */
  --font-display: 800 2.75rem/3rem 'Bricolage Grotesque 44pt', system-ui, sans-serif; /* display 44/48 */
  --font-title1: 800 1.75rem/2rem 'Bricolage Grotesque 28pt', system-ui, sans-serif; /* title1 28/32 */
  --font-title2: 700 1.375rem/1.625rem 'Bricolage Grotesque 22pt', system-ui, sans-serif; /* title2 22/26 */
  --font-headline: 600 1.0625rem/1.375rem 'Figtree', system-ui, sans-serif; /* headline 17/22 */
  --font-body: 400 1.0625rem/1.5rem 'Figtree', system-ui, sans-serif; /* body 17/24 */
  --font-subhead: 400 0.9375rem/1.25rem 'Figtree', system-ui, sans-serif; /* subhead 15/20 */
  --font-footnote: 400 0.8125rem/1.125rem 'Figtree', system-ui, sans-serif; /* footnote 13/18 */
  --font-caption: 500 0.75rem/1rem 'Figtree', system-ui, sans-serif; /* caption 12/16 */
  --title-tracking: -0.5px;

  /* Motion (Motion in theme.ts). The springs are drawn with linear(): springLogo bounces
     (dampingRatio 0.6) and springUI barely does (0.85). */
  --spring-logo-duration: 600ms;
  --spring-logo: linear(0, 0.045, 0.155, 0.302, 0.46, 0.614, 0.751, 0.865, 0.954, 1.019, 1.062, 1.085, 1.094, 1.093, 1.084, 1.07, 1.056, 1.041, 1.027, 1.016, 1.007, 1, 0.995, 0.992, 1);
  --spring-ui-duration: 350ms;
  --spring-ui: linear(0, 0.047, 0.156, 0.29, 0.426, 0.553, 0.662, 0.753, 0.825, 0.881, 0.923, 0.953, 0.974, 0.988, 0.997, 1.002, 1);
  --splash-stagger: 150ms;
  --duration-base: 250ms;
  --duration-fast: 150ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0B0B0C;
    --surface: #1C1C1E;
    --surface-elevated: #2C2C2E;
    --elevated: #1C1C1E;
    --border: #2C2C2E;
    --text: #F5F5F7;
    --text-secondary: #A1A1A6;
    --accent: #FF5C86;
    --accent-button: #E23C69;
    --text-accent: #FF7A9C;
    --accent-soft: #4A1022;
    --accent-soft-text: #FFFFFF;
    --success: #34C77B;
    --on-fill: #FFFFFF;
    --viewfinder: #2C2C2E;
    --camera-control: rgba(11, 11, 12, 0.35);
    --bar-fill: rgba(28, 28, 30, 0.72);
    --bar-border: rgba(44, 44, 46, 0.9);
    --bar-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --on-surface: var(--surface-elevated);
  }
}

@media (min-width: 64rem) {
  :root {
    --section-space: 6rem;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: var(--font-body);
  overflow-wrap: break-word;
}

h2,
h3,
.stores {
  text-wrap: balance;
}

a {
  color: var(--text-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:focus-visible,
.case-list:focus-visible {
  outline: var(--border-focus) solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--space-xxs);
}

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

.icon {
  display: block;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
}

.skip {
  position: absolute;
  z-index: 20;
  left: var(--screen-margin);
  top: -100px;
  padding: var(--space-xs) var(--space-md);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-group);
}

.skip:focus {
  top: var(--space-xs);
}

/* The floating bar: the logo and the language (decision of 1 November 2026). */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: var(--space-sm) var(--screen-margin) 0;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  max-width: var(--landing-width);
  margin: 0 auto;
  padding: var(--tab-bar-padding) var(--tab-bar-padding) var(--tab-bar-padding) var(--screen-margin);
  background: var(--bar-fill);
  border: var(--hairline) solid var(--bar-border);
  border-radius: var(--radius-tab-bar);
  box-shadow: var(--bar-shadow);
  -webkit-backdrop-filter: blur(var(--tab-bar-blur));
  backdrop-filter: blur(var(--tab-bar-blur));
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--min-touch);
}

.brand img {
  height: 2rem;
  width: auto;
}

.language {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-icon);
  min-height: var(--min-touch);
  padding: 0 var(--space-md) 0 var(--space-sm);
  border-radius: calc(var(--min-touch) / 2);
  background: var(--on-surface);
  color: var(--text);
  font: var(--font-subhead);
  font-weight: 600;
  text-decoration: none;
}

.language .icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Legal pages */

.page-legal main {
  max-width: calc(var(--content-width) + 2 * var(--screen-margin));
  margin: 0 auto;
  padding: var(--space-lg) var(--screen-margin) var(--section-space);
}

.page-legal h1 {
  font: var(--font-title1);
  letter-spacing: var(--title-tracking);
  margin: var(--space-lg) 0 var(--space-xs);
}

.page-legal h2 {
  font: var(--font-title2);
  letter-spacing: var(--title-tracking);
  margin: var(--space-xl) 0 var(--space-sm);
  scroll-margin-top: 6rem;
}

.page-legal h3 {
  font: var(--font-headline);
  margin: var(--space-lg) 0 var(--space-xs);
}

.page-legal p,
.page-legal ul,
.page-legal ol {
  margin: 0 0 var(--space-md);
}

.page-legal ul,
.page-legal ol {
  padding-left: var(--space-lg);
}

.page-legal li {
  margin-bottom: var(--space-xs);
}

.page-legal li > ul,
.page-legal li > ol {
  margin: var(--space-xs) 0 0;
}

/* "Versión 1 · Vigente desde…" under the title of a legal page. */
.page-legal main > h1 + p {
  font: var(--font-footnote);
  color: var(--text-secondary);
}

.table {
  margin: 0 0 var(--space-md);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius-group);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font: var(--font-subhead);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-sm);
}

th {
  background: var(--surface);
  font-weight: 600;
}

tr + tr td,
tbody tr:first-child td {
  border-top: var(--hairline) solid var(--border);
}

/* On a phone each row becomes a card, with its column names. */
@media (max-width: 40rem) {
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  table,
  tbody,
  tr,
  td {
    display: block;
  }

  tbody tr:first-child td {
    border-top: 0;
  }

  tr + tr {
    border-top: var(--hairline) solid var(--border);
  }

  tr + tr td {
    border-top: 0;
  }

  td {
    padding: 0 var(--space-sm) var(--space-xs);
  }

  td:first-child {
    padding-top: var(--space-sm);
  }

  td:last-child {
    padding-bottom: var(--space-sm);
  }

  td[data-label]::before {
    content: attr(data-label);
    display: block;
    font: var(--font-footnote);
    color: var(--text-secondary);
  }
}

/* Footer, on accentSoft, like Duolingo's (help, legal and language columns). */

.site-footer {
  background: var(--accent-soft);
  color: var(--accent-soft-text);
  padding: var(--section-space) var(--screen-margin) var(--space-xl);
}

.footer-columns,
.credits {
  max-width: var(--landing-width);
  margin: 0 auto;
}

.footer-columns {
  display: grid;
  gap: var(--space-lg);
}

.footer-title {
  font: var(--font-headline);
  margin: 0 0 var(--space-xxs);
}

.footer-columns ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-columns a,
.footer-columns .current {
  display: inline-flex;
  align-items: center;
  min-height: var(--min-touch);
  font: var(--font-subhead);
  color: var(--accent-soft-text);
  text-decoration: none;
}

.footer-columns a:hover,
.footer-columns a[aria-current='page'] {
  text-decoration: underline;
}

.footer-columns .current {
  font-weight: 700;
}

.credits {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: var(--hairline) solid var(--border);
  font: var(--font-footnote);
}

@media (min-width: 48rem) {
  .footer-columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Home page (task 13.4; Figma, "Lapsy — Landing 13.4") */

.hero,
.section {
  box-sizing: content-box;
  max-width: var(--landing-width);
  margin: 0 auto;
  padding-left: var(--screen-margin);
  padding-right: var(--screen-margin);
}

.section {
  padding-top: var(--section-space);
}

.section-head {
  margin-bottom: var(--space-lg);
}

.section-head h2 {
  font: var(--font-title1);
  letter-spacing: var(--title-tracking);
  margin: 0;
}

.section-head p {
  max-width: 40rem;
  margin: var(--space-sm) 0 0;
  color: var(--text-secondary);
}

.hero {
  display: grid;
  gap: var(--space-lg);
  padding-top: var(--space-lg);
}

.hero h1 {
  font: var(--font-display);
  letter-spacing: var(--title-tracking);
  margin: 0;
}

.lead {
  margin: var(--space-sm) 0 0;
  color: var(--text-secondary);
}

/* Where the App Store and Google Play badges go once the app is out: as tall as them. */
.stores {
  display: flex;
  align-items: center;
  min-height: var(--chip-height);
  margin: var(--space-lg) 0 0;
  font: var(--font-headline);
}

/* The three frames of the logo: two photos, tilted, and today's, the camera. Sizes and
   positions are in cqw of the box, so they keep the logo's proportions at any width. */
.fichas {
  position: relative;
  width: 100%;
  max-width: 36rem;
  aspect-ratio: 5 / 4;
  justify-self: end;
  container-type: inline-size;
}

.ficha {
  --tilt: 0deg;
  position: absolute;
  bottom: 2cqw;
  aspect-ratio: 300 / 432;
  border-radius: var(--radius-photo);
  overflow: hidden;
  transform-origin: 0 100%;
  transform: translateY(0) rotate(var(--tilt));
}

.ficha-1 {
  --tilt: -20deg;
  left: 27.5cqw;
  width: 41.6cqw;
}

.ficha-2 {
  --tilt: -10deg;
  left: 37.7cqw;
  width: 46.8cqw;
}

.ficha-3 {
  left: 48cqw;
  width: 52cqw;
}

.ficha > picture,
.ficha img {
  width: 100%;
  height: 100%;
}

.ficha img {
  object-fit: cover;
}

/* The camera (Figma "Cámara", 300 × 432): its parts are measured in --u, 1/300 of its width. */
.camera {
  position: relative;
  width: 100%;
  aspect-ratio: 300 / 432;
  border-radius: var(--radius-photo);
  overflow: hidden;
  background: var(--viewfinder);
  container-type: inline-size;
}

.camera > * {
  --u: calc(100cqw / 300);
}

.camera-live,
.camera-ghost {
  position: absolute;
  inset: 0;
}

.camera-live img,
.camera-ghost img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The ghost is the same photo, a little bigger and moved, so the double image shows. */
.camera-ghost {
  inset: auto;
  left: calc(-30 * var(--u));
  top: calc(-14 * var(--u));
  width: 108%;
  height: 108%;
  opacity: var(--ghost-opacity);
}

.ghost-label {
  position: absolute;
  left: calc(12 * var(--u));
  right: calc(12 * var(--u));
  top: calc(12 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  padding: calc(6 * var(--u)) calc(6 * var(--u)) calc(6 * var(--u)) calc(12 * var(--u));
  border-radius: calc(18 * var(--u));
  background: var(--camera-control);
  color: var(--on-fill);
  font: 500 calc(12 * var(--u)) / calc(16 * var(--u)) 'Figtree', system-ui, sans-serif; /* caption */
}

.ghost-label > span:first-of-type {
  flex: 1;
}

.ghost-label .icon {
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
}

.ghost-hide {
  display: grid;
  place-items: center;
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.ghost-hide .icon {
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
}

.shutter {
  position: absolute;
  left: calc(110 * var(--u));
  bottom: calc(24 * var(--u));
  width: calc(80 * var(--u));
  height: calc(80 * var(--u));
  border: calc(4 * var(--u)) solid var(--on-fill);
  border-radius: 50%;
}

.shutter::after {
  content: '';
  position: absolute;
  inset: calc(4 * var(--u));
  border-radius: 50%;
  background: var(--on-fill);
}

/* Who it is for: a row that slides sideways on a phone, four columns on a wide screen. */
.case-list {
  display: flex;
  gap: var(--space-sm);
  margin: 0 calc(-1 * var(--screen-margin));
  padding: 0 var(--screen-margin) var(--space-xs);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--screen-margin);
  scrollbar-width: none;
}

.case-list::-webkit-scrollbar {
  display: none;
}

.case {
  flex: 0 0 16.5rem;
  scroll-snap-align: start;
  padding: var(--card-padding);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.case img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-card-photo);
}

.case h3 {
  font: var(--font-headline);
  margin: var(--space-sm) 0 var(--gap-tight);
}

.case p {
  font: var(--font-subhead);
  color: var(--text-secondary);
  margin: 0;
}

/* How it works */
.steps {
  display: grid;
  gap: var(--space-xl);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  view-timeline: --step block;
}

.step-art {
  display: grid;
  place-items: center;
  height: 21.25rem;
  padding: var(--space-lg);
  border-radius: var(--radius-card);
  background: var(--surface);
  overflow: hidden;
}

.step h3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font: var(--font-title2);
  letter-spacing: var(--title-tracking);
  margin: var(--space-md) 0 var(--space-xs);
}

.step > p {
  margin: 0;
  color: var(--text-secondary);
}

.step-number {
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-soft-text);
  font: var(--font-headline);
  letter-spacing: 0;
}

.art-rhythm {
  align-content: center;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-sm);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: 0 var(--space-sm);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-icon);
  height: var(--chip-height);
  padding: 0 calc(var(--space-md) - var(--border-outline));
  border: var(--border-outline) solid transparent;
  border-radius: var(--radius-chip);
  background: var(--surface);
  font: var(--font-subhead);
}

.chip .icon {
  width: 1rem;
  height: 1rem;
}

.chip--selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-soft-text);
}

.notice {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-group);
  background: var(--on-surface);
}

.notice p {
  margin: 0;
}

.notice-app {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font: var(--font-caption);
  color: var(--text-secondary);
}

.notice-app img {
  border-radius: var(--space-xxs);
}

.notice-now {
  margin-left: auto;
}

.notice .notice-title {
  margin-top: var(--space-xs);
  font: var(--font-headline);
}

.notice-body {
  font: var(--font-subhead);
}

.art-ghost .camera {
  width: 12.75rem;
}

/* The 9:16 preview of the video (Figma "Video 9:16", 170 wide): parts in --u, 1/170 of it. */
.video {
  position: relative;
  width: 10.25rem;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-end-card-preview);
  overflow: hidden;
  background: var(--viewfinder);
  container-type: inline-size;
}

.video > * {
  --u: calc(100cqw / 170);
}

.video picture,
.video img {
  width: 100%;
  height: 100%;
}

.video img {
  object-fit: cover;
}

.video-ready {
  position: absolute;
  left: calc(12 * var(--u));
  top: calc(12 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
  padding: calc(6 * var(--u)) calc(10 * var(--u));
  border-radius: calc(12 * var(--u));
  background: var(--camera-control);
  color: var(--on-fill);
  font: 500 calc(12 * var(--u)) / calc(16 * var(--u)) 'Figtree', system-ui, sans-serif; /* caption */
}

.video-ready .icon {
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
}

.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: calc(56 * var(--u));
  height: calc(56 * var(--u));
  margin: calc(-28 * var(--u)) 0 0 calc(-28 * var(--u));
  border-radius: 50%;
  background: var(--camera-control);
  color: var(--on-fill);
}

.video-play .icon {
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}

/* No spoilers */
.spoilers {
  padding-top: calc(var(--section-space) + var(--space-xl));
  view-timeline: --spoilers block;
}

.spoilers .section-head h2 {
  font: var(--font-display);
}

.spoilers .section-head p {
  color: var(--text);
}

.cards {
  display: grid;
  gap: var(--space-sm);
}

/* A card of the panel (Figma "Lapsy / Tarjeta"). */
.card {
  display: grid;
  gap: var(--space-sm);
  padding: calc(var(--card-padding) - var(--border-focus));
  border: var(--border-focus) solid transparent;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.card--open {
  border-color: var(--accent);
}

.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.card-photo {
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-card-photo);
  overflow: hidden;
}

/* The last photo, blurred: it can be guessed, not seen (Figma: a layer blur of 12). */
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px);
  transform: scale(1.3);
}

.card-info {
  display: grid;
  flex: 1;
  gap: var(--gap-tight);
}

.card-name {
  font: var(--font-headline);
}

.card-detail {
  font: var(--font-footnote);
  color: var(--text-secondary);
}

.card-action {
  display: grid;
  place-items: center;
  width: var(--min-touch);
  height: var(--min-touch);
  border-radius: 50%;
  background: var(--accent-button);
  color: var(--on-fill);
}

.card-action .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.card progress {
  display: block;
  width: 100%;
  height: var(--progress-height);
  border: 0;
  border-radius: var(--radius-progress);
  background: var(--border);
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

.card progress::-webkit-progress-bar {
  background: var(--border);
}

.card progress::-webkit-progress-value {
  border-radius: var(--radius-progress);
  background: var(--accent);
}

.card progress::-moz-progress-bar {
  border-radius: var(--radius-progress);
  background: var(--accent);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  font: var(--font-footnote);
  color: var(--text-secondary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xxs);
  padding: var(--space-xxs) var(--badge-padding-x);
  border-radius: var(--radius-badge);
  background: var(--accent-soft);
  color: var(--accent-soft-text);
}

.badge .icon {
  width: 0.875rem;
  height: 0.875rem;
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-icon);
  color: var(--text);
}

.card-status .icon {
  width: 1rem;
  height: 1rem;
  color: var(--success);
}

/* Trust */
.trust-list {
  display: grid;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.trust-list a {
  color: inherit;
}

.trust-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--min-touch);
  height: var(--min-touch);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.trust-link {
  margin: var(--space-lg) 0 0;
  font: var(--font-headline);
}

/* Closing: the end of a Lapsy video, on raspberry (only titles in white: 3:1 or more). */
.closing {
  margin-top: var(--section-space);
  padding: var(--empty-state-padding-top) var(--screen-margin);
  background: var(--accent-button);
  color: var(--on-fill);
  text-align: center;
}

.closing-logo {
  width: 7.5rem;
  height: auto;
  margin: 0 auto;
}

.closing h2 {
  max-width: 24rem;
  margin: var(--space-lg) auto 0;
  font: var(--font-title1);
  letter-spacing: var(--title-tracking);
}

.closing .stores {
  justify-content: center;
  max-width: 22rem;
  margin: var(--space-lg) auto 0;
  font: var(--font-title2);
  letter-spacing: var(--title-tracking);
}

/* Wide screens */
@media (min-width: 64rem) {
  .hero {
    grid-template-columns: 32rem 1fr;
    align-items: center;
    gap: var(--space-xl);
    padding-top: var(--space-xl);
  }

  .hero h1,
  .spoilers .section-head h2 {
    font: var(--font-display-web);
  }

  .case-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .step-art {
    height: 26.25rem;
  }

  .art-ghost .camera {
    width: 15.5rem;
  }

  .video {
    width: var(--video-preview-width);
  }

  .spoilers {
    display: grid;
    grid-template-columns: 1fr 32.5rem;
    align-items: center;
    gap: 4rem;
  }

  .spoilers .section-head {
    margin: 0;
  }

  .spoilers .section-head p {
    font: var(--font-title2);
    letter-spacing: var(--title-tracking);
  }

  .trust-list {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .trust-list li {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-lg);
    border-radius: var(--radius-card);
    background: var(--surface);
    font: var(--font-headline);
  }

  .closing {
    padding: var(--section-space) var(--screen-margin);
  }

  .closing-logo {
    width: 10rem;
  }

  .closing h2 {
    max-width: none;
    font: var(--font-display);
  }

  .closing .stores {
    max-width: none;
  }
}

/* Motion: only CSS, and only without "Reduce motion" (then everything stays still). */
@media (prefers-reduced-motion: no-preference) {
  /* The frames stand up one by one, as in the splash: from its start pose (25° more
     tilted and 28 pt lower) with springLogo, splashStagger apart. */
  @keyframes ficha-up {
    from {
      opacity: 0;
      transform: translateY(1.75rem) rotate(calc(var(--tilt) - 25deg));
    }
  }

  .ficha {
    animation: ficha-up var(--spring-logo-duration) var(--spring-logo) both;
  }

  .ficha-2 {
    animation-delay: var(--splash-stagger);
  }

  .ficha-3 {
    animation-delay: calc(2 * var(--splash-stagger));
  }

  /* Then the ghost photo shows up over the camera. */
  @keyframes ghost-in {
    from {
      opacity: 0;
      transform: translate(4%, 2%);
    }
  }

  @keyframes fade-in {
    from {
      opacity: 0;
    }
  }

  .ficha-3 .camera-ghost {
    animation: ghost-in var(--duration-base) ease-out both;
    animation-delay: calc(2 * var(--splash-stagger) + var(--spring-logo-duration));
  }

  .ficha-3 .ghost-label {
    animation: fade-in var(--duration-base) ease-out both;
    animation-delay: calc(2 * var(--splash-stagger) + var(--spring-logo-duration));
  }

  @supports (animation-timeline: view()) {
    /* Each part of a section comes in with a fade and a small rise as it scrolls in. */
    @keyframes rise {
      from {
        opacity: 0;
        transform: translateY(var(--space-lg));
      }
    }

    .section-head,
    .case-list,
    .step,
    .cards,
    .trust-list li,
    .trust-link,
    .closing > * {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }

    /* Step 2: the ghost photo comes in over the camera. */
    .art-ghost .camera-ghost {
      animation: ghost-in linear both;
      animation-timeline: --step;
      animation-range: entry 40% cover 35%;
    }

    /* "Nada de spoilers": the text lights up word by word as it scrolls. */
    @keyframes light-up {
      from {
        color: var(--text-secondary);
      }
    }

    .reveal span {
      animation: light-up linear both;
      animation-timeline: --spoilers;
    }

    .reveal span:nth-child(1) { animation-range: cover 20% cover 28%; }
    .reveal span:nth-child(2) { animation-range: cover 21.6% cover 29.6%; }
    .reveal span:nth-child(3) { animation-range: cover 23.2% cover 31.2%; }
    .reveal span:nth-child(4) { animation-range: cover 24.8% cover 32.8%; }
    .reveal span:nth-child(5) { animation-range: cover 26.4% cover 34.4%; }
    .reveal span:nth-child(6) { animation-range: cover 28% cover 36%; }
    .reveal span:nth-child(7) { animation-range: cover 29.6% cover 37.6%; }
    .reveal span:nth-child(8) { animation-range: cover 31.2% cover 39.2%; }
    .reveal span:nth-child(9) { animation-range: cover 32.8% cover 40.8%; }
    .reveal span:nth-child(10) { animation-range: cover 34.4% cover 42.4%; }
    .reveal span:nth-child(11) { animation-range: cover 36% cover 44%; }
    .reveal span:nth-child(12) { animation-range: cover 37.6% cover 45.6%; }
    .reveal span:nth-child(13) { animation-range: cover 39.2% cover 47.2%; }
    .reveal span:nth-child(14) { animation-range: cover 40.8% cover 48.8%; }
    .reveal span:nth-child(15) { animation-range: cover 42.4% cover 50.4%; }
    .reveal span:nth-child(16) { animation-range: cover 44% cover 52%; }
    .reveal span:nth-child(17) { animation-range: cover 45.6% cover 53.6%; }
    .reveal span:nth-child(18) { animation-range: cover 47.2% cover 55.2%; }
    .reveal span:nth-child(19) { animation-range: cover 48.8% cover 56.8%; }
    .reveal span:nth-child(20) { animation-range: cover 50.4% cover 58.4%; }

    /* Then the gym card opens its moment, as in the app: the raspberry border fades in,
       the card pops to popScale and back, and the camera button grows in. */
    @keyframes moment-opens {
      0% {
        border-color: transparent;
        transform: scale(1);
      }
      50% {
        border-color: var(--accent);
        transform: scale(var(--pop-scale));
      }
      100% {
        transform: scale(1);
      }
    }

    @keyframes grow-in {
      from {
        opacity: 0;
        transform: scale(0.5);
      }
    }

    .card--open {
      animation: moment-opens linear both;
      animation-timeline: --spoilers;
      animation-range: cover 45% cover 55%;
    }

    .card--open .card-action {
      animation: grow-in linear both;
      animation-timeline: --spoilers;
      animation-range: cover 47% cover 53%;
    }

    .card--open .badge {
      animation: fade-in linear both;
      animation-timeline: --spoilers;
      animation-range: cover 47% cover 51%;
    }
  }
}
