/* Spedy website — one stylesheet for every page.
   Colours and type follow the app (lib/constants/appcolors.dart,
   lib/styles/spedy_tokens.dart): teal 1E3F52 → 2B5870, accent FF8855,
   glass white 8 %, Inter. No external requests (fonts are self-hosted). */

@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fonts/Inter-Regular.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(fonts/Inter-Medium.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fonts/Inter-SemiBold.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(fonts/Inter-Bold.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 800; font-display: swap; src: url(fonts/Inter-ExtraBold.woff2) format("woff2"); }

:root {
  --teal-deep: #0D2130;
  --teal-dark: #1E3F52;
  --teal: #2B5870;
  --accent: #FF8855;
  --accent-deep: #FF6B3D;
  --text: #FFFFFF;
  --text-soft: rgba(255, 255, 255, 0.78);
  --text-faint: rgba(255, 255, 255, 0.6);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.14);
  --radius: 20px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(180deg, var(--teal-deep) 0%, var(--teal-dark) 30%, var(--teal) 100%) fixed;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #ffa47c; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: #111; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
section.tight { padding: 56px 0; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 16px; text-wrap: pretty; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--text-soft); max-width: 680px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.accent { color: var(--accent); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--text-faint); font-size: 15px; }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 33, 48, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header.over-hero { position: fixed; left: 0; right: 0; background: linear-gradient(180deg, rgba(13,33,48,0.7), rgba(13,33,48,0)); border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; transition: background .25s; }
.site-header.over-hero.scrolled { background: rgba(13, 33, 48, 0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand img { height: 34px; width: auto; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; opacity: .88; }
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; color: var(--accent); }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 14px !important; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 16px;
  text-decoration: none; color: #fff; border: 0; cursor: pointer;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  box-shadow: 0 10px 30px rgba(255, 107, 61, 0.3);
}
.btn:hover { color: #fff; filter: brightness(1.06); }
.btn.ghost { background: transparent; border: 1.5px solid rgba(255,255,255,.5); box-shadow: none; }
.nav .btn { padding: 10px 18px; font-size: 14px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: #fff; border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 600; }
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; background: rgba(13,33,48,0.97); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav-links .btn { margin-top: 14px; border-bottom: 0; }
  .lang { align-self: flex-start; margin-top: 12px; }
}

/* ── Hero (home: the bridges video) ─────────────────── */
.hero { position: relative; min-height: min(100vh, 960px); min-height: min(100svh, 960px); display: flex; align-items: center; overflow: hidden; padding: 120px 0 80px; }
.hero .poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero video, .hero .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(13,33,48,0.55) 0%, rgba(13,33,48,0.35) 40%, rgba(13,33,48,0.85) 88%, var(--teal-deep) 100%); }
.hero h1 { max-width: 860px; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero .lead { color: #fff; opacity: .92; text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.hero-logo { width: min(280px, 62vw); margin-bottom: 28px; filter: drop-shadow(0 6px 24px rgba(0,0,0,.35)); }
.video-toggle { position: absolute; right: 20px; bottom: 20px; background: rgba(13,33,48,.6); color: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.page-hero { padding: 72px 0 24px; }

/* ── Store badges ───────────────────────────────────── */
.badges { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.center .badges { justify-content: center; }
.badges a { display: block; }
.badges img { height: 54px; width: auto; }
.availability { margin-top: 14px; font-size: 14px; color: var(--text-soft); }

/* ── Cards / grids ──────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card.edge { border-color: rgba(255, 136, 85, 0.55); }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,136,85,.14); border: 1px solid rgba(255,136,85,.4); margin-bottom: 16px; }
.card .icon svg { width: 24px; height: 24px; stroke: var(--accent); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-soft); font-size: 16px; }

/* steps */
.steps { counter-reset: step; display: grid; gap: 14px; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 20px 22px 20px 74px; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; }
.steps li::before { content: counter(step); position: absolute; left: 20px; top: 18px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--accent); background: rgba(255,136,85,.14); border: 1px solid rgba(255,136,85,.5); }
.steps li strong { display: block; font-size: 17px; margin-bottom: 2px; }
.steps li span { color: var(--text-soft); font-size: 16px; }

/* split: text + phone */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.split.flip { grid-template-columns: .9fr 1.1fr; }
.split.flip .phone-col { order: -1; }
@media (max-width: 900px) { .split, .split.flip { grid-template-columns: 1fr; gap: 36px; } .split.flip .phone-col { order: 0; } }
.phone-col { display: flex; justify-content: center; gap: 18px; }
.phone { width: min(280px, 72vw); aspect-ratio: 1320 / 2868; border-radius: 40px; padding: 10px; background: #0a1822; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,255,255,.04); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 31px; }
.phone.small { width: min(220px, 44vw); }
.phone-col .phone.small:nth-child(2) { margin-top: 48px; }

/* modes */
.mode { text-align: center; }
.mode .icon { margin: 0 auto 16px; }

/* price banner */
.price { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; background: linear-gradient(120deg, rgba(255,136,85,.16), rgba(255,255,255,.06)); border: 1px solid rgba(255,136,85,.5); border-radius: 26px; padding: 34px; }
.price .big { font-size: clamp(40px, 6vw, 60px); font-weight: 800; line-height: 1; }
.price .big small { white-space: nowrap; font-size: 20px; font-weight: 600; color: var(--text-soft); }
.price ul { margin: 0; padding-left: 20px; color: var(--text-soft); }

/* checklist */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 34px; color: var(--text-soft); }
.checks li strong { color: #fff; }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,136,85,.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF8855' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; border: 1px solid rgba(255,136,85,.5); }
.flags li::before { background: rgba(255,90,90,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF7A7A' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v8M12 18h.01'/%3E%3C/svg%3E") center/12px no-repeat; border-color: rgba(255,122,122,.55); }

/* notice */
.notice { border-left: 3px solid var(--accent); background: var(--glass); padding: 18px 22px; border-radius: 0 14px 14px 0; color: var(--text-soft); }

/* FAQ */
.faq details { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 18px 28px 18px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 24px; color: var(--accent); font-weight: 600; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 18px; color: var(--text-soft); }
.faq h2 { margin-top: 40px; font-size: 24px; }

/* CTA band */
.cta-band { text-align: center; background: radial-gradient(ellipse at 50% 0%, rgba(255,136,85,.22), transparent 60%), var(--glass); border: 1px solid var(--line); border-radius: 30px; padding: 56px 24px; }

/* ── Footer ─────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 36px; background: rgba(13,33,48,.55); font-size: 15px; color: var(--text-faint); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .foot { grid-template-columns: 1fr 1fr; } }
.foot h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 12px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { color: var(--text-soft); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot .brand img { height: 30px; margin-bottom: 12px; }
.legal-line { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }

/* ── Legal pages (light, long-form reading) ─────────── */
.legal-page { background: #fff; color: #1f2937; }

/* ── Desktop QR code next to the store badges ───────── */
.qr { display: none; }
@media (min-width: 901px) and (hover: hover) {
  .qr { display: inline-flex; align-items: center; gap: 12px; margin-top: 16px; }
  .qr img { width: 84px; height: 84px; background: #fff; border-radius: 12px; padding: 6px; }
  .qr span { font-size: 13px; color: rgba(255,255,255,.72); max-width: 150px; line-height: 1.35; }
  .center .qr { justify-content: center; }
}

/* ══ Motion (Phase 2) ════════════════════════════════════════════════════
   Everything below only runs for people who have NOT asked their device for
   less motion. Only transform/opacity/clip-path move, so nothing shifts the
   layout or slows taps. */

/* Phone that changes screen as you read the steps */
.phone.stack { position: relative; }
.phone.stack img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); opacity: 0; transition: opacity .55s ease, transform .55s ease; transform: scale(.97); }
.phone.stack img.on { opacity: 1; transform: none; }
.steps[data-screens] li { cursor: pointer; transition: border-color .3s ease, background-color .3s ease; }
.steps[data-screens] li.on { border-color: rgba(255,136,85,.65); background-color: rgba(255,136,85,.08); }
@media (min-width: 901px) {
  .scrolly .split { align-items: start; }
  .scrolly .phone-col { position: sticky; top: 110px; }
  .scrolly .steps { gap: clamp(48px, 18vh, 190px); padding: clamp(16px, 6vh, 60px) 0 clamp(40px, 12vh, 130px); }
}

/* Globe */
.globe-wrap { position: relative; width: min(520px, 88vw); aspect-ratio: 1; margin: 0 auto; }
.globe-wrap canvas { width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; cursor: grab; touch-action: pan-y; }
.globe-wrap canvas.ready { opacity: 1; }
.globe-wrap .globe-toggle { position: absolute; right: 6px; bottom: 6px; background: rgba(13,33,48,.6); color: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.live-places { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding: 0; list-style: none; }
.live-places li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.live-places li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* "Let's Spedy" glass disc, like the button in the app */
.disc { display: grid; place-items: center; width: 150px; height: 150px; margin: 6px auto 26px; border-radius: 50%; text-decoration: none; color: #fff; text-align: center; line-height: 1; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.22), rgba(255,255,255,.04) 60%), rgba(13,33,48,.45); border: 2px solid var(--accent); box-shadow: 0 0 0 0 rgba(255,136,85,.5), 0 12px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform .25s ease, box-shadow .25s ease; }
.disc small { display: block; font-size: 15px; font-weight: 600; opacity: .9; margin-bottom: 4px; }
.disc b { display: block; font-size: 30px; font-weight: 800; }
.disc i { display: block; font-style: normal; color: var(--accent); font-size: 20px; margin-top: 6px; }
.disc:hover, .disc:focus-visible { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255,136,85,.14), 0 16px 48px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.25); }

@media (prefers-reduced-motion: no-preference) {
  /* Smooth fade between pages (browsers without it just change page) */
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

  /* Home: the logo builds left to right like a bridge, then the words rise */
  .hero-logo { animation: build 1.3s cubic-bezier(.2,.7,.2,1) .15s both; }
  .hero h1, .hero .lead, .hero .badges, .hero .availability, .hero .qr { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
  .hero h1 { animation-delay: .7s; }
  .hero .lead { animation-delay: .85s; }
  .hero .badges, .hero .availability, .hero .qr { animation-delay: 1s; }
  .page-hero h1, .page-hero .lead, .page-hero .eyebrow { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .page-hero .lead { animation-delay: .12s; }

  /* Sections rise in as they scroll into view, driven by the scroll itself
     (no script). Browsers without this just show everything. */
  @supports (animation-timeline: view()) {
    main section:not(.hero):not(.page-hero) :is(.card, .steps li, .price, .cta-band, .faq details, .checks li, .phone, h2, .globe-wrap) {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 5% entry 55%;
    }
    .scrolly .steps li, .scrolly .phone { animation: none; }
  }

  /* The disc breathes three times, then rests */
  .disc { animation: pulse 2.4s ease-out 1.2s 3; }
}

@keyframes build { from { clip-path: inset(0 100% 0 0); filter: drop-shadow(0 0 0 rgba(255,136,85,0)); } 70% { filter: drop-shadow(0 0 22px rgba(255,136,85,.55)); } to { clip-path: inset(0 0 0 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,136,85,.5), 0 12px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25); } 100% { box-shadow: 0 0 0 26px rgba(255,136,85,0), 0 12px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25); } }
