/* Tvoryvo Landing Page Styles — Warm Memory Workshop */

/* Self-hosted variable fonts (SIL OFL 1.1, licenses in assets/fonts); subsets match the Google Fonts split. */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/source-sans-3-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/source-sans-3-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/source-serif-4-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/source-serif-4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #FAF8F3;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #F2EEE5;
  --bg-dark: #0E2A2E;
  --text: #0E2A2E;
  --text-muted: #455D61;
  --text-light: #FAF8F3;
  --accent: #006D77;
  --accent-soft: #E0EFEF;
  --border: #DED9CE;
  --border-strong: #C6BFB1;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1180px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --header-height: 72px;
  --space-section: 96px;
  --space-group: 64px;
  --space-header: 56px;
  --space-grid: 24px;
  --space-card: 28px 24px;
  --space-hero-start: var(--space-group);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

summary {
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--text);
  color: var(--text-light);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
}

.skip-link:focus {
  top: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  min-height: 44px;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-icon {
  /* Compensate for the transparent foreground's safe-zone padding. */
  width: 54px;
  height: 54px;
  max-width: none;
  margin: -9px;
}

.header-nav,
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-menu {
  display: none;
  position: relative;
}

.nav-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
}

.nav-menu-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-menu[open] .nav-menu-toggle {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 240px;
  max-height: calc(100dvh - var(--header-height) - 24px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(14, 42, 46, 0.12);
}

.nav-menu-panel > * {
  flex-shrink: 0;
}

.nav-menu-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.nav-menu-link:hover {
  background: var(--bg-subtle);
}

.nav-menu-panel .lang-switch {
  align-self: flex-start;
  margin: 8px 12px 4px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.lang-option {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  min-height: 36px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-option[aria-current="page"] {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(14, 42, 46, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-dark {
  background-color: var(--bg-dark);
  color: #FFFFFF;
  border: 1px solid var(--bg-dark);
}

.btn-dark:hover {
  background-color: #183E43;
}

/* Official store badges. The Play PNG carries 41/168 of its visible height as
   transparent clear space on each side; negative margins align the visible marks. */
.store-badges {
  --badge-height: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.store-badge {
  display: inline-flex;
}

.store-badge img {
  height: var(--badge-height);
  width: auto;
}

.store-badge-play img {
  height: calc(var(--badge-height) * 250 / 168);
  margin: calc(var(--badge-height) * -41 / 168);
}

/* Typography tokens */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 16px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--text);
  margin: 0;
}

/* Avoid one-word last lines in headings and short centered copy. */
h1, h2, h3,
.faq-item summary,
.cta-lead {
  text-wrap: balance;
}

p,
.step-caption,
.use-case-examples {
  text-wrap: pretty;
}

/* Hero Section */
.hero {
  padding: var(--space-hero-start) 0 var(--space-section);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-header);
  align-items: center;
}

.hero-title {
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-lead {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 24px;
  max-width: 560px;
}

.use-case-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.use-case-pill {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

/* Hardware Phone Frame & Open Floating Compositions */
.phone-frame {
  position: relative;
  background: linear-gradient(160deg, #1E2F33 0%, #0E1A1D 100%);
  border-radius: 38px;
  padding: 10px;
  border: 1px solid #354B50;
  box-shadow:
    0 28px 60px -12px rgba(14, 42, 46, 0.28),
    0 12px 24px -8px rgba(14, 42, 46, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  /* Resting pose (--rot/--x/--y) changes per layout; hover or tap adds the lift delta. */
  --rot: 0deg;
  --x: 0px;
  --y: 0px;
  --tilt: 1.5deg;
  --shift: 0px;
  --raise: -4px;
  --grow: 0;
  transform:
    rotate(calc(var(--rot) + var(--lift, 0) * var(--tilt)))
    translate(calc(var(--x) + var(--lift, 0) * var(--shift)), calc(var(--y) + var(--lift, 0) * var(--raise)))
    scale(calc(1 + var(--lift, 0) * var(--grow)));
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.38s ease;
}

.screen-cluster:hover,
.step-phones:hover {
  --lift: 1;
}

/* Subtle speaker notch at top bezel */
.phone-frame::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  z-index: 3;
  pointer-events: none;
}

/* Subtle glass reflection across screen */
.phone-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 38%);
  pointer-events: none;
  z-index: 2;
}

.phone-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 28px;
  background: var(--bg-elevated);
}

/* Hero Visual Cluster */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 580px;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: min(480px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 109, 119, 0.13) 0%, rgba(184, 220, 205, 0.18) 45%, rgba(250, 248, 243, 0) 72%);
  z-index: 0;
  pointer-events: none;
}

.screen-cluster {
  position: relative;
  width: 100%;
  max-width: 500px;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 1;
}

.screen-hero-main {
  width: 282px;
  z-index: 2;
  --rot: -3.5deg;
  --y: -6px;
  --grow: 0.01;
}

.screen-hero-sub {
  position: absolute;
  right: 8px;
  top: 40px;
  width: 256px;
  z-index: 1;
  --rot: 5deg;
  --y: 14px;
  --shift: 6px;
}

/* Broad Use Cases Section (Audience Appeal) */
.section-use-cases {
  padding: var(--space-section) 0;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-grid);
}

.use-case-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.use-case-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(14, 42, 46, 0.06);
}

.use-case-tag {
  display: inline-flex;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.use-case-card h3 {
  font-size: 22px;
  line-height: 1.28;
}

.use-case-card p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.use-case-examples {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

/* How It Works Section */
.section-steps {
  padding: var(--space-section) 0;
}

.section-header {
  max-width: 740px;
  margin-bottom: var(--space-header);
}

.section-title {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 19px;
  color: var(--text-muted);
  margin: 0;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-section);
}

.step-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-group);
  align-items: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}

.step-title {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.25;
  margin-bottom: 16px;
}

.step-desc {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 24px;
  max-width: 500px;
}

.step-caption {
  display: inline-block;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-subtle);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  max-width: 500px;
}

/* Open Compositional Step Visuals (No Detached Box) */
.step-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 540px;
}

/* Soft organic aura behind framed phones instead of a hard rectangular box */
.step-visual::before {
  content: "";
  position: absolute;
  width: min(440px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 109, 119, 0.11) 0%, rgba(184, 220, 205, 0.16) 46%, rgba(250, 248, 243, 0) 72%);
  pointer-events: none;
  z-index: 0;
}

.step-phones {
  position: relative;
  width: 100%;
  max-width: 470px;
  min-height: 520px;
  display: flex;
  align-items: center;
  z-index: 1;
}

.step-phone-primary {
  width: 262px;
  z-index: 2;
  --rot: -2.5deg;
  --x: 12px;
  --raise: -6px;
  --grow: 0.01;
}

.step-phone-secondary {
  position: absolute;
  right: 12px;
  top: 38px;
  width: 236px;
  z-index: 1;
  --rot: 4.5deg;
  --y: 12px;
  --shift: 6px;
  opacity: 0.96;
}

@media (min-width: 961px) {
  .step-row:nth-child(even) .step-copy {
    order: 2;
  }

  .step-row:nth-child(even) .step-phone-primary {
    margin-left: auto;
    --rot: 2.5deg;
    --x: -12px;
    --tilt: -1.5deg;
  }

  .step-row:nth-child(even) .step-phone-secondary {
    right: auto;
    left: 12px;
    --rot: -4.5deg;
    --tilt: -1.5deg;
    --shift: -6px;
  }
}

/* Method & Names Section (SEO Pillar Content) */
.section-method {
  padding: var(--space-section) 0;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.method-header {
  max-width: 760px;
  margin-bottom: var(--space-header);
}

.alias-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.alias-pill {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

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

.editorial-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-card);
}

.editorial-card h3 {
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 12px;
}

.editorial-card p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

/* FAQ Section (Evergreen SEO) */
.section-faq {
  padding: var(--space-section) 0 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-header);
  align-items: start;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.faq-item summary {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::after {
  content: "+";
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Final Download Section */
.section-cta {
  padding: var(--space-group) 0;
  text-align: center;
}

.cta-box {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  box-shadow: 0 16px 40px rgba(14, 42, 46, 0.05);
}

.cta-title {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
  margin-bottom: 16px;
}

.cta-lead {
  font-size: 19px;
  color: var(--text-muted);
  margin: 0 auto 32px;
  max-width: 540px;
}

.cta-box .store-badges {
  justify-content: center;
}

/* Not found */
.error-page {
  min-height: calc(100svh - var(--header-height));
  display: grid;
  place-items: center;
  padding: var(--space-group) 24px;
  text-align: center;
}

.error-content {
  max-width: 480px;
}

.error-visual {
  position: relative;
  isolation: isolate;
  width: min(100%, 360px);
  margin: 0 auto 32px;
  padding-bottom: 28px;
}

.error-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8% 18% 12%;
  background: var(--accent-soft);
  border-radius: 50% 45% 55% 40%;
  transform: rotate(-12deg);
}

.error-code {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: clamp(120px, 25vw, 180px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}

.error-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.error-title {
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.2;
}

.error-description {
  max-width: 34ch;
  margin: 16px auto 28px;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 48px;
  font-size: 15px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-links a:hover {
  color: var(--text);
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  :root {
    --space-section: 80px;
    --space-group: 56px;
    --space-header: 48px;
  }

  .nav-links,
  .nav-lang {
    display: none;
  }

  .header-nav {
    gap: 12px;
  }

  .nav-menu {
    display: block;
  }

  .hero-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .use-cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-visual,
  .step-visual {
    min-height: auto;
  }

  .screen-cluster,
  .step-phones {
    justify-content: center;
    min-height: 500px;
    max-width: 440px;
    margin: 0 auto;
  }

  .screen-hero-main {
    width: 250px;
    --rot: -3deg;
    --x: -45px;
    --y: 0px;
  }

  .screen-hero-sub {
    right: 20px;
    width: 230px;
  }

  .step-row {
    grid-template-columns: 1fr;
    gap: var(--space-header);
  }

  .step-phone-primary {
    width: 244px;
    --x: -42px;
  }

  .step-phone-secondary {
    right: 20px;
    width: 222px;
  }

  .editorial-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --space-section: 64px;
    --space-group: 48px;
    --space-header: 40px;
    --space-grid: 16px;
    --space-card: 24px 20px;
    --space-hero-start: 32px;
  }

  .use-cases-grid {
    grid-template-columns: 1fr;
  }

  .screen-cluster,
  .step-phones {
    min-height: 430px;
    max-width: 340px;
  }

  .screen-hero-main,
  .step-phone-primary {
    width: 206px;
    --rot: -2.5deg;
    --x: -34px;
  }

  .screen-hero-sub,
  .step-phone-secondary {
    right: 8px;
    top: 32px;
    width: 188px;
  }

  .faq-item {
    padding: 18px 20px;
  }

  .faq-item summary {
    font-size: 18px;
    line-height: 1.35;
  }

  .cta-box {
    padding: 40px 20px;
  }

  .cta-lead {
    font-size: 17px;
    margin-bottom: 24px;
  }

  .site-footer {
    padding: 32px 0 40px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-links {
    order: -1;
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 400px) {
  .container {
    padding: 0 16px;
  }

  .btn {
    padding: 8px 14px;
  }

  /* Keeps both store badges on one row down to 360px; Apple's minimum is 40px. */
  .store-badges {
    --badge-height: 44px;
    gap: 10px;
  }

  .cta-box {
    padding: 40px 16px;
  }
}

@media (max-width: 359px) {
  .brand span {
    display: none;
  }
}
