/* ==============================================================================
   BarCraft Web Showcase — Styling System
   Apple HIG Light-First Minimalist Design System with Dynamic Theme Switcher
   ============================================================================== */

:root {
  /* Color Palette - Light Theme (Default) */
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #F1F5F9;
  --bg-surface-hover: #F8FAFC;
  
  --border-subtle: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-focus: #C86428;

  /* Accent Tones */
  --copper-primary: #2563EB;
  --copper-light: #EFF6FF;
  --copper-dark: #1D4ED8;
  --copper-glow: rgba(37, 99, 235, 0.2);

  --sage-primary: #10B981;
  --sage-light: #ECFDF5;

  --badge-green-bg: #ECFDF5;
  --badge-green-text: #059669;
  --badge-orange-bg: #FFFBEB;
  --badge-orange-text: #D97706;

  /* Typography */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
  --shadow-phone: 0 25px 60px -15px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);

  /* Layout */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --max-width: 1080px;
  --transition-speed: 0.25s;
}

body.dark-theme {
  --bg-page: #0B0E14;
  --bg-surface: #151922;
  --bg-surface-alt: #1C222F;
  --bg-surface-hover: #222938;

  --border-subtle: #2A3241;
  --border-medium: #3A4456;
  --border-focus: #E07D3E;

  --copper-primary: #3B82F6;
  --copper-light: rgba(59, 130, 246, 0.15);
  --copper-dark: #60A5FA;
  --copper-glow: rgba(59, 130, 246, 0.3);

  --sage-primary: #10B981;
  --sage-light: rgba(16, 185, 129, 0.15);

  --badge-green-bg: rgba(5, 150, 105, 0.2);
  --badge-green-text: #34D399;
  --badge-orange-bg: rgba(217, 119, 6, 0.2);
  --badge-orange-text: #FBBF24;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-tertiary: #64748B;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.6);
  --shadow-phone: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

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

html {
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-page);
  overflow-x: hidden;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Typography Hierarchy */
h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation (DevPet / DisplayBridge Apple HIG Style — Impeccable Precision) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 252, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.dark-theme .site-header {
  background: rgba(13, 14, 17, 0.88);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.logo-text {
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  display: inline-block;
}

.version-tag {
  font-size: 11px;
  height: 20px;
  padding: 0 8px;
  background: var(--copper-light);
  color: var(--copper-primary);
  border-radius: 9999px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  padding: 6px 2px;
  border-radius: 4px;
  transition: color 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

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

.nav-link:focus-visible {
  outline: 2px solid var(--copper-primary);
  outline-offset: 2px;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.theme-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  flex-shrink: 0;
}

.theme-btn:hover {
  background: var(--bg-surface-alt);
  border-color: var(--copper-primary);
  color: var(--copper-primary);
}

.theme-btn:focus-visible {
  outline: 2px solid var(--copper-primary);
  outline-offset: 2px;
}

.theme-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: block;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  pointer-events: none;
}

.theme-btn:hover svg {
  transform: rotate(15deg) scale(1.08);
}

.theme-btn:active {
  transform: scale(0.92);
}

/* Light Theme: show sun, hide moon */
.theme-btn .sun-icon { display: block; }
.theme-btn .moon-icon { display: none; }

/* Dark Theme: hide sun, show moon */
body.dark-theme .theme-btn .sun-icon { display: none; }
body.dark-theme .theme-btn .moon-icon { display: block; }

.nav-appstore-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  flex-shrink: 0;
  text-decoration: none;
  border-radius: 6px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-appstore-link:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.nav-appstore-link:focus-visible {
  outline: 2px solid var(--copper-primary);
  outline-offset: 2px;
}

.nav-appstore-badge {
  height: 36px;
  width: auto;
  display: block;
  border-radius: 6px;
}

/* Hero Section */
.hero-section {
  padding: 64px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}

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

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--copper-primary);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--copper-primary);
  border-radius: 50%;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.hero-title {
  font-size: 52px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-speed);
  border: none;
}

.btn-primary {
  background-color: var(--copper-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--copper-glow);
}

.btn-primary:hover {
  background-color: var(--copper-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--copper-primary);
  color: var(--copper-primary);
  transform: translateY(-1px);
}

.hero-specs-pill {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
}

/* Device Mockup Stage */
.device-stage {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.phone-mockup {
  width: 330px;
  height: 710px;
  background-color: #000;
  border-radius: 56px;
  border: 12px solid #000;
  outline: 2px solid #333;
  box-shadow: inset 0 0 0 2px #222, 0 40px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255,255,255,0.1);
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

/* Side Buttons */
.phone-mockup::before {
  content: '';
  position: absolute;
  top: 120px;
  left: -14px;
  width: 4px;
  height: 110px;
  background: #333;
  border-radius: 4px 0 0 4px;
  box-shadow: 0 60px 0 0 #333; /* Volume down */
  z-index: 100;
}

.phone-mockup::after {
  content: '';
  position: absolute;
  top: 140px;
  right: -14px;
  width: 4px;
  height: 70px;
  background: #333;
  border-radius: 0 4px 4px 0;
  z-index: 100;
}

.phone-island {
  width: 100px;
  height: 24px;
  background-color: #000000;
  border-radius: 14px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.island-camera {
  width: 9px;
  height: 9px;
  background-color: #111827;
  border-radius: 50%;
}

.island-sensor {
  width: 7px;
  height: 7px;
  background-color: #0F172A;
  border-radius: 50%;
}

.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 10px;
}

.phone-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* In-Phone App Preview Elements */
.phone-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.phone-cocktail-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-cocktail-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background-color: var(--copper-light);
  color: var(--copper-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.phone-cocktail-name {
  font-size: 15px;
  font-weight: 700;
}

.phone-cocktail-sub {
  font-size: 11px;
  color: var(--text-tertiary);
}

.phone-bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
}

.phone-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  color: var(--text-tertiary);
  gap: 2px;
}

.phone-nav-item.active {
  color: var(--copper-primary);
  font-weight: 700;
}

/* Section Common Styles */
.section {
  padding: 80px 0;
}

.section-alt {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--copper-primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: 38px;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 16px;
}

/* Interactive Simulator Section */
.simulator-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: flex-start;
}

.sim-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.sim-control-group {
  margin-bottom: 24px;
}

.sim-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

/* Drink Selection Pills */
.drink-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drink-pill {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-speed);
}

.drink-pill:hover {
  border-color: var(--copper-primary);
  color: var(--text-primary);
}

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

/* Stepper and Unit Toggles */
.sim-dual-controls {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.stepper-box {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 12px;
}

.stepper-btn {
  width: 32px;
  height: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
}

.stepper-btn:hover:not(:disabled) {
  border-color: var(--copper-primary);
  color: var(--copper-primary);
}

.stepper-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stepper-count {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 24px;
  text-align: center;
}

.unit-switch-group {
  display: inline-flex;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.unit-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.unit-btn.active {
  background: var(--bg-surface);
  color: var(--copper-primary);
  box-shadow: var(--shadow-sm);
}

/* Recipe Ingredients Table */
.recipe-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.recipe-table tr {
  border-bottom: 1px solid var(--border-subtle);
}

.recipe-table tr:last-child {
  border-bottom: none;
}

.recipe-table td {
  padding: 10px 0;
  font-size: 14px;
}

.recipe-table td.amount {
  text-align: right;
  font-weight: 700;
  color: var(--copper-primary);
}

/* Radar Canvas Container */
.radar-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

#radarCanvas {
  display: block;
  max-width: 100%;
}

/* Step-by-Step Guidance Box */
.step-guide-box {
  margin-top: 20px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.step-card-active {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-badge-num {
  width: 28px;
  height: 28px;
  background: var(--copper-primary);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-instruction-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Timer Control Box */
.timer-widget {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.timer-digits {
  font-size: 24px;
  font-weight: 800;
  color: var(--copper-primary);
}

.timer-actions {
  display: flex;
  gap: 8px;
}

/* Cabinet Interactive Section */
.cabinet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.bottle-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bottle-chip {
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-speed);
}

.bottle-chip:hover {
  border-color: var(--copper-primary);
}

.bottle-chip.owned {
  background: var(--copper-light);
  border-color: var(--copper-primary);
  color: var(--copper-primary);
}

.cabinet-results-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cabinet-result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.cabinet-result-card.ready {
  border-left: 4px solid var(--badge-green-text);
}

.cabinet-result-card.missing {
  border-left: 4px solid var(--badge-orange-text);
}

.result-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.result-card-title {
  font-size: 16px;
  font-weight: 700;
}

.result-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

.result-badge.ready {
  background: var(--badge-green-bg);
  color: var(--badge-green-text);
}

.result-badge.missing {
  background: var(--badge-orange-bg);
  color: var(--badge-orange-text);
}

/* Feature Cards Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-speed), border-color var(--transition-speed);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--copper-primary);
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--copper-light);
  color: var(--copper-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
}

/* Tech Specs Comparison Cards */
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.spec-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.spec-platform-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.spec-platform-header h3 {
  font-size: 22px;
}

.spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spec-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.spec-check {
  color: var(--copper-primary);
  font-weight: bold;
}

/* FAQ Section (DevPet / DisplayBridge Accordion Layout) */
.faq-section {
  padding: 80px 0;
}

.faq-accordion {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed);
}

.faq-item:hover {
  border-color: var(--border-medium);
}

.faq-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: transparent;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all var(--transition-speed);
}

.faq-trigger span {
  flex: 1;
  text-align: left;
}

.faq-trigger .chevron {
  transition: transform 0.25s ease, color 0.25s ease;
  color: var(--text-tertiary);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-trigger .chevron {
  transform: rotate(180deg);
  color: var(--copper-primary);
}

.faq-content {
  display: none;
  padding: 0 22px 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

.faq-item.open .faq-content {
  display: block;
}

/* CTA Download Section */
.cta-section {
  padding: 96px 0;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-page) 0%, var(--bg-surface-alt) 100%);
  border-top: 1px solid var(--border-subtle);
}

.cta-badges-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* Official Store Badges (App Store & Google Play) */
.cta-badge-link {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

.cta-badge-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  opacity: 0.95;
}

.cta-badge-link:focus-visible {
  outline: 2px solid var(--copper-primary);
  outline-offset: 3px;
  border-radius: 12px;
}

.cta-badge-img {
  height: 48px;
  width: auto;
  display: block;
  border-radius: 8px;
}

/* Site Footer (DevPet / DisplayBridge Apple HIG Style) */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 36px;
  margin-top: auto;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.footer-logo img {
  border-radius: 6px;
}

.footer-tagline {
  font-size: 0.80rem;
  color: var(--text-secondary);
}

.footer-languages-info {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: right;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
}

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-copy-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-copy {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.footer-apple-legal {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-tertiary);
}

.footer-locale {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.footer-locale:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.globe-icon {
  color: inherit;
  flex-shrink: 0;
}

.footer-locale-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: inherit;
  border: none;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  padding: 2px 18px 2px 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2386868B' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}

.footer-locale-select:hover {
  color: var(--copper-primary);
}

.footer-locale-select:focus-visible {
  outline: 2px solid var(--copper-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.footer-locale-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.modal-box h3 {
  font-size: 22px;
  margin-bottom: 14px;
}

.modal-box p {
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ============================================================
   Responsive — Tablet / Phablet / Mobile / Small Phone
   Target: iOS Safari, Chrome for Android, system browsers
   ============================================================ */

/* Touch-action & tap highlights — suppress iOS tap glow globally */
a, button, [role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Tablet — hide nav links, reflow hero & grids */
@media (max-width: 960px) {
  .site-nav {
    display: none;
  }

  /* Hero */
  .hero-section {
    padding: 48px 0 64px;
  }
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-text {
    align-items: center;
    order: 1;
  }
  .device-stage {
    order: 2;
  }
  .hero-title {
    font-size: 42px;
  }
  .hero-subtitle {
    font-size: 17px;
    max-width: 560px;
  }
  .hero-cta-group {
    justify-content: center;
  }

  /* Sections */
  .section {
    padding: 64px 0;
  }
  .section-header {
    margin-bottom: 40px;
  }
  .section-title {
    font-size: 32px;
  }

  /* Grids → single column */
  .simulator-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .cabinet-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .specs-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Phone mockup: center on tablet */
  .device-stage {
    justify-content: center;
  }

  /* Footer */
  .footer-top-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-languages-info {
    text-align: left;
  }
  .footer-bottom-row {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 16px;
  }

  /* CTA badges */
  .cta-badges-group {
    gap: 16px;
  }
}

/* Phablet — large phone landscape / small tablet portrait */
@media (max-width: 720px) {
  .hero-title {
    font-size: 36px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 56px 0;
  }
  .container {
    padding: 0 20px;
  }
  .nav-container {
    padding: 0 20px;
  }

  /* Phone mockup: scale to fit */
  .phone-mockup {
    width: 280px;
    height: 560px;
  }

  /* Sim panels: full-width stacked */
  .sim-panel {
    padding: 24px;
  }
}

/* Mobile — standard iPhone / Android phone portrait */
@media (max-width: 540px) {
  /* Nav */
  .version-tag {
    display: none;
  }
  .nav-container {
    padding: 0 16px;
    height: 56px;
  }
  .logo-text {
    font-size: 15px;
  }
  .nav-actions {
    gap: 8px;
  }
  .theme-btn {
    width: 40px;
    height: 40px;
  }
  .nav-appstore-link {
    display: none; /* header badge hides on mobile — CTA section below is the primary download */
  }

  /* Hero */
  .hero-section {
    padding: 36px 0 52px;
  }
  .hero-title {
    font-size: 30px;
    letter-spacing: -0.02em;
  }
  .hero-subtitle {
    font-size: 15px;
  }
  .badge-pill {
    font-size: 12px;
    padding: 5px 12px;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .btn {
    width: 100%;
    justify-content: center;
    padding: 15px 20px;
    font-size: 15px;
    min-height: 48px; /* Apple HIG 44pt touch target */
  }
  .hero-specs-pill {
    font-size: 12px;
    text-align: center;
  }

  /* Phone mockup: compact for small screens */
  .phone-mockup {
    width: 240px;
    height: 480px;
    border-radius: 38px;
    border-width: 8px;
  }
  .phone-island {
    width: 80px;
    height: 20px;
    top: 8px;
  }
  .phone-body {
    padding: 6px 12px 52px;
    gap: 8px;
  }
  .phone-cocktail-name {
    font-size: 13px;
  }
  .phone-cocktail-sub {
    font-size: 10px;
  }

  /* Sections */
  .section {
    padding: 48px 0;
  }
  .container {
    padding: 0 16px;
  }
  .section-header {
    margin-bottom: 32px;
  }
  .section-title {
    font-size: 26px;
  }
  .section-subtitle {
    font-size: 15px;
  }
  .section-tag {
    font-size: 11px;
  }

  /* Simulator */
  .sim-panel {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }
  .sim-dual-controls {
    flex-direction: column;
    gap: 12px;
  }
  .stepper-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
  .unit-btn {
    padding: 8px 14px;
    min-height: 40px;
  }
  .drink-pill {
    padding: 9px 14px;
    min-height: 40px;
  }

  /* Cabinet */
  .bottle-chip {
    padding: 10px 14px;
    min-height: 44px;
  }

  /* Features */
  .feature-card {
    padding: 24px 20px;
  }

  /* Specs */
  .spec-card {
    padding: 24px 20px;
  }

  /* FAQ */
  .faq-trigger {
    padding: 16px 18px;
    font-size: 14px;
    min-height: 52px;
  }
  .faq-content {
    padding: 0 18px 16px;
    font-size: 13px;
  }

  /* CTA */
  .cta-section {
    padding: 64px 0;
  }
  .cta-badges-group {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  .cta-badge-img {
    height: 44px;
  }

  /* Footer */
  .site-footer {
    padding: 36px 0 28px;
  }
  .footer-content {
    gap: 16px;
  }
  .footer-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .modal-box {
    padding: 24px 20px;
    border-radius: var(--radius-md);
  }
}

/* Small phone — iPhone SE, Galaxy A series (≤ 390px) */
@media (max-width: 390px) {
  .hero-title {
    font-size: 26px;
  }
  .phone-mockup {
    width: 210px;
    height: 420px;
  }
  .features-grid {
    gap: 14px;
  }
  .hero-cta-group {
    gap: 10px;
  }
  .cta-badge-img {
    height: 40px;
  }
}

/* Safe area insets — iPhone notch / Dynamic Island / Android gesture bar */
@supports (padding: env(safe-area-inset-bottom)) {
  .site-header {
    padding-top: env(safe-area-inset-top);
  }
  .site-footer {
    padding-bottom: calc(36px + env(safe-area-inset-bottom));
  }
  @media (max-width: 540px) {
    .site-footer {
      padding-bottom: calc(28px + env(safe-area-inset-bottom));
    }
  }
}

