/* ============================================================
   Oh!Furwatch — Main Stylesheet
   Theme : Connected Safe Home — BLE pet IoT
   ------------------------------------------------------------
   Design rules
   • One radius scale for every card (--radius-card = 28px)
   • One surface system: --surface, --surface-elev, --surface-soft
   • Text uses --text and --text-muted (always WCAG ≥ 4.5:1)
   ============================================================ */

/* ---------- 1. Design Tokens ---------- */
:root {
  /* Brand */
  --brand-blue:        #0a347c;
  --brand-blue-soft:   #1f4ea8;
  --brand-yellow:      #ffb91a;
  --brand-green:       #16a34a;
  --brand-red:         #ef4444;

  /* Page bg + text */
  --brand-bg:          #f8fbfa;
  --brand-bg-rgb:      248, 251, 250;
  --brand-text:        #051b40;
  --brand-text-muted:  #475569;          /* darker than before for WCAG */

  /* Surfaces (cards) */
  --surface:           #ffffff;          /* main card bg */
  --surface-elev:      #ffffff;          /* elevated card bg */
  --surface-soft:      #f1f5fb;          /* tinted surface */
  --surface-border:    rgba(5,27,64,0.08);
  --surface-text:      #051b40;
  --surface-text-muted:#475569;

  /* Glass */
  --glass-bg:          rgba(255,255,255,0.65);
  --glass-border:      rgba(255,255,255,0.55);

  /* Shape */
  --radius-card:       28px;             /* every card uses this */
  --radius-card-lg:    44px;             /* feature frames only */
  --radius-pill:       9999px;
  --radius-input:      16px;

  /* Type */
  --font-sans:    "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "Poppins", "DM Sans", sans-serif;

  /* Motion */
  --ease-out-quint: cubic-bezier(0.16, 1, 0.3, 1);

  /* Elevation */
  --shadow-card:  0 14px 40px -18px rgba(10,52,124,0.25);
  --shadow-3xl:   0 40px 100px -20px rgba(10,52,124,0.30);
}

.dark {
  --brand-blue:        #6da4ff;
  --brand-blue-soft:   #a8c5ff;
  --brand-yellow:      #ffd45c;
  --brand-green:       #4ade80;

  --brand-bg:          #06091a;
  --brand-bg-rgb:      6, 9, 26;
  --brand-text:        #f5f7fb;
  --brand-text-muted:  #c8d0de;          /* lighter for dark bg readability */

  --surface:           #111a30;          /* navy-blue card */
  --surface-elev:      #15203c;
  --surface-soft:      #0b1325;
  --surface-border:    rgba(255,255,255,0.08);
  --surface-text:      #f5f7fb;
  --surface-text-muted:#c8d0de;

  --glass-bg:          rgba(17,24,39,0.55);
  --glass-border:      rgba(255,255,255,0.10);

  --shadow-card:  0 18px 50px -22px rgba(0,0,0,0.65);
  --shadow-3xl:   0 40px 120px -25px rgba(0,0,0,0.75);
}

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

html {
  scroll-behavior: smooth;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (min-width: 768px) { html { font-size: 18px; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--brand-bg);
  color: var(--brand-text);
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.45s ease;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

::selection { background: rgba(255,185,26,0.30); color: var(--brand-blue); }

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

/* ---------- 3. Utility hooks ---------- */
.font-display { font-family: var(--font-display); }
.text-balance { text-wrap: balance; }

.text-brand-blue       { color: var(--brand-blue); }
.text-brand-yellow     { color: var(--brand-yellow); }
.text-brand-green      { color: var(--brand-green); }
.text-brand-text       { color: var(--brand-text); }
.text-brand-text-muted { color: var(--brand-text-muted); }
.bg-brand-blue         { background-color: var(--brand-blue); }
.bg-brand-yellow       { background-color: var(--brand-yellow); }
.bg-brand-green        { background-color: var(--brand-green); }
.bg-brand-bg           { background-color: var(--brand-bg); }
.fill-brand-yellow     { fill: var(--brand-yellow); }

/* Tailwind dark variant on surface-aware bg */
.bg-surface       { background-color: var(--surface); }
.bg-surface-soft  { background-color: var(--surface-soft); }
.text-surface     { color: var(--surface-text); }
.text-surface-muted{ color: var(--surface-text-muted); }

/* ---------- 4. CARDS — unified system ---------- */
.card,
.pebble-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  color: var(--surface-text);
  transition: transform 0.55s var(--ease-out-quint),
              box-shadow 0.55s ease,
              border-color 0.4s ease,
              background-color 0.5s ease,
              color 0.4s ease,
              opacity 0.4s ease;
}
.card:hover,
.pebble-card:hover {
  transform: translateY(-7px) scale(1.014);
  box-shadow: 0 38px 82px -22px rgba(10,52,124,0.32);
}
.dark .card:hover,
.dark .pebble-card:hover {
  box-shadow: 0 38px 82px -22px rgba(0,0,0,0.58);
}

.card p,
.pebble-card p { color: var(--surface-text-muted); }

.card.is-featured {
  background: linear-gradient(160deg, #0a347c 0%, #1f4ea8 100%);
  color: #fff;
  border: 0;
  box-shadow: 0 40px 90px -25px rgba(10,52,124,0.55);
  transform: scale(1.025);
}
/* Dark mode: keep navy gradient (var(--brand-blue) goes light in dark, so hardcode) */
.dark .card.is-featured {
  background: linear-gradient(160deg, #0d2260 0%, #142e6e 100%);
  box-shadow: 0 40px 90px -25px rgba(0,0,0,0.65);
}
.card.is-featured:hover { transform: scale(1.025) translateY(-7px); }
.card.is-featured p,
.card.is-featured li { color: rgba(255,255,255,0.88); }
.card.is-featured .check { color: var(--brand-yellow); }
.card.is-featured .meta-tag { background: var(--brand-yellow); color: #051b40; }

.card.is-muted { opacity: 0.62; }
.card.is-muted:hover { opacity: 1; }

/* Small surfaces inside dark cards stay readable */
.card.is-featured .icon-tile {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* Glass cards keep glass look but inherit theme-aware surface */
.glass {
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
  color: var(--surface-text);
  border-radius: var(--radius-card);
}
.glass-dark {
  backdrop-filter: blur(28px);
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: var(--shadow-3xl);
  border-radius: var(--radius-card);
}
.shadow-3xl { box-shadow: var(--shadow-3xl); }

/* Override Tailwind rounded-* on data cards we want unified.
   `.glass` is intentionally left out so feature frames like the
   3D showcase (rounded-6xl) and the signup form keep their
   larger radius via Tailwind utility. */
.card,
.pebble-card { border-radius: var(--radius-card) !important; }

/* Larger feature frames (3D card, signup form) */
.frame-lg { border-radius: var(--radius-card-lg) !important; }

/* ---------- 5. Hero / Cinematic ---------- */
.cinematic-vignette {
  background: radial-gradient(circle at center, transparent 0%, rgba(10,52,124,0.10) 100%);
}
.hero-gradient-overlay {
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(var(--brand-bg-rgb), 0.2) 60%,
    var(--brand-bg) 100%);
}

/* ---------- 6. Radar pulse ---------- */
@keyframes radar-pulse {
  0%   { transform: scale(0.8); opacity: 0; }
  25%  { transform: scale(1);   opacity: 0.5; }
  100% { transform: scale(2.5); opacity: 0; }
}
.radar-pulse-ring {
  position: absolute;
  border: 1px solid rgba(10,52,124,0.20);
  border-radius: 9999px;
  width: 100%; height: 100%;
  animation: radar-pulse 4s var(--ease-out-quint) infinite;
}
.dark .radar-pulse-ring { border-color: rgba(125,165,255,0.30); }
.radar-pulse-ring.delay-1 { animation-delay: 1s; }
.radar-pulse-ring.delay-2 { animation-delay: 2s; }

/* ---------- 7. Magnetic float ---------- */
@keyframes magnetic-float {
  0%, 100% { transform: translateY(0)    rotate(0deg); }
  33%      { transform: translateY(-15px) rotate(1deg); }
  66%      { transform: translateY(-5px)  rotate(-1deg); }
}
.magnetic-float { animation: magnetic-float 8s ease-in-out infinite; }

/* ---------- 8. Section transitions ----------
   .trans is a between-sections strip whose bg matches the
   NEXT section. Each variant clips/masks the bottom edge of
   the previous section into a curve / tilt / blob / wave.
*/
.trans {
  display: block;
  width: 100%;
  height: 90px;
  margin: 0;
  position: relative;
  pointer-events: none;
}
.trans-curve   { border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.trans-blob    { -webkit-mask: radial-gradient(ellipse 65% 110% at 30% 100%, black 60%, transparent 61%), radial-gradient(ellipse 60% 110% at 75% 100%, black 60%, transparent 61%);
                          mask: radial-gradient(ellipse 65% 110% at 30% 100%, black 60%, transparent 61%), radial-gradient(ellipse 60% 110% at 75% 100%, black 60%, transparent 61%);
                 -webkit-mask-composite: source-over;
                          mask-composite: add; }
.trans-tilt-l  { clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.trans-tilt-r  { clip-path: polygon(0 0, 100% 100%, 0 100%); }
.trans-wave    { -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'><path d='M0,60 C240,90 480,10 720,30 C960,50 1200,90 1440,30 L1440,90 L0,90 Z' fill='black'/></svg>") center / 100% 100% no-repeat;
                          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'><path d='M0,60 C240,90 480,10 720,30 C960,50 1200,90 1440,30 L1440,90 L0,90 Z' fill='black'/></svg>") center / 100% 100% no-repeat; }

/* Tiny hairline for same-color section boundaries */
.divider-dots {
  height: 1px; width: 100%;
  background-image: radial-gradient(circle, var(--surface-border) 1px, transparent 1px);
  background-size: 14px 1px;
  opacity: 0.6;
}

/* legacy waves kept for the wide cup transition under the hero */
.wave-divider {
  position: absolute; bottom: 0; left: 0;
  width: 100%; height: 120px;
  background: var(--brand-bg);
  -webkit-mask-image: radial-gradient(circle at 50% 0, transparent 65%, black 70%);
          mask-image: radial-gradient(circle at 50% 0, transparent 65%, black 70%);
  -webkit-mask-size: 200% 100%;  mask-size: 200% 100%;
  -webkit-mask-position: center; mask-position: center;
  z-index: 5;
}
.wave-divider-top {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 120px;
  background: var(--brand-bg);
  -webkit-mask-image: radial-gradient(circle at 50% 100%, transparent 65%, black 70%);
          mask-image: radial-gradient(circle at 50% 100%, transparent 65%, black 70%);
  -webkit-mask-size: 200% 100%;  mask-size: 200% 100%;
  -webkit-mask-position: center; mask-position: center;
  z-index: 5;
}
.gradient-divider {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--brand-bg));
  pointer-events: none;
}

/* ---------- 9. Glow mesh ---------- */
.glow-mesh {
  background:
    radial-gradient(at 0% 0%,   rgba(var(--brand-bg-rgb),0) 0%, var(--brand-bg) 50%),
    radial-gradient(at 100% 0%, rgba(var(--brand-bg-rgb),0) 0%, var(--brand-bg) 50%),
    radial-gradient(at 50% 100%, rgba(255,185,26,0.15) 0%, transparent 60%);
}
.atmos-blur { filter: blur(120px); }

/* ---------- 10. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.6rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  transition: transform .3s var(--ease-out-quint), box-shadow .3s ease, background .3s ease;
  cursor: pointer;
  border: 0;
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--brand-blue);
  color: #fff;
  padding: 0.85rem 1.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  box-shadow: 0 14px 30px -10px rgba(10,52,124,0.40);
}
.btn-yellow {
  background: var(--brand-yellow);
  color: var(--brand-blue);
  padding: 1.25rem 3rem;
  font-size: 1.1rem;
  border-radius: var(--radius-card);
  box-shadow: 0 24px 60px -15px rgba(255,185,26,0.55);
}
.btn-ghost {
  background: transparent;
  color: var(--surface-text);
  padding: 0.85rem 2rem;
  border: 1px solid var(--surface-border);
  font-size: 0.85rem;
}
.btn-ghost:hover { background: rgba(10,52,124,0.05); }
.dark .btn-ghost:hover { background: rgba(255,255,255,0.05); }

/* ---------- 11. Form fields ---------- */
.field {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-input);
  padding: 1.1rem 1.25rem;
  color: var(--surface-text);
  font: inherit;
  outline: none;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.field:focus { box-shadow: 0 0 0 4px rgba(10,52,124,0.18); border-color: var(--brand-blue); }
.field::placeholder { color: rgba(71,85,105,0.55); }
.dark .field::placeholder { color: rgba(200,208,222,0.55); }
.field-label {
  display: block;
  margin: 0 0 0.65rem 0.25rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--brand-text-muted);
}

/* ---------- 12. Reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  transition: opacity 0.82s var(--ease-out-quint),
              transform 0.82s var(--ease-out-quint),
              filter    0.72s var(--ease-out-quint);
}
[data-reveal="left"]  { transform: translateX(-60px); }
[data-reveal="right"] { transform: translateX(60px); }
[data-reveal="scale"] { transform: scale(0.92); }
[data-reveal].is-in { opacity: 1; transform: none; filter: blur(0); }

/* ---------- 13. Navbar ---------- */
.navbar {
  position: fixed; inset: 0 0 auto 0;
  z-index: 50;
  padding: 1.75rem 1.5rem;
  transition: padding 0.5s var(--ease-out-quint);
}
.navbar.is-scrolled { padding: 0.85rem 1.5rem; }
.navbar-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.5s var(--ease-out-quint);
  padding: 0;
}
.navbar.is-scrolled .navbar-inner {
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.5rem;
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.nav-link {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--brand-text-muted);
  transition: color .25s ease;
}
.nav-link:hover { color: var(--brand-blue); }
.nav-toggle {
  width: 2.5rem; height: 2.5rem;
  border-radius: 9999px;
  background: rgba(10,52,124,0.06);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; color: var(--brand-text-muted);
  transition: background .25s ease;
}
.dark .nav-toggle { background: rgba(255,255,255,0.06); }
.nav-toggle:hover { background: rgba(10,52,124,0.12); }
.dark .nav-toggle:hover { background: rgba(255,255,255,0.12); }

.nav-burger { display:none; }
@media (max-width: 1024px) {
  .nav-burger { display: inline-flex; }
  .nav-links  { display: none; }
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

.mobile-menu {
  position: fixed; inset: 0;
  background: var(--brand-bg);
  z-index: 60;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateY(-100%);
  transition: transform .5s var(--ease-out-quint);
}
.mobile-menu.is-open { display: flex; transform: translateY(0); }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-text);
}

/* ---------- 14. Chips / pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--brand-text-muted);
  backdrop-filter: blur(14px);
}
.dot {
  width: 0.5rem; height: 0.5rem; border-radius: 9999px;
  background: var(--brand-green);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* Hero floating chips */
.float-chip {
  position: absolute; z-index: 20;
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.9rem 1.1rem;
  border-radius: 1.25rem;
  backdrop-filter: blur(20px);
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  color: var(--surface-text);
  animation: magnetic-float 8s ease-in-out infinite;
}

/* ---------- 15. Live map ---------- */
.live-map {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card-lg);
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,185,26,0.18), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(10,52,124,0.18),  transparent 50%),
    linear-gradient(135deg, #eaf0fb 0%, #f8fbfa 100%);
}
.dark .live-map {
  background:
    radial-gradient(circle at 30% 30%, rgba(255,212,92,0.22), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(109,164,255,0.22), transparent 50%),
    linear-gradient(135deg, #0d1733 0%, #06091a 100%);
}
.live-map .grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(10,52,124,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,52,124,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 75%);
}
.dark .live-map .grid-overlay {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
}
.live-map .pin {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 9999px;
  background: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(10,52,124,0.20);
}
.live-map .pin::after {
  content: ""; position: absolute; inset: -8px;
  border-radius: 9999px;
  border: 2px solid var(--brand-blue);
  animation: pin-ping 2.4s ease-out infinite;
}
.live-map .pin.pet {
  background: var(--brand-yellow);
  box-shadow: 0 0 0 4px rgba(255,185,26,0.30);
}
.live-map .pin.pet::after { border-color: var(--brand-yellow); }
@keyframes pin-ping {
  0%   { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(3);   opacity: 0; }
}
.live-map .trail { position: absolute; inset: 0; pointer-events: none; }

/* ---------- 16. Phone mockup — ALWAYS light theme ---------- */
.phone-mock {
  width: 320px; max-width: 100%;
  aspect-ratio: 9 / 19;
  border-radius: 48px;
  background: linear-gradient(180deg, #f5f7fb 0%, #ffffff 100%);
  border: 8px solid #111827;
  box-shadow: 0 60px 120px -30px rgba(10,52,124,0.35);
  position: relative;
  overflow: hidden;
  color: #051b40;                        /* always dark text */
}
.phone-mock .notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 28px;
  border-radius: 9999px;
  background: #111827;
  z-index: 2;
}
.phone-screen {
  position: absolute; inset: 0;
  padding: 56px 18px 18px;
  display: flex; flex-direction: column; gap: 14px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,185,26,0.25), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #eef2f9 100%);
  color: #051b40;
}
.phone-screen .tile {
  background: #ffffff;
  border: 1px solid rgba(5,27,64,0.06);
  border-radius: 18px;
  padding: 14px;
  font-size: 12px;
  color: #051b40;
  box-shadow: 0 4px 12px rgba(10,52,124,0.06);
}
.phone-screen .tile-muted { color: #475569; }

.bar { height: 8px; border-radius: 9999px; background: rgba(10,52,124,0.10); overflow: hidden; }
.bar > i { display:block; height:100%; background: #0a347c; border-radius: 9999px; animation: bar-grow 2.4s var(--ease-out-quint) infinite alternate; }
@keyframes bar-grow { from { width: 20%; } to { width: var(--w, 80%); } }

/* ---------- 17. Marquee ---------- */
.marquee {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex; gap: 4rem;
  width: max-content;
  animation: marquee 40s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-item {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--brand-text-muted);
  opacity: 0.6;
  white-space: nowrap;
}

/* ---------- 18. FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--surface-border); }
.faq-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  text-align: left;
  background: transparent; border: 0; cursor: pointer;
  padding: 1.75rem 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand-text);
}
.faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease-out-quint);
}
.faq-body > div { overflow: hidden; }
.faq-item.is-open .faq-body { grid-template-rows: 1fr; }
.faq-item.is-open .faq-icon { transform: rotate(45deg); }
.faq-icon {
  width: 36px; height: 36px;
  border-radius: 9999px;
  border: 1px solid var(--surface-border);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .4s var(--ease-out-quint);
  color: var(--brand-blue);
}
.faq-text {
  color: var(--brand-text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  padding-bottom: 1.5rem;
  max-width: 60ch;
}

/* ---------- 19. Pricing tag (also used as comparison badge) ---------- */
.price-tag,
.meta-tag {
  position: absolute; top: -14px; right: 2rem;
  background: var(--brand-yellow);
  color: var(--brand-blue);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
}

/* ---------- 20. Stats ---------- */
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  letter-spacing: -0.03em;
  color: var(--brand-blue);
  line-height: 1;
}
.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--brand-text-muted);
  margin-top: 0.6rem;
}

/* ---------- 21. Misc utilities ---------- */
.icon-tile {
  width: 3rem; height: 3rem; border-radius: 1rem;
  background: rgba(10,52,124,0.08);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand-blue);
}
.dark .icon-tile { background: rgba(109,164,255,0.18); }
.icon-tile.lg { width: 3.5rem; height: 3.5rem; border-radius: 1.25rem; }

.tag-feature {
  background: rgba(10,52,124,0.08);
  color: var(--brand-blue);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.dark .tag-feature { background: rgba(109,164,255,0.18); }

/* ---------- 22. Cursor blob ---------- */
.cursor-blob {
  position: fixed; top: 0; left: 0;
  width: 28px; height: 28px;
  border-radius: 9999px;
  background: rgba(10,52,124,0.10);
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
  transition: width .3s ease, height .3s ease, background .3s ease;
  mix-blend-mode: multiply;
  display: none;
}
.dark .cursor-blob { mix-blend-mode: screen; background: rgba(125,165,255,0.18); }
@media (min-width: 1024px) { .cursor-blob { display: block; } }

/* ---------- 23. Footer ---------- */
footer {
  background-color: var(--brand-blue);
  color: #fff;
}
.dark footer { background-color: #08122c; }
footer a { color: rgba(255,255,255,0.75); transition: color .25s ease; }
footer a:hover { color: #fff; }

/* ---------- 24. model-viewer slot ---------- */
model-viewer {
  width: 100%;
  height: 550px;
  --poster-color: transparent;
  background: transparent;
}

/* ---------- 25. Toast ---------- */
.toast {
  position: fixed;
  bottom: 2rem; right: 2rem;
  background: var(--brand-blue);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(10,52,124,0.30);
  z-index: 80;
  transform: translateY(20px);
  opacity: 0;
  transition: opacity .3s ease, transform .3s var(--ease-out-quint);
  font-weight: 600;
  font-size: 0.9rem;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: var(--brand-red); }

/* ---------- 26. Scroll-to-top FAB ---------- */
.scroll-top {
  position: fixed;
  right: 1.5rem; bottom: 1.5rem;
  width: 52px; height: 52px;
  border-radius: 9999px;
  background: var(--brand-blue);
  color: #fff;
  border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 18px 40px -10px rgba(10,52,124,0.45);
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.85);
  transition: opacity .35s ease, transform .35s var(--ease-out-quint), background .25s ease;
}
.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.scroll-top:hover { background: var(--brand-blue-soft); transform: translateY(-4px) scale(1.05); }
.scroll-top svg, .scroll-top i { width: 22px; height: 22px; }

/* Scroll progress ring around the button */
.scroll-top .progress {
  position: absolute; inset: -4px;
  border-radius: 9999px;
  background: conic-gradient(var(--brand-yellow) calc(var(--p,0) * 1%), transparent 0);
  -webkit-mask: radial-gradient(circle, transparent 60%, black 61%);
          mask: radial-gradient(circle, transparent 60%, black 61%);
}

/* ---------- 27. Dark-mode card overrides ---------- */
/* Force previously hard-coded bg-white spots to follow theme.        */
.surface-island {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-card);
}
.dark .bg-white-island { background: var(--surface) !important; }

/* ============================================================
   28. PATCH — Theme smoothness, text contrast & animation
   ============================================================ */

/* --- 28a. Smooth theme transitions on every major element --- */
section,
footer,
.navbar,
.mobile-menu,
.chip,
.float-chip,
.tag-feature,
.icon-tile,
.field,
.field-label,
.faq-item,
.faq-trigger,
.live-map,
.stat-num,
.stat-label,
.marquee-item,
.surface-island,
.pebble-card h3,
.pebble-card p,
.card h3,
.card p,
.card li {
  transition: background-color 0.5s ease, color 0.45s ease, border-color 0.4s ease;
}

/* Section dividers must also cross-fade */
.trans         { transition: background-color 0.5s ease !important; }
footer         { transition: background-color 0.5s ease !important; }
.navbar-inner  { transition: all 0.5s var(--ease-out-quint); }

/* --- 28b. Fix inline-styled icon tiles in comparison cards (hardcoded light values) --- */
.dark .card .icon-tile[style*="rgba(5,27,64"] {
  background: rgba(109,164,255,0.18) !important;
  color: rgba(109,164,255,0.88) !important;
}

/* --- 28c. Yellow button text always dark (var(--brand-blue) lightens in dark mode) --- */
.btn-yellow { color: #051b40 !important; }

/* --- 28d. Text contrast improvements for white-bg sections in light mode --- */
/* Sections that are bg-white in light mode — ensure muted text stays readable */
.stat-label { color: var(--brand-text-muted); }

/* Dark mode: boost muted text slightly so it doesn't wash out on navy cards */
.dark .card p,
.dark .pebble-card p,
.dark .card li { color: var(--surface-text-muted); }

/* --- 28e. Buttons — smoother spring transitions --- */
.btn {
  transition: transform 0.38s var(--ease-out-quint),
              box-shadow 0.38s ease,
              background-color 0.3s ease,
              color 0.25s ease !important;
}
.btn:hover  { transform: translateY(-3px) scale(1.025); }
.btn:active { transform: translateY(0)   scale(0.975); }

/* btn-yellow keeps btn base but ensure no conflict with scale */
.btn-yellow:hover { transform: translateY(-3px) scale(1.02); }

/* --- 28f. Scroll-to-top FAB transitions --- */
.scroll-top {
  transition: opacity 0.45s var(--ease-out-quint),
              transform 0.45s var(--ease-out-quint),
              background-color 0.3s ease !important;
}

/* --- 28g. FAQ body animation smoother --- */
.faq-body { transition: grid-template-rows 0.48s var(--ease-out-quint); }
.faq-icon {
  transition: transform 0.42s var(--ease-out-quint),
              background-color 0.3s ease,
              border-color 0.3s ease;
}

/* --- 28h. Staggered grid card reveals (waterfall entrance) --- */
.grid > [data-reveal]:nth-child(1)  { transition-delay: 0.00s; }
.grid > [data-reveal]:nth-child(2)  { transition-delay: 0.08s; }
.grid > [data-reveal]:nth-child(3)  { transition-delay: 0.16s; }
.grid > [data-reveal]:nth-child(4)  { transition-delay: 0.24s; }
.grid > [data-reveal]:nth-child(5)  { transition-delay: 0.32s; }
.grid > [data-reveal]:nth-child(6)  { transition-delay: 0.40s; }
.grid > [data-reveal]:nth-child(7)  { transition-delay: 0.48s; }
.grid > [data-reveal]:nth-child(8)  { transition-delay: 0.56s; }
.grid > [data-reveal]:nth-child(9)  { transition-delay: 0.64s; }

/* Stagger for list items inside a reveal parent */
.space-y-6 > li:nth-child(1) { transition-delay: 0.04s; }
.space-y-6 > li:nth-child(2) { transition-delay: 0.14s; }
.space-y-6 > li:nth-child(3) { transition-delay: 0.24s; }

/* --- 28i. Float chips polish --- */
.float-chip {
  transition: background-color 0.5s ease,
              border-color 0.4s ease,
              color 0.4s ease;
}

/* --- 28j. Marquee items theme transition --- */
.marquee-item {
  transition: color 0.45s ease;
}

/* --- 28k. Navbar & mobile menu transitions --- */
.nav-link, .nav-toggle {
  transition: color 0.25s ease, background-color 0.25s ease !important;
}

/* --- 28l. Phone mockup always-light (intentional) — ensure tile text clear --- */
.phone-screen .tile {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- 28m. Smooth section bg for Safety, App, Testimonials, Pricing etc. --- */
/* These use bg-white/dark:bg-brand-bg; ensure the wave/curve dividers
   above them also transition on the same timing. */
.wave-divider,
.wave-divider-top {
  transition: background-color 0.5s ease;
}

/* --- 28n. Hero floating chip text fix in dark mode --- */
.dark .float-chip .text-brand-text-muted { color: var(--brand-text-muted); }

/* --- 28o. Improved section text readability in both modes --- */
/* Ensure brand-text on bg-white sections is always readable */
.text-brand-text        { color: var(--brand-text); }
.text-brand-text-muted  { color: var(--brand-text-muted); }

/* Comparison muted-card icon tiles in dark mode (inline style override) */
.dark .card.is-muted .icon-tile {
  background: rgba(109,164,255,0.16) !important;
  color: rgba(109,164,255,0.85) !important;
}

/* --- 28p. Bigger hover lift on feature image cards (use-cases section) --- */
article.relative.rounded-5xl {
  transition: transform 0.55s var(--ease-out-quint),
              box-shadow 0.55s ease;
}
article.relative.rounded-5xl:hover {
  transform: translateY(-6px);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.35);
}

/* --- 28q. Pebble-card title always follows surface-text --- */
.pebble-card h3,
.card h3 { color: var(--surface-text); }

/* --- 28r. Hero staggered child reveal (chip → h1 → p → buttons) --- */
/* Scoped to the hero text block only to avoid cascading on every card */
#top [data-reveal] > *:nth-child(1) { transition-delay: 0.0s; }
#top [data-reveal] > *:nth-child(2) { transition-delay: 0.12s; }
#top [data-reveal] > *:nth-child(3) { transition-delay: 0.24s; }
#top [data-reveal] > *:nth-child(4) { transition-delay: 0.38s; }
#top [data-reveal]:not(.is-in) > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease-out-quint), transform 0.65s var(--ease-out-quint);
}
#top [data-reveal].is-in > * { opacity: 1; transform: none; }

/* --- 28s. Section-level directional reveals keep blur from base rule --- */
/* (base [data-reveal] already sets filter: blur(6px); these just keep alignment) */

/* --- 28t. FAQ item open state polish --- */
.faq-item.is-open {
  background: var(--surface-soft);
  border-radius: calc(var(--radius-card) / 2);
  padding: 0 1.25rem;
  margin: 0.25rem 0;
  transition: background-color 0.35s ease, padding 0.3s ease;
}
.faq-item.is-open .faq-trigger { color: var(--brand-blue); }

/* --- 28u. Comparison & pricing cards: featured always has proper text contrast --- */
.card.is-featured h3,
.card.is-featured p,
.card.is-featured li,
.card.is-featured span { color: inherit; }
.card.is-featured .text-xs.opacity-80 { opacity: 0.82; }

/* --- 28v. Pioneer form glass card transitions --- */
.glass {
  transition: background-color 0.5s ease,
              border-color 0.4s ease,
              box-shadow 0.5s ease;
}

/* --- 28w. Testimonial figcaption border transitions --- */
figcaption {
  transition: border-color 0.4s ease;
}

/* ============================================================
   29. PATCH v1.2 — Logo switch, bg-page, bg-white dark fix,
       form text, footer layout
   ============================================================ */

/* --- 29a. Navbar logo theme switch (CSS-native, replaces Tailwind dark: classes) --- */
.navbar-logo-light { display: block; }
.navbar-logo-dark  { display: none;  }
.dark .navbar-logo-light { display: none;  }
.dark .navbar-logo-dark  { display: block; }

/* --- 29b. Fix sections / trans-strips using bg-white that don't switch ---
   Tailwind Play CDN can fail to generate dark: overrides when the target
   color is a CSS variable (opacity pipeline breaks). Override directly.     */
.dark .bg-white.transition-colors,
.dark .trans.bg-white {
  background-color: var(--brand-bg) !important;
}
/* Gap div between hero and 3D-Showcase */
.dark div.h-40.bg-white {
  background-color: var(--brand-bg) !important;
}
/* Ensure transition timing is preserved on these elements */
.bg-white.transition-colors,
.trans.bg-white,
div.h-40.bg-white {
  transition: background-color 0.5s ease !important;
}

/* --- 29c. Meta-tags are always yellow with opaque background ---
   Overrides the old rgba(255,255,255,0.12) on .is-featured cards.           */
.meta-tag,
.card.is-featured .meta-tag {
  background: var(--brand-yellow) !important;
  color: #051b40 !important;
  box-shadow: 0 4px 12px -4px rgba(255,185,26,0.45);
}

/* --- 29d. Pioneer form — bigger, bolder text throughout --- */
/* Section intro text */
#pioneers > div > div:first-child p {
  font-size: 1.15rem;
  font-weight: 600;
}
/* Submit button text */
#pioneers button[type="submit"] {
  font-size: 1.35rem !important;
  letter-spacing: 0.01em;
}
/* "No credit card" footnote */
#pioneers .text-\[11px\] {
  font-size: 0.75rem;
  font-weight: 700;
}

/* --- 29e. Footer copyright block (placed under social icons in HTML) --- */
.footer-copy {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: rgba(255,255,255,0.30);
  line-height: 1.9;
  padding-top: 0.5rem;
}
