/* =========================================================================
   GIA Healthcare AI — Landing Stylesheet
   Single-file, framework-free. Custom properties for the design system.
   ========================================================================= */

/* ---- Self-hosted fonts (Phase 1.6 production reliability) ---- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url('/landing/assets/fonts/manrope-variable-latin.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/landing/assets/fonts/inter-variable-latin.woff2') format('woff2-variations');
}

/* ---- Design tokens ---- */
:root {
  /* Brand */
  --gia-purple-primary: #7C3AED;
  --gia-purple-deep:    #4C1D95;
  --gia-purple-glow:    #A78BFA;
  --gia-lavender-tint:  #F5F3FF;

  /* Surface */
  --gia-bg-white:       #FFFFFF;
  --gia-text-primary:   #1F2937;
  --gia-text-secondary: #6B7280;
  --gia-text-tertiary:  #9CA3AF;
  --gia-border:         #E5E7EB;

  /* Shadow */
  --gia-shadow-sm:      0 1px 2px 0 rgba(124, 58, 237, 0.05);
  --gia-shadow-md:      0 8px 24px -8px rgba(124, 58, 237, 0.15);
  --gia-shadow-lg:      0 24px 48px -16px rgba(76, 29, 149, 0.18);
  --gia-shadow-glow:    0 0 60px rgba(167, 139, 250, 0.30);

  /* Gradient */
  --gia-gradient-hero:  radial-gradient(at 70% 30%, #F5F3FF 0%, #FFFFFF 60%);
  --gia-gradient-cta:   linear-gradient(135deg, #7C3AED 0%, #4C1D95 100%);
  /* Brand identity gradient — sampled from gia-lockup.png wordmark (electric blue → vivid violet). */
  --gia-gradient-brand: linear-gradient(90deg, #0045EE 0%, #9134F4 100%);

  /* Type */
  --font-heading: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; /* clip off-canvas #mobile-sheet (transform: translateX(360px)) so documentElement.scrollWidth ≤ viewport */ }
body {
  margin: 0;
  overflow-x: clip; /* prevent horizontal overflow from animated mesh + tilted device frame */
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
hr { border: 0; height: 1px; background: var(--gia-border); margin: 0; }

/* ---- Base ---- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gia-text-primary);
  background: var(--gia-bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
  outline: 3px solid var(--gia-purple-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -64px;
  left: 16px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--gia-purple-deep);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 16px; }

#scroll-sentinel { position: absolute; top: 0; left: 0; height: 1px; width: 1px; pointer-events: none; }

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) {
  .container { padding: 0 48px; }
}

/* ---- Typography utilities ---- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gia-purple-primary);
  margin-bottom: 16px;
}
.eyebrow-inverse { color: var(--gia-purple-glow); }

.display-hero {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--gia-text-primary);
  margin-bottom: 24px;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--gia-text-primary);
  margin-bottom: 16px;
}
.section-title--inverse { color: #fff; }

.body-lead {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
  color: var(--gia-text-secondary);
  max-width: 540px;
}
.body-lead--inverse { color: rgba(255,255,255,0.85); max-width: 600px; margin-left: auto; margin-right: auto; }

.section-sub {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--gia-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.gradient-text {
  /* Brand identity gradient (blue → purple) — matches the official wordmark tier. */
  background: var(--gia-gradient-brand);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gia-purple-primary); /* fallback */
}
@media (prefers-reduced-motion: no-preference) {
  .gradient-text { animation: gia-shimmer 6s linear infinite; }
}
@keyframes gia-shimmer {
  0%   { background-position:   0% 50%; }
  100% { background-position: 200% 50%; }
}

.trust-row {
  margin-top: 24px;
  font-size: 13px;
  color: var(--gia-text-tertiary);
  letter-spacing: 0.01em;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), background 0.18s var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
}
.btn-lg { padding: 16px 28px; font-size: 16px; border-radius: 14px; }
.btn-block { display: flex; width: 100%; }

.btn-primary {
  background: var(--gia-gradient-cta);
  color: #fff;
  box-shadow: 0 4px 12px -2px rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(124, 58, 237, 0.45), inset 0 1px 0 rgba(255,255,255,0.18);
}

.btn-secondary {
  background: var(--gia-bg-white);
  color: var(--gia-text-primary);
  border-color: var(--gia-border);
}
.btn-secondary:hover {
  border-color: var(--gia-purple-primary);
  color: var(--gia-purple-primary);
  transform: translateY(-1px);
}

.btn-on-purple {
  background: #fff;
  color: var(--gia-purple-deep);
  box-shadow: 0 12px 24px -8px rgba(0,0,0,0.25);
}
.btn-on-purple:hover { transform: translateY(-1px); background: #fff; color: var(--gia-purple-deep); }

.link-muted { color: var(--gia-text-secondary); font-weight: 500; font-size: 15px; }
.link-muted:hover { color: var(--gia-purple-primary); }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--gia-border);
}
.header-row {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  /* Subtle hover affordance — restrained, no opacity dip below 0.85. */
  transition: opacity 0.18s var(--ease-out);
}
.brand:hover { opacity: 0.85; }

.brand-logo img {
  display: block;
  height: 32px;
  width: auto;
}
@media (min-width: 768px) {
  .brand-logo img { height: 40px; }
}

.footer-logo img {
  display: block;
  height: 80px;
  width: auto;
  margin-bottom: 4px;
}

/* Legacy text-wordmark styles kept for any non-landing context that still uses .brand-wordmark (none on this page). */
.brand-wordmark {
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  background: var(--gia-gradient-cta);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gia-purple-primary);
}
.brand-wordmark--lg { font-size: 32px; }
.brand-tagline {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  color: var(--gia-text-secondary);
  letter-spacing: 0.01em;
}

.primary-nav {
  display: none;
  align-items: center;
  gap: 32px;
}
.primary-nav a {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--gia-text-secondary);
  transition: color 0.18s var(--ease-out);
}
.primary-nav a:hover { color: var(--gia-purple-primary); }

.header-cta {
  display: none;
  align-items: center;
  gap: 16px;
}

.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gia-text-primary);
  border-radius: 2px;
  margin-left: auto;
  margin-right: auto;
  transition: transform 0.2s var(--ease-out), opacity 0.2s var(--ease-out);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-sheet {
  position: fixed;
  top: 72px;
  right: 0;
  bottom: 0;
  width: min(360px, 100vw);
  background: #fff;
  box-shadow: -16px 0 48px -16px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.3s var(--ease-out);
  z-index: 99;
}
.mobile-sheet.open { transform: translateX(0); }
.mobile-sheet-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
}
.mobile-sheet-inner a {
  display: block;
  padding: 14px 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 17px;
  color: var(--gia-text-primary);
  border-bottom: 1px solid var(--gia-border);
}
.mobile-sheet-inner a:last-child { border-bottom: 0; }
.mobile-sheet-inner .btn { margin-top: 16px; padding: 16px; font-size: 16px; }

@media (min-width: 1024px) {
  .primary-nav, .header-cta { display: inline-flex; }
  .hamburger { display: none; }
}

/* ---- Sections ---- */
.section {
  padding: 96px 0;
}
@media (min-width: 768px) {
  .section { padding: 128px 0; }
}
@media (min-width: 1024px) {
  .section { padding: 160px 0; }
}
.section-head {
  text-align: center;
  margin-bottom: 64px;
}
.section-head .eyebrow { margin-bottom: 12px; }

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 112px 0 96px;
  background:
    radial-gradient(circle at 20% 30%, #F5F3FF 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, #EDE9FE 0%, transparent 50%),
    radial-gradient(circle at 60% 80%, #F5F3FF 0%, transparent 40%),
    #FFFFFF;
  background-size: 200% 200%, 100% 100%, 100% 100%, auto;
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .hero { animation: gia-mesh-breathe 18s ease-in-out infinite; }
}
@keyframes gia-mesh-breathe {
  0%, 100% { background-position: 0% 0%,   100% 0%, 60% 80%, 0 0; }
  50%      { background-position: 20% 10%, 100% 0%, 60% 80%, 0 0; }
}
@media (min-width: 768px) {
  .hero { padding: 160px 0 128px; }
}
@media (min-width: 1024px) {
  .hero { padding: 184px 0 160px; }
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 96px; }
}
.hero-copy { max-width: 640px; }
.cta-row {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 480px) {
  .cta-row { flex-direction: row; gap: 16px; }
}
.hero-device-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* ---- Device frame (CSS-only iPhone-style bezel) ---- */
.device-frame {
  position: relative;
  width: 100%;
  /* 15% smaller than original 320px to let real brand photos in the new
     Medicine-Delivery + Trusted-by-Doctors sections visually dominate. */
  max-width: 272px;
  aspect-ratio: 390 / 844;
  padding: 8px;
  border-radius: 44px;
  background: linear-gradient(145deg, #1F2937 0%, #111827 100%);
  box-shadow: var(--gia-shadow-lg), var(--gia-shadow-glow);
  isolation: isolate;
}
.device-frame::before {
  /* notch */
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 24px;
  border-radius: 14px;
  background: #0A0A0A;
  z-index: 3;
  pointer-events: none;
}
.device-frame::after {
  /* power button accent */
  content: '';
  position: absolute;
  right: -2px;
  top: 120px;
  width: 3px;
  height: 60px;
  border-radius: 0 2px 2px 0;
  background: rgba(167, 139, 250, 0.45);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.6);
}
.device-screen {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #fff;
  position: relative;
}
.device-screen img, .device-screen picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 36px;
}
.device-screen--placeholder {
  background: linear-gradient(180deg, var(--gia-lavender-tint) 0%, #EDE9FE 50%, #DDD6FE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--gia-purple-deep);
  opacity: 0.55;
}

.device-frame.tilted {
  transform: rotate(4deg);
}
@keyframes gia-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: no-preference) {
  .device-frame.floating {
    animation: gia-float 4s ease-in-out infinite;
  }
}

/* ---- Trust banner ---- */
.trust-banner {
  background: var(--gia-lavender-tint);
  padding: 64px 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: center;
}
@media (min-width: 768px) {
  .trust-grid { grid-template-columns: repeat(4, 1fr); gap: 32px; }
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--gia-text-primary);
  line-height: 1.3;
}
.trust-item svg { color: var(--gia-purple-primary); flex-shrink: 0; }

/* ---- Cards (shared) ---- */
.card {
  position: relative;
  background: var(--gia-bg-white);
  border: 1px solid var(--gia-border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--gia-shadow-sm);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--gia-shadow-md);
  border-color: rgba(167, 139, 250, 0.5);
}
.icon-tile {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gia-lavender-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gia-purple-primary);
  margin-bottom: 24px;
}
.icon-tile--lg { width: 64px; height: 64px; border-radius: 16px; }

.card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--gia-text-primary);
}
.card p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gia-text-secondary);
  max-width: 320px;
}

/* ---- Services grid ---- */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .service-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

/* ---- How it works ---- */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-left: 32px;
}
.steps::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 12px;
  bottom: 12px;
  width: 0;
  border-left: 1px dashed rgba(124, 58, 237, 0.3);
}
@media (min-width: 1024px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding-left: 0;
  }
  .steps::before {
    left: 5%;
    right: 5%;
    top: 24px;
    bottom: auto;
    width: auto;
    height: 0;
    border-left: 0;
    border-top: 1px dashed rgba(124, 58, 237, 0.3);
  }
}
.step {
  position: relative;
}
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gia-gradient-cta);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 8px 24px -6px rgba(124, 58, 237, 0.45), 0 0 0 6px #fff;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}
@media (max-width: 1023.98px) {
  .step-badge { position: absolute; left: -52px; top: 0; }
}
.step h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
}
.step p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--gia-text-secondary);
  max-width: 280px;
}

/* ---- Why GIA grid ---- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
.why-card {
  padding-top: 36px;
}
.why-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.5), transparent);
}

/* ---- Family ---- */
.section-family {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--gia-lavender-tint) 100%);
}
.family-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  align-items: center;
}
@media (min-width: 1024px) {
  .family-grid { grid-template-columns: 1fr 1fr; gap: 96px; }
}
.family-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 32px 0;
}
.family-visual .device-frame { max-width: 255px; }
.family-visual .mascot-figure {
  position: absolute;
  right: 5%;
  bottom: -8px;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 12px 16px rgba(76, 29, 149, 0.25));
}
.mascot-figure img { object-fit: contain; }

.family-bullets {
  margin-top: 32px;
  display: grid;
  gap: 16px;
}
.family-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gia-text-primary);
}
.family-bullets svg { color: var(--gia-purple-primary); flex-shrink: 0; margin-top: 2px; }

/* ---- Beta ---- */
.section-beta {
  background: var(--gia-gradient-cta);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.section-beta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(at 30% 20%, rgba(255,255,255,0.12) 0%, transparent 50%),
              radial-gradient(at 80% 80%, rgba(255,255,255,0.10) 0%, transparent 55%);
  pointer-events: none;
}
.beta-inner { position: relative; max-width: 720px; margin: 0 auto; }
.beta-inner .btn { margin-top: 32px; }

.store-row {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}
.store-label { font-weight: 500; }
.store-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.2);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 13px;
  opacity: 0.85;
}

/* ---- Footer ---- */
.site-footer {
  background: #0F172A;
  color: rgba(255,255,255,0.7);
  padding: 80px 0 32px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.4fr repeat(4, 1fr); gap: 48px; }
}
.footer-brand p {
  margin-top: 16px;
  max-width: 280px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}
.footer-col ul { display: grid; gap: 12px; }
.footer-col a { color: rgba(255,255,255,0.7); transition: color 0.18s var(--ease-out); }
.footer-col a:hover { color: #fff; }

.footer-disclaimer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-disclaimer p {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
  max-width: 720px;
}
.footer-copy { margin-top: 16px; color: rgba(255,255,255,0.72) !important; }

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

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

/* ============================================================
   Legal page shell (privacy.html / terms.html)
   ============================================================ */
.legal-page {
  padding: 64px 0 96px;
  max-width: 760px;
  margin: 0 auto;
}
.legal-page h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.legal-page .meta {
  color: var(--gia-text-tertiary);
  margin-bottom: 32px;
}
.legal-page h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  margin: 40px 0 12px;
  color: var(--gia-text-primary);
}
.legal-page h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  margin: 28px 0 8px;
  color: var(--gia-text-primary);
}
.legal-page p, .legal-page li {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--gia-text-secondary);
}
.legal-page ul { list-style: disc; padding-left: 24px; margin: 12px 0; display: grid; gap: 8px; }
.legal-page a { color: var(--gia-purple-primary); text-decoration: underline; }


/* =========================================================================
   Step I — Animations & micro-interactions (asset-independent)
   Every keyframe is wrapped in `prefers-reduced-motion: no-preference` so
   reduced-motion users get a stable, motionless page.
   ========================================================================= */

/* 1) Header logo entrance — runs once on first paint. */
@media (prefers-reduced-motion: no-preference) {
  .brand-logo { animation: gia-logo-enter 500ms cubic-bezier(0.16, 1, 0.3, 1) both; }
}
@keyframes gia-logo-enter {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1);    }
}

/* 5) Intentional placeholder polish for device-frame screen content. */
.device-screen--placeholder {
  background: linear-gradient(180deg, var(--gia-lavender-tint) 0%, #EDE9FE 50%, #DDD6FE 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
}
.device-screen--placeholder svg {
  width: 32px; height: 32px;
  color: var(--gia-purple-primary);
  opacity: 0.40;
}
.placeholder-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--gia-text-tertiary);
}

/* 6) Scroll-linked hero parallax (Chrome 115+ / Edge 115+, native).
       Browsers without animation-timeline silently drop these declarations. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-device-wrap {
      animation: gia-hero-device-drift linear both;
      animation-timeline: scroll();
      animation-range: 0vh 90vh;
    }
    .hero-copy {
      animation: gia-hero-copy-drift linear both;
      animation-timeline: scroll();
      animation-range: 0vh 90vh;
    }
  }
}
@keyframes gia-hero-device-drift {
  from { transform: translateY(0); }
  to   { transform: translateY(-40px); }
}
@keyframes gia-hero-copy-drift {
  from { transform: translateY(0); }
  to   { transform: translateY(20px); }
}

/* 4) Mascot figure (real brand asset) — bob + hover scale.
       The .mascot-figure wrapper holds an <img src=".../gia-mascot.webp"> via <picture>.
       The animation classes are on the wrapper, so the actual mascot image scales
       through `width: 100%` to fill the wrapper. */
.mascot-figure {
  width: 200px; height: 200px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 250ms var(--ease-out);
  will-change: transform;
}
.mascot-figure:hover { transform: scale(1.03); }
.mascot-figure svg,
.mascot-figure img { width: 100%; height: 100%; object-fit: contain; }
@media (prefers-reduced-motion: no-preference) {
  .mascot-figure { animation: gia-mascot-bob 3.5s ease-in-out infinite; }
}
@keyframes gia-mascot-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* 7) Card hover refinement — applied via .card base + reinforced here for clarity. */
.card { transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out), border-color 250ms var(--ease-out); }
.card:hover { transform: translateY(-6px); border-color: rgba(167, 139, 250, 0.4); }
.card .icon-tile { transition: transform 250ms var(--ease-out); }
.card:hover .icon-tile { transform: scale(1.05); }

/* 8) Primary CTA shimmer sweep on hover-enter + tactile click. */
.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  transform: translateX(-100%);
  pointer-events: none;
  z-index: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .btn-primary:hover::before { animation: gia-btn-sweep 800ms ease-out; }
}
@keyframes gia-btn-sweep {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
.btn-primary:active { transform: scale(0.98); transition-duration: 100ms; }
.btn-primary > * { position: relative; z-index: 1; }

/* 9) Trust-banner stagger — incremental delay on .reveal items inside .trust-grid. */
@media (prefers-reduced-motion: no-preference) {
  .trust-grid .trust-item[data-stagger="0"].is-in { transition-delay:   0ms; }
  .trust-grid .trust-item[data-stagger="1"].is-in { transition-delay:  80ms; }
  .trust-grid .trust-item[data-stagger="2"].is-in { transition-delay: 160ms; }
  .trust-grid .trust-item[data-stagger="3"].is-in { transition-delay: 240ms; }
}

/* 10) How-It-Works step-badge scale-in with 100ms stagger when section reveals. */
@media (prefers-reduced-motion: no-preference) {
  .step.is-in .step-badge { animation: gia-step-pop 360ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  .step[data-stagger="0"].is-in .step-badge { animation-delay:   0ms; }
  .step[data-stagger="1"].is-in .step-badge { animation-delay: 100ms; }
  .step[data-stagger="2"].is-in .step-badge { animation-delay: 200ms; }
  .step[data-stagger="3"].is-in .step-badge { animation-delay: 300ms; }
}
@keyframes gia-step-pop {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* 11) Footer link underline animation (0%→100% width on hover). */
.footer-col a {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}
.footer-col a::after {
  content: '';
  position: absolute;
  left: 0; right: auto; bottom: 0;
  width: 0;
  height: 1px;
  background: rgba(255,255,255,0.85);
  transition: width 200ms var(--ease-out);
}
.footer-col a:hover::after { width: 100%; }

/* =========================================================================
   NEW SECTIONS — Medicine Delivery + Trusted by Filipino Doctors
   Both share the .photo-grid 2-col layout with a glossy purple-glow photo card.
   The CSS variables come from the existing design tokens at the top of this file
   so the new sections match the established premium aesthetic exactly.
   ========================================================================= */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
@media (max-width: 900px) {
  .photo-grid { grid-template-columns: 1fr; gap: 48px; }
  /* On mobile both variants render image FIRST then copy — DOM order is
     image,copy for delivery; copy,image for doctors. Reverse the doctor variant
     so the photo always leads on small screens (better content gravity). */
  .photo-grid--image-right > .photo-copy { order: 2; }
  .photo-grid--image-right > .brand-photo { order: 1; }
}

.brand-photo {
  margin: 0;
  position: relative;
  border-radius: 28px;
  /* Glossy purple gradient border — uses padding-box trick so the gradient
     reads as a 2-px frame around the photo, plus the soft outer glow shadow
     that mirrors the existing .device-frame box-shadow language. */
  padding: 2px;
  background: linear-gradient(145deg,
    rgba(167, 139, 250, 0.55) 0%,
    rgba(124, 58, 237, 0.35) 40%,
    rgba(167, 139, 250, 0.20) 100%);
  box-shadow:
    0 30px 60px -25px rgba(76, 29, 149, 0.35),
    0 18px 38px -18px rgba(124, 58, 237, 0.30),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  isolation: isolate;
  transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out);
  will-change: transform;
}
.brand-photo:hover {
  transform: translateY(-4px);
  box-shadow:
    0 36px 70px -22px rgba(76, 29, 149, 0.42),
    0 22px 44px -16px rgba(124, 58, 237, 0.36),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}
.brand-photo picture,
.brand-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  /* Photo content gets a slightly darker inner rim so the white background
     of the body doesn't bleed into the photo's lighter sky pixels. */
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04) inset;
}

/* Copy column shared by both new sections */
.photo-copy { max-width: 520px; }
.photo-copy .eyebrow { margin-bottom: 12px; }
.photo-copy .section-title { margin-bottom: 16px; }
.photo-copy .section-title em {
  font-style: italic;
  /* The "with" word in the doctors-section headline picks up the brand
     gradient to draw the eye to the partnership message. */
  background: var(--gia-gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.photo-copy .body-lead { margin-bottom: 28px; color: var(--gia-text-secondary); }

.photo-bullets {
  list-style: none;
  margin: 0 0 28px 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.photo-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--gia-text-primary);
}
.photo-bullets li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--gia-purple-primary);
  /* Subtle background tile to match the existing icon-tile language */
  background: var(--gia-lavender-tint);
  border-radius: 8px;
  padding: 6px;
  box-sizing: content-box;
}

/* Secondary CTA arrow link */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--gia-purple-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: gap 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
.link-arrow:hover { gap: 12px; border-bottom-color: var(--gia-purple-primary); }

/* Stat strip beneath the doctors section bullets */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 18px 0 0 0;
  border-top: 1px solid rgba(124, 58, 237, 0.12);
}
@media (max-width: 600px) {
  .stat-strip { grid-template-columns: 1fr; gap: 14px; }
}
.stat-strip__item { display: flex; flex-direction: column; gap: 4px; }
.stat-strip__label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gia-purple-deep);
  margin: 0;
}
.stat-strip__value {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--gia-text-secondary);
  font-weight: 500;
}

/* Per-section accent backgrounds — keep them WHITE-base but with a faint
   tinted spotlight behind the photo column, mirroring the family section. */
.section-delivery,
.section-doctors {
  position: relative;
  overflow: hidden;
}
.section-delivery::before,
.section-doctors::before {
  content: '';
  position: absolute;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gia-lavender-tint) 0%, rgba(245, 243, 255, 0) 65%);
  z-index: 0;
  pointer-events: none;
}
.section-delivery::before { top: -120px; left: -180px; }
.section-doctors::before  { top: -120px; right: -180px; }
.section-delivery > .container,
.section-doctors > .container { position: relative; z-index: 1; }

/* Reduced-motion final sweep — ensure NO animations execute under reduce-motion.
   The @media wrappers above already gate the inputs; this is the safety net
   in case any keyframe was declared outside a wrapper. */
@media (prefers-reduced-motion: reduce) {
  .device-frame.floating,
  .gradient-text,
  .hero,
  .brand-logo,
  .mascot-figure,
  .btn-primary::before,
  .step.is-in .step-badge {
    animation: none !important;
  }
  .trust-grid .trust-item.is-in,
  .step.is-in .step-badge { transition-delay: 0ms !important; animation-delay: 0ms !important; }
}

/* =====================================================================
   PHONE DEMO — animated 5-scene product demonstration inside the hero
   device frame. Content-only (frame styling stays). ~15 KB CSS.
   Colors from :root brand vars only. transform + opacity animations only
   (no layout thrash → 60fps). All animations gated by prefers-reduced-motion.
   ===================================================================== */

/* Screen background — replaces the .device-screen--placeholder look while
   preserving the outer frame's rounded corners. Keeps a soft off-white so
   scene UI reads clearly. */
.device-screen--demo {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8F6FF 100%);
  color: var(--gia-text-primary);
  padding: 30px 12px 14px 12px;   /* leave room for the notch (24px + 14px top) */
  display: block;
  font-family: var(--font-body);
  contain: content;               /* isolates paint / avoids external CLS */
}

.phone-demo {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  /* Scoped tokens — reuse existing brand vars, never redefine purple */
  --pd-purple:      var(--gia-purple-primary);
  --pd-purple-deep: var(--gia-purple-deep);
  --pd-purple-tint: var(--gia-lavender-tint);
  --pd-ink:         var(--gia-text-primary);
  --pd-ink-muted:   var(--gia-text-secondary);
  --pd-ink-soft:    var(--gia-text-tertiary);
  --pd-bg:          #FAFAFA;
  --pd-card:        #FFFFFF;
  --pd-border:      #EEE8FA;
  --pd-shadow:      0 4px 20px -8px rgba(90, 60, 200, 0.25);
  --pd-shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.06);
  --pd-shadow-lift: 0 10px 24px -10px rgba(90, 60, 200, 0.32);
  --pd-green:       #10B981;
  --pd-green-tint:  #ECFDF5;
  --pd-amber:       #F59E0B;
  --pd-ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --pd-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  background: var(--pd-bg);
  font-family: var(--font-body);
  color: var(--pd-ink);
}

/* Full-bleed scene layered on the phone screen. Enter = fade + slide-up 8px.
   Exit = fade + very slight scale-down. transform + opacity only. */
.phone-demo-scene {
  position: absolute;
  inset: 0;
  padding: 14px 12px 12px 12px;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  pointer-events: none;
  transition:
    opacity 300ms var(--pd-ease),
    transform 400ms var(--pd-ease);
  display: flex;
  flex-direction: column;
  gap: 8px;
  will-change: opacity, transform;
  overflow: hidden;
}
.phone-demo-scene.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition-duration: 400ms, 500ms;
}

/* ---- Shared navbar (top of every scene) ---- */
.pd-navbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px 8px 2px;
  border-bottom: 1px solid var(--pd-border);
  min-height: 34px;
}
.pd-nav-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--pd-purple-tint);
  color: var(--pd-purple-deep);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pd-nav-icon--right { margin-left: auto; background: transparent; color: var(--pd-ink-muted); }
.pd-nav-titlewrap {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0;
}
.pd-nav-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gia-gradient-cta);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.10);
}
.pd-nav-textcol { display: flex; flex-direction: column; min-width: 0; }
.pd-nav-title,
.pd-nav-titleonly {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--pd-purple-deep);
  line-height: 1.15;
}
.pd-nav-titleonly { flex: 1; min-width: 0; }
.pd-nav-sub {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px;
  color: var(--pd-ink-muted);
  font-weight: 600;
  margin-top: 1px;
}
.pd-live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--pd-green);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18);
}
.pd-nav-badge {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--pd-purple-tint);
  color: var(--pd-purple-deep);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ---- Scene 1: ChatGIA ---- */
.pd-chat {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  min-height: 0;
  padding-top: 4px;
}
.pd-msg {
  max-width: 82%;
  padding: 8px 11px;
  border-radius: 16px;
  font-size: 11px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(6px);
  animation-fill-mode: forwards;
  position: relative;
}
.pd-msg--user {
  align-self: flex-end;
  background: var(--gia-gradient-cta);
  color: #fff;
  border-bottom-right-radius: 5px;
  box-shadow: var(--pd-shadow);
}
.pd-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  max-width: 90%;
  opacity: 0;
  transform: translateY(6px);
  animation-fill-mode: forwards;
}
.pd-msg-row--ai { align-self: flex-start; }
.pd-chat-av {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gia-gradient-cta);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(124, 58, 237, 0.25);
}
.pd-msg-row .pd-msg {
  opacity: 1;
  transform: none;
  animation: none;
}
.pd-msg--ai {
  background: var(--pd-card);
  color: var(--pd-ink);
  border-bottom-left-radius: 5px;
  box-shadow: var(--pd-shadow-sm);
  border: 1px solid var(--pd-border);
}
.pd-msg--typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 12px;
  min-height: 24px;
}
.pd-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--pd-purple);
  opacity: 0.4;
}
/* Character-reveal effect for AI response: clip wipes right → showing text */
.pd-msg--reveal {
  overflow: hidden;
  white-space: normal;
}
.pd-chat-cta {
  margin-top: auto;
  padding-top: 6px;
  opacity: 0;
  transform: translateY(8px);
  animation-fill-mode: forwards;
  align-self: flex-start;
}
.pd-pill {
  border: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--gia-gradient-cta);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: default;
  box-shadow: var(--pd-shadow-lift);
}

/* ---- Scene 2: Doctor Consultation ---- */
.pd-scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}
.pd-doc {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  border-radius: 16px;
  box-shadow: var(--pd-shadow-sm);
  opacity: 0;
  transform: translateY(10px);
  animation-fill-mode: forwards;
}
.pd-doc-photo {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.pd-doc-photo--a { background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%); }
.pd-doc-photo--b { background: linear-gradient(135deg, #F0ABFC 0%, #A855F7 100%); }
.pd-doc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pd-doc-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pd-doc-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12px;
  color: var(--pd-ink);
  line-height: 1.15;
}
.pd-rate {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #FFFBEB;
  color: #92400E;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}
.pd-doc-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.pd-tag {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--pd-purple-tint);
  color: var(--pd-purple-deep);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.pd-tag--muted {
  background: #F3F4F6;
  color: var(--pd-ink-muted);
}
.pd-doc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3px;
}
.pd-doc-fee {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  color: var(--pd-purple-deep);
}
.pd-doc-cta {
  position: relative;
  overflow: hidden;
  border: 0;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--gia-gradient-cta);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 10.5px;
  cursor: default;
  box-shadow: 0 3px 10px -3px rgba(124, 58, 237, 0.45);
}
.pd-ripple {
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
}

/* Slide-up modal sheet (Doctor confirm + Lab confirm reuse it) */
.pd-sheet {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--pd-card);
  border: 1px solid var(--pd-green);
  border-radius: 16px;
  box-shadow: 0 -8px 24px -8px rgba(16, 185, 129, 0.22), var(--pd-shadow-lift);
  opacity: 0;
  transform: translateY(40px);
  animation-fill-mode: forwards;
}
.pd-sheet--slim {
  padding: 10px 12px;
}
.pd-sheet-check {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--pd-green);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transform: scale(0);
  animation-fill-mode: forwards;
  box-shadow: 0 4px 12px -2px rgba(16, 185, 129, 0.45);
}
.pd-sheet--slim .pd-sheet-check { width: 22px; height: 22px; }
.pd-sheet-text { flex: 1; min-width: 0; }
.pd-sheet-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12px;
  color: var(--pd-ink);
  line-height: 1.2;
}
.pd-sheet-sub {
  font-size: 10.5px;
  color: var(--pd-ink-muted);
  margin-top: 2px;
}

/* ---- Scene 3: Medicine Ordering ---- */
.pd-cart-btn {
  position: relative;
  margin-left: auto;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--pd-purple-tint);
  color: var(--pd-purple-deep);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pd-cart-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px;
  background: var(--pd-purple);
  color: #fff;
  font-weight: 900;
  font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--pd-bg);
  opacity: 0;
  transform: scale(0);
  animation-fill-mode: forwards;
}
.pd-med-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 4px;
}
.pd-med {
  padding: 10px 10px 8px 10px;
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  border-radius: 14px;
  box-shadow: var(--pd-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateY(10px);
  animation-fill-mode: forwards;
}
.pd-med-thumb {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  margin-bottom: 2px;
}
.pd-med-thumb--a { background: linear-gradient(135deg, #FFE4E6 0%, #FECDD3 100%); }
.pd-med-thumb--b { background: linear-gradient(135deg, #FEF3C7 0%, #FED7AA 100%); }
.pd-med-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 11px;
  color: var(--pd-ink);
  line-height: 1.15;
}
.pd-med-sub {
  font-size: 9.5px;
  color: var(--pd-ink-muted);
}
.pd-med-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.pd-med-price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12px;
  color: var(--pd-purple-deep);
}
.pd-add {
  position: relative;
  overflow: hidden;
  border: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gia-gradient-cta);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 9.5px;
  cursor: default;
  box-shadow: 0 2px 6px -2px rgba(124, 58, 237, 0.5);
}
.pd-add--ghost {
  background: transparent;
  color: var(--pd-purple-deep);
  border: 1px solid var(--pd-purple-tint);
  box-shadow: none;
}
/* Bottom cart drawer */
.pd-drawer {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  border-radius: 14px;
  box-shadow: var(--pd-shadow-lift);
  opacity: 0;
  transform: translateY(60px);
  animation-fill-mode: forwards;
}
.pd-drawer-info { flex: 1; min-width: 0; }
.pd-drawer-count { font-size: 9.5px; color: var(--pd-ink-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.pd-drawer-total {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 15px;
  color: var(--pd-ink);
}
.pd-drawer-btn {
  border: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--gia-gradient-cta);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 11px;
  cursor: default;
  box-shadow: 0 3px 10px -3px rgba(124, 58, 237, 0.5);
}
/* Success takeover */
.pd-success {
  position: absolute;
  inset: 14px 12px 12px 12px;
  padding-top: 42px;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--pd-green-tint) 100%);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  opacity: 0;
  animation-fill-mode: forwards;
}
.pd-success-check {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--pd-green);
  display: flex; align-items: center; justify-content: center;
  transform: scale(0);
  animation-fill-mode: forwards;
  box-shadow: 0 8px 24px -6px rgba(16, 185, 129, 0.45);
  margin-bottom: 6px;
}
.pd-success-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 15px;
  color: #065F46;
}
.pd-success-sub {
  font-size: 11px;
  color: #047857;
  font-weight: 600;
}

/* ---- Scene 4: Laboratory Request ---- */
.pd-labs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}
.pd-lab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  box-shadow: var(--pd-shadow-sm);
  opacity: 0;
  transform: translateY(8px);
  animation-fill-mode: forwards;
}
.pd-lab-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pd-purple);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.pd-lab-meta { flex: 1; min-width: 0; }
.pd-lab-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 11.5px;
  color: var(--pd-ink);
  line-height: 1.15;
}
.pd-lab-sub {
  font-size: 9.5px;
  color: var(--pd-ink-muted);
  margin-top: 1px;
}
.pd-lab-price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 11.5px;
  color: var(--pd-purple-deep);
  flex-shrink: 0;
}
/* QR overlay (center of screen, above list, below sheet) */
.pd-qrwrap {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -55%) scale(0.5);
  padding: 12px 12px 8px 12px;
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  border-radius: 16px;
  box-shadow: var(--pd-shadow-lift), 0 0 0 8px rgba(124, 58, 237, 0.08);
  opacity: 0;
  animation-fill-mode: forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.pd-qr {
  width: 90px; height: 90px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 2px;
  padding: 4px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--pd-border);
}
.pd-qr span {
  background: var(--pd-ink);
  border-radius: 1px;
}
/* Pseudo-random cells: hide some to look QR-ish */
.pd-qr span:nth-child(2),  .pd-qr span:nth-child(5),
.pd-qr span:nth-child(9),  .pd-qr span:nth-child(11), .pd-qr span:nth-child(13),
.pd-qr span:nth-child(17), .pd-qr span:nth-child(22), .pd-qr span:nth-child(23),
.pd-qr span:nth-child(25), .pd-qr span:nth-child(29), .pd-qr span:nth-child(30),
.pd-qr span:nth-child(32), .pd-qr span:nth-child(34), .pd-qr span:nth-child(37),
.pd-qr span:nth-child(41), .pd-qr span:nth-child(43), .pd-qr span:nth-child(45),
.pd-qr span:nth-child(46), .pd-qr span:nth-child(48) {
  background: transparent;
}
/* Corner locator squares */
.pd-qr span:nth-child(1),  .pd-qr span:nth-child(7),
.pd-qr span:nth-child(43) {
  background: var(--pd-purple-deep);
  outline: 1.5px solid var(--pd-purple-deep);
  outline-offset: 1px;
}
.pd-qr-caption {
  font-size: 9.5px;
  color: var(--pd-ink-muted);
  font-weight: 700;
  text-align: center;
}

/* ---- Scene 5: Family Dashboard ---- */
.pd-fam-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding-top: 4px;
  opacity: 0;
  transform: translateY(6px);
  animation-fill-mode: forwards;
}
.pd-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  border-radius: 12px;
  box-shadow: var(--pd-shadow-sm);
  transition: border-color 220ms var(--pd-ease), box-shadow 220ms var(--pd-ease), transform 220ms var(--pd-ease);
}
.pd-chip.is-focus {
  border-color: var(--pd-purple);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.18), var(--pd-shadow);
  transform: translateY(-1px);
}
.pd-chip--self { background: var(--pd-purple-tint); }
.pd-chip-av {
  width: 24px; height: 24px; border-radius: 50%;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}
.pd-chip-av--rose   { background: linear-gradient(135deg, #FB7185 0%, #E11D48 100%); }
.pd-chip-av--sky    { background: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%); }
.pd-chip-av--mint   { background: linear-gradient(135deg, #34D399 0%, #059669 100%); }
.pd-chip-av--purple { background: var(--gia-gradient-cta); }
.pd-chip-lbl {
  font-size: 9px;
  font-weight: 700;
  color: var(--pd-ink);
}
.pd-remind {
  padding: 8px 10px;
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  border-radius: 12px;
  box-shadow: var(--pd-shadow-sm);
  opacity: 0;
  transform: translateY(8px);
  animation-fill-mode: forwards;
}
.pd-remind-row { display: flex; align-items: center; gap: 8px; }
.pd-remind-icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pd-remind-icon--done {
  background: var(--pd-green);
  color: #fff;
  transform: scale(0);
  animation-fill-mode: forwards;
  box-shadow: 0 3px 8px -2px rgba(16, 185, 129, 0.4);
}
.pd-remind-icon--pending {
  background: #FEF3C7;
  color: #B45309;
}
.pd-remind-meta { flex: 1; min-width: 0; }
.pd-remind-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 11px;
  color: var(--pd-ink);
  line-height: 1.15;
}
.pd-remind-sub {
  font-size: 9.5px;
  color: var(--pd-ink-muted);
  margin-top: 1px;
}
.pd-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  opacity: 0;
  transform: translateY(8px);
  animation-fill-mode: forwards;
}
.pd-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px 5px 4px;
  background: linear-gradient(180deg, var(--pd-card) 0%, var(--pd-purple-tint) 100%);
  border: 1px solid var(--pd-border);
  border-radius: 10px;
  box-shadow: var(--pd-shadow-sm);
  gap: 2px;
}
.pd-stat-val {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 11px;
  color: var(--pd-ink);
  line-height: 1;
  margin-top: 2px;
}
.pd-stat-lbl {
  font-size: 8.5px;
  color: var(--pd-ink-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---- Keyframes (all transform + opacity, no layout) ---- */
@keyframes pd-slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pd-slideUpLg {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pd-slideUpSheet {
  0%   { opacity: 0; transform: translateY(60px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes pd-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pd-typing-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-2px); }
}
@keyframes pd-ripple {
  0%   { transform: translate(-50%, -50%) scale(0);  opacity: 0.55; }
  100% { transform: translate(-50%, -50%) scale(30); opacity: 0; }
}
@keyframes pd-spring {
  0%   { transform: scale(0);    }
  60%  { transform: scale(1.18); }
  100% { transform: scale(1);    }
}
@keyframes pd-qrPop {
  0%   { opacity: 0; transform: translate(-50%, -55%) scale(0.5); }
  60%  { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes pd-labPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15); }
  50%      { box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.28); }
}
@keyframes pd-avatarBreath {
  0%, 100% { box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.10); }
  50%      { box-shadow: 0 0 0 5px rgba(124, 58, 237, 0.22); }
}
@keyframes pd-textWipe {
  0%   { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0 0 0); }
}

/* ---- Scene animation choreography (only under no-reduce-motion) ---- */
@media (prefers-reduced-motion: no-preference) {
  /* ChatGIA — user msg → typing → wipe-in AI msg → CTA pill */
  .phone-demo-scene[data-scene="chatgia"].is-active [data-pd-step="1"] { animation: pd-slideUp 380ms var(--pd-ease) 180ms forwards; }
  .phone-demo-scene[data-scene="chatgia"].is-active [data-pd-step="2"] { animation: pd-slideUp 380ms var(--pd-ease) 900ms forwards; }
  .phone-demo-scene[data-scene="chatgia"].is-active [data-pd-step="3"] { animation: pd-slideUp 380ms var(--pd-ease) 2000ms forwards; }
  .phone-demo-scene[data-scene="chatgia"].is-active [data-pd-step="3"] .pd-msg--reveal { animation: pd-textWipe 900ms var(--pd-ease) 2100ms both; }
  .phone-demo-scene[data-scene="chatgia"].is-active [data-pd-step="4"] { animation: pd-slideUp 400ms var(--pd-ease) 3200ms forwards; }
  .phone-demo-scene[data-scene="chatgia"].is-active .pd-msg--typing .pd-dot:nth-child(1) { animation: pd-typing-dot 900ms ease-in-out 950ms infinite; }
  .phone-demo-scene[data-scene="chatgia"].is-active .pd-msg--typing .pd-dot:nth-child(2) { animation: pd-typing-dot 900ms ease-in-out 1100ms infinite; }
  .phone-demo-scene[data-scene="chatgia"].is-active .pd-msg--typing .pd-dot:nth-child(3) { animation: pd-typing-dot 900ms ease-in-out 1250ms infinite; }
  .phone-demo-scene[data-scene="chatgia"].is-active .pd-nav-avatar { animation: pd-avatarBreath 2600ms ease-in-out infinite 300ms; }

  /* Doctor Consultation — cards stagger → ripple on Book → sheet spring-up */
  .phone-demo-scene[data-scene="doctor"].is-active [data-pd-step="1"] { animation: pd-slideUp 420ms var(--pd-ease) 180ms forwards; }
  .phone-demo-scene[data-scene="doctor"].is-active [data-pd-step="2"] { animation: pd-slideUp 420ms var(--pd-ease) 320ms forwards; }
  .phone-demo-scene[data-scene="doctor"].is-active [data-pd-step="1"] .pd-ripple { animation: pd-ripple 800ms ease-out 1500ms 1; }
  .phone-demo-scene[data-scene="doctor"].is-active [data-pd-step="3"] { animation: pd-slideUpSheet 520ms var(--pd-ease) 2100ms forwards; }
  .phone-demo-scene[data-scene="doctor"].is-active [data-pd-step="3"] .pd-sheet-check { animation: pd-spring 520ms var(--pd-ease-spring) 2300ms forwards; }

  /* Medicine Ordering — cards → +Add ripple + cart badge pop → drawer up → success takeover */
  .phone-demo-scene[data-scene="pharmacy"].is-active [data-pd-step="1"] { animation: pd-slideUp 420ms var(--pd-ease) 180ms forwards; }
  .phone-demo-scene[data-scene="pharmacy"].is-active [data-pd-step="2"] { animation: pd-slideUp 420ms var(--pd-ease) 320ms forwards; }
  .phone-demo-scene[data-scene="pharmacy"].is-active [data-pd-step="1"] .pd-ripple { animation: pd-ripple 700ms ease-out 1300ms 1; }
  .phone-demo-scene[data-scene="pharmacy"].is-active [data-pd-step="3"] { animation: pd-spring 480ms var(--pd-ease-spring) 1400ms forwards; }
  .phone-demo-scene[data-scene="pharmacy"].is-active [data-pd-step="4"] { animation: pd-slideUpSheet 520ms var(--pd-ease) 1700ms forwards; }
  .phone-demo-scene[data-scene="pharmacy"].is-active [data-pd-step="5"] { animation: pd-fadeIn 400ms var(--pd-ease) 2700ms forwards; }
  .phone-demo-scene[data-scene="pharmacy"].is-active [data-pd-step="5"] .pd-success-check { animation: pd-spring 600ms var(--pd-ease-spring) 2850ms forwards; }

  /* Laboratory Request — 3 rows stagger → QR pop → schedule sheet */
  .phone-demo-scene[data-scene="lab"].is-active [data-pd-step="1"] { animation: pd-slideUp 400ms var(--pd-ease) 180ms forwards; }
  .phone-demo-scene[data-scene="lab"].is-active [data-pd-step="2"] { animation: pd-slideUp 400ms var(--pd-ease) 320ms forwards; }
  .phone-demo-scene[data-scene="lab"].is-active [data-pd-step="3"] { animation: pd-slideUp 400ms var(--pd-ease) 460ms forwards; }
  .phone-demo-scene[data-scene="lab"].is-active [data-pd-step="1"] .pd-lab-pulse { animation: pd-labPulse 1600ms ease-in-out 900ms infinite; }
  .phone-demo-scene[data-scene="lab"].is-active [data-pd-step="4"] { animation: pd-qrPop 620ms var(--pd-ease-spring) 1800ms forwards; }
  .phone-demo-scene[data-scene="lab"].is-active [data-pd-step="5"] { animation: pd-slideUpSheet 520ms var(--pd-ease) 3100ms forwards; }
  .phone-demo-scene[data-scene="lab"].is-active [data-pd-step="5"] .pd-sheet-check { animation: pd-spring 460ms var(--pd-ease-spring) 3300ms forwards; }

  /* Family Dashboard — chips → reminders → checkmark spring → stats */
  .phone-demo-scene[data-scene="family"].is-active [data-pd-step="1"] { animation: pd-slideUp 400ms var(--pd-ease) 180ms forwards; }
  .phone-demo-scene[data-scene="family"].is-active [data-pd-step="2"] { animation: pd-slideUp 400ms var(--pd-ease) 700ms forwards; }
  .phone-demo-scene[data-scene="family"].is-active [data-pd-step="2"] .pd-remind-icon--done { animation: pd-spring 520ms var(--pd-ease-spring) 1400ms forwards; }
  .phone-demo-scene[data-scene="family"].is-active [data-pd-step="3"] { animation: pd-slideUp 400ms var(--pd-ease) 1100ms forwards; }
  .phone-demo-scene[data-scene="family"].is-active [data-pd-step="4"] { animation: pd-slideUp 420ms var(--pd-ease) 1700ms forwards; }
  /* Chip highlight cycles through 4 chips (JS toggles .is-focus class) */
}

/* Reduced-motion fallback — show ONE static scene (Family Dashboard) fully
   rendered, no animations. Preserves original behavior. */
@media (prefers-reduced-motion: reduce) {
  .phone-demo-scene { transition: none; }
  .phone-demo-scene:not([data-scene="family"]) {
    display: none;
  }
  .phone-demo-scene[data-scene="family"] {
    opacity: 1;
    transform: none;
    position: relative;
    inset: auto;
  }
  .phone-demo-scene[data-scene="family"] [data-pd-step] {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .phone-demo-scene[data-scene="family"] .pd-remind-icon--done {
    transform: none;
  }
}

/* ---- Footer additions for GIA Pharmacy Corp operator statement ---- */
.footer-operator { opacity: 0.85; margin-top: 4px; }
.footer-support  { margin-top: 6px; }
.footer-support a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }


/* =========================================================================
   Family Dashboard preview  —  .fd-* scope (Landing "For the Whole Family")
   All rules scoped to the .fd-screen / .fd-* namespace so no existing
   selector is touched. Reuses the site's --gia-purple-primary; NO new
   colour tokens defined.
   ========================================================================= */

/* The dashboard replaces the placeholder background inside the phone screen.
   The parent .device-screen already clips to the phone frame. */
.fd-screen {
  --fd-purple:      var(--gia-purple-primary);
  --fd-purple-soft: rgba(124, 58, 237, 0.10);
  --fd-purple-ring: rgba(124, 58, 237, 0.35);
  --fd-emg:         #E23A5C;

  background: #fafafa;
  color: #1F2937;
  padding: 20px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--font-body, Inter, system-ui, sans-serif);
}

/* Fake iOS status bar */
.fd-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: #1F2937;
  padding: 0 4px;
  letter-spacing: 0.02em;
}
.fd-statusbar-icons { display: inline-flex; align-items: center; gap: 4px; }
.fd-signal, .fd-battery { display: inline-block; }
.fd-signal {
  width: 14px; height: 8px;
  background:
    linear-gradient(to top, currentColor 30%, transparent 30%) 0 0/2px 100% no-repeat,
    linear-gradient(to top, currentColor 55%, transparent 55%) 4px 0/2px 100% no-repeat,
    linear-gradient(to top, currentColor 80%, transparent 80%) 8px 0/2px 100% no-repeat,
    linear-gradient(to top, currentColor 100%, transparent 100%) 12px 0/2px 100% no-repeat;
}
.fd-battery {
  width: 18px; height: 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
  position: relative;
  background: linear-gradient(to right, currentColor 85%, transparent 85%);
}
.fd-battery::after {
  content: '';
  position: absolute; right: -3px; top: 2px;
  width: 2px; height: 5px;
  background: currentColor;
  border-radius: 0 1px 1px 0;
}

/* Screen title bar */
.fd-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 0;
}
.fd-title {
  font-family: var(--font-heading, Manrope, sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #1F2937;
  letter-spacing: -0.01em;
  transition: opacity 260ms cubic-bezier(0.4, 0, 0.2, 1);
}
.fd-title.is-fading { opacity: 0; }
.fd-title-chip {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--fd-purple-soft);
  color: var(--fd-purple);
}

/* Persistent family roster row */
.fd-roster {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 4px 0 2px;
}
.fd-avatar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px 5px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
}
.fd-avatar-emoji {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #F5F3FF;
  font-size: 18px;
  line-height: 1;
}
.fd-avatar-label {
  font-size: 10px;
  font-weight: 600;
  color: #6B7280;
  letter-spacing: 0.01em;
}
.fd-avatar::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  box-shadow: 0 0 0 2px var(--fd-purple-ring);
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity 300ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.fd-avatar.is-active::before {
  opacity: 1;
  transform: scale(1);
}
.fd-avatar.is-active .fd-avatar-emoji {
  background: var(--fd-purple);
  color: #fff;
}
@media (prefers-reduced-motion: no-preference) {
  .fd-avatar.is-active::before {
    animation: fd-ring-pulse 2.2s ease-in-out infinite;
  }
}
@keyframes fd-ring-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.35); }
  50%      { box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.55), 0 0 12px rgba(124, 58, 237, 0.35); }
}

/* Scene stage: absolutely stacked so cross-fades don't push layout. */
.fd-stage {
  position: relative;
  flex: 1;
  min-height: 190px;
}
.fd-scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 380ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 380ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.fd-scene.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Card primitive shared by all scenes */
.fd-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px -8px rgba(90, 60, 200, 0.20);
  padding: 12px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(0, 0, 0, 0.03);
}
.fd-card-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.fd-card-title {
  font-family: var(--font-heading, Manrope, sans-serif);
  font-size: 12px;
  font-weight: 700;
  color: #1F2937;
  letter-spacing: -0.01em;
}
.fd-card-sub {
  font-size: 10px;
  font-weight: 500;
  color: #9CA3AF;
  margin-left: auto;
}

/* Health-summary stat tiles */
.fd-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.fd-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 6px;
  background: #F5F3FF;
  border-radius: 10px;
  align-items: center;
}
.fd-stat-label {
  font-size: 9px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fd-stat-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--fd-purple);
  font-family: var(--font-heading, Manrope, sans-serif);
}

/* Medicine rows */
.fd-med-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.fd-med-row:first-of-type { border-top: none; }
.fd-med-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.fd-med-check.is-done {
  background: #DCFCE7;
  color: #15803D;
  transform: scale(1);
  animation: fd-check-pop 400ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 100ms;
}
@keyframes fd-check-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}
.fd-med-check.is-pending {
  background: #F3F4F6;
  color: #9CA3AF;
}
@media (prefers-reduced-motion: no-preference) {
  .fd-med-check.is-pending {
    animation: fd-pulse-soft 1.8s ease-in-out infinite;
  }
}
@keyframes fd-pulse-soft {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
.fd-med-body { display: flex; flex-direction: column; gap: 1px; }
.fd-med-name { font-size: 11px; font-weight: 600; color: #1F2937; }
.fd-med-meta { font-size: 10px; color: #6B7280; }

/* Appointment card */
.fd-appt {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fd-appt-doc {
  display: flex; gap: 10px; align-items: center;
}
.fd-appt-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--fd-purple-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.fd-appt-body { display: flex; flex-direction: column; gap: 2px; }
.fd-appt-name { font-size: 12px; font-weight: 700; color: #1F2937; }
.fd-appt-meta { font-size: 10px; color: #6B7280; }
.fd-appt-cta {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  border: 0;
  background: var(--fd-purple);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: default;
}

/* Emergency card — subtle red-orange accent, not alarming */
.fd-card--emergency {
  border: 1px solid rgba(226, 58, 92, 0.18);
  background: linear-gradient(180deg, #FFF5F6 0%, #fff 60%);
}
.fd-emg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fd-emg);
  box-shadow: 0 0 0 2px rgba(226, 58, 92, 0.18);
  margin-right: 4px;
}
.fd-emg-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.fd-emg-list li {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #6B7280;
}
.fd-emg-list li strong {
  color: #1F2937;
  font-weight: 700;
}
.fd-emg-caption {
  margin: 4px 0 0;
  font-size: 9.5px;
  color: #9CA3AF;
  font-style: italic;
}

/* Chat scene */
.fd-chat {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 8px 4px 4px;
}
.fd-chat-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--fd-purple-soft);
  display: flex; align-items: center; justify-content: center;
}
.fd-chat-avatar img { width: 100%; height: 100%; object-fit: contain; }
.fd-chat-bubble {
  background: var(--fd-purple);
  color: #fff;
  padding: 8px 12px;
  border-radius: 14px 14px 14px 4px;
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 4px 12px -6px rgba(124, 58, 237, 0.45);
  max-width: 78%;
}
.fd-chat-dots {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 12px;
}
.fd-chat-dots span {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  animation: fd-dot-bounce 1.2s ease-in-out infinite;
}
.fd-chat-dots span:nth-child(2) { animation-delay: 0.15s; }
.fd-chat-dots span:nth-child(3) { animation-delay: 0.30s; }
@keyframes fd-dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
  30%           { transform: translateY(-3px); opacity: 1; }
}
.fd-chat-text { display: none; }
.fd-chat[data-fd-typed="true"] .fd-chat-dots { display: none; }
.fd-chat[data-fd-typed="true"] .fd-chat-text { display: block; }

/* -------- Reduced motion — freeze on scene 1 -------- */
@media (prefers-reduced-motion: reduce) {
  .fd-scene { transition: none; }
  .fd-scene:not([data-fd-scene="roster"]) { display: none; }
  .fd-scene[data-fd-scene="roster"] { opacity: 1; transform: none; }
  .fd-avatar.is-active::before { animation: none; }
  .fd-med-check.is-done { animation: none; }
  .fd-med-check.is-pending { animation: none; }
  .fd-chat-dots span { animation: none; }
}

/* =========================================================================
   Download badges  —  .fd-downloads
   ========================================================================= */
.fd-downloads {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.fd-download {
  display: inline-flex;
  align-items: center;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.fd-download img {
  display: block;
  height: 52px;
  width: auto;
  border-radius: 8px;
}
.fd-download--gplay {
  outline-offset: 4px;
  border-radius: 8px;
}
.fd-download--gplay:hover,
.fd-download--gplay:focus-visible {
  transform: translateY(-1px);
}
.fd-download-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.fd-download--apple {
  filter: grayscale(1);
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
/* CSS-built App Store badge (mimics the official black rounded shape) */
.fd-apple-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #000;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  height: 52px;
  box-sizing: border-box;
}
.fd-apple-badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}
.fd-apple-badge-top {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.9;
}
.fd-apple-badge-store {
  font-family: var(--font-heading, Manrope, sans-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.fd-download-caption {
  font-size: 11px;
  font-style: italic;
  color: var(--gia-text-tertiary, #9CA3AF);
}
@media (max-width: 640px) {
  .fd-downloads { flex-direction: column; gap: 16px; }
}

/* =========================================================================
   Hero section — content-refinement additions (Feb 2026)
   All new selectors are .hero-*  (or reuse existing .gradient-text unchanged).
   No :root / nav / other-section rules modified.
   ========================================================================= */

/* Download block below the primary CTA */
.hero-downloads {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero-downloads-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--gia-text-secondary, #4B5563);
}
.hero-downloads-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.hero-download {
  display: inline-flex;
  align-items: center;
  transition:
    transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-download img {
  display: block;
  height: 48px;
  width: auto;
  border-radius: 8px;
}
.hero-download--gplay {
  border-radius: 8px;
  outline-offset: 4px;
}
.hero-download--gplay:hover,
.hero-download--gplay:focus-visible {
  transform: translateY(-1px);
}
.hero-download--apple {
  filter: grayscale(1);
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
/* CSS-built App Store badge — mirrors the .fd-apple-badge shape but scoped to .hero-*. */
.hero-apple-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #000;
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  height: 48px;
  box-sizing: border-box;
}
.hero-apple-badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}
.hero-apple-badge-top {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.9;
}
.hero-apple-badge-store {
  font-family: var(--font-heading, Manrope, sans-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero-downloads-caption {
  font-size: 11px;
  font-style: italic;
  color: var(--gia-text-tertiary, #9CA3AF);
}
@media (max-width: 540px) {
  .hero-downloads-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Trust indicator row — replaces the old .trust-row single-line copy. */
.hero-trust {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gia-text-secondary, #4B5563);
  line-height: 1.2;
}
.hero-trust-item span {
  font-size: 15px;
  line-height: 1;
}
@media (max-width: 640px) {
  .hero-trust { gap: 10px 16px; }
  .hero-trust-item { font-size: 12.5px; }
}

