/* ==========================================================================
   CALOBUDDY — Agency-Grade Design System & CSS
   Theme: Soft Structuralism (Light Theme)
   Fonts: Plus Jakarta Sans & Outfit & Cormorant Garamond
   Colors: Slate-900 (#0F172A), Sapphire Accent (#0284C7 / #0369A1), 
           CaloBuddy Amber (#F59E0B / #D97706), Light Slate (#F8FAFC)
   ========================================================================== */

:root {
  /* Core Brand Tokens */
  --color-primary: #0F172A;       /* Slate 900 */
  --color-secondary: #334155;     /* Slate 700 */
  --color-muted: #64748B;         /* Slate 500 */
  --color-subtle: #94A3B8;        /* Slate 400 */
  
  --color-bg: #F8FAFC;            /* Slate 50 */
  --color-surface: #FFFFFF;
  --color-surface-tint: #F1F5F9;   /* Slate 100 */

  /* Accents */
  --color-accent: #0284C7;        /* Sapphire Blue CTA */
  --color-accent-hover: #0369A1;
  --color-accent-light: #E0F2FE;

  --color-amber: #F59E0B;         /* CaloBuddy Gold / Pet Warmth */
  --color-amber-dark: #D97706;
  --color-amber-light: #FEF3C7;

  /* Macros & Semantics */
  --color-protein: #F59E0B;       /* Amber */
  --color-carbs: #0284C7;         /* Sky */
  --color-fat: #F43F5E;           /* Rose */
  --color-water: #38BDF8;         /* Cyan */
  --color-success: #10B981;       /* Emerald */
  --color-danger: #EF4444;        /* Crimson */

  /* Machined Hairlines & Shadows */
  --border-light: rgba(15, 23, 42, 0.07);
  --border-focus: rgba(2, 132, 199, 0.4);
  --shadow-soft: 0 20px 40px -15px rgba(15, 23, 42, 0.05), 0 2px 6px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
  --shadow-float: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
  --inner-highlight: inset 0 1px 1px rgba(255, 255, 255, 0.9);

  /* Radii */
  --radius-pill: 9999px;
  --radius-outer: 2rem;           /* 32px outer bezel */
  --radius-inner: calc(2rem - 6px); /* 26px concentric inner core */
  --radius-card: 1.5rem;          /* 24px */
  --radius-sm: 0.75rem;           /* 12px */

  /* Timing & Motion */
  --ease-elastic: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-default: 260ms var(--ease-elastic);
  --transition-fluid: 450ms var(--ease-elastic);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color-bg);
  color: var(--color-primary);
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--color-primary);
  background-color: var(--color-bg);
  overflow-x: hidden;
  min-height: 100dvh;
}

/* Subtle architectural dot grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: -1;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea {
  font-family: inherit;
}

/* ── Container ───────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ── Typography Scale ─────────────────────────────────────────────────────── */
.font-display {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.03em;
}

.font-serif-accent {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 600;
}

h1, h2, h3, h4 {
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.15;
}

.display-1 {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.section-title {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 58ch;
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* Eyebrow Pill Tag (Strict Restraint: Used only once every 3 sections) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--color-amber-light);
  color: #B45309; /* WCAG AA: 4.65:1 on #FEF3C7 */
  border: 1px solid rgba(180, 83, 9, 0.25);
  margin-bottom: 1rem;
}

.eyebrow-blue {
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-color: rgba(2, 132, 199, 0.2);
}

/* ── Doppelrand (Double-Bezel) Architecture ────────────────────────────────── */
.bezel-outer {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--border-light);
  padding: 0.45rem;
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-default), box-shadow var(--transition-default);
}

.bezel-inner {
  background: var(--color-surface);
  border-radius: var(--radius-inner);
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: var(--inner-highlight);
  overflow: hidden;
  height: 100%;
}

.bezel-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
}

/* ── Fluid Island Navigation ──────────────────────────────────────────────── */
.nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  pointer-events: none;
}

.island-nav {
  pointer-events: auto;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.75rem 0.5rem 1.25rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 0 1px rgba(15, 23, 42, 0.1);
  transition: all var(--transition-default);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

.nav-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-secondary);
  transition: color var(--transition-default);
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.1);
  color: #065F46;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-pulse {
  width: 7px;
  height: 7px;
  background: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
  border-radius: 50%;
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-primary);
  margin: 4px auto;
  border-radius: 2px;
  transition: transform var(--transition-default), opacity var(--transition-default);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-default);
}

.mobile-nav-drawer.is-open,
body.menu-open .mobile-nav-drawer {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-content {
  position: absolute;
  top: 5.5rem;
  left: 1.5rem;
  right: 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-outer);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-float);
  border: 1px solid var(--border-light);
  transform: translateY(-10px);
  transition: transform var(--transition-default);
}

.mobile-nav-drawer.is-open .mobile-nav-content,
body.menu-open .mobile-nav-drawer .mobile-nav-content {
  transform: translateY(0);
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-link {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* ── Buttons & Islands ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.4rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-default);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

/* Button-in-Button Primary Island */
.btn-primary {
  background: var(--color-accent);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  padding-right: 0.65rem; /* Room for nested circle icon */
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
  transform: translateY(-1px);
}

.btn-icon-bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-default);
}

.btn-primary:hover .btn-icon-bubble {
  transform: translateX(2px) translateY(-1px);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-primary);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: var(--shadow-card);
}

.btn-secondary:hover {
  background: var(--color-surface-tint);
  border-color: rgba(15, 23, 42, 0.2);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Store Badges */
.store-badge-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.store-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #000000;
  color: #FFFFFF;
  padding: 0.6rem 1.25rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform var(--transition-default), opacity var(--transition-default);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.store-badge-btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.store-badge-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.store-badge-subtext {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
  display: block;
  line-height: 1;
}

.store-badge-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: block;
  line-height: 1.2;
}

.store-badge-pill-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(245, 158, 11, 0.15);
  color: #B45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-left: 0.25rem;
}

/* ── Hero Section (Strict Viewport Discipline) ────────────────────────────── */
.hero-section {
  padding-top: 6.75rem; /* max pt-24 at desktop */
  padding-bottom: 4rem;
  min-height: calc(100dvh - 2rem);
  display: flex;
  align-items: center;
  position: relative;
}

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

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 1.25rem;
}

.hero-subtext {
  font-size: 1.15rem;
  color: var(--color-muted);
  line-height: 1.55;
  margin-bottom: 2rem;
  max-width: 48ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-store-hint {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Hero Companion Stage Card */
.hero-pet-card {
  position: relative;
}

.pet-live-core {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at 50% 30%, rgba(254, 243, 199, 0.5) 0%, #FFFFFF 70%);
}

.pet-live-badge-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.pet-level-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #FFFBEB;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-amber-dark);
}

.pet-streak-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ECFDF5;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: #065F46;
}

.pet-display-stage {
  position: relative;
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0 1.25rem 0;
}

.pet-avatar-img {
  width: 170px;
  height: 170px;
  object-fit: contain;
  transition: transform var(--transition-fluid);
  filter: drop-shadow(0 12px 18px rgba(217, 119, 6, 0.18));
}

.pet-avatar-img:hover {
  transform: scale(1.05) rotate(2deg);
}

.pet-status-bar {
  width: 100%;
  background: var(--color-surface-tint);
  border-radius: var(--radius-pill);
  padding: 0.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.pet-xp-fill {
  background: linear-gradient(90deg, var(--color-amber), var(--color-amber-dark));
  height: 10px;
  border-radius: var(--radius-pill);
  width: 78%;
  transition: width 0.8s var(--ease-spring);
}

.pet-macro-bubbles {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  justify-content: space-around;
}

.macro-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface-tint);
  border: 1px solid rgba(15, 23, 42, 0.04);
  flex: 1;
}

.macro-chip-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
}

.macro-chip-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-top: 0.1rem;
}

/* ── Social Proof & Trust Strip ───────────────────────────────────────────── */
.trust-strip {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--color-surface);
}

.trust-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.trust-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-surface-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 1.1rem;
}

.trust-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
}

.trust-subtext {
  font-size: 0.75rem;
  color: var(--color-muted);
}

/* ── Interactive Re-estimate Feature Simulator ─────────────────────────────── */
.simulator-section {
  padding: 6rem 0;
}

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

.simulator-explainer {
  display: flex;
  flex-direction: column;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.step-card {
  display: flex;
  gap: 1rem;
  padding: 1.1rem;
  border-radius: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--border-light);
  transition: all var(--transition-default);
}

.step-card.active {
  border-color: rgba(2, 132, 199, 0.4);
  background: #F0F9FF;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-surface-tint);
  color: var(--color-primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.step-card.active .step-num {
  background: var(--color-accent);
  color: #FFFFFF;
}

.step-text h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.step-text p {
  font-size: 0.85rem;
  color: var(--color-muted);
  line-height: 1.45;
}

/* Interactive Mockup */
.mockup-phone {
  padding: 1.75rem;
  background: #FFFFFF;
}

.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.mockup-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.mockup-time {
  font-size: 0.75rem;
  color: var(--color-muted);
  background: var(--color-surface-tint);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
}

.food-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.food-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: var(--color-surface-tint);
  border: 1px solid rgba(15, 23, 42, 0.04);
  transition: all var(--transition-default);
}

.food-item-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.food-item-icon {
  font-size: 1.2rem;
}

.food-item-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-primary);
}

.food-item-sub {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.food-item-cals {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-accent);
}

/* Dynamic Add Item row */
.add-food-btn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.add-food-btn {
  flex: 1;
  background: rgba(2, 132, 199, 0.08);
  color: var(--color-accent);
  border: 1px dashed rgba(2, 132, 199, 0.35);
  border-radius: 0.85rem;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-default);
}

.add-food-btn:hover {
  background: rgba(2, 132, 199, 0.14);
}

/* Re-estimate CTA button */
.btn-reestimate {
  width: 100%;
  background: linear-gradient(135deg, #0284C7, #0369A1);
  color: #FFFFFF;
  border: none;
  padding: 0.85rem;
  border-radius: 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
  transition: all var(--transition-default);
}

.btn-reestimate:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
}

.btn-reestimate:active {
  transform: scale(0.98);
}

.pulse-glow {
  animation: pulse-reestimate 1.8s infinite;
}

@keyframes pulse-reestimate {
  0% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(2, 132, 199, 0); }
  100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

.sim-item-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  margin-left: 0.35rem;
}

.sim-badge-mod {
  background: #E0F2FE;
  color: #0369A1;
}

.sim-badge-add {
  background: #FEF3C7;
  color: #B45309;
}

.reestimate-metric-bar {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.total-cals-display {
  display: flex;
  flex-direction: column;
}

.total-cals-label {
  font-size: 0.75rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.total-cals-number {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
  transition: color 0.4s var(--ease-elastic);
}

.macro-split-strip {
  display: flex;
  gap: 0.5rem;
}

.macro-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-pill);
}

.macro-p { background: var(--color-amber-light); color: var(--color-amber-dark); }
.macro-c { background: var(--color-accent-light); color: var(--color-accent); }
.macro-f { background: #FFE4E6; color: #E11D48; }

/* ── Interactive Pet Companion Evolution Showcase ─────────────────────────── */
.pet-showcase-section {
  padding: 6rem 0;
  background: var(--color-surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.pet-stage-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.stage-tab-btn {
  background: var(--color-surface-tint);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-secondary);
  cursor: pointer;
  transition: all var(--transition-default);
}

.stage-tab-btn:hover {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.2);
}

.stage-tab-btn.active {
  background: var(--color-amber-dark);
  color: #FFFFFF;
  border-color: var(--color-amber-dark);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.pet-stage-display-card {
  max-width: 780px;
  margin: 0 auto;
}

.pet-stage-inner {
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.pet-stage-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.pet-stage-img-large {
  width: 220px;
  height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(217, 119, 6, 0.2));
  transition: transform var(--transition-fluid);
}

.mood-selector {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.mood-btn {
  background: var(--color-surface-tint);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-default);
}

.mood-btn.active {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}

.pet-stage-details h3 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.pet-stage-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--color-amber-dark);
  margin-bottom: 1rem;
}

.pet-stage-desc {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.pet-perks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pet-perk-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-secondary);
}

.perk-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

/* ── Bento Feature Matrix ─────────────────────────────────────────────────── */
.features-section {
  padding: 6rem 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.bento-col-8 { grid-column: span 8; }
.bento-col-4 { grid-column: span 4; }
.bento-col-6 { grid-column: span 6; }

.bento-card-inner {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.bento-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.bento-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}

.bento-desc {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

/* Bento Badge Matrix */
.badge-scroller {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.badge-scroller::-webkit-scrollbar { display: none; }

.badge-tile {
  background: var(--color-surface-tint);
  border: 1px solid var(--border-light);
  border-radius: 1.25rem;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 95px;
  flex-shrink: 0;
}

.badge-tile img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-bottom: 0.4rem;
}

.badge-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-secondary);
}

/* Feature Preview Image Card */
.bento-media-wrap {
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border-light);
  margin-top: 1rem;
}

.bento-media-wrap img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform var(--transition-fluid);
}

.bento-media-wrap:hover img {
  transform: scale(1.02);
}

/* ── FAQ Section (Accordion) ──────────────────────────────────────────────── */
.faq-section {
  padding: 6rem 0;
  background: var(--color-surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.faq-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem auto;
}

.faq-filter-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.faq-filter-pill {
  background: var(--color-surface-tint);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-secondary);
  cursor: pointer;
  transition: all var(--transition-default);
}

.faq-filter-pill.active {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}

.faq-accordion {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: 1.25rem;
  background: var(--color-bg);
  overflow: hidden;
  transition: all var(--transition-default);
}

.faq-item.is-open {
  background: #FFFFFF;
  border-color: rgba(2, 132, 199, 0.3);
  box-shadow: var(--shadow-card);
}

.faq-trigger {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
}

.faq-icon-cross {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-surface-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-default), background var(--transition-default);
}

.faq-item.is-open .faq-icon-cross {
  transform: rotate(45deg);
  background: var(--color-accent);
  color: #FFFFFF;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-elastic), padding 0.3s var(--ease-elastic);
  padding: 0 1.5rem;
}

.faq-item.is-open .faq-answer {
  max-height: 400px;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

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

.faq-highlight-box {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: #F0F9FF;
  border-left: 3px solid var(--color-accent);
  border-radius: 0.5rem;
  font-size: 0.88rem;
  color: #0369A1;
}

/* ── Download CTA Banner ──────────────────────────────────────────────────── */
.cta-banner-section {
  padding: 6rem 0;
}

.cta-banner-inner {
  padding: 4rem 2rem;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.08) 0%, rgba(255, 255, 255, 1) 75%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-banner-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.cta-banner-sub {
  font-size: 1.15rem;
  color: var(--color-muted);
  max-width: 52ch;
  margin-bottom: 2rem;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--border-light);
  padding: 4.5rem 0 2.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand h4 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.5;
  max-width: 32ch;
}

.footer-col h5 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--color-secondary);
  transition: color var(--transition-default);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--color-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ── Dedicated Legal / Policy Pages Layout ────────────────────────────────── */
.legal-page-header {
  padding-top: 7rem;
  padding-bottom: 3rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--border-light);
}

.legal-meta-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.legal-content-wrap {
  padding: 4rem 0;
}

.legal-article {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-secondary);
}

.legal-article h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-light);
}

.legal-article h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.legal-article p, .legal-article ul, .legal-article ol {
  margin-bottom: 1.25rem;
}

.legal-article ul, .legal-article ol {
  padding-left: 1.5rem;
}

.legal-article li {
  margin-bottom: 0.5rem;
}

.legal-summary-card {
  background: #F0F9FF;
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: 1.25rem;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.legal-summary-card h4 {
  font-size: 1.05rem;
  color: #0369A1;
  margin-bottom: 0.75rem;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.legal-table th, .legal-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  text-align: left;
}

.legal-table th {
  background: var(--color-surface-tint);
  font-weight: 700;
  color: var(--color-primary);
}

/* ── Interactive Modal: Store Notify Me ───────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-default);
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: #FFFFFF;
  border-radius: var(--radius-outer);
  padding: 2.5rem;
  box-shadow: var(--shadow-float);
  border: 1px solid var(--border-light);
  transform: scale(0.96);
  transition: transform var(--transition-default);
  position: relative;
}

.modal-backdrop.is-open .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-surface-tint);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--color-secondary);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--border-light);
  background: var(--color-surface-tint);
  font-size: 0.95rem;
  color: var(--color-primary);
  outline: none;
  transition: border-color var(--transition-default), background var(--transition-default);
}

.form-input:focus {
  border-color: var(--color-accent);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* ── Responsive Collapse Below 768px (Strict a11y & layout) ───────────────── */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .bento-col-8, .bento-col-6, .bento-col-4 {
    grid-column: span 12;
  }
  .simulator-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-wrapper {
    padding: 0.65rem 0.85rem;
  }
  .nav-links, .nav-status-pill {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
    min-height: 44px;
    min-width: 44px;
  }
  .mobile-nav-drawer {
    display: block;
  }
  .island-nav {
    padding: 0.35rem 0.5rem 0.35rem 0.85rem;
    gap: 0.4rem;
  }
  .island-nav .nav-brand {
    font-size: 1.05rem;
    gap: 0.45rem;
    flex-shrink: 0;
  }
  .island-nav .nav-brand-icon {
    width: 28px;
    height: 28px;
  }
  .island-nav .nav-actions {
    gap: 0.4rem;
  }
  .island-nav .btn-secondary.btn-sm,
  .island-nav .btn-outline {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  .hero-section {
    padding-top: 5.5rem;
    padding-bottom: 3rem;
  }
  .pet-stage-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2rem 1.25rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-links a {
    display: inline-block;
    padding: 0.35rem 0;
    min-height: 38px;
    line-height: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  #deleteSubmitBtn {
    white-space: normal !important;
    line-height: 1.35;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    text-align: center;
  }
  .legal-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .form-input {
    font-size: 16px; /* Prevents auto-zoom on iOS Safari */
    min-height: 44px;
  }
}

@media (max-width: 360px) {
  .island-nav .nav-brand span {
    font-size: 0.95rem;
  }
  .island-nav .btn-secondary.btn-sm {
    padding: 0.3rem 0.45rem;
    font-size: 0.72rem;
  }
}

/* Reduced Motion Compliance */
@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;
  }
}
