/* ==============================
   FONTS
   ============================== */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==============================
   DESIGN TOKENS
   ============================== */
:root {
  /* Brand colours */
  --accent:        #0891b2;
  --accent-dark:   #0e7490;
  --accent-light:  #22d3ee;
  --accent-soft:   rgba(8, 145, 178, 0.10);
  --accent-glow:   rgba(8, 145, 178, 0.28);

  /* Light surface */
  --bg:              #e8f4fd;
  --surface:         #ffffff;
  --surface-muted:   #f4fbff;
  --text-primary:    #0c1f2e;
  --text-secondary:  #446070;
  --border:          #bae6fd;
  --border-soft:     #e0f2fe;

  /* Hero dark */
  --hero-bg:      #071521;
  --hero-text:    rgba(255, 255, 255, 0.65);

  /* Elevation */
  --shadow-sm:   0 2px 8px  rgba(8, 145, 178, 0.06);
  --shadow-md:   0 8px 24px rgba(8, 145, 178, 0.10);
  --shadow-lg:   0 20px 56px rgba(8, 145, 178, 0.14);
  --shadow-card: 0 4px 20px rgba(12, 31, 46, 0.07);

  /* Shape */
  --radius-xl: 1.5rem;
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
  --radius-sm: 0.5rem;

  /* Layout */
  --container: 72rem;
  --header-h: 4.25rem;
}

/* ==============================
   RESET & BASE
   ============================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.65;
}

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

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

a:hover { text-decoration: underline; }

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

/* ==============================
   ACCESSIBILITY
   ============================== */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 1000;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--text-primary);
  color: #fff;
}

.skip-link:focus { top: 1rem; }

/* ==============================
   LAYOUT
   ============================== */
.container {
  width: min(var(--container), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* ==============================
   HEADER
   ============================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
  border-bottom: 1px solid transparent;
  /* Default (non-hero pages): light */
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--border-soft);
  backdrop-filter: blur(12px);
}

/* On hero page: start transparent, turn white on scroll */
.hero-page .site-header {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.hero-page .site-header.scrolled {
  background: rgba(255, 255, 255, 0.75);
  border-bottom-color: var(--border-soft);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 1.15rem;
  color: var(--text-primary);
  transition: color 300ms ease;
}

.hero-page .brand { color: #fff; }
.hero-page .site-header.scrolled .brand { color: var(--text-primary); }

.brand:hover { text-decoration: none; }

/* Desktop nav (inside header) */
.site-nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Mobile nav (outside header) — hidden on desktop */
.site-nav-mobile { display: none; }

.site-nav-desktop a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.92rem;
  transition: color 200ms ease;
}

.hero-page .site-nav-desktop a { color: rgba(255, 255, 255, 0.72); }
.hero-page .site-header.scrolled .site-nav-desktop a { color: var(--text-secondary); }

.site-nav-desktop a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.hero-page .site-nav-desktop a:hover { color: #fff; }
.hero-page .site-header.scrolled .site-nav-desktop a:hover { color: var(--text-primary); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 2.25rem;
  padding: 0 0.85rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.nav-toggle:hover {
  text-decoration: none;
  background: #fff;
}

.hero-page .nav-toggle {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.hero-page .site-header.scrolled .nav-toggle {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--border-soft);
  color: var(--text-primary);
}

/* ==============================
   TYPOGRAPHY
   ============================== */
h1, h2, h3, h4 {
  margin-top: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

p {
  margin-top: 0;
  color: var(--text-secondary);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* ==============================
   HERO
   ============================== */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 80% 70% at 75% 50%, rgba(8, 145, 178, 0.13) 0%, transparent 65%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(14, 116, 144, 0.09) 0%, transparent 55%),
    linear-gradient(to bottom, #071521 0%, #0a2a3a 40%, #0d3d4a 100%);
  padding: calc(3rem + var(--header-h)) 0 4.5rem;
  overflow: hidden;
}

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

.hero-content { max-width: 34rem; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.22);
  color: var(--accent-light);
}

.hero h1 { color: #fff; }

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent-light) 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  max-width: 32rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* CTA buttons */
.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  cursor: not-allowed;
  opacity: 0.85;
}

.cta-btn:hover { text-decoration: none; }

.cta-apple {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}

.cta-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.cta-sub {
  font-size: 0.7rem;
  opacity: 0.7;
  letter-spacing: 0.01em;
}

.cta-main {
  font-size: 0.95rem;
  font-weight: 700;
}

.coming-soon-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.38);
}

/* ==============================
   PHONE MOCKUP
   ============================== */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(8, 145, 178, 0.18) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

.phone-mockup {
  position: relative;
  width: 230px;
  margin: 0 auto;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.5));
  z-index: 1;
}

.phone-frame {
  position: relative;
  width: 230px;
  height: 498px;
  background: #1a1a1e;
  border: 4px solid #2a2a2e;
  border-radius: 3rem;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Volume buttons (left side) */
.phone-btn {
  position: absolute;
  background: #2a2a2e;
  border-radius: 2px;
}

.phone-btn-vol1 { left: -7px; top: 80px;  width: 3px; height: 26px; }
.phone-btn-vol2 { left: -7px; top: 114px; width: 3px; height: 26px; }
.phone-btn-power { right: -7px; top: 96px;  width: 3px; height: 38px; }

.phone-screen {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #5bcec5 0%, #e8f0f0 100%);
  overflow: hidden;
}

.phone-screen-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* App UI inside phone */
.phone-app {
  position: absolute;
  inset: 0;
  padding: 28px 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.app-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
}

.app-topbar-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: -0.01em;
  font-family: Inter, sans-serif;
}

.app-topbar-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
}

.app-progress-card {
  background: rgba(8, 145, 178, 0.18);
  border: 1px solid rgba(8, 145, 178, 0.28);
  border-radius: 0.65rem;
  padding: 9px 11px;
}

.app-progress-label {
  font-size: 0.52rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
  font-family: Inter, sans-serif;
}

.app-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}

.app-progress-fill {
  height: 100%;
  width: 66%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  border-radius: 99px;
}

.app-progress-count {
  font-size: 0.52rem;
  color: var(--accent-light);
  font-weight: 600;
  font-family: Inter, sans-serif;
}

.app-med-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.app-med-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.6rem;
  padding: 8px 10px;
}

.app-med-item.done {
  border-color: rgba(8, 145, 178, 0.22);
  background: rgba(8, 145, 178, 0.08);
}

.app-med-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.app-med-item.done .app-med-dot { background: var(--accent-light); }

.app-med-info { flex: 1; min-width: 0; }

.app-med-name {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  margin-bottom: 4px;
}

.app-med-item.done .app-med-name { background: rgba(255, 255, 255, 0.42); }

.app-med-name.short { width: 55%; }
.app-med-name.long  { width: 80%; }

.app-med-time {
  height: 4px;
  width: 42%;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
}

.app-med-check {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-med-check::after {
  content: '';
  width: 5px;
  height: 3px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg) translateY(-0.5px);
}

/* ==============================
   STATS STRIP
   ============================== */
.stats-strip {
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
  padding: 1.1rem 0;
}

.stats-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.stat-item svg { color: var(--accent); flex-shrink: 0; }

/* ==============================
   SECTIONS
   ============================== */
.section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border-soft);
}

.section-header {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto 3rem;
}

.section-header h2 { margin-bottom: 0.5rem; }
.section-header p { font-size: 1rem; margin: 0; }

/* ==============================
   FEATURE CARDS
   ============================== */
.feature-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-card);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.1rem;
}

/* ==============================
   HOW IT WORKS
   ============================== */
.how-section { background: #fff; }

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  position: relative;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.step-desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ==============================
   WHY PILLDOR
   ============================== */
.why-section { background: var(--bg); }

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.why-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-card);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.why-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.why-card h3 { margin-bottom: 0.35rem; }
.why-card p  { margin: 0; font-size: 0.95rem; }

/* ==============================
   FAQ
   ============================== */
.faq-section { background: #fff; }

.faq-list {
  max-width: 42rem;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-soft);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: transform 200ms ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item[open] .faq-question::after {
  content: "\2212";
}

.faq-answer {
  padding: 0 0 1.15rem;
}

.faq-answer p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ==============================
   CONTACT
   ============================== */
.contact-section { padding: 3rem 0 4rem; }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-card);
  text-align: center;
  max-width: 30rem;
  margin: 0 auto;
}

.contact-card h2 { margin-bottom: 0.5rem; }
.contact-card p  { margin-bottom: 1rem; }

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
}

.contact-link:hover { color: var(--accent-dark); text-decoration: underline; }

/* ==============================
   FOOTER
   ============================== */
.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border-soft);
  background: #fff;
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: block;
  margin-bottom: 0.3rem;
}

.footer-meta p {
  margin: 0 0 0.2rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.75;
}

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

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.87rem;
  color: var(--text-secondary);
  font-weight: 500;
}

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

.footer-social {
  display: flex;
  gap: 0.6rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-secondary);
  transition: background 150ms ease, color 150ms ease;
}

.footer-social a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

/* Fallback for footer nav without .footer-links class (legal pages) */
.footer-inner nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-inner nav a {
  font-size: 0.87rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-inner nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* ==============================
   LEGAL PAGES
   ============================== */
.page-main { padding: calc(3.5rem + var(--header-h)) 0 3.5rem; }

.page-main .container {
  width: min(56rem, calc(100% - 2.5rem));
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--accent);
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--accent-dark);
}

.breadcrumb [aria-current] {
  color: var(--text-secondary);
  font-weight: 500;
}

.legal-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(1.2rem, 3vw, 2.4rem);
  line-height: 1.72;
}

.legal-card table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0;
  font-size: 0.92rem;
}

.legal-card th,
.legal-card td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
}

.legal-card th {
  font-weight: 600;
  color: var(--text-primary);
}

.legal-card table a { word-break: break-word; }

.legal-header { margin-bottom: 1.35rem; }

.legal-date {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.legal-section + .legal-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
}

.legal-section ul {
  margin: 0.6rem 0 0;
  padding-left: 1.15rem;
}

.legal-section h3 {
  margin-top: 1.35rem;
  margin-bottom: 0.6rem;
}

.legal-section h2 + h3 {
  margin-top: 1rem;
}

.legal-section li {
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

/* ==============================
   SCROLL ANIMATIONS
   ============================== */
[data-animate] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: none;
}

[data-animate="d1"] { transition-delay: 0.08s; }
[data-animate="d2"] { transition-delay: 0.18s; }
[data-animate="d3"] { transition-delay: 0.28s; }

@media (max-width: 47.99rem) {
  .nav-toggle { display: inline-flex; }
  .site-nav-desktop { display: none; }
  .site-nav-mobile { display: flex; }

  /* Drawer overlay */
  .nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 119;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background 300ms ease;
  }

  body.nav-open .nav-overlay {
    background: rgba(0, 0, 0, 0.4);
    pointer-events: auto;
  }

  /* Side drawer (outside header, no backdrop-filter inheritance) */
  .site-nav-mobile {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 80vw;
    z-index: 120;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    border-radius: 1rem 0 0 1rem;
    transform: translateX(100%);
    transition: transform 300ms ease;
    flex-wrap: nowrap;
  }

  body.nav-open .site-nav-mobile {
    transform: translateX(0);
  }

  body.nav-open { overflow: hidden; }

  /* Drawer header */
  .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-soft);
  }

  .drawer-brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
  }

  .drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 0.5rem;
    background: var(--bg-soft);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
  }

  .drawer-close:hover {
    background: var(--border-soft);
    color: var(--text-primary);
  }

  .site-nav-mobile a {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.85rem 1.5rem;
    width: 100%;
    border-bottom: none;
    transition: background 150ms ease, color 150ms ease;
  }

  .site-nav-mobile a:hover {
    color: var(--text-primary);
    background: var(--bg-soft);
  }

  .hero-page .site-header.nav-open .brand { color: var(--text-primary); }

  .hero-page .site-header.nav-open .nav-toggle {
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--border-soft);
    color: var(--text-primary);
  }
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (min-width: 48rem) {
  /* Hide mobile drawer elements on desktop */
  .drawer-header { display: none; }
  .drawer-close { display: none; }

  /* Hero */
  .hero { padding: calc(6.5rem + var(--header-h)) 0 5.5rem; }

  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .hero-content { max-width: 100%; }

  /* Phone: 3D tilt */
  .phone-mockup {
    width: 270px;
    transform: perspective(1200px) rotateY(-10deg) rotateX(3deg);
  }

  .phone-frame {
    width: 270px;
    height: 584px;
  }

  .hero-visual::before {
    width: 340px;
    height: 480px;
  }

  /* Feature grid */
  .feature-grid { grid-template-columns: repeat(2, 1fr); }

  /* Steps */
  .steps-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

  /* Why */
  .why-grid { grid-template-columns: repeat(3, 1fr); }

  /* Plus: centre the two cards */
  .plus-section .why-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 42rem;
    margin-inline: auto;
  }

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

  /* Footer */
  .footer-right { align-items: flex-end; }
}

@media (min-width: 64rem) {
  .phone-mockup { width: 290px; }
  .phone-frame  { width: 290px; height: 628px; }

  .hero-visual::before {
    width: 380px;
    height: 520px;
  }
}
