:root {
  --ink: #2B332F;
  --ink-light: #4A5650;
  --muted: #6A7770;
  --green: #6C9479;
  --green-dark: #3F5E49;
  --cream: #FAF8F5;
  --paper: #FFFFFF;
  --sand: #F0EAD6;
  --line: #E2DFD8;
  --accent: #E28D44;
  --shadow-sm: 0 4px 12px rgba(43, 51, 47, 0.05);
  --shadow-md: 0 12px 32px rgba(43, 51, 47, 0.08);
  --shadow-lg: 0 24px 64px rgba(43, 51, 47, 0.12);
  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --radius-device: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  transition: all 0.2s ease;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(calc(-100% - 2rem));
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
}

.narrow {
  width: min(720px, 100%);
}

.text-center {
  text-align: center;
}

/* Typography */
h1, h2, h3, .brand {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
  margin-top: 0;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.eyebrow {
  color: var(--green-dark);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.85);
  border-bottom: 1px solid rgba(226, 223, 216, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

/* Buttons and Badges */
.play-badge-link {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 8px;
}

.play-badge-link:hover {
  transform: translateY(-2px) scale(1.02);
}

.play-badge {
  display: block;
  height: auto;
  max-width: 100%;
}

header .play-badge {
  height: 48px;
}

.hero-actions .play-badge, .final-cta .play-badge {
  height: 64px;
}

/* Hero Section */
.hero {
  padding: 5rem 0 6rem;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--sand) 0%, transparent 70%);
  opacity: 0.6;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.hero-lede {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--ink-light);
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.availability {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Realistic Phone Mockup - Slim Bezel */
.device-frame {
  position: relative;
  border-radius: 36px;
  padding: 8px;
  background: #000;
  box-shadow:
    0 0 0 2px #222,
    var(--shadow-lg);
  margin: 0 auto;
  max-width: 320px;
  width: 100%;
}

/* Punch-hole Camera */
.device-frame::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: #151515;
  border-radius: 50%;
  z-index: 10;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.2), 0 0 0 1px #000;
}

.device-frame img {
  border-radius: 28px;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 2856;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
}

/* Component Cutouts */
.ui-cutout {
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: var(--paper);
  padding: 4px;
  border: 1px solid var(--line);
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section-soft {
  background: var(--paper);
  border-radius: 40px;
  margin: 0 1rem;
  box-shadow: var(--shadow-sm);
}

.section-header {
  margin-bottom: 4rem;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--muted);
}

/* Cards & Grids */
.steps-grid, .resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--cream);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--sand);
  color: var(--green-dark);
  font-weight: 700;
  font-family: 'Fraunces', serif;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.card p {
  color: var(--ink-light);
  margin-bottom: 0;
}

/* Feature Section */
.feature-section {
  background: var(--sand);
  border-radius: 40px 40px 0 0;
  margin-top: 2rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 6rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(43, 51, 47, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list strong {
  font-size: 1.125rem;
  color: var(--ink);
}

.feature-list span {
  color: var(--ink-light);
}

.phone-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.device-frame-sm {
  max-width: 220px;
  margin: 0 auto;
}

.device-frame-offset {
  margin-top: 3rem;
}

/* Energy Demo Widget */
.demo-section {
  background: var(--paper);
}

.demo-widget {
  max-width: 600px;
  margin: 0 auto;
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.demo-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.energy-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.75rem 1.5rem;
  border-radius: 99px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.energy-btn:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.energy-btn.active {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
  box-shadow: 0 4px 12px rgba(63, 94, 73, 0.3);
}

.demo-card {
  background: var(--paper);
  padding: 2rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  transition: all 0.3s ease;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.demo-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.demo-card h3 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Philosophy */
.philosophy-section {
  background: var(--cream);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: left;
}

.philosophy-card {
  background: var(--paper);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.philosophy-card h3 {
  margin-bottom: 0.75rem;
}

.philosophy-card p {
  color: var(--ink-light);
}

/* FAQ */
.faq-section {
  background: var(--paper);
  border-radius: 40px;
  margin: 0 1rem;
  box-shadow: var(--shadow-sm);
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: clip;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 1.5rem;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-weight: 700;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  flex: 0 0 auto;
  color: var(--green-dark);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  transition: transform 180ms ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  color: var(--ink-light);
}

.faq-answer p {
  margin: 0;
}

.faq-answer a {
  color: var(--green-dark);
  font-weight: 600;
}

/* Audio Player Mockup */
.audio-player-mock {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--cream);
  padding: 0.75rem 1rem;
  border-radius: 99px;
  border: 1px solid var(--line);
  margin-top: 1rem;
  width: fit-content;
}

.play-btn {
  background: var(--green-dark);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0 0 0 2px; /* optical adjustment for triangle */
  cursor: pointer;
}

.play-btn.playing {
  padding: 0; /* mathematical center for pause bars */
}

.waveform {
  width: 120px;
  height: 20px;
  background: repeating-linear-gradient(
    90deg,
    var(--green) 0px,
    var(--green) 2px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.5;
  border-radius: 10px;
  transition: transform 0.2s ease;
}

.audio-player-mock.playing .waveform {
  animation: wave 1.2s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.4); }
}

.time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

/* Final CTA */
.final-cta {
  padding: 6rem 0;
}

.cta-icon {
  display: block;
  width: 128px;
  height: 128px;
  object-fit: contain;
  margin: 0 auto 2rem;
  filter: drop-shadow(0 14px 24px rgba(35, 48, 41, 0.16));
}

/* Animations */
.fade-up {
  opacity: 1;
  transform: none;
}

.js .fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.js .fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

.soft-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0); }
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

/* Media Queries */
@media (max-width: 992px) {
  .hero-grid, .feature-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .phone-pair {
    width: min(100%, 520px);
    margin-inline: auto;
    align-items: start;
  }

  .device-frame-offset {
    margin-top: 0;
  }
  
  .hero-copy {
    text-align: center;
  }
  
  .hero-lede {
    margin-inline: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .feature-copy {
    order: -1;
  }

  .desktop-nav {
    display: none !important; /* Hide on mobile for mockup simplicity */
  }
}

@media (max-width: 768px) {
  .feature-section {
    border-radius: 28px 28px 0 0;
    margin-top: 1rem;
  }

  .demo-controls {
    flex-direction: column;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
  }

  .faq-section {
    border-radius: 28px;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
    gap: 0.75rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-up, .soft-float {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .skip-link {
    transition: none;
  }
}
