/* ============================================
   MLex Landing Page — Design System & Styles
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Charis+SIL:ital@1&family=Manrope:wght@400;500;600;700;800&display=swap');

/* --- Design Tokens --- */
:root {
  --color-gold: #E0B85A;
  --color-gold-dark: #A38644;
  --color-cream: #F2F1ED;
  --color-cream-light: #FAEDD5;
  --color-dark: #15191E;
  --color-dark-blue: #212B36;
  --color-teal: #3A536B;
  --color-wine: #7A2E3A;
  --color-gray: #71716F;
  --color-slate: #99A5B2;

  --font-serif: 'Charis SIL', Georgia, serif;
  --font-sans: 'Manrope', system-ui, sans-serif;

  --section-px: 8.333vw;
  /* ~120px at 1440 */
  --section-px-narrow: 13.889vw;
  /* ~200px at 1440 */
}

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

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

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

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

ul,
ol {
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Typography --- */
.heading-xl {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 1.2px;
  font-size: clamp(2rem, 3.889vw, 3.5rem);
  line-height: 1.05;
}

.heading-lg {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 1.2px;
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 1.15;
}

.heading-md {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 1.2px;
  font-size: clamp(1.75rem, 2.6vw, 2.375rem);
  line-height: 1.2;
}

.text-body {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(0.875rem, 1.1vw, 1rem);
  line-height: 1.7;
}

.text-subtitle {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(1rem, 1.5vw, 1.375rem);
  line-height: 1.5;
}

/* --- Tag Component --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.tag__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* --- Button --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 2rem;
  background: var(--color-gold);
  color: var(--color-dark);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(0.875rem, 1.1vw, 1.125rem);
  border-radius: 0.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 2rem rgba(224, 184, 90, 0.3);
  background: #ecc76a;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-gold);
  color: var(--color-dark-blue);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.25rem 1rem rgba(224, 184, 90, 0.25);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--color-cream-light);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(250, 237, 213, 0.3);
  transition: border-color 0.25s ease, background 0.25s ease;
  cursor: pointer;
}

.btn-outline:hover {
  border-color: var(--color-cream-light);
  background: rgba(250, 237, 213, 0.05);
}

.btn-outline-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--color-gold);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  border: 1.5px solid var(--color-gold);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}

.btn-outline-gold:hover {
  background: var(--color-gold);
  color: var(--color-dark-blue);
  transform: translateY(-2px);
}

.btn-outline-gold img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  transition: filter 0.25s ease;
}

.btn-outline-gold:hover img {
  filter: brightness(0);
}

/* ============================================
   NAVIGATION HEADER
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--section-px);
  z-index: 1000;
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.nav.scrolled {
  background: rgba(21, 25, 30, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav__logo {
  height: 2rem;
  width: auto;
}

.nav__logo svg {
  height: 100%;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.875rem;
  color: var(--color-cream);
  transition: color 0.2s ease;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: width 0.3s ease;
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__link:hover {
  color: var(--color-gold);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4.167vw;
  min-height: 100vh;
  padding: 6.944vw var(--section-px);
  background: var(--color-dark-blue);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero__bg-img,
.hero__bg-filter,
.hero__bg-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__bg-filter {
  background: var(--color-dark-blue);
  /* Use a slightly transparent overlay if the image is meant to show through, 
     but Penpot had opacity: 1 for the color filter? Wait! If opacity is 1, the image is hidden!
     Let's use 0.85 so we can see the image! */
  opacity: 0.85;
}

.hero__bg-pattern {
  background-image: url('assets/bg-tinysquares.jpg');
  background-repeat: repeat;
  mix-blend-mode: multiply;
  opacity: 0.5;
  /* Default subtle opacity if Penpot didn't specify */
}

.hero__left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2.5rem;
  max-width: 36rem;
  z-index: 2;
}

.hero__title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero .tag {
  color: var(--color-gold);
}

.hero__tag {
  display: inline-flex;
  border: 1px solid rgba(224, 184, 90, 0.45);
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  backdrop-filter: blur(4px);
  background: rgba(33, 43, 54, 0.35);
  letter-spacing: 0.2em;
  font-size: 0.8rem;
}

.hero__h1 {
  color: var(--color-cream);
}

.hero__subtitle {
  color: var(--color-cream);
  font-weight: 600;
  font-size: clamp(1rem, 1.5vw, 1.375rem);
  line-height: 1.5;
  opacity: 0.9;
}

.hero__right {
  flex: 0 1 39.583vw;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.hero__illustration {
  width: 100%;
  max-width: 35.625rem;
  height: auto;
}

.hero__divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 3;
}

.hero__divider svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ============================================
   VALUE PROPOSITION 1
   ============================================ */
.value-prop {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 4.167vw;
  padding: 8.333vw var(--section-px);
  background: var(--color-teal);
  overflow: hidden;
}

/* Moved pattern to value-prop__visual::before */

.value-prop__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.value-prop__h2 {
  color: var(--color-gold);
}

.value-prop__text {
  color: var(--color-cream);
  font-weight: 500;
  font-size: clamp(0.875rem, 1.1vw, 1rem);
  line-height: 1.8;
}

.value-prop__visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.value-prop__visual::before {
  content: "";
  position: absolute;
  bottom: -20%;
  right: -20%;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(var(--color-gold) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  opacity: 0.35;
  z-index: 1;
  pointer-events: none;
}

.value-prop__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-width: 40rem;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 2;
  display: block;
  object-fit: cover;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services {
  display: flex;
  flex-direction: column;
  gap: 3.333vw;
  padding: 6.944vw var(--section-px-narrow);
  background: var(--color-cream);
}

.services__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.services .tag {
  color: var(--color-gold-dark);
}

.services__h2 {
  color: var(--color-wine);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  /* 40px */
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  /* 16px */
  padding: 2.5rem;
  /* 40px */
  background: #ffffff;
  border: 1px solid var(--color-gold);
  border-radius: 2px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.05);
}

.feature-card__icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: #FAEDD5;
  color: var(--color-dark-blue);
}

.feature-card__icon svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.feature-card__title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(0.95rem, 1.25vw, 1.125rem);
  color: var(--color-wine);
}

.feature-card__desc {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-gray);
  line-height: 1.6;
}

/* ============================================
   VALUE PROPOSITION 2 (SOCIAL PROOF)
   ============================================ */
.social-proof {
  position: relative;
  /* For tinysquare */
  display: flex;
  align-items: center;
  gap: 5.555vw;
  /* 80px */
  padding: 8.333vw var(--section-px);
  background: var(--color-teal);
  /* Do not use overflow: hidden if we want the tinysquare to bleed into CTA,
     but we might need it for clean edges. Let's keep it visible at the bottom. */
}

/* BOUNDARY WRAPPER (For bg-tinysquare) */
.section-boundary-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  z-index: 5;
  /* Ensure it sits on top of both sections */
}

.bg-tinysquare-overlay {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-50%);
  width: 45vw;
  max-width: 650px;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.social-proof__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.social-proof__h2 {
  color: var(--color-gold);
}

.social-proof__text {
  color: var(--color-cream);
  font-weight: 500;
  font-size: clamp(0.875rem, 1.1vw, 1rem);
  line-height: 1.8;
}

.social-proof__metrics {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  padding: 1.5rem 0;
  flex-wrap: wrap;
}

.metric--card {
  flex: 1;
  min-width: 120px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.metric__number {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.5rem, 2.2vw, 2.5rem);
  color: var(--color-cream);
  line-height: 1;
  white-space: nowrap;
}

.metric__label {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--color-cream);
  opacity: 0.9;
  line-height: 1.4;
}

/* CAROUSEL */
.social-proof__carousel {
  flex: 1;
  position: relative;
  z-index: 2;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
  background: #2a3c4e;
  /* Placeholder dark gray/teal */
}

.carousel__viewport {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.carousel__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel__slide {
  min-width: 100%;
  height: 100%;
}

.carousel__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel__controls {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 10;
}

.carousel__btn {
  background: var(--color-gold);
  border: none;
  color: var(--color-dark-blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel__btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.carousel__btn svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
}

/* ============================================
   FINAL CTA SECTION
   ============================================ */
.cta-section {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4.444vw;
  padding: 7.222vw var(--section-px);
  background: var(--color-wine);
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  width: 300px;
  height: 300px;
  background-image: radial-gradient(var(--color-gold) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  opacity: 0.35;
  z-index: 1;
  pointer-events: none;
}

.cta-section__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.cta-section__h2 {
  color: var(--color-gold);
}

.cta-section__text {
  color: var(--color-cream);
  font-weight: 500;
  font-size: clamp(0.875rem, 1.1vw, 1rem);
  line-height: 1.8;
}

.cta-section__visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.cta-section__img {
  width: 100%;
  min-width: 480px;
  max-width: 35rem;
  min-height: 334px;
  height: auto;
  object-fit: cover;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 3.333vw;
  padding: 6.944vw var(--section-px-narrow);
  background: var(--color-cream);
}

.faq__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.faq__header::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 2px;
  background: var(--color-gold);
  border-radius: 2px;
  margin-top: 0.25rem;
}

.faq__h2 {
  color: var(--color-wine);
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  /* 12px gap in Penpot */
}

.faq-item {
  background: #ffffff;
  border: 1px solid #bcbcb9;
  border-radius: 2px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.5rem;
  /* 24px padding in Penpot */
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(0.95rem, 1.25vw, 1.125rem);
  color: var(--color-wine);
  text-align: left;
  transition: color 0.2s ease;
}

.faq-item__question:hover {
  color: var(--color-wine);
}

.faq-item__icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 0.35s ease;
  color: var(--color-wine);
}

.faq-item.open .faq-item__icon {
  transform: rotate(45deg);
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  opacity: 0;
}

.faq-item.open .faq-item__answer {
  max-height: 20rem;
  border-top: 1px solid #e8e7e3;
  opacity: 1;
}

.faq-item__answer-inner {
  padding: 1rem 1.5rem 1.5rem 1.5rem;
  /* 24px bottom/sides, 16px top (gap) */
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-gray);
  line-height: 1.7;
}

/* --- FAQ Ebook Banner --- */
.ebook-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4.5rem;
  padding: 3rem;
  background: var(--color-wine);
  border: 2px solid var(--color-slate);
  /* Hex #697b8e */
  border-radius: 0.75rem;
  /* 12px */
  margin-top: 2rem;
  overflow: hidden;
  position: relative;
}

.ebook-banner::before {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 300px;
  height: 300px;
  background-image: radial-gradient(var(--color-gold) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
}

.ebook-banner__left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.ebook-banner__content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ebook-banner__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 1.2px;
  font-size: clamp(1.5rem, 2.3vw, 2.125rem);
  color: var(--color-gold);
  line-height: 1.25;
}

.ebook-banner__text {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-cream);
  opacity: 0.9;
}

.ebook-banner__image {
  flex-shrink: 0;
  width: 16rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.ebook-banner__cover {
  width: 100%;
  height: auto;
  border-radius: 4px 8px 8px 4px;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease;
}

.ebook-banner:hover .ebook-banner__cover {
  transform: rotate(-3deg) scale(1.05);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-teal);
  padding: 4rem var(--section-px) 2rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  border-top: 5px solid var(--color-gold);
}

.footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

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

.footer__logo {
  height: 1.75rem;
  width: auto;
}

.footer__logo svg {
  height: 100%;
  width: auto;
}

.footer__tagline {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-cream);
  max-width: 24rem;
}

.footer__links {
  display: flex;
  gap: 1rem;
}

.footer__divider {
  height: 1px;
  background: rgba(242, 241, 237, 0.12);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__copyright {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-slate);
}

.footer__studio {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-slate);
}

/* ============================================
   MODAL (LEAD CAPTURE)
   ============================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(21, 25, 30, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal {
  background: var(--color-cream);
  width: 100%;
  max-width: 32rem;
  border-radius: 1rem;
  padding: 2.5rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.2);
}

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

.modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2rem;
  height: 2rem;
  color: var(--color-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 10;
}

.modal__close:hover {
  color: var(--color-wine);
}

.modal__header {
  margin-bottom: 2rem;
}

.modal__eyebrow {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold-dark);
  margin-bottom: 0.5rem;
}

.modal__title {
  color: var(--color-wine);
  margin-bottom: 0.75rem;
  font-size: clamp(1.5rem, 2vw, 1.75rem) !important;
}

.modal__subtitle {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-gray);
  line-height: 1.5;
}

/* Form Styles */
.modal__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-dark-blue);
}

.form-required {
  color: var(--color-wine);
}

.form-optional {
  font-weight: 500;
  color: var(--color-slate);
  font-size: 0.8rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-slate);
  border-radius: 0.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-dark);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-gold-dark);
  box-shadow: 0 0 0 3px rgba(224, 184, 90, 0.2);
}

.form-input.is-invalid {
  border-color: var(--color-wine);
}

.form-input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(122, 46, 58, 0.15);
}

.form-error {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-wine);
  font-weight: 600;
  min-height: 1.2rem;
  display: none;
}

.form-error.visible {
  display: block;
}

/* Submit Button & States */
.modal__submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
  position: relative;
}

.btn-submit__spinner {
  display: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(21, 25, 30, 0.2);
  border-top-color: var(--color-dark);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
}

.modal__submit.loading .btn-submit__text {
  visibility: hidden;
}

.modal__submit.loading .btn-submit__spinner {
  display: block;
}

.modal__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.modal__privacy {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--color-slate);
  text-align: center;
}

/* Success View */
.modal__form-view[hidden],
.modal__success-view[hidden] {
  display: none !important;
}

.modal__success-view {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
}

.success__icon-wrap {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1.5rem;
  color: #10B981;
  /* Green */
}

.success__circle {
  stroke: currentColor;
  stroke-width: 2;
  fill: rgba(16, 185, 129, 0.1);
}

.success__check {
  stroke: currentColor;
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
}

.modal-backdrop.open .success__check {
  animation: drawCheck 0.5s ease-out forwards 0.2s;
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

.success__title {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--color-dark-blue);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.success__message {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-gray);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.success__close-btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 2.5rem;
}

/* Mini Ebook Banner */
.mini-ebook-banner {
  background: var(--color-wine);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-align: left;
  border: 1px solid var(--color-slate);
}

.mini-ebook-banner__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.mini-ebook-banner__label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold);
}

.mini-ebook-banner__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-cream);
  line-height: 1.2;
}

.mini-ebook-banner__desc {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-cream);
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.mini-ebook-banner__btn {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.mini-ebook-banner__btn:hover {
  color: var(--color-cream);
}

.mini-ebook-banner__img {
  width: 4.5rem;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(2rem);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-1rem);
  }

  100% {
    transform: translateY(0);
  }
}

.hero__illustration {
  opacity: 0;
  animation: slideInRight 1s ease-out forwards, float 5s ease-in-out infinite 1s;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   HAMBURGER BUTTON (hidden on desktop)
   ============================================ */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  z-index: 1100;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-cream-light);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* X animation when open */
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   RESPONSIVE — Tablet (breakpoint: 1024px)
   ============================================ */
@media (max-width: 64rem) {
  .social-proof {
    flex-direction: column;
  }

  .social-proof__info {
    max-width: 100%;
  }

  .social-proof__carousel {
    width: 100%;
  }

  .cta-section {
    flex-direction: column;
    text-align: center;
  }

  .cta-section__content {
    align-items: center;
  }

  .cta-section__img {
    min-width: unset;
    width: 100%;
    max-width: 28rem;
  }
}

/* ============================================
   RESPONSIVE — Mobile (breakpoint: 768px)
   ============================================ */
@media (max-width: 48rem) {

  /* --- Tokens --- */
  :root {
    --section-px: 1.25rem;
    --section-px-narrow: 1.25rem;
  }

  /* --- Global touch targets --- */
  .btn-primary,
  .btn-secondary,
  .btn-outline,
  .btn-outline-gold,
  .nav__link,
  .carousel__btn,
  .faq-item__question,
  .mini-ebook-banner__btn {
    min-height: 48px;
  }

  /* --- Navigation --- */
  .nav {
    padding: 0 1.25rem;
    height: 4rem;
  }

  .nav__hamburger {
    display: flex;
  }

  .nav__links {
    /* Off-canvas drawer */
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(75vw, 18rem);
    background: var(--color-dark-blue);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
    padding: 5rem 1.75rem 2rem;
    transform: translateX(110%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    box-shadow: -0.5rem 0 2rem rgba(0,0,0,0.4);
    display: flex; /* always flex, hidden via transform */
  }

  .nav__links.open {
    transform: translateX(0);
  }

  .nav__link {
    font-size: 1rem;
    font-weight: 700;
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
  }

  .nav__links .btn-secondary {
    margin-top: 1.5rem;
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  /* --- Hero --- */
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 7rem 1.25rem 3rem;
    min-height: auto;
    gap: 2rem;
  }

  .hero__left {
    align-items: center;
    max-width: 100%;
    order: 1;
    gap: 1.5rem;
  }

  .hero__right {
    flex: none;
    width: 85%;
    max-width: 22rem;
    order: 2;
    margin: 0 auto;
  }

  .hero__h1 {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }

  .hero__subtitle {
    font-size: 0.95rem;
  }

  .hero__divider {
    display: none;
  }

  .hero__tag {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
  }

  /* --- Value Proposition --- */
  .value-prop {
    flex-direction: column;
    padding: 3.5rem 1.25rem;
    gap: 2rem;
  }

  .value-prop__visual {
    display: none;
  }

  /* --- Services --- */
  .services {
    padding: 3rem 1.25rem;
    gap: 2rem;
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .services__h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .feature-card {
    padding: 1.5rem;
  }

  /* --- Social Proof --- */
  .social-proof {
    flex-direction: column;
    padding: 3rem 1.25rem;
    gap: 2rem;
  }

  .social-proof__info {
    max-width: 100%;
    text-align: center;
  }

  .social-proof__h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .social-proof__metrics {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .metric--card {
    flex: 1 1 calc(50% - 0.75rem);
    min-width: 120px;
    padding: 1rem;
    text-align: center;
    align-items: center;
  }

  .social-proof__carousel {
    width: 100%;
    border-radius: 0.5rem;
  }

  /* --- CTA Section --- */
  .cta-section {
    flex-direction: column;
    padding: 3rem 1.25rem;
    gap: 2rem;
    text-align: center;
  }

  .cta-section__content {
    align-items: center;
    order: 1;
  }

  .cta-section__visual {
    display: none;
  }

  .cta-section__h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .cta-section::before {
    width: 180px;
    height: 180px;
  }

  /* --- FAQ --- */
  .faq {
    padding: 3rem 1.25rem;
    gap: 1.5rem;
  }

  .faq__h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .faq-item__question {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    min-height: 56px;
  }

  .faq-item__answer-inner {
    padding: 0.75rem 1.25rem 1.25rem;
    font-size: 0.9rem;
  }

  /* --- Ebook Banner --- */
  .ebook-banner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    padding: 2rem 1.25rem;
  }

  .ebook-banner__left {
    align-items: center;
    text-align: center;
  }

  .ebook-banner__image {
    width: 10rem;
  }

  .ebook-banner::before {
    width: 160px;
    height: 160px;
  }

  /* --- Footer --- */
  .footer {
    padding: 3rem 1.25rem 2rem;
    gap: 2rem;
  }

  .footer__top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .footer__brand {
    align-items: center;
  }

  .footer__links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .btn-outline-gold {
    flex: 1;
    justify-content: center;
    min-height: 48px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    align-items: center;
  }

  /* --- Modal --- */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-width: 100%;
    width: 100%;
    border-radius: 1.25rem 1.25rem 0 0;
    padding: 2rem 1.25rem 2.5rem;
    max-height: 92dvh;
    /* dvh accounts for virtual keyboard */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(100%);
  }

  .modal-backdrop.open .modal {
    transform: translateY(0);
  }

  .modal__title {
    font-size: 1.35rem !important;
  }

  .modal__submit {
    min-height: 52px;
    font-size: 1rem;
  }

  .form-input {
    font-size: 1rem;
    /* Prevents iOS zoom on focus */
    padding: 0.75rem 0.875rem;
    min-height: 48px;
  }

  /* --- Mini Ebook Banner (modal success) --- */
  .mini-ebook-banner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1.25rem;
  }

  .mini-ebook-banner__content {
    align-items: center;
  }

  /* --- Section boundary (decorative) --- */
  .section-boundary-wrapper {
    display: none;
  }
}

/* ============================================
   RESPONSIVE — Small Mobile (breakpoint: 400px)
   ============================================ */
@media (max-width: 25rem) {
  .hero__h1 {
    font-size: 1.6rem;
  }

  .metric--card {
    flex: 1 1 100%;
  }
}