/* =========================================================
   CHAPISHA — Public Landing Page
   Semantic HTML5 + modern CSS3. Organized by section.
   ========================================================= */

/* ---------------------------------------------------------
   1. TOKENS
   --------------------------------------------------------- */
:root {
  /* Brand */
  --navy: #052B69;
  --navy-700: #0A3A80;
  --navy-900: #04204F;
  --orange: #FF5A00;
  --orange-400: #FF7A33;
  --ice: #EAF4FF;
  --white: #FFFFFF;
  --slate: #0F172A;
  --green: #12894F;

  /* Text */
  --ink: #0E2C57;
  --ink-body: #3D5273;
  --ink-muted: #64769A;
  --on-navy: #DCE8F8;
  --on-navy-dim: #9FB6D6;

  /* Glass surfaces */
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-line: rgba(255, 255, 255, 0.9);
  --hairline: rgba(10, 58, 128, 0.10);

  /* Radii */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Shadows */
  --sh-xs: 0 2px 8px rgba(5, 43, 105, 0.05);
  --sh-sm: 0 6px 18px rgba(5, 43, 105, 0.07);
  --sh-md: 0 14px 38px rgba(5, 43, 105, 0.10);
  --sh-lg: 0 28px 70px rgba(5, 43, 105, 0.14);
  --sh-navy: 0 12px 28px rgba(5, 43, 105, 0.30);

  /* Space */
  --s1: 0.25rem; --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;
  --s5: 1.5rem; --s6: 2rem;     --s7: 2.75rem; --s8: 4rem; --s9: 5.5rem;

  /* Layout */
  --shell: 1240px;
  --header-h: 76px;

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.34s;
  --t-fast: 0.18s var(--ease);
  --t-base: var(--dur) var(--ease);

  --blur: 16px;
}

/* ---------------------------------------------------------
   2. BASE
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-body);
  background:
    radial-gradient(1100px 520px at 82% -6%, rgba(255, 255, 255, 0.95), transparent 62%),
    radial-gradient(900px 500px at 4% 12%, rgba(255, 255, 255, 0.7), transparent 60%),
    linear-gradient(180deg, #EFF7FF 0%, #E3EFFB 42%, #EAF4FF 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
picture { display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

h1, h2, h3 { color: var(--ink); font-weight: 800; line-height: 1.16; letter-spacing: -0.015em; }
p { line-height: 1.62; }

.icon { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 1000;
  background: var(--navy); color: #fff;
  padding: 0.8rem 1.25rem; border-radius: var(--r-sm); font-weight: 700;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 16px; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--s5); }
.section { padding-block: var(--s7); }

/* ---------------------------------------------------------
   3. BUTTONS
   --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; padding: 0 1.6rem;
  border-radius: var(--r-pill);
  font-weight: 700; font-size: 0.97rem; white-space: nowrap;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
}

.btn-primary {
  background: linear-gradient(140deg, var(--navy-700), var(--navy));
  color: #fff;
  box-shadow: var(--sh-navy);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(5, 43, 105, 0.38); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  border: 1px solid var(--hairline);
  box-shadow: var(--sh-sm);
}
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }

.btn-outline {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-2px); }

.btn-sm { min-height: 44px; padding: 0 1.2rem; font-size: 0.9rem; }

/* ---------------------------------------------------------
   4. HEADER — floating glass bar
   --------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 100; padding-top: 14px; }
.header-shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--s5); }

.header-bar {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
  height: var(--header-h);
  padding: 0 0.85rem 0 1rem;
  border-radius: var(--r-md);
}
/* The glass sits on a pseudo-element, not on .header-bar itself: backdrop-filter
   would make the bar a containing block for the fixed off-canvas nav inside it. */
.header-bar::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  border: 1px solid var(--glass-line);
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--t-base), background-color var(--t-base);
}
.site-header.is-scrolled .header-bar::before {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--sh-md);
}
@supports not (backdrop-filter: blur(1px)) {
  .header-bar::before { background: rgba(255, 255, 255, 0.96); }
}

.brand { display: inline-flex; align-items: center; }
.brand-logo { width: clamp(132px, 13vw, 168px); height: auto; }

.nav-list { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.1rem); }
.nav-link {
  position: relative; display: inline-block;
  font-weight: 600; font-size: 0.94rem; color: var(--ink-body);
  padding-block: 0.4rem;
  transition: color var(--t-fast);
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2.5px;
  border-radius: 2px; background: var(--orange);
  transform: scaleX(0); transform-origin: center;
  transition: transform var(--t-fast);
}
.nav-link:hover { color: var(--navy); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--navy); font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: var(--s3); }



/* ---------------------------------------------------------
   5. HERO
   --------------------------------------------------------- */
.hero { position: relative; padding-top: var(--s7); padding-bottom: var(--s5); overflow: hidden; }

.hero-backdrop {
  position: absolute; inset: auto 0 0 0; height: 84%;
  background: url("../images/hero-backdrop.svg") no-repeat center bottom / cover;
  opacity: 0.22;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  align-items: center;
  gap: var(--s6);
}

.hero-copy { padding-block: var(--s5) var(--s7); }

.hero-title {
  display: flex; flex-direction: column;
  font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.5rem);
  letter-spacing: -0.03em;
  margin-bottom: var(--s5);
}
.line-navy { color: var(--navy); }
.line-orange { color: var(--orange); }

.hero-lead {
  max-width: 44ch;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  color: var(--ink-body);
  margin-bottom: var(--s4);
}
.hero-tagline { font-weight: 700; color: var(--navy); margin-bottom: var(--s6); }

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

.hero-visual { position: relative; display: flex; justify-content: center; align-items: flex-end; }

/* Kiosk and phone are separate assets composed here, matching the reference art. */
.hero-stage {
  position: relative;
  width: min(100%, 520px);
  /* Height is driven by the tallest child: the kiosk is 60% of the stage width and
     540x1164, so it needs 0.60 * (1164/540) = 1.293x the width. 10/13 leaves a hair
     of headroom so the art never spills out of its reserved box. */
  aspect-ratio: 10 / 13;
}
.hero-stage img { width: 100%; height: auto; }

.hero-kiosk {
  position: absolute; left: 2%; bottom: 0;
  width: 60%;
  filter: drop-shadow(0 30px 42px rgba(5, 43, 105, 0.22));
}
.hero-phone {
  position: absolute; right: 0; bottom: 2%;
  width: 46%;
  filter: drop-shadow(0 22px 34px rgba(5, 43, 105, 0.20));
}

/* ---------------------------------------------------------
   6. BENEFIT STRIP
   --------------------------------------------------------- */
.benefit-section { position: relative; z-index: 2; margin-top: calc(-1 * var(--s5)); padding-bottom: var(--s5); }

.benefit-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s4); }

.benefit-card {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 1.05rem 1rem;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--glass-line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.benefit-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }

.benefit-icon { color: var(--navy); flex-shrink: 0; }
.benefit-icon.accent { color: var(--orange); }

.benefit-card h3 { font-size: 0.9rem; margin-bottom: 0.2rem; }
.benefit-card p { font-size: 0.78rem; line-height: 1.45; color: var(--ink-muted); }

@supports not (backdrop-filter: blur(1px)) {
  .benefit-card { background: rgba(255, 255, 255, 0.95); }
}

/* ---------------------------------------------------------
   7. PANELS — shared section container
   --------------------------------------------------------- */
.panel {
  position: relative;
  padding: var(--s7) var(--s6);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.52));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--glass-line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-sm);
}
@supports not (backdrop-filter: blur(1px)) {
  .panel { background: rgba(255, 255, 255, 0.9); }
}

.panel-title { text-align: center; font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem); }
.panel-sub { text-align: center; color: var(--ink-muted); margin-top: 0.6rem; font-size: 1rem; }
.panel-title + .grid-4, .panel-sub + .steps, .panel-title + .reasons,
.panel-sub + .locations, .panel-sub + .audiences { margin-top: var(--s6); }
.panel-note { text-align: center; color: var(--ink-muted); font-size: 0.9rem; margin-top: var(--s5); }

/* Dot-grid flourish beside the panel */
.panel-dotted::before, .panel-dotted::after {
  content: "";
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 88px; height: 190px;
  background-image: radial-gradient(rgba(10, 58, 128, 0.22) 2px, transparent 2.2px);
  background-size: 18px 18px;
  opacity: 0.5;
  pointer-events: none;
}
.panel-dotted::before { left: -104px; }
.panel-dotted::after { right: -104px; }

/* ---------------------------------------------------------
   8. WHAT IS CHAPISHA — tiles
   --------------------------------------------------------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s5); }

.tile {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--s6) var(--s4);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.tile:hover { transform: translateY(-5px); box-shadow: var(--sh-md); }

.tile-glyph { color: var(--navy); margin-bottom: var(--s5); }
.tile p { font-size: 0.92rem; color: var(--ink-body); }

/* ---------------------------------------------------------
   9. HOW IT WORKS — steps + phones
   --------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s5); }

.step {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--s6) var(--s4) var(--s5);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
}

.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin-bottom: var(--s3);
  border-radius: 50%;
  background: var(--orange); color: #fff;
  font-weight: 800; font-size: 0.95rem;
  box-shadow: 0 6px 14px rgba(255, 90, 0, 0.34);
}

.step-glyph { color: var(--navy); margin-bottom: var(--s3); }
.step h3 { font-size: 1.06rem; margin-bottom: 0.45rem; }
.step p { font-size: 0.85rem; color: var(--ink-muted); }

/* dotted connector + arrowhead between steps */
.step-link {
  position: absolute; top: 44px; left: 100%; width: var(--s6);
  display: flex; align-items: center; padding-inline: 5px;
}
.step-link::before {
  content: ""; flex: 1;
  border-top: 3px dotted var(--orange);
  opacity: 0.85;
}
.step-link::after {
  content: ""; margin-left: 3px;
  width: 0; height: 0;
  border-left: 7px solid var(--orange);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.phones { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s4); margin-top: var(--s7); }
.phones img {
  width: 100%; height: auto;
  filter: drop-shadow(0 18px 30px rgba(5, 43, 105, 0.18));
}

/* ---------------------------------------------------------
   10. WHY CHOOSE CHAPISHA — reasons
   --------------------------------------------------------- */
.reasons { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s3); }

.reason {
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 1.1rem 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.reason:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }

.reason-icon { color: var(--orange); flex-shrink: 0; }
.reason-icon.navy { color: var(--navy); }
.reason-icon.green { color: var(--green); }

.reason h3 { font-size: 0.86rem; margin-bottom: 0.22rem; }
.reason p { font-size: 0.76rem; line-height: 1.45; color: var(--ink-muted); }

/* ---------------------------------------------------------
   11. LOCATIONS
   --------------------------------------------------------- */
.locations { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s4); }

.location {
  display: flex; flex-direction: column;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
  overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.location:hover { transform: translateY(-5px); box-shadow: var(--sh-md); }

.location-media {
  display: block; border-radius: var(--r-sm); overflow: hidden;
  background: var(--ice);
  aspect-ratio: 4 / 3;
}
.location-media picture { display: block; width: 100%; height: 100%; }
.location-media img { width: 100%; height: 100%; object-fit: cover; }

.location-label {
  display: flex; align-items: flex-start; gap: 0.35rem;
  padding: 0.7rem 0.35rem 0.4rem;
}
.location-label .icon { color: var(--orange); flex-shrink: 0; margin-top: 1px; }
.location-label h3 { font-size: 0.82rem; line-height: 1.32; font-weight: 700; }

/* ---------------------------------------------------------
   12. BUILT FOR ZANZIBAR — audiences
   --------------------------------------------------------- */
.audiences { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s5); }

.audience {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0.55rem 0.55rem var(--s5);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.audience:hover { transform: translateY(-5px); box-shadow: var(--sh-md); }

.audience-media {
  display: block; width: 100%; border-radius: var(--r-md); overflow: hidden;
  background: var(--ice); aspect-ratio: 4 / 3; margin-bottom: var(--s4);
}
.audience-media img { width: 100%; height: 100%; object-fit: cover; }

.audience h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.audience p { font-size: 0.86rem; color: var(--ink-muted); padding-inline: 0.4rem; }

/* ---------------------------------------------------------
   13. TRUST STRIP
   --------------------------------------------------------- */
.trust-section { padding-block: var(--s5) var(--s8); }

.trust {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s5);
  padding: var(--s6);
  border-radius: var(--r-lg);
  background: linear-gradient(125deg, var(--navy) 0%, #06326F 55%, var(--navy-900) 100%);
  box-shadow: var(--sh-lg);
}

.trust-item { display: flex; align-items: flex-start; gap: 0.85rem; position: relative; }
.trust-item + .trust-item { padding-left: var(--s5); }
.trust-item + .trust-item::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
  border-left: 2px dotted rgba(255, 255, 255, 0.28);
}

.trust-icon { color: #fff; flex-shrink: 0; }
.trust-icon.accent { color: var(--orange-400); }

.trust-item h3 { color: #fff; font-size: 0.94rem; margin-bottom: 0.3rem; }
.trust-item p { color: var(--on-navy-dim); font-size: 0.8rem; line-height: 1.5; }

/* ---------------------------------------------------------
   14. FOOTER
   --------------------------------------------------------- */
.site-footer {
  background: linear-gradient(160deg, #073070 0%, var(--navy) 45%, var(--navy-900) 100%);
  color: var(--on-navy);
  padding-top: var(--s8);
}

.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1.15fr 1fr 1fr;
  gap: var(--s6);
  padding-bottom: var(--s7);
}

.footer-col { position: relative; }
.footer-col + .footer-col { padding-left: var(--s6); }
.footer-col + .footer-col::before {
  content: ""; position: absolute; left: 0; top: 2px; bottom: 2px;
  border-left: 2px dotted rgba(255, 255, 255, 0.16);
}

.footer-col h3 { color: #fff; font-size: 1.02rem; margin-bottom: var(--s4); }
.footer-col > p { font-size: 0.88rem; color: var(--on-navy-dim); line-height: 1.6; }

.footer-brand img { width: 178px; height: auto; margin-bottom: var(--s4); }
.footer-by { margin-top: var(--s4); font-weight: 600; color: var(--on-navy); font-size: 0.86rem; }

.footer-contact { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-contact li { display: flex; align-items: center; gap: 0.6rem; }
.footer-contact .icon { color: var(--on-navy-dim); flex-shrink: 0; }
.footer-contact a { font-size: 0.88rem; transition: color var(--t-fast); word-break: break-word; }
.footer-contact a:hover { color: var(--orange-400); }

.footer-col .btn-outline { margin-top: var(--s4); }

.socials { display: flex; gap: 0.6rem; margin-top: var(--s4); }
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #fff;
  transition: background-color var(--t-fast), transform var(--t-fast);
}
.socials a:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }

.footer-hasnet { display: flex; align-items: center; gap: 0.6rem; margin-top: var(--s6); }
.footer-hasnet span { font-size: 0.8rem; color: var(--on-navy-dim); }
.footer-hasnet img {
  width: 104px; height: auto;
  background: #fff; border-radius: 8px; padding: 5px 7px;
}

.footer-bottom {
  padding-block: var(--s5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: var(--on-navy-dim);
}
/* Licence attribution for the Creative Commons location photography */
.footer-credits {
  margin-top: 0.6rem;
  font-size: 0.68rem;
  line-height: 1.7;
  color: rgba(159, 182, 214, 0.72);
}
.footer-credits a { text-decoration: underline; text-underline-offset: 2px; }
.footer-credits a:hover { color: var(--white); }

/* ---------------------------------------------------------
   15. REVEAL ANIMATION
   --------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

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

/* ---------------------------------------------------------
   16. LARGE DESKTOP
   --------------------------------------------------------- */
@media (min-width: 1440px) {
  :root { --shell: 1320px; }
  .panel { padding: var(--s8) var(--s7); }
}

/* ---------------------------------------------------------
   17. TABLET / SMALL DESKTOP  (max 1100px)
   --------------------------------------------------------- */
@media (max-width: 1100px) {
  .benefit-strip { grid-template-columns: repeat(3, 1fr); }
  .reasons { grid-template-columns: repeat(3, 1fr); }
  .locations { grid-template-columns: repeat(3, 1fr); }
  .panel-dotted::before, .panel-dotted::after { display: none; }
}

/* ---------------------------------------------------------
   18. TABLET  (max 1023px)
   --------------------------------------------------------- */
@media (max-width: 1023px) {
  /* Navigation on mobile/tablet lives in the bottom dock, so the header nav
     and its CTA step aside entirely — no burger, no off-canvas panel.
     That leaves the logo alone, so centre it rather than stranding it left. */
  .main-nav { display: none; }
  .header-actions { display: none; }
  .header-bar { justify-content: center; padding-inline: var(--s4); }

  .hero { padding-top: var(--s5); }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-visual { order: -1; }
  .hero-stage { width: min(88%, 420px); }
  .hero-copy { text-align: center; padding-block: var(--s5); }
  .hero-lead { margin-inline: auto; }
  .hero-cta { justify-content: center; }

  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: var(--s5); }
  /* 5 steps over 2 columns leaves one orphan — let it span the row */
  .steps .step:last-child { grid-column: 1 / -1; }
  .step-link { display: none; }
  .audiences { grid-template-columns: repeat(2, 1fr); }
  .trust { grid-template-columns: repeat(2, 1fr); row-gap: var(--s6); }
  .trust-item:nth-child(odd) { padding-left: 0; }
  .trust-item:nth-child(odd)::before { display: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col:nth-child(odd) { padding-left: 0; }
  .footer-col:nth-child(odd)::before { display: none; }
}

/* ---------------------------------------------------------
   19. MOBILE  (max 767px)
   --------------------------------------------------------- */
@media (max-width: 767px) {
  :root { --header-h: 64px; --blur: 10px; }

  .shell, .header-shell { padding-inline: var(--s4); }
  .section { padding-block: var(--s5); }
  .panel { padding: var(--s6) var(--s4); border-radius: var(--r-lg); }

  .benefit-strip { grid-template-columns: 1fr; }
  .reasons { grid-template-columns: 1fr; }
  .locations { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .audiences { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr; padding: var(--s5); }
  .trust-item { padding-left: 0 !important; }
  .trust-item::before { display: none !important; }

  /* horizontal snap row for the phone screens */
  .phones {
    grid-template-columns: repeat(5, 62vw);
    gap: var(--s4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--s4));
    padding: 0 var(--s4) var(--s3);
    -webkit-overflow-scrolling: touch;
  }
  .phone { scroll-snap-align: center; }

  .footer-grid { grid-template-columns: 1fr; gap: var(--s7); }
  .footer-col { padding-left: 0 !important; }
  .footer-col::before { display: none !important; }

  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }

  /* the backdrop scales up on narrow viewports — keep it a whisper */
  .hero-backdrop { opacity: 0.12; height: 60%; }
}

@media (max-width: 400px) {
  .locations { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------
   19. MOBILE / TABLET BOTTOM DOCK
   Four section links flanking a raised Home button, with a
   sliding pill behind the active item. Hidden on desktop,
   where the header nav already does this job.
   --------------------------------------------------------- */
.dock { display: none; }

@media (max-width: 1023px) {
  .dock {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 80; /* under the off-canvas nav (95) and its scrim (90) */
    padding: 0 var(--s3) calc(var(--s3) + env(safe-area-inset-bottom, 0px));
    pointer-events: none; /* only the bar itself is interactive */
  }

  .dock-bar {
    position: relative;
    pointer-events: auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    max-width: 460px;
    margin-inline: auto;
    height: 62px;
    padding-inline: 5px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--glass-line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-md);
  }
  @supports (backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px)) {
    .dock-bar {
      background: rgba(255, 255, 255, 0.78);
      -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
      backdrop-filter: blur(var(--blur)) saturate(160%);
    }
  }

  /* Sliding active indicator — JS sets width + translateX */
  .dock-pill {
    position: absolute;
    left: 0; top: 6px;
    height: calc(100% - 12px);
    border-radius: 14px;
    background: rgba(5, 43, 105, 0.07);
    opacity: 0;
    transform: translateX(0);
    transition: transform var(--t-base), width var(--t-base), opacity var(--t-fast);
    pointer-events: none;
  }
  .dock-pill.is-on { opacity: 1; }

  .dock-item {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    text-decoration: none;
    color: var(--ink-muted);
    transition: color var(--t-fast), transform var(--t-fast);
  }
  .dock-item .icon { stroke-width: 1.8; }

  .dock-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
  }

  .dock-item.is-active { color: var(--navy); }
  .dock-item:not(.dock-item-home):active { transform: scale(0.92); }

  .dock-item:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
    border-radius: var(--r-sm);
  }

  /* Raised centre Home button */
  .dock-item-home { justify-content: flex-end; padding-bottom: 9px; }

  .dock-home {
    position: absolute;
    top: -25px;
    left: 50%;
    width: 52px;
    height: 52px;
    margin-left: -26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
    border: 4px solid rgba(255, 255, 255, 0.92);
    box-shadow: var(--sh-navy);
    transition: transform var(--t-base), box-shadow var(--t-base);
  }
  .dock-item-home.is-active .dock-home {
    transform: scale(1.07);
    box-shadow: 0 14px 30px rgba(5, 43, 105, 0.42);
  }
  .dock-item-home:active .dock-home { transform: scale(0.94); }

  /* Keep the dock clear of the last of the page content */
  .footer-bottom {
    padding-bottom: calc(var(--s5) + 78px + env(safe-area-inset-bottom, 0px));
  }
}

/* Very narrow phones — trim the labels, not the tap targets */
@media (max-width: 350px) {
  .dock-label { font-size: 0.54rem; }
  .dock-bar { padding-inline: 2px; }
}
