:root {
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-pad: 1rem;
  --touch-min: 44px;
  --bg: #f0f6fc;
  --text: #1a2744;
  --muted: #5a6b8a;
  --matio-navy: #1a2744;
  --matio-cyan: #10d0f0;
  --matio-blue: #1090f0;
  --matio-purple: #9030f0;
  --matio-purple-deep: #7010d0;
  --matio-gold: #f0b010;
  --matio-gold-soft: #fff4d6;
  --brand: #9030f0;
  --brand-dark: #7010d0;
  --brand-gradient: linear-gradient(
    120deg,
    var(--matio-cyan) 0%,
    var(--matio-blue) 38%,
    var(--matio-purple) 100%
  );
  --brand-gradient-soft: linear-gradient(
    160deg,
    rgba(16, 208, 240, 0.14) 0%,
    rgba(16, 144, 240, 0.08) 40%,
    rgba(144, 48, 240, 0.12) 100%
  );
  --white: #ffffff;
  --radius: 20px;
  --radius-lg: 32px;
  --font: "Nunito", system-ui, sans-serif;
  --font-display: "Quicksand", "Nunito", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 2.5vw, 1.05rem);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
}

body.nav-open {
  overflow: hidden;
}

@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;
  }
}

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

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(240, 246, 252, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(144, 48, 240, 0.08);
  padding-top: env(safe-area-inset-top, 0px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--header-pad) 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: var(--touch-min);
  height: var(--touch-min);
  padding: 0;
  border: none;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(144, 48, 240, 0.12);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--matio-purple-deep);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.is-nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.logo-img--icon {
  height: 48px;
  width: auto;
}

.nav {
  display: flex;
  gap: 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--matio-purple);
}

.nav a.is-active {
  color: var(--matio-purple);
  text-decoration: none;
  box-shadow: inset 0 -2px 0 var(--matio-gold);
}

/* Hero */
.hero {
  padding: 3.5rem 0 4rem;
  background: var(--brand-gradient-soft);
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 8%;
  right: 6%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--matio-gold);
  opacity: 0.35;
  filter: blur(2px);
  pointer-events: none;
}

.hero-brand {
  margin-bottom: 1rem;
}

.hero-logo {
  width: min(340px, 100%);
  max-width: 100%;
  height: auto;
  display: block;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--matio-navy);
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.hero-points {
  margin: 0 0 2rem;
  padding-left: 0;
  list-style: none;
  color: var(--text);
}

.hero-points li {
  margin-bottom: 0.5rem;
  padding-left: 1.35rem;
  position: relative;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--matio-gold);
  box-shadow: 0 0 0 2px rgba(240, 176, 16, 0.35);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.hero-copy {
  min-width: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-gradient);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(144, 48, 240, 0.32);
}

.btn-ghost {
  background: var(--white);
  color: var(--brand-dark);
  border: 2px solid rgba(16, 208, 240, 0.45);
}

/* Phone mock */
.phone-frame {
  border-radius: 2.2rem;
  overflow: hidden;
  background: #111;
  padding: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  max-width: 280px;
  margin-inline: auto;
}

.phone-frame img {
  border-radius: 1.6rem;
  width: 100%;
}

.phone-frame--sm {
  max-width: 200px;
  padding: 8px;
}

.phone-frame--slider {
  max-width: 200px;
  padding: 8px;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.phone-frame--slider img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  text-align: center;
  margin: 0 0 0.75rem;
  color: var(--matio-navy);
}

.section-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.section-intro--left {
  text-align: left;
  margin-left: 0;
}

/* Name story */
.name-story {
  max-width: 720px;
  margin: 0 auto 3rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.75rem;
  border: 1px solid rgba(16, 208, 240, 0.25);
  box-shadow: 0 8px 32px rgba(144, 48, 240, 0.08);
}

.name-story-lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  text-align: center;
}

.name-story-parts {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.name-part {
  margin: 0;
}

.name-part dt {
  margin: 0 0 0.35rem;
}

.name-part-label {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.name-part dd {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
}

.name-story-close {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 1.05rem;
  color: var(--matio-navy);
  font-weight: 700;
}

.section-subhead {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  text-align: center;
  margin: 0 0 0.75rem;
  color: var(--matio-navy);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
}

.about-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid rgba(144, 48, 240, 0.08);
  box-shadow: 0 4px 20px rgba(16, 144, 240, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.about-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(144, 48, 240, 0.1);
}

.about-card h3 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--matio-purple-deep);
}

.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Categories */
.categories {
  background: var(--white);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
}

.cat-card {
  background: var(--cat);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.cat-card::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.cat-icon {
  font-size: 1.5rem;
  font-weight: 800;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.cat-card h3 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

.cat-card p {
  margin: 0;
  font-size: 0.88rem;
  opacity: 0.92;
  flex: 1;
  position: relative;
  z-index: 1;
}

.cat-meta {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.85;
  margin-top: 0.75rem;
  position: relative;
  z-index: 1;
}

/* App preview carousel — slide one-by-one (no fade scroll) */
.preview-carousel-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 2rem 1rem 2rem;
  overflow: visible;
}

.app-carousel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  row-gap: 0.5rem;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
}

.carousel-caption {
  grid-row: 2;
}

.carousel-dots {
  grid-row: 3;
}

.carousel-viewport {
  flex: 1;
  min-width: 0;
  width: 664px;
  max-width: 100%;
  margin-inline: auto;
  overflow-x: hidden;
  overflow-y: visible;
  position: relative;
  padding-bottom: 0.5rem;
}

.carousel-viewport::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 380px;
  background: radial-gradient(
    ellipse at center,
    rgba(16, 208, 240, 0.2) 0%,
    rgba(144, 48, 240, 0.08) 50%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.carousel-track {
  position: relative;
  width: 100%;
  /* 200px phone width × screenshot aspect + frame padding */
  height: 452px;
  min-height: 452px;
  z-index: 1;
}

.carousel-slide {
  position: absolute;
  left: 50%;
  top: 0;
  width: 200px;
  margin: 0 0 0 -100px;
  text-align: center;
  transition:
    transform 0.55s cubic-bezier(0.25, 0.8, 0.25, 1),
    filter 0.45s ease,
    opacity 0.45s ease;
  filter: grayscale(100%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.carousel-slide.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.carousel-slide.is-adjacent {
  filter: grayscale(60%);
  opacity: 0.72;
  pointer-events: auto;
  z-index: 2;
}

.carousel-slide.is-active {
  filter: grayscale(0%);
  opacity: 1;
  pointer-events: auto;
  z-index: 3;
}

.carousel-caption {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-align: center;
}

.carousel-arrow {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0 0 2px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--matio-cyan), var(--matio-purple));
  color: var(--white);
  font-size: 1.65rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(144, 48, 240, 0.28);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
  z-index: 3;
  -webkit-tap-highlight-color: transparent;
}

.carousel-arrow:hover {
  filter: brightness(1.06);
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(16, 144, 240, 0.35);
}

.carousel-arrow:active {
  transform: scale(0.96);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #d1d5db;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.is-active {
  background: var(--brand);
  transform: scale(1.2);
}

/* Carousel: tablet and below — single-slide mode */
@media (max-width: 767px) {
  .preview-carousel-wrap {
    padding: 1.25rem clamp(0.5rem, 3vw, 1rem) 1.75rem;
    border-radius: var(--radius);
  }

  .carousel-controls {
    gap: 0.35rem;
  }

  .carousel-arrow {
    width: var(--touch-min);
    height: var(--touch-min);
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    font-size: 1.35rem;
  }

  .carousel-viewport::before {
    width: min(200px, 68vw);
    height: min(400px, 70vh);
  }

  .carousel-slide {
    width: min(200px, 68vw);
    margin-left: calc(min(200px, 68vw) / -2);
  }

  .carousel-track {
    height: max(400px, calc(min(200px, 68vw) * 2.164 + 20px));
    min-height: max(400px, calc(min(200px, 68vw) * 2.164 + 20px));
  }

  .phone-frame--slider {
    max-width: min(200px, 68vw);
  }

  .carousel-slide.is-adjacent {
    opacity: 0;
    pointer-events: none;
  }

  .carousel-dots {
    flex-wrap: wrap;
    max-width: 100%;
    padding-inline: 0.25rem;
  }
}

/* Languages */
.languages {
  background: linear-gradient(135deg, #eef6ff 0%, #f5f0ff 100%);
}

.languages-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.lang-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.lang-list li {
  background: var(--white);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.lang-flag {
  font-size: 1.5rem;
}

/* CTA */
.cta-box {
  text-align: center;
  background: var(--brand-gradient);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
}

.cta-box h2 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.cta-box p {
  margin: 0 auto;
  max-width: 520px;
  opacity: 0.95;
}

.cta-note {
  margin-top: 1rem !important;
  font-size: 0.9rem;
  opacity: 0.8 !important;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(144, 48, 240, 0.1);
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  background: linear-gradient(180deg, var(--bg) 0%, var(--matio-gold-soft) 100%);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-inner p {
  margin: 0.25rem 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  font-weight: 700;
}

.footer-nav a {
  color: var(--brand-dark);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--matio-purple);
  text-decoration: underline;
}

.footer-muted {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Legal pages */
.legal-page main {
  padding: 2.5rem 0 4rem;
}

.legal-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid transparent;
  border-image: var(--brand-gradient) 1;
}

.legal-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin: 0 0 0.5rem;
  color: var(--matio-navy);
}

.legal-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.legal-content {
  max-width: 720px;
  margin-inline: auto;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--matio-purple-deep);
}

.legal-content h3 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--text);
}

.legal-content p,
.legal-content li {
  color: var(--text);
  font-size: 1rem;
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.35rem;
  margin: 0.5rem 0 1rem;
}

.legal-content li {
  margin-bottom: 0.35rem;
}

.legal-content a {
  color: var(--brand-dark);
  font-weight: 700;
}

.legal-toc {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(16, 208, 240, 0.25);
  box-shadow: 0 4px 16px rgba(144, 48, 240, 0.06);
}

.legal-toc h2 {
  margin-top: 0;
  font-size: 1rem;
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.legal-toc a {
  font-weight: 600;
  text-decoration: none;
}

.legal-toc a:hover {
  text-decoration: underline;
}

/* ——— Responsive ——— */

/* Tablet landscape / small laptop */
@media (max-width: 1024px) {
  .hero-grid {
    gap: 2rem;
  }

  .section {
    padding: 3.5rem 0;
  }
}

/* Tablet portrait */
@media (max-width: 900px) {
  .hero-grid,
  .languages-inner {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 1;
  }

  .hero-phone {
    order: 2;
    margin-top: var(--space-sm);
  }

  .phone-frame {
    max-width: min(240px, 55vw);
  }

  .languages-inner .section-intro--left {
    text-align: center;
    margin-inline: auto;
  }

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

/* Mobile */
@media (max-width: 767px) {
  :root {
    --header-pad: 0.75rem;
    --gutter: clamp(1rem, 5vw, 1.5rem);
  }

  html {
    scroll-padding-top: 4.5rem;
  }

  .site-header .header-inner {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0;
  }

  .logo {
    grid-column: 1;
    grid-row: 1;
  }

  .nav-toggle {
    display: flex;
    grid-column: 2;
    grid-row: 1;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    padding: 0;
    gap: 0;
    transition:
      max-height 0.35s ease,
      opacity 0.25s ease,
      padding 0.35s ease;
  }

  .site-header.is-nav-open .nav {
    max-height: 320px;
    opacity: 1;
    padding-top: var(--space-sm);
    gap: 0.15rem;
  }

  .nav a {
    display: flex;
    align-items: center;
    min-height: var(--touch-min);
    padding: 0.65rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
  }

  .nav a:hover,
  .nav a.is-active {
    background: rgba(144, 48, 240, 0.08);
    box-shadow: none;
    text-decoration: none;
  }

  .nav a.is-active {
    box-shadow: inset 3px 0 0 var(--matio-gold);
  }

  .hero {
    padding: 2rem 0 1.75rem;
  }

  .hero::before {
    width: 72px;
    height: 72px;
    top: 18%;
    right: -4px;
  }

  .hero-phone {
    display: none;
  }

  .hero-copy {
    text-align: center;
    max-width: 100%;
    margin-inline: auto;
  }

  .hero-brand {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-md);
  }

  .hero-logo {
    width: min(300px, 88vw);
    margin-inline: auto;
  }

  .hero h1 {
    font-size: clamp(1.5rem, 6.5vw, 2.1rem);
    hyphens: auto;
  }

  .lead {
    font-size: 1rem;
    text-align: left;
  }

  .hero-points {
    text-align: left;
    max-width: 22rem;
    margin-inline: auto;
  }

  .hero-points li {
    padding-left: 1.25rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
    min-height: var(--touch-min);
  }

  .section {
    padding: 2.75rem 0;
  }

  .section h2,
  .section-subhead {
    font-size: clamp(1.45rem, 5vw, 1.85rem);
  }

  .section-intro {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding-inline: 0;
  }

  .name-story {
    padding: 1.35rem 1.15rem;
    margin-bottom: 2rem;
    border-radius: var(--radius);
  }

  .name-story-lead {
    font-size: 1.05rem;
  }

  .name-part dd {
    font-size: 0.95rem;
  }

  .about-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .about-card {
    text-align: left;
  }

  .cat-card {
    min-height: 0;
    text-align: left;
  }

  .languages {
    text-align: center;
  }

  .languages-inner > div,
  .languages-inner h2,
  .lang-list li {
    text-align: center;
  }

  .lang-list li {
    justify-content: center;
    font-size: 1rem;
    padding: 0.9rem 1rem;
  }

  .preview .section-intro,
  .carousel-caption {
    text-align: center;
  }

  .section.cta .cta-box {
    margin-left: max(16px, env(safe-area-inset-left, 0px));
    margin-right: max(16px, env(safe-area-inset-right, 0px));
    padding: 2rem 1.25rem;
    border-radius: var(--radius);
    width: auto;
    box-sizing: border-box;
  }

  .cta-box h2 {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
  }

  .footer-nav {
    flex-direction: column;
    gap: 0.65rem;
  }

  .footer-nav a {
    min-height: var(--touch-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Legal pages */
  .legal-page main {
    padding: 1.75rem 0 2.5rem;
  }

  .legal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  .legal-header h1 {
    font-size: clamp(1.45rem, 6vw, 1.85rem);
    line-height: 1.2;
  }

  .legal-meta {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .legal-toc {
    padding: 1rem 1.1rem;
    margin-bottom: 1.5rem;
  }

  .legal-toc ol {
    font-size: 0.95rem;
  }

  .legal-content {
    width: 100%;
  }

  .legal-content h2 {
    font-size: 1.1rem;
    margin-top: 1.75rem;
    scroll-margin-top: 5rem;
  }

  .legal-content p,
  .legal-content li {
    font-size: 0.95rem;
    overflow-wrap: anywhere;
  }
}

/* Small phones */
@media (max-width: 480px) {
  :root {
    --gutter: 1rem;
  }

  .logo-img--icon {
    height: 40px;
  }

  .hero {
    padding-top: 1.35rem;
  }

  .eyebrow {
    font-size: 0.78rem;
  }

  .name-story-close {
    font-size: 0.98rem;
  }

  .carousel-arrow {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .carousel-slide {
    width: min(180px, 76vw);
    margin-left: calc(min(180px, 76vw) / -2);
  }

  .phone-frame--slider {
    max-width: min(180px, 76vw);
  }

  .carousel-viewport::before {
    width: min(180px, 76vw);
    height: min(400px, 65vh);
  }

  .carousel-track {
    height: max(380px, calc(min(180px, 76vw) * 2.164 + 20px));
    min-height: max(380px, calc(min(180px, 76vw) * 2.164 + 20px));
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
  }

  .btn {
    font-size: 0.95rem;
    padding-inline: 1.25rem;
  }

  .site-footer {
    padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }

  .legal-toc a {
    line-height: 1.45;
    display: inline-block;
    padding: 0.15rem 0;
  }
}

/* Very narrow (e.g. iPhone SE) */
@media (max-width: 360px) {
  .nav a {
    font-size: 0.92rem;
    padding-inline: 0.75rem;
  }

  .hero-logo {
    width: 100%;
  }

  .cat-card h3 {
    font-size: 1rem;
  }
}

