/* ===================================================================
   TWINE DESIGN SYSTEM - Lower Light
   Shared styles for all pages. DO NOT mix with old design language.
   =================================================================== */

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

:root {
  --black: #161616;
  --white: #ffffff;
  --gray-50: rgba(22, 22, 22, 0.04);
  --gray-100: rgba(22, 22, 22, 0.08);
  --gray-200: rgba(22, 22, 22, 0.12);
  --gray-300: rgba(22, 22, 22, 0.16);
  --gray-text: rgba(22, 22, 22, 0.64);
  --gray-muted: rgba(22, 22, 22, 0.4);

  /* Accent colors */
  --accent: #C8553D;
  --accent-light: rgba(200, 85, 61, 0.06);
  --accent-mid: rgba(200, 85, 61, 0.12);
  --accent-hover: rgba(200, 85, 61, 0.8);
  --success: #5B8A5F;
  --success-light: rgba(91, 138, 95, 0.06);
  --success-mid: rgba(91, 138, 95, 0.12);

  --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif: 'Times New Roman', Times, Cambria, Georgia, serif;
}

html { scroll-behavior: smooth; }
@media (max-width: 600px) { html { scroll-behavior: auto; } }

/* Hide nav login button instantly when session exists (prevents flash before JS swaps to avatar) */
html.has-session .nav-login { visibility: hidden; }

body {
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--white);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== UTILITY ===== */
.hidden { display: none !important; }

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 100;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Only animate nav background on desktop — causes flicker on mobile */
@media (min-width: 601px) {
  .nav { transition: background 0.3s, border-color 0.3s; }
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--gray-100);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.4px;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--black);
  transition: opacity 0.2s;
}

.nav-links a:hover { opacity: 0.6; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-login {
  font-size: 14px;
  font-weight: 400;
  color: var(--black);
  transition: opacity 0.2s;
}

.nav-login:hover { opacity: 0.6; }

.nav-cta {
  font-size: 13px;
  height: 34px;
  padding: 0 16px;
  border-radius: 8px;
  white-space: nowrap;
}

/* Nav avatar (logged-in state) */
.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent, #c45e3e);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}
.nav-avatar:hover { opacity: 0.8; }

.nav-profile-wrap {
  position: relative;
}

.nav-profile-hidden {
  visibility: hidden;
  pointer-events: none;
}

.nav-profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 8px 0;
  z-index: 1000;
}

[data-theme="dark"] .nav-profile-dropdown {
  background: #1a1a1a;
}

.nav-profile-dropdown.open {
  display: block;
}

.nav-profile-info {
  padding: 12px 16px;
}

.nav-profile-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--black);
}

.nav-profile-email {
  display: block;
  font-size: 12px;
  color: var(--gray-text);
  margin-top: 2px;
}

.nav-profile-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 4px 0;
}

.nav-profile-link {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--black);
  text-decoration: none;
  transition: background 0.15s;
}

.nav-profile-link:hover {
  background: var(--gray-50);
}

/* Mobile avatar (injected before hamburger, hidden on desktop) */
.nav-avatar-mobile {
  display: none;
  position: relative;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
  white-space: nowrap;
}

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

.btn-primary:hover { opacity: 0.8; }

.btn-secondary {
  background: var(--gray-50);
  color: var(--black);
}

.btn-secondary:hover { background: var(--gray-100); }

.btn-large {
  height: 44px;
  padding: 0 24px;
  font-size: 15px;
}

/* ===== FOCUS-VISIBLE (keyboard accessibility) ===== */
:focus-visible {
  outline: 2px solid var(--accent, #C8553D);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 2px solid var(--accent, #C8553D);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(200, 85, 61, 0.15);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent, #C8553D);
  outline-offset: 0;
}

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--black);
  transition: transform 0.3s;
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 101;
  padding: 24px;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 400;
  border-bottom: 1px solid var(--gray-100);
  transition: opacity 0.2s;
}

.mobile-menu a:hover { opacity: 0.6; }

.mobile-menu .btn {
  margin-top: 16px;
  width: 100%;
  height: 44px;
  font-size: 15px;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 288px 24px 64px;
  text-align: center;
  background: #f0f0f0 url('/images/hero-curves-light.svg') center center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  display: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border-radius: 12px;
  padding: 10px 20px 10px 12px;
  font-size: 13px;
  color: var(--black);
  margin-bottom: 40px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

.hero-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-badge-icon svg { width: 18px; height: 18px; }

.hero-badge-text {
  text-align: left;
  line-height: 1.3;
}

.hero-badge-text strong { display: block; font-weight: 500; }
.hero-badge-text span { color: var(--gray-text); font-size: 12px; }

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 680px;
  margin: 0 auto 24px;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--black);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-ctas {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero-image {
  width: 100%;
  max-width: 800px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.12);
  position: relative;
  z-index: 2;
}

/* ===== SECTION LABEL ===== */
.section-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-text);
}

/* ===== VALUE PROP (3 col) ===== */
.value-section {
  padding: 120px 24px;
}

.value-section .container { max-width: 1200px; }

.value-heading {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 64px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.value-card h3 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
}

.value-card p {
  font-size: 15px;
  color: var(--gray-text);
  line-height: 1.6;
}

/* ===== TESTIMONIALS (horizontal scroll) ===== */
.testimonials-section {
  padding: 80px 0;
  overflow: hidden;
}

.testimonials-section .section-label {
  text-align: center;
  margin-bottom: 48px;
}

.testimonial-track {
  display: flex;
  gap: 16px;
  padding: 0 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.testimonial-track::-webkit-scrollbar { display: none; }

.testimonial-card {
  flex-shrink: 0;
  width: 340px;
  scroll-snap-align: start;
  padding: 24px;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}

.testimonial-avatar {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: var(--gray-100);
  margin-bottom: 20px;
  overflow: hidden;
}

.testimonial-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--gray-text);
  background: linear-gradient(135deg, #e8e4df, #d8d3cc);
}

.testimonial-quote {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  flex: 1;
  margin-bottom: 24px;
}

.testimonial-author {
  font-size: 14px;
  font-weight: 500;
}

.testimonial-role {
  font-size: 13px;
  color: var(--gray-text);
}

/* ===== BIG STATEMENT (scroll reveal) ===== */
.statement-scroll {
  height: 250vh;
  position: relative;
}
@media (max-width: 600px) { .statement-scroll { height: 180vh; } }

.statement-scroll-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.statement-scroll-content {
  text-align: center;
  padding: 0 24px;
  max-width: 780px;
  margin: 0 auto;
}

.statement-lead {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--black);
  margin: 0 0 32px;
  transition: color 0.6s ease;
}

.statement-lead.faded {
  color: #bbb;
}

.statement-punchline {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--black);
  margin: 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.statement-punchline.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Keep old classes for other pages that still use them */
.statement-section {
  padding: 160px 24px;
  text-align: center;
}

.statement-gray {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--gray-text);
  max-width: 720px;
  margin: 0 auto 24px;
}

.statement-black {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--black);
  max-width: 720px;
  margin: 0 auto;
}

/* ===== ICEBERG SCROLL REVEAL ===== */
.iceberg-scroll {
  height: 350vh;
  position: relative;
}
@media (max-width: 600px) { .iceberg-scroll { height: 250vh; } }

.iceberg-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #c8d8e0;
}

.iceberg-image-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.iceberg-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.iceberg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: grayscale(100%);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

@media (min-width: 601px) {
  .iceberg-img { will-change: filter, object-position; }
}

.iceberg-text {
  position: relative;
  z-index: 2;
  text-align: left;
  padding: 0 24px;
  max-width: 900px;
  width: 100%;
}

.iceberg-line1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 12px;
  transition: color 0.5s ease;
}

.iceberg-line1.faded {
  color: rgba(255,255,255,0.4);
}

.iceberg-line2 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 48px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.iceberg-line2.visible {
  opacity: 1;
  transform: translateY(0);
}

.iceberg-hope {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255,255,255,0.9);
  max-width: 440px;
  margin-left: auto;
  margin-right: 0;
  text-align: left;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
}

.iceberg-hope.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PRODUCT CARDS (3 col) ===== */
.products-section {
  padding: 120px 24px;
}

.products-section .container { max-width: 1200px; }

.products-heading {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 560px;
  margin-bottom: 64px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.product-card {
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.product-card:hover { border-color: var(--gray-300); }

.product-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #f2eee7, #e7e2d9);
  border-radius: 12px;
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-card-image-inner {
  width: 80%;
  height: 70%;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.product-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-text);
  margin-bottom: 12px;
}

.product-card h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.product-card p {
  font-size: 14px;
  color: var(--gray-text);
  line-height: 1.6;
  margin-bottom: 24px;
  flex: 1;
}

.product-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}

.product-link:hover { opacity: 0.6; }

/* ===== HOW IT WORKS (2-col sticky) ===== */
.how-section {
  padding: 120px 24px;
}

.how-section .container { max-width: 1200px; }

.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.how-visual {
  background: linear-gradient(145deg, #ece8e2, #e0dbd5);
  border-radius: 20px;
  aspect-ratio: 1 / 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: sticky;
  top: 96px;
}

.how-visual-inner {
  width: 100%;
  height: 100%;
  background: #050F2A;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.how-visual-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.how-visual-logo.active {
  opacity: 1;
}

.how-vis-bar {
  height: 12px;
  border-radius: 6px;
  background: var(--gray-100);
}

.how-vis-bar.w40 { width: 40%; }
.how-vis-bar.w70 { width: 70%; }
.how-vis-bar.w55 { width: 55%; }

.how-vis-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
}

.how-vis-card {
  border-radius: 8px;
  background: var(--gray-50);
  padding: 12px;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 80px;
  padding: 40px 0;
}

.how-step-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-text);
  margin-bottom: 12px;
}

.how-step h3 {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.how-step p {
  font-size: 16px;
  color: var(--gray-text);
  line-height: 1.6;
  max-width: 420px;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 160px 24px;
  text-align: center;
}

.cta-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  max-width: 700px;
  margin: 0 auto 32px;
}

.cta-section p {
  font-size: 17px;
  color: var(--gray-text);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* ===== FAQ ===== */
.faq-section {
  padding: 120px 24px;
}

.faq-section .container { max-width: 720px; }

.faq-heading {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 48px;
}

.faq-item {
  border-bottom: 1px solid var(--gray-100);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  color: var(--black);
  transition: opacity 0.2s;
}

.faq-question:hover { opacity: 0.6; }

.faq-question .icon {
  font-size: 18px;
  color: var(--gray-text);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.active .faq-question .icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 0 20px;
  font-size: 15px;
  color: var(--gray-text);
  line-height: 1.6;
}

/* ===== DISCLAIMER BAR ===== */
.disclaimer-bar {
  padding: 24px;
  background: var(--gray-50, #F9FAFB);
  border-top: 1px solid var(--gray-100, #E5E7EB);
}
.disclaimer-bar p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 12px;
  line-height: 1.6;
  color: var(--gray-muted, #6B7280);
  text-align: center;
}
[data-theme="dark"] .disclaimer-bar {
  background: rgba(255,255,255,0.02);
  border-top-color: rgba(255,255,255,0.06);
}

/* ===== SHOPPING CART ===== */
.cart-nav-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  padding: 0;
  transition: opacity 0.2s;
}
.cart-nav-btn:hover { opacity: 0.6; }

.cart-badge {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 18px;
  height: 18px;
  background: var(--black);
  color: var(--white);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}
[data-theme="dark"] .cart-badge {
  background: var(--white);
  color: var(--black);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 90vw;
  background: var(--white);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
}
.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
}
.cart-drawer-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.cart-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.15s;
}
.cart-close-btn:hover {
  background: var(--gray-50);
}

.cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--gray-muted);
}
.cart-empty p {
  margin-bottom: 16px;
  font-size: 15px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-50);
}
.cart-item:last-child {
  border-bottom: none;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cart-item-name {
  font-size: 15px;
  font-weight: 500;
}
.cart-item-price {
  font-size: 14px;
  color: var(--gray-muted);
}

.cart-item-remove {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: var(--gray-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.cart-item-remove:hover {
  background: var(--gray-50);
  color: var(--black);
}

.cart-drawer-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--gray-100);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.cart-savings {
  font-size: 13px;
  color: var(--gray-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.cart-checkout-btn {
  width: 100%;
}

/* "Add to Cart" buttons on solutions page */
.cart-add-btn {
  margin-top: 8px;
  font-size: 14px;
  height: 40px;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  background: transparent;
  color: var(--black);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-weight: 500;
}
.cart-add-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}
.cart-add-btn.cart-btn-added {
  background: var(--gray-50);
  color: var(--gray-muted);
  cursor: default;
}
.cart-add-btn.cart-btn-owned {
  background: transparent;
  color: var(--black);
  border-color: var(--gray-200);
  cursor: pointer;
}
.cart-add-btn.cart-btn-owned:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

/* ===== FOOTER ===== */
.footer {
  padding: 80px 24px 40px;
  border-top: 1px solid var(--gray-100);
}

.footer .container { max-width: 1200px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 18px;
  margin-bottom: 12px;
}

.footer-brand-desc {
  font-size: 14px;
  color: var(--gray-text);
  line-height: 1.6;
  max-width: 240px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-text);
  margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  font-size: 14px;
  color: var(--black);
  transition: opacity 0.2s;
}

.footer-col a:hover { opacity: 0.6; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--gray-100);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--gray-muted);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 13px;
  color: var(--gray-muted);
  transition: color 0.2s;
}

.footer-legal a:hover { color: var(--black); }

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (min-width: 601px) {
  .reveal { will-change: opacity, transform; }
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reveal-delay-1,
  .reveal-delay-2,
  .reveal-delay-3,
  .reveal-delay-4 {
    transition-delay: 0s;
  }
}

/* ===== PAGE TRANSITION ===== */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white, #ffffff);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.page-transition.fade-visible {
  opacity: 1;
}

/* Dark mode page transition */
[data-theme="dark"] .page-transition {
  background: #111111;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .page-transition {
    background: #111111;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-login { display: none; }
  .hamburger { display: flex; }

  /* On mobile: hide nav-right entirely, show mobile theme toggle + mobile avatar */
  .nav-right {
    display: none;
  }
  .theme-toggle-mobile {
    display: inline-flex !important;
    margin-left: auto;
  }
  .nav-avatar-mobile {
    display: inline-flex !important;
    margin-left: auto;
  }
  .nav-avatar-mobile ~ .theme-toggle-mobile {
    margin-left: 8px;
  }

  .value-grid { grid-template-columns: 1fr; gap: 32px; }

  .how-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .how-visual {
    position: relative;
    top: 0;
    aspect-ratio: 4 / 3;
  }

  .products-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* ===== LEGAL / TEXT PAGES ===== */
.legal-page {
  padding: 140px 24px 80px;
}

.legal-page .container { max-width: 720px; }

.legal-page h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.legal-meta {
  font-size: 13px;
  color: var(--gray-muted);
  margin-bottom: 48px;
}

.legal-page h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 40px 0 12px;
}

.legal-page h2:first-of-type {
  margin-top: 0;
}

.legal-page h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 8px;
}

.legal-page p {
  font-size: 15px;
  color: var(--gray-text);
  line-height: 1.75;
  margin-bottom: 12px;
}

.legal-page ul {
  margin: 8px 0 16px;
}

.legal-page li {
  font-size: 15px;
  color: var(--gray-text);
  line-height: 1.7;
  padding: 4px 0 4px 20px;
  position: relative;
}

.legal-page li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-200);
}

.legal-page li strong {
  color: var(--black);
  font-weight: 500;
}

.legal-page a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page a:hover {
  opacity: 0.6;
}

/* ===== 404 PAGE ===== */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 160px 24px 80px;
}

.error-page h1 {
  font-family: var(--font-serif);
  font-size: clamp(64px, 10vw, 96px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}

.error-page h2 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.error-page p {
  font-size: 16px;
  color: var(--gray-text);
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 28px;
}

@media (max-width: 600px) {
  .hero { padding: 144px 20px 40px; }
  .hero::before, .hero::after { display: none; }
  .hero h1 { font-size: 32px; }
  .hero-image { aspect-ratio: auto; }
  .testimonial-card { width: 290px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ===================================================================
   DARK MODE
   Auto-detects system preference via prefers-color-scheme.
   Can be manually overridden with data-theme="dark" or data-theme="light"
   on the <html> element.
   =================================================================== */

/* ----- Dark mode token overrides (shared) ----- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --black: #E8E8E8;
    --white: #111111;
    --gray-50: rgba(255, 255, 255, 0.04);
    --gray-100: rgba(255, 255, 255, 0.08);
    --gray-200: rgba(255, 255, 255, 0.12);
    --gray-300: rgba(255, 255, 255, 0.16);
    --gray-text: rgba(255, 255, 255, 0.64);
    --gray-muted: rgba(255, 255, 255, 0.4);

    --accent: #C8553D;
    --accent-light: rgba(200, 85, 61, 0.1);
    --accent-mid: rgba(200, 85, 61, 0.18);

    --success: #5B8A5F;
    --success-light: rgba(91, 138, 95, 0.1);
    --success-mid: rgba(91, 138, 95, 0.15);
  }

  /* Body */
  :root:not([data-theme="light"]) body {
    background: #111111;
  }

  /* Nav scrolled */
  :root:not([data-theme="light"]) .nav.scrolled {
    background: rgba(17, 17, 17, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  /* Mobile menu */
  :root:not([data-theme="light"]) .mobile-menu {
    background: #111111;
  }

  /* Buttons */
  :root:not([data-theme="light"]) .btn-primary {
    background: #ffffff;
    color: #111111;
  }

  :root:not([data-theme="light"]) .btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #E8E8E8;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  :root:not([data-theme="light"]) .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  /* Statement scroll */
  :root:not([data-theme="light"]) .statement-lead { color: #fff; }
  :root:not([data-theme="light"]) .statement-lead.faded { color: #444; }
  :root:not([data-theme="light"]) .statement-punchline { color: #fff; }

  /* Iceberg */
  :root:not([data-theme="light"]) .iceberg-sticky { background: #1a2a35; }
  :root:not([data-theme="light"]) .iceberg-image-wrap::after { background: rgba(0, 0, 0, 0.45); }

  /* Hero */
  :root:not([data-theme="light"]) .hero {
    background: #181818 url('/images/hero-curves-dark.svg') center center / cover no-repeat;
  }

  :root:not([data-theme="light"]) .hero::before {
    background: radial-gradient(ellipse at center, #1a1a1a 0%, #1a1a1a 40%, transparent 70%);
    box-shadow: 0 -40px 100px rgba(0, 0, 0, 0.2);
  }

  :root:not([data-theme="light"]) .hero::after {
    background: radial-gradient(ellipse at center, #1a1a1a 0%, #1a1a1a 35%, transparent 68%);
    box-shadow: 0 -30px 80px rgba(0, 0, 0, 0.15);
  }

  :root:not([data-theme="light"]) .hero-badge {
    background: #1A1A1A;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  :root:not([data-theme="light"]) .hero-badge-icon {
    background: #E8E8E8;
  }

  :root:not([data-theme="light"]) .hero-image {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.08);
  }

  /* Testimonial cards */
  :root:not([data-theme="light"]) .testimonial-card {
    background: #1A1A1A;
    border-color: rgba(255, 255, 255, 0.08);
  }

  :root:not([data-theme="light"]) .testimonial-avatar-placeholder {
    background: linear-gradient(135deg, #2a2a2a, #222222);
  }

  /* Product cards */
  :root:not([data-theme="light"]) .product-card {
    background: #1A1A1A;
    border-color: rgba(255, 255, 255, 0.08);
  }

  :root:not([data-theme="light"]) .product-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
  }

  :root:not([data-theme="light"]) .product-card-image {
    background: linear-gradient(145deg, #222222, #1e1e1e);
  }

  :root:not([data-theme="light"]) .product-card-image-inner {
    background: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  /* How it works */
  :root:not([data-theme="light"]) .how-visual {
    background: linear-gradient(145deg, #222222, #1c1c1c);
  }

  :root:not([data-theme="light"]) .how-visual-inner {
    background: #050F2A;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  }

  /* Footer */
  :root:not([data-theme="light"]) .footer {
    background: #0D0D0D;
    border-top-color: rgba(255, 255, 255, 0.06);
  }

  :root:not([data-theme="light"]) .footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.06);
  }

  :root:not([data-theme="light"]) .footer-legal a:hover {
    color: #E8E8E8;
  }

  /* FAQ */
  :root:not([data-theme="light"]) .faq-item {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  /* Legal pages */
  :root:not([data-theme="light"]) .legal-page li::before {
    background: rgba(255, 255, 255, 0.12);
  }

  /* Inputs & forms (generic) */
  :root:not([data-theme="light"]) input,
  :root:not([data-theme="light"]) textarea,
  :root:not([data-theme="light"]) select {
    background: #1A1A1A;
    border-color: rgba(255, 255, 255, 0.12);
    color: #E8E8E8;
  }

  :root:not([data-theme="light"]) input::placeholder,
  :root:not([data-theme="light"]) textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
  }

  :root:not([data-theme="light"]) input:focus,
  :root:not([data-theme="light"]) textarea:focus,
  :root:not([data-theme="light"]) select:focus {
    border-color: rgba(255, 255, 255, 0.24);
    outline: none;
  }
}

/* ----- Manual toggle: data-theme="dark" ----- */
[data-theme="dark"] {
  --black: #E8E8E8;
  --white: #111111;
  --gray-50: rgba(255, 255, 255, 0.04);
  --gray-100: rgba(255, 255, 255, 0.08);
  --gray-200: rgba(255, 255, 255, 0.12);
  --gray-300: rgba(255, 255, 255, 0.16);
  --gray-text: rgba(255, 255, 255, 0.64);
  --gray-muted: rgba(255, 255, 255, 0.4);

  --accent: #C8553D;
  --accent-light: rgba(200, 85, 61, 0.1);
  --accent-mid: rgba(200, 85, 61, 0.18);

  --success: #5B8A5F;
  --success-light: rgba(91, 138, 95, 0.1);
  --success-mid: rgba(91, 138, 95, 0.15);
}

[data-theme="dark"] body {
  background: #111111;
}

[data-theme="dark"] .nav.scrolled {
  background: rgba(17, 17, 17, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .mobile-menu {
  background: #111111;
}

[data-theme="dark"] .btn-primary {
  background: #ffffff;
  color: #111111;
}

[data-theme="dark"] .btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #E8E8E8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .statement-lead {
  color: var(--white, #fff);
}

[data-theme="dark"] .statement-lead.faded {
  color: #444;
}

[data-theme="dark"] .statement-punchline {
  color: var(--white, #fff);
}

[data-theme="dark"] .iceberg-sticky { background: #1a2a35; }
[data-theme="dark"] .iceberg-image-wrap::after { background: rgba(0, 0, 0, 0.45); }

[data-theme="dark"] .hero {
  background: #181818 url('/images/hero-curves-dark.svg') center center / cover no-repeat;
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(ellipse at center, #1a1a1a 0%, #1a1a1a 40%, transparent 70%);
  box-shadow: 0 -40px 100px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .hero::after {
  background: radial-gradient(ellipse at center, #1a1a1a 0%, #1a1a1a 35%, transparent 68%);
  box-shadow: 0 -30px 80px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .hero-badge {
  background: #1A1A1A;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .hero-badge-icon {
  background: #E8E8E8;
}

[data-theme="dark"] .hero-image {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .testimonial-card {
  background: #1A1A1A;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .testimonial-avatar-placeholder {
  background: linear-gradient(135deg, #2a2a2a, #222222);
}

[data-theme="dark"] .product-card {
  background: #1A1A1A;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .product-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] .product-card-image {
  background: linear-gradient(145deg, #222222, #1e1e1e);
}

[data-theme="dark"] .product-card-image-inner {
  background: #2a2a2a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .how-visual {
  background: linear-gradient(145deg, #222222, #1c1c1c);
}

[data-theme="dark"] .how-visual-inner {
  background: #050F2A;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .footer {
  background: #0D0D0D;
  border-top-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .footer-bottom {
  border-top-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .footer-legal a:hover {
  color: #E8E8E8;
}

[data-theme="dark"] .faq-item {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .legal-page li::before {
  background: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #1A1A1A;
  border-color: rgba(255, 255, 255, 0.12);
  color: #E8E8E8;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  border-color: rgba(255, 255, 255, 0.24);
  outline: none;
}
