/* =========================================================
   THE WHITVALE — Main Business Site
   Design tokens, layout, components, responsive rules.
   4px increment system for all spacing/sizing.
   ========================================================= */

:root {
  /* Brand colours */
  --crimson: #8B1A1A;
  --gold: #C9A84C;
  --ivory: #F5F0E8;
  --white: #FFFFFF;
  --ink: #1E1E1E;
  --rosewood: #754C4C;
  --pink: #D29797; /* Final CTA band only — do not use elsewhere */

  /* Fonts */
  --font-display: 'Cormorant Garamond', serif;
  --font-serif: 'EB Garamond', serif;
  --font-body: 'Montserrat', sans-serif;

  /* Layout */
  --nav-height: 88px;
  --nav-height-mobile: 72px;
  --container-max: 1320px;
  --container-pad: 24px;
  --radius-sm: 8px;
  --radius-md: 20px;
  --radius-pill: 100px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 200ms var(--ease);
  --transition-base: 320ms var(--ease);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

h1, h2, h3, p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
  border-radius: var(--radius-pill);
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  white-space: nowrap;
}

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

.btn--gold:hover {
  background: #b8964a;
  box-shadow: 0 8px 20px rgba(201, 168, 76, 0.35);
  transform: translateY(-2px);
}

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

.btn:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 3px;
}

/* Scroll-triggered reveal. Elements start visible by default (no-JS /
   pre-JS baseline); only once script.js confirms it's running (`.js` on
   <html>) do they hide and wait for IntersectionObserver to reveal them. */
.reveal {
  transition: opacity 380ms var(--ease), transform 380ms var(--ease);
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
}

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

/* -------------------- Nav -------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background-color var(--transition-base), box-shadow var(--transition-base), height var(--transition-base);
}

.nav.is-scrolled {
  background: rgba(30, 30, 30, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

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

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--white);
  letter-spacing: 0.02em;
  transition: opacity var(--transition-fast);
}

.nav__logo:hover {
  opacity: 0.8;
}

.nav__panel {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  display: inline-block;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 8px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}

.nav__links a:hover::after {
  transform: scaleX(1);
}

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

.nav__cta {
  flex-shrink: 0;
  padding: 16px 32px;
  font-size: 15px;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  flex-shrink: 0;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav.is-open .nav__toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav.is-open .nav__toggle span:nth-child(2) {
  opacity: 0;
}

.nav.is-open .nav__toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* -------------------- Hero -------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  scroll-margin-top: var(--nav-height);
}

.hero__video,
.hero__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 30, 30, 0.4);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 40px) 24px 80px;
  text-align: center;
  color: var(--white);
}

.hero__eyebrow {
  text-align: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw + 12px, 76px);
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin: 0 0 24px;
}

.hero__sub {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(16px, 1.2vw + 12px, 24px);
  line-height: 1.6;
  max-width: 720px;
  margin: 0 auto 48px;
}

/* -------------------- Demo Form (shared, 3 instances) -------------------- */
.demo-form {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-form__fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-form__fields[hidden] {
  display: none;
}

.demo-form__names {
  display: flex;
  gap: 16px;
}

.demo-form__label {
  flex: 1 1 0;
  display: block;
}

.demo-form__submit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 10px;
}

.demo-form__submit-row .demo-form__label {
  flex: 1 1 auto;
}

.demo-form__input {
  width: 100%;
  border: none;
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 20px 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  transition: box-shadow var(--transition-fast);
}

.demo-form__submit-row .demo-form__input {
  padding: 16px 20px;
}

.demo-form__input::placeholder {
  color: #C0BFBF;
  font-weight: 600;
}

.demo-form__input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--crimson);
}

.demo-form__button {
  flex-shrink: 0;
  padding: 16px 36px;
}

/* Mailchimp's required anti-bot field: must stay in the DOM and empty,
   just not visible or reachable by real visitors. */
.demo-form__botcheck {
  position: absolute;
  left: -5000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.demo-form__confirmation {
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 380ms var(--ease), transform 380ms var(--ease);
}

.demo-form__confirmation.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.demo-form__confirmation .eyebrow {
  margin-bottom: 8px;
}

/* Gold reads too faint against the dusty pink final-CTA band */
.demo-form--on-pink .demo-form__confirmation .eyebrow {
  color: var(--crimson);
}

.demo-form__confirmation-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 1.6vw + 14px, 28px);
  line-height: 1.3;
  color: var(--white);
  margin: 0;
}

/* -------------------- Section heading shared -------------------- */
.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 3.4vw + 12px, 64px);
  line-height: 1.1;
  text-align: center;
  margin: 0 0 56px;
}

/* -------------------- Problem / Solution -------------------- */
.problem-solution {
  scroll-margin-top: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.problem-solution__col {
  padding: 80px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.problem-solution__col--problem {
  background: var(--crimson);
  color: var(--white);
}

.problem-solution__col--solution {
  background: var(--ivory);
  color: var(--ink);
  border: 4px solid var(--gold);
}

.problem-solution__col h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 3vw + 8px, 48px);
  margin: 0 0 32px;
}

.problem-solution__col p {
  font-size: clamp(16px, 1vw + 10px, 20px);
  line-height: 1.7;
  max-width: 480px;
}

.problem-solution__col p + p {
  margin-top: 20px;
}

/* -------------------- About -------------------- */
.about {
  scroll-margin-top: var(--nav-height);
  padding: 120px 24px;
}

.about h2 {
  margin-bottom: 64px;
}

.about__grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about__image {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.about__text {
  font-size: clamp(16px, 1vw + 10px, 20px);
  line-height: 1.75;
}

/* -------------------- Try It Yourself -------------------- */
.try-it {
  scroll-margin-top: var(--nav-height);
  background: var(--crimson);
  color: var(--white);
  padding: 120px 24px;
  text-align: center;
}

.try-it__lead {
  max-width: 780px;
  margin: 0 auto 48px;
  font-size: clamp(17px, 1.2vw + 11px, 24px);
  line-height: 1.6;
}

.try-it__lead strong {
  display: block;
  font-weight: 700;
  margin-bottom: 16px;
}

/* -------------------- How It Works -------------------- */
.how-it-works {
  scroll-margin-top: var(--nav-height);
  padding: 120px 24px;
}

.how-it-works h2 {
  margin-bottom: 56px;
}

.carousel {
  max-width: 1320px;
  margin: 0 auto;
}

.carousel__viewport {
  position: relative;
  background: var(--crimson);
  border-radius: var(--radius-md);
  overflow: hidden;
  touch-action: pan-y;
}

.carousel__track {
  display: flex;
  will-change: transform;
  transition: transform 500ms var(--ease);
}

.carousel__slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: minmax(0, 560px) 1fr;
  gap: 64px;
  align-items: center;
  padding: 56px;
  min-height: 560px;
}

.carousel__visual {
  width: 100%;
  aspect-ratio: 560 / 600;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--ivory);
}

.carousel__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel__copy {
  color: var(--white);
}

.carousel__copy h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(28px, 2.6vw + 12px, 44px);
  line-height: 1.2;
  margin: 0 0 24px;
}

.carousel__num {
  color: var(--gold);
}

.carousel__copy p {
  font-size: clamp(17px, 1.2vw + 10px, 22px);
  line-height: 1.6;
  max-width: 480px;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.carousel__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid #939393;
  padding: 0;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.carousel__dot:hover {
  transform: scale(1.15);
  border-color: var(--gold);
}

.carousel__dot.is-active {
  background: var(--gold);
  border-color: var(--gold);
}

.carousel__dot:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 3px;
}

/* -------------------- What's Included -------------------- */
.included {
  scroll-margin-top: var(--nav-height);
  padding: 120px 24px;
}

.included h2 {
  margin-bottom: 56px;
}

.included__grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.included__card {
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base);
}

.included__card:hover {
  transform: translateY(-6px);
}

.included__visual {
  width: 100%;
  aspect-ratio: 420 / 368;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #d9d9d9;
  margin-bottom: 32px;
}

.included__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.included__card h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 28px;
  text-align: center;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}

.included__card p {
  text-align: center;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 340px;
  margin: 0 auto;
}

/* -------------------- Pricing -------------------- */
.pricing {
  scroll-margin-top: var(--nav-height);
  padding: 120px 24px;
}

.pricing__grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.pricing h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 4vw + 8px, 56px);
  margin: 0 0 24px;
}

.pricing p {
  font-size: clamp(17px, 1.2vw + 10px, 22px);
  line-height: 1.7;
  margin: 0 0 40px;
  max-width: 500px;
}

.pricing__image {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* -------------------- FAQ -------------------- */
.faq {
  scroll-margin-top: var(--nav-height);
  padding: 120px 24px;
}

.faq h2 {
  margin-bottom: 56px;
}

.faq__list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.faq__item {
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(30, 30, 30, 0.12);
}

.faq__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq__question {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 1.4vw + 14px, 28px);
  color: var(--crimson);
  margin: 0 0 12px;
}

.faq__answer {
  font-size: clamp(16px, 0.6vw + 13px, 18px);
  line-height: 1.7;
  margin: 0;
}

/* -------------------- Final CTA + Footer (continuous rosewood field) -------------------- */
.final-cta {
  scroll-margin-top: var(--nav-height);
  background: var(--rosewood);
  padding: 80px 24px 0;
}

.final-cta__card {
  max-width: 1300px;
  margin: 0 auto;
  background: var(--pink);
  border-radius: var(--radius-md);
  padding: 80px 40px;
  text-align: center;
  color: var(--white);
}

.final-cta__card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 3.4vw + 12px, 64px);
  margin: 0 0 24px;
}

.final-cta__card p {
  max-width: 700px;
  margin: 0 auto 48px;
  font-size: clamp(16px, 1.1vw + 10px, 24px);
  line-height: 1.6;
  text-wrap: balance;
}

.footer {
  background: var(--rosewood);
  color: var(--white);
  padding: 96px 24px 0;
}

.footer__grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 80px;
}

.footer__brand p {
  margin: 0 0 8px;
}

.footer__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 2.6vw + 12px, 44px);
  margin-bottom: 20px !important;
}

.footer__brand a {
  transition: color var(--transition-fast);
}

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

.footer__col h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  margin: 0 0 24px;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer__col a {
  font-size: 16px;
  position: relative;
  display: inline-block;
  transition: color var(--transition-fast);
}

.footer__col a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}

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

.footer__col a:hover::after {
  transform: scaleX(1);
}

.copyright {
  background: var(--ink);
  color: var(--white);
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 20px 24px;
}

.copyright strong {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* =========================================================
   Responsive
   ========================================================= */

/* Tablet */
@media (max-width: 1024px) {
  .about__grid,
  .pricing__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about__image {
    height: 380px;
    order: -1;
  }

  .pricing__image {
    height: 380px;
  }

  .carousel__slide {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 32px;
    padding: 40px;
    min-height: 0;
  }

  .included__grid {
    grid-template-columns: 1fr 1fr;
  }

  .included__card:nth-child(3) {
    grid-column: 1 / -1;
    max-width: 420px;
    margin: 0 auto;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 56px;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --nav-height: var(--nav-height-mobile);
  }

  .container,
  .about,
  .try-it,
  .how-it-works,
  .included,
  .pricing,
  .faq {
    padding-left: 20px;
    padding-right: 20px;
  }

  .nav__panel {
    position: fixed;
    top: var(--nav-height-mobile);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(30, 30, 30, 0.96);
    backdrop-filter: blur(12px);
    padding: 8px 20px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base), transform var(--transition-base);
  }

  .nav.is-open .nav__panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__links a {
    padding: 16px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav__cta {
    margin: 12px 0 0;
  }

  .nav__toggle {
    display: flex;
  }

  .hero__content {
    padding: calc(var(--nav-height-mobile) + 32px) 20px 56px;
  }

  .demo-form__names {
    flex-direction: column;
  }

  .demo-form__submit-row {
    flex-direction: column;
    background: transparent;
    padding: 0;
    gap: 16px;
  }

  .demo-form__submit-row .demo-form__label,
  .demo-form__submit-row .demo-form__input {
    width: 100%;
  }

  .demo-form__button {
    width: 100%;
  }

  .problem-solution {
    grid-template-columns: 1fr;
  }

  .problem-solution__col {
    padding: 56px 24px;
  }

  .about,
  .try-it,
  .how-it-works,
  .included,
  .pricing,
  .faq {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .included__grid {
    grid-template-columns: 1fr;
  }

  .included__card:nth-child(3) {
    grid-column: auto;
    max-width: none;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    row-gap: 48px;
    padding-bottom: 56px;
  }

  .footer__brand {
    grid-column: auto;
  }

  .final-cta__card {
    padding: 56px 24px;
  }

  .carousel__copy h3 {
    font-size: clamp(24px, 6vw, 32px);
  }
}
