/* Wattnest Main Styles */

/* Imports */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@400;500;600;700&display=swap');
@import url('./variables.css');
@import url('./animations.css');

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Performance optimizations */
/* Note: will-change and transform can break position:sticky, so only apply to fixed/animated elements */
.frame-canvas,
.hero-overlay {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-charcoal);
  background-color: var(--color-cream);
  overflow-x: hidden;
}

/* Smooth scroll container (for Lenis) */
html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-charcoal);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-headline); }
h3 { font-size: var(--text-subhead); }

p {
  max-width: 65ch;
}

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

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

/* Container */
.container {
  width: var(--container-width);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--frame-padding);
}

/* Header - Clean like Adaline */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  padding: var(--space-sm) 0;
  transition: background 0.3s var(--ease-out), padding 0.3s var(--ease-out);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 768px) {
  .header {
    padding: var(--space-md) 0;
  }
}

.header.scrolled {
  background: rgba(250, 248, 245, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  padding: var(--space-xs) 0;
}

@media (min-width: 768px) {
  .header.scrolled {
    padding: var(--space-sm) 0;
  }
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 0;
}

.header__logo img {
  height: 32px;
  width: auto;
}

@media (min-width: 768px) {
  .header__logo img {
    height: 36px;
  }
}

.header__logo-text {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--color-charcoal);
  font-weight: 500;
}

@media (min-width: 768px) {
  .header__logo-text {
    font-size: 1.25rem;
  }
}

.header__nav {
  display: none;
}

@media (min-width: 768px) {
  .header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
  }
}

@media (min-width: 1024px) {
  .header__nav {
    gap: var(--space-lg);
  }
}

.header__nav-link {
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-charcoal);
  transition: opacity 0.2s var(--ease-out);
  position: relative;
  opacity: 0.7;
  padding: 8px 4px;
}

.header__nav-link:hover {
  opacity: 1;
}

.header__nav-link::after {
  display: none;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

@media (min-width: 1024px) {
  .header__actions {
    gap: var(--space-sm);
  }
}

/* Buttons - Clean like Adaline */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  letter-spacing: 0.02em;
  min-height: 44px; /* Touch-friendly minimum */
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
  .btn {
    padding: 0.625rem 1.25rem;
    min-height: auto;
  }
}

.btn--primary {
  background: var(--color-charcoal);
  color: white;
  border-color: var(--color-charcoal);
}

.btn--primary:hover,
.btn--primary:active {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--secondary {
  background: white;
  color: var(--color-charcoal);
  border: 1px solid var(--color-gray-300);
}

.btn--secondary:hover,
.btn--secondary:active {
  border-color: var(--color-charcoal);
}

.btn--accent {
  background: var(--color-accent);
  color: white;
}

.btn--accent:hover,
.btn--accent:active {
  background: var(--color-accent-dark);
}

.btn--large {
  padding: 1rem 1.75rem;
  font-size: var(--text-body);
}

@media (min-width: 768px) {
  .btn--large {
    padding: 0.875rem 1.75rem;
  }
}

/* Hero + Frame Combined Section */
.hero-frame-section {
  position: relative;
  height: 180vh; /* Shorter on mobile for faster scroll through */
}

@media (min-width: 768px) {
  .hero-frame-section {
    height: 250vh;
  }
}

.frame-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  z-index: 1;
  /* iOS Safari performance fixes */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Hero overlay - sits on top of frame */
.hero-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 20vh;
  pointer-events: none;
  transition: opacity 0.15s ease-out;
  /* iOS Safari performance fixes */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

@media (min-width: 768px) {
  .hero-overlay {
    padding-top: 25vh;
  }
}

.hero-overlay .container,
.hero-overlay .hero__content {
  pointer-events: auto;
}

.hero__content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

@media (min-width: 768px) {
  .hero__content {
    padding: 0;
  }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 4rem);
  margin-bottom: var(--space-sm);
  color: #1a1a1a;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 400;
}

@media (min-width: 768px) {
  .hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--space-md);
  }
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: #444;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.01em;
}

@media (min-width: 768px) {
  .hero__subtitle {
    font-size: 1.0625rem;
    max-width: 450px;
  }
}

/* Scroll Indicator - minimal */
.scroll-indicator {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  text-align: center;
  color: #333;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

@media (min-width: 768px) {
  .scroll-indicator {
    bottom: 30px;
    font-size: var(--text-micro);
    letter-spacing: 0.1em;
  }
}

.scroll-indicator span {
  display: block;
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .scroll-indicator span {
    margin-bottom: 12px;
  }
}

.scroll-indicator__arrow {
  width: 1px;
  height: 24px;
  margin: 0 auto;
  background: #333;
  animation: scrollPulse 1.5s ease-in-out infinite;
}

@media (min-width: 768px) {
  .scroll-indicator__arrow {
    height: 30px;
  }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
  50% { opacity: 0.7; transform: scaleY(1); }
}

/* Hide hero overlay and scroll indicator when scrolled */
.hero-overlay.faded {
  opacity: 0;
  pointer-events: none;
}

.scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Feature Tabs Section - Scroll Driven */
.features-scroll {
  position: relative;
  height: 300vh; /* Shorter on mobile for faster scrolling */
}

@media (min-width: 768px) {
  .features-scroll {
    height: 400vh;
  }
}

.features-scroll__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  background: var(--color-warm-white);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  padding-top: 56px; /* Account for header */
  z-index: 20;
}

@media (min-width: 768px) {
  .features-scroll__sticky {
    padding-top: 60px;
  }
}

/* Tab Progress Bar */
.tab-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-gray-200);
}

.tab-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Hide the header in sticky view - focus on tabs */
.features-scroll .features__header {
  display: none;
}

.features__header {
  text-align: center;
  margin-bottom: var(--space-xl);
  padding-top: var(--space-xl);
}

.features__title {
  margin-bottom: var(--space-md);
}

.features__subtitle {
  color: var(--color-gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-sm);
  margin-bottom: var(--space-md);
  background: var(--color-warm-white);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tab-nav::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .tab-nav {
    gap: var(--space-md);
    padding: var(--space-lg) 0;
    margin-bottom: var(--space-lg);
    overflow-x: visible;
  }
}

.tab-nav__item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s var(--ease-out), background-color 0.2s;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  min-height: 44px;
  /* Touch-friendly tap target */
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
  .tab-nav__item {
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
  }
}

.tab-nav__item:active {
  background-color: rgba(0, 0, 0, 0.05);
}

.tab-nav__item.active {
  opacity: 1;
}

.tab-nav__number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--color-gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-small);
  font-weight: 600;
  position: relative;
  transition: border-color 0.3s var(--ease-out), background-color 0.3s;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .tab-nav__number {
    width: 40px;
    height: 40px;
  }
}

.tab-nav__item.active .tab-nav__number {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: white;
}

.tab-nav__number svg {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.tab-nav__number circle {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 2;
}

.tab-nav__label {
  font-weight: 500;
  color: var(--color-charcoal);
  font-size: var(--text-small);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .tab-nav__label {
    font-size: var(--text-body);
  }
}

.tab-nav__counter {
  font-size: var(--text-micro);
  color: var(--color-muted);
  margin-left: var(--space-xs);
}

.tab-nav__connector {
  width: 40px;
  height: 2px;
  background: var(--color-gray-200);
  display: none;
}

@media (min-width: 768px) {
  .tab-nav__connector {
    display: block;
  }
}

/* Tab Panels Container */
.tab-panels {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: var(--space-sm) 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
  .tab-panels {
    padding: var(--space-lg) 0;
  }
}

/* Tab Content */
.tab-content {
  display: none;
  opacity: 0;
  width: 100%;
}

.tab-content.active {
  display: block;
  opacity: 1;
}

.tab-content__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: start;
}

@media (min-width: 1024px) {
  .tab-content__inner {
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-xl);
  }
}

.tab-content__text {
  padding-right: 0;
}

@media (min-width: 1024px) {
  .tab-content__text {
    padding-right: var(--space-xl);
  }
}

.tab-content__title {
  font-size: clamp(1.5rem, 4vw, var(--text-headline));
  margin-bottom: var(--space-sm);
}

@media (min-width: 768px) {
  .tab-content__title {
    margin-bottom: var(--space-md);
  }
}

.tab-content__desc {
  color: var(--color-gray-600);
  margin-bottom: var(--space-lg);
  font-size: var(--text-body);
  line-height: 1.6;
}

@media (min-width: 768px) {
  .tab-content__desc {
    margin-bottom: var(--space-xl);
    font-size: var(--text-body-lg);
  }
}

/* Sub-steps */
.sub-steps {
  border-top: 1px solid var(--color-gray-200);
}

.sub-step {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-gray-200);
  transition: opacity 0.3s ease-out;
}

@media (min-width: 768px) {
  .sub-step {
    padding: var(--space-md) 0;
  }
}

.sub-step__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

@media (min-width: 768px) {
  .sub-step__header {
    gap: var(--space-md);
  }
}

.sub-step__number {
  font-size: var(--text-small);
  color: var(--color-primary);
  min-width: 28px;
  font-weight: 600;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .sub-step__number {
    min-width: 32px;
  }
}

.sub-step__title {
  font-weight: 600;
  color: var(--color-charcoal);
  transition: color 0.2s ease-out;
  font-size: var(--text-small);
  line-height: 1.4;
}

@media (min-width: 768px) {
  .sub-step__title {
    font-size: var(--text-body);
  }
}

.sub-step__content {
  padding-left: calc(28px + var(--space-sm));
  margin-top: var(--space-xs);
  color: var(--color-gray-600);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease-out, opacity 0.3s ease-out, margin 0.3s ease-out;
  font-size: var(--text-small);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .sub-step__content {
    padding-left: calc(32px + var(--space-md));
    margin-top: var(--space-sm);
    font-size: var(--text-body);
  }
}

.sub-step.active .sub-step__content {
  max-height: 200px;
  opacity: 1;
  margin-top: var(--space-xs);
}

@media (min-width: 768px) {
  .sub-step.active .sub-step__content {
    margin-top: var(--space-sm);
  }
}

.sub-step.active .sub-step__title {
  color: var(--color-primary);
}

.sub-step:not(.active) {
  opacity: 0.5;
}

.sub-step:not(.active) .sub-step__content {
  margin-top: 0;
}

/* Tab Visual Area */
.tab-content__visual {
  background: var(--color-gray-100);
  border-radius: var(--radius-lg);
  display: none;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .tab-content__visual {
    display: flex;
    border-radius: var(--radius-xl);
  }
}

.tab-content__visual-placeholder {
  color: var(--color-muted);
  font-size: var(--text-small);
  text-align: center;
  width: 100%;
}

.tab-content__visual-placeholder svg {
  width: 100%;
  height: auto;
}

/* Secondary Tab Nav (Editor/Datasets style) */
.secondary-tabs {
  display: flex;
  gap: var(--space-xs);
  background: var(--color-gray-100);
  padding: 4px;
  border-radius: var(--radius-md);
  width: fit-content;
  margin-bottom: var(--space-lg);
}

.secondary-tab {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.secondary-tab.active {
  background: white;
  color: var(--color-charcoal);
  box-shadow: var(--shadow-sm);
}

/* CTA Section */
.cta-section {
  padding: var(--space-xl) 0;
  background: var(--color-primary);
  color: white;
  text-align: center;
}

@media (min-width: 768px) {
  .cta-section {
    padding: var(--space-2xl) 0;
  }
}

.cta-section__title {
  color: white;
  margin-bottom: var(--space-sm);
  font-size: clamp(1.5rem, 5vw, var(--text-headline));
  padding: 0 var(--space-sm);
}

@media (min-width: 768px) {
  .cta-section__title {
    margin-bottom: var(--space-md);
    padding: 0;
  }
}

.cta-section__desc {
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
  margin: 0 auto var(--space-lg);
  font-size: var(--text-small);
  line-height: 1.6;
  padding: 0 var(--space-sm);
}

@media (min-width: 768px) {
  .cta-section__desc {
    margin: 0 auto var(--space-xl);
    font-size: var(--text-body);
    padding: 0;
  }
}

.cta-section .btn--primary {
  background: white;
  color: var(--color-primary);
}

.cta-section .btn--primary:hover,
.cta-section .btn--primary:active {
  background: var(--color-cream);
}

/* Footer */
.footer {
  background: var(--color-charcoal);
  color: white;
  padding: var(--space-2xl) 0 var(--space-xl);
}

@media (min-width: 768px) {
  .footer {
    padding: var(--space-3xl) 0 var(--space-xl);
  }
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg) var(--space-md);
  margin-bottom: var(--space-xl);
}

@media (min-width: 640px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer__grid {
    grid-template-columns: 2fr repeat(4, 1fr);
    margin-bottom: var(--space-2xl);
  }
}

.footer__brand {
  grid-column: 1 / -1;
  margin-bottom: var(--space-md);
}

@media (min-width: 1024px) {
  .footer__brand {
    grid-column: auto;
    margin-bottom: 0;
  }
}

.footer__brand img {
  max-width: 100px;
  height: auto;
}

@media (min-width: 768px) {
  .footer__brand img {
    max-width: 120px;
  }
}

.footer__brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-small);
  margin-top: var(--space-sm);
  max-width: 280px;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .footer__brand p {
    margin-top: var(--space-md);
    max-width: 250px;
  }
}

.footer__col-title {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: white;
}

@media (min-width: 768px) {
  .footer__col-title {
    margin-bottom: var(--space-md);
  }
}

.footer__links {
  list-style: none;
}

.footer__links li {
  margin-bottom: var(--space-xs);
}

.footer__links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-small);
  transition: color 0.2s var(--ease-out);
  display: inline-block;
  padding: 4px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .footer__links a {
    min-height: auto;
    padding: 2px 0;
  }
}

.footer__links a:hover,
.footer__links a:active {
  color: white;
}

.footer__bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer__bottom {
    padding-top: var(--space-xl);
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__copyright {
  color: rgba(255, 255, 255, 0.4);
  font-size: var(--text-small);
}

.footer__legal {
  display: flex;
  gap: var(--space-md);
}

.footer__legal a {
  color: rgba(255, 255, 255, 0.4);
  font-size: var(--text-small);
  transition: color 0.2s var(--ease-out);
  padding: 8px 0;
}

.footer__legal a:hover,
.footer__legal a:active {
  color: white;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-muted); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Mobile Menu Button */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  min-width: 44px;
  min-height: 44px;
  z-index: calc(var(--z-modal) + 10);
  position: relative;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--color-charcoal);
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
  transform-origin: center;
}

/* Hamburger to X animation */
.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hide header actions on mobile */
@media (max-width: 767px) {
  .header__actions {
    display: none;
  }
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.mobile-menu__link {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--color-charcoal);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), color 0.2s;
}

.mobile-menu.open .mobile-menu__link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.open .mobile-menu__link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-menu__link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-menu__link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-menu__link:nth-child(4) { transition-delay: 0.25s; }

.mobile-menu__link:hover,
.mobile-menu__link:active {
  color: var(--color-primary);
}

.mobile-menu__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  max-width: 280px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  transition-delay: 0.3s;
}

.mobile-menu.open .mobile-menu__actions {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu__actions .btn {
  width: 100%;
  justify-content: center;
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

/* Value Props Section */
.value-props {
  padding: var(--space-3xl) 0;
  background: var(--color-warm-white);
}

.value-props__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .value-props__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.value-prop {
  text-align: center;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.value-prop:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: white;
}

.value-prop__number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.value-prop__text {
  font-size: var(--text-small);
  color: var(--color-gray-600);
  line-height: 1.5;
}

/* How It Works Section */
.how-it-works {
  padding: var(--space-3xl) 0;
  padding-top: calc(var(--space-3xl) + 60px);
  background: linear-gradient(to bottom, var(--color-warm-white) 0%, var(--color-cream) 15%, var(--color-cream) 100%);
  position: relative;
}

.how-it-works::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, var(--color-warm-white), transparent);
  pointer-events: none;
}

.how-it-works__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-2xl);
}

@media (min-width: 768px) {
  .how-it-works__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.how-it-works__step {
  position: relative;
  padding: var(--space-lg);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.how-it-works__step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.how-it-works__step-number {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-subhead);
  margin-bottom: var(--space-md);
}

.how-it-works__step-title {
  font-family: var(--font-body);
  font-size: var(--text-body-lg);
  font-weight: 600;
  color: var(--color-charcoal);
  margin-bottom: var(--space-xs);
}

.how-it-works__step-desc {
  font-size: var(--text-small);
  color: var(--color-gray-600);
  line-height: 1.6;
}

/* Connector lines between steps (desktop only) */
@media (min-width: 768px) {
  .how-it-works__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    right: -16px;
    width: 32px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    z-index: 1;
  }
}

/* Frame text overlay styles */
.frame-text h2 {
  font-size: var(--text-headline);
  color: white;
  margin-bottom: var(--space-sm);
}

.frame-text p {
  font-size: var(--text-body-lg);
  color: rgba(255, 255, 255, 0.8);
}

/* Focus styles for accessibility */
.btn:focus-visible,
.tab-nav__item:focus-visible,
.header__nav-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Selection styles */
::selection {
  background: var(--color-primary);
  color: white;
}

/* Smooth scrollbar (webkit) - desktop only */
@media (min-width: 768px) {
  ::-webkit-scrollbar {
    width: 10px;
  }

  ::-webkit-scrollbar-track {
    background: var(--color-gray-100);
  }

  ::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
  }

  ::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-600);
  }
}

/* ================================
   MOBILE-SPECIFIC OPTIMIZATIONS
   ================================ */

/* Safe area insets for notched devices (iPhone X+) */
@supports (padding: env(safe-area-inset-bottom)) {
  .header {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .footer {
    padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
  }

  .mobile-menu {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .scroll-indicator {
    bottom: calc(20px + env(safe-area-inset-bottom));
  }

  @media (min-width: 768px) {
    .scroll-indicator {
      bottom: 30px;
    }
  }
}

/* Prevent text size adjustment on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Improve tap responsiveness */
@media (max-width: 767px) {
  a, button, .btn, .tab-nav__item {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }

  /* Prevent pull-to-refresh on Chrome Android */
  body {
    overscroll-behavior-y: contain;
  }
}

/* Improve image rendering on mobile */
img {
  image-rendering: -webkit-optimize-contrast;
}

/* Fix input zoom on iOS */
@media (max-width: 767px) {
  input, select, textarea {
    font-size: 16px;
  }
}

/* Ensure proper line height on mobile */
@media (max-width: 767px) {
  body {
    line-height: 1.5;
  }

  p {
    line-height: 1.6;
  }
}
