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

:root {
  --ink:    #1A1714;
  --linen:  #E8E0D3;
  --cream:  #FAF7F2;
  --taupe:  #8A7A6A;
  --rule:   #D4CCC0;
  --terra:  #B5624A;

  --font-display: 'Cinzel', serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'Space Mono', monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--ink);
  overflow-x: hidden;
}

/* ── 1. HERO PARALLAX (Osmo multi-layer) ───────────────────────── */
/*
  Layer 1 (deepest):  Hero image               — yPercent 70
  Layer 2 (mid):      "ARCHETYPE" title         — yPercent 40
  Layer 3 (front):    Dark foreground gradient   — yPercent 15
  Layer 4 (closest):  Grain                      — yPercent 5
  overflow:hidden clips everything to the viewport.
*/

.parallax {
  position: relative;
  z-index: 0;
}

.parallax__header {
  position: relative;
  height: 100svh;
  overflow: hidden;
  z-index: 0;
}

.parallax__visuals {
  position: relative;
  width: 100%;
  height: 100%;
}

.parallax__black-line-overflow {
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--ink);
  z-index: 10;
  pointer-events: none;
}

.parallax__layers {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* All layers — full viewport, stacked */
.parallax__layer-img,
.parallax__layer-title,
.parallax__layer-grain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}

/* Layer 1 — background image (no person) */
.parallax__layer-img {
  object-fit: cover;
  object-position: center center;
  display: block;
}

.parallax__layer-bg {
  z-index: 1;
}

/* Layer 2 — centered hero content stack */
.parallax__layer-title {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  z-index: 2;
  padding-bottom: 32vh;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  transform: translateX(-6%);
}

.hero-logo {
  display: block;
  width: 50px;
  height: 48px;
  margin-bottom: 1.25rem;
  background: linear-gradient(
    90deg,
    #FAF7F2  0%,
    #C8A882  20%,
    #C47862  40%,
    #D4A574  60%,
    #FAF7F2  80%,
    #C8A882  100%
  );
  background-size: 300% 100%;
  -webkit-mask-image: url('assets/archetype-logo.svg');
  mask-image: url('assets/archetype-logo.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.85rem, 9.2vw, 8.1rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.1;
  margin-bottom: 0.35rem;

  /* Looping gradient shift */
  background: linear-gradient(
    90deg,
    #FAF7F2  0%,
    #C8A882  20%,
    #C47862  40%,
    #D4A574  60%,
    #FAF7F2  80%,
    #C8A882  100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  font-weight: 500;
  color: #FFFFFF;
  opacity: 1;
  letter-spacing: 0.05em;
  margin-bottom: 1.75rem;
  text-shadow:
    0 0 20px rgba(255, 255, 255, 0.3),
    0 0 40px rgba(255, 255, 255, 0.15),
    0 1px 8px rgba(26, 23, 20, 0.5);
}

/* Layer 3 — foreground image (with person), masked so only bottom shows */
.parallax__layer-fg {
  z-index: 3;
  -webkit-mask-image: linear-gradient(
    to top,
    black 0%,
    black 50%,
    transparent 72%
  );
  mask-image: linear-gradient(
    to top,
    black 0%,
    black 50%,
    transparent 72%
  );
  pointer-events: none;
}

/* Layer 4 — grain */
.parallax__layer-grain {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  mix-blend-mode: overlay;
  opacity: 0.06;
  pointer-events: none;
  z-index: 4;
}

/* Bottom fade — hero bleeds into dark problem section */
.parallax__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30vh;
  background: linear-gradient(to bottom, transparent 0%, var(--ink) 100%);
  pointer-events: none;
  z-index: 5;
}


/* ── Waitlist glow wrapper ──────────────────────────────────────── */
.waitlist-glow-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Inline waitlist pill ──────────────────────────────────────── */
.waitlist-inline {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 100px;
  overflow: hidden;
  height: 42px;
}

.waitlist-inline.open {
  background: rgba(26, 23, 20, 0.5);
  border: 1px solid rgba(181, 98, 74, 0.35);
  padding: 3px;
  gap: 0;
}

.waitlist-trigger {
  display: inline-block;
  background:
    linear-gradient(
      110deg,
      #B5624A 0%,
      #BE6C56 40%,
      #C47862 60%,
      #BE6C56 80%,
      #B5624A 100%
    );
  background-size: 160% 100%;
  animation: gradientDrift 12s ease-in-out infinite;
  color: var(--cream);
  border: none;
  padding: 0 2rem;
  height: 100%;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 100px;
  white-space: nowrap;
  transition: max-width 0.35s var(--ease), padding 0.35s var(--ease), opacity 0.25s var(--ease), transform 0.2s var(--ease);
  max-width: 200px;
  overflow: hidden;
  flex-shrink: 0;
  opacity: 0.75;
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at center, black 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 100% 100% at center, black 50%, transparent 100%);
  box-shadow:
    0 0 10px 4px rgba(181, 98, 74, 0.18),
    0 0 28px 12px rgba(181, 98, 74, 0.10),
    0 0 56px 24px rgba(181, 98, 74, 0.05);
}

@keyframes gradientDrift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.waitlist-trigger:hover {
  background: #c96e55;
  opacity: 0.85;
  box-shadow:
    0 0 12px 5px rgba(181, 98, 74, 0.22),
    0 0 36px 14px rgba(181, 98, 74, 0.12),
    0 0 64px 28px rgba(181, 98, 74, 0.06);
}

.waitlist-trigger:active {
  transform: scale(0.98);
}

.waitlist-trigger:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 2px;
}

/* Form — hidden by default, slides in */
.waitlist-form {
  display: flex;
  align-items: center;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.45s var(--ease), opacity 0.3s var(--ease);
  height: 100%;
}

.waitlist-inline.open .waitlist-trigger {
  max-width: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.waitlist-inline.open .waitlist-form {
  max-width: 380px;
  opacity: 1;
}

.waitlist-input {
  width: 220px;
  height: 100%;
  padding: 0 1.2rem;
  border: none;
  border-radius: 100px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--cream);
  outline: none;
  letter-spacing: 0.02em;
}

.waitlist-input::placeholder {
  color: rgba(232, 224, 211, 0.4);
}

.waitlist-input:focus {
  background: transparent;
}

.waitlist-submit {
  height: 100%;
  padding: 0 1.6rem;
  border: none;
  background: var(--terra);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background 0.2s var(--ease);
  flex-shrink: 0;
}

.waitlist-submit:hover {
  background: #c96e55;
}

.waitlist-submit:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: -2px;
}

/* Thank-you state */
.waitlist-thanks {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--cream);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 0 1.5rem;
  transition: opacity 0.4s var(--ease);
}

.waitlist-inline.submitted .waitlist-trigger,
.waitlist-inline.submitted .waitlist-form {
  opacity: 0;
  pointer-events: none;
}

.waitlist-inline.submitted .waitlist-thanks {
  opacity: 1;
}

/* ── Hero CTA — sits below the person, in front of all layers ──── */
.hero-cta {
  position: fixed;
  bottom: 12vh;
  left: calc(50% - 3vw);
  transform: translateX(-50%);
  z-index: 10;
  will-change: opacity;
}

/* ── Product CTA ── */
.product-waitlist .waitlist-trigger {
  font-size: 0.75rem;
  padding: 0 2rem;
}

/* ── 2. PROBLEM SECTION ────────────────────────────────────────── */
.problem-section {
  position: relative;
  z-index: 1;
  height: 500svh;
  background: var(--ink);
}

.problem-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  color: var(--linen);
}

/* ── Background: fog/mist canvas ── */
.problem-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
}

/* ── Panels: one at a time, absolutely stacked ── */
.problem-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 8vw;
  opacity: 0;
}

.problem-img-wrap {
  width: min(620px, 85vw);
  height: 264px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 2rem;
  will-change: opacity, transform;
}

.problem-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  display: block;
}

/* Shared numeral overlay — fixed position in the sticky container */
.problem-numeral-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: baseline;
  z-index: 2;
  pointer-events: none;
  margin-top: 5.5rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.25vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--linen);
}

.problem-numeral-char {
  display: inline-block;
  opacity: 0;
  transition: opacity 0.35s ease, width 0.35s ease, margin 0.35s ease;
  will-change: opacity;
  overflow: hidden;
}

.problem-numeral-char.hidden {
  width: 0 !important;
  margin: 0 !important;
  opacity: 0;
}

/* Spacer in panels to reserve the numeral's vertical space */
.problem-numeral-spacer {
  height: clamp(3rem, 5.25vw, 4.5rem);
  margin-bottom: 1.2rem;
  padding-top: 1rem;
}

.problem-text {
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 1.9vw, 1.8rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(232, 224, 211, 0.85);
  text-align: center;
  width: min(520px, 78vw);
  will-change: opacity, transform;
}

.hl {
  color: var(--terra);
  opacity: 1;
}

.problem-text em {
  font-style: italic;
  color: var(--terra);
  opacity: 0.85;
}

.problem-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.2s ease;
}
.problem-link:hover {
  opacity: 0.7;
}

/* ── 3. PRODUCT SECTION ─────────────────────────────────────────── */
.product-section {
  position: relative;
  z-index: 1;
  background: var(--ink);
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 6vw;
  overflow: hidden;
}

.product-inner {
  max-width: 860px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

/* ── Product headline ── */
.product-headline {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--linen);
  text-transform: uppercase;
  margin-bottom: 3rem;
}

.product-headline-hl {
  color: var(--terra);
}

/* ── Product render + glow ── */
.product-render-wrap {
  position: relative;
  width: 100%;
  max-width: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3rem;
}

.product-glow {
  position: absolute;
  inset: -50% -45%;
  margin: auto;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  will-change: transform, opacity;
}

.product-glow--warm {
  transform: scale(0.4);
  opacity: 0;
  background:
    radial-gradient(
      ellipse 55% 45% at 45% 50%,
      rgba(212, 165, 116, 1) 0%,
      rgba(200, 168, 130, 0.75) 15%,
      rgba(196, 120, 98, 0.40) 35%,
      rgba(180, 150, 110, 0.15) 55%,
      transparent 75%
    );
}

.product-glow--teal {
  transform: scale(0.4);
  opacity: 0;
  background:
    radial-gradient(
      ellipse 50% 42% at 55% 50%,
      rgba(78, 114, 104, 1) 0%,
      rgba(61, 90, 82, 0.65) 18%,
      rgba(46, 74, 66, 0.30) 40%,
      transparent 68%
    );
}

.product-glow--terra {
  transform: scale(0.4);
  opacity: 0;
  background:
    radial-gradient(
      ellipse 48% 42% at 50% 45%,
      rgba(181, 98, 74, 0.90) 0%,
      rgba(196, 120, 98, 0.55) 20%,
      rgba(212, 165, 116, 0.22) 45%,
      transparent 70%
    );
}

.product-img {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  z-index: 1;
}

/* ── Product body text ── */
.product-body {
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 1.9vw, 1.8rem);
  font-weight: 300;
  line-height: 1.75;
  color: rgba(232, 224, 211, 0.75);
  max-width: 780px;
  margin-bottom: 2.5rem;
}

.product-body-hl {
  color: var(--terra);
  font-weight: 400;
  font-style: italic;
}

/* (product CTA now uses .product-waitlist variant of .waitlist-inline) */

/* ── 4. FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--ink);
  overflow: hidden;
}

/* Background image + overlay */
.footer-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.footer-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.footer-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, var(--ink) 0%, rgba(26, 23, 20, 0.25) 35%, rgba(26, 23, 20, 0.15) 55%, rgba(26, 23, 20, 0.55) 100%);
}

.footer-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  mix-blend-mode: overlay;
  opacity: 0.08;
  pointer-events: none;
}

/* Motto — centered */
.footer-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem 4rem;
}

.footer-motto {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.8vw, 2.2rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 224, 211, 0.85);
  text-align: center;
  text-shadow: 0 2px 16px rgba(26, 23, 20, 0.5);
}

/* Bottom bar */
.footer-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3vw 1.5rem;
  border-top: 1px solid rgba(232, 224, 211, 0.1);
}

.footer-bar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-logo-link {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer-logo-link:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.footer-logo-link:hover .footer-logo {
  background: rgba(232, 224, 211, 1);
}

.footer-logo-link:focus-visible {
  outline: 1px solid var(--terra);
  outline-offset: 2px;
}

.footer-logo-link:active {
  transform: translateY(0);
}

.footer-logo {
  width: 20px;
  height: 19px;
  background: rgba(232, 224, 211, 0.7);
  transition: background 0.2s var(--ease);
  -webkit-mask-image: url('assets/archetype-logo.svg');
  mask-image: url('assets/archetype-logo.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  flex-shrink: 0;
}

.footer-brand-name {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 224, 211, 0.55);
}

.footer-bar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-link {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: rgba(232, 224, 211, 0.45);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s var(--ease);
}

.footer-link:hover {
  color: rgba(232, 224, 211, 0.8);
}

.footer-link:focus-visible {
  outline: 1px solid var(--terra);
  outline-offset: 2px;
}

.footer-link:active {
  color: rgba(232, 224, 211, 0.6);
}

.footer-link-sep {
  font-size: 0.7rem;
  color: rgba(232, 224, 211, 0.25);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-social-link {
  color: rgba(232, 224, 211, 0.45);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
  display: flex;
  align-items: center;
}

.footer-social-link:hover {
  color: rgba(232, 224, 211, 0.8);
  transform: translateY(-1px);
}

.footer-social-link:focus-visible {
  outline: 1px solid var(--terra);
  outline-offset: 2px;
}

.footer-social-link:active {
  transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-content {
    transform: translateX(-3%);
  }

  .hero-cta {
    left: calc(50% - 1.5vw);
  }

  .hero-title {
    font-size: clamp(3rem, 14vw, 6rem);
  }

  .problem-img-wrap {
    height: 216px;
  }
}

@media (max-width: 768px) {

  /* ── 1. Hero — remove leftward shift, keep centered ── */
  .hero-content {
    transform: translateX(0);
  }

  .hero-title {
    font-size: clamp(2.6rem, 12vw, 5rem);
  }

  .hero-sub {
    font-size: clamp(1rem, 4vw, 1.4rem);
  }

  .parallax__layer-title {
    padding-bottom: 28vh;
  }

  .hero-cta {
    left: 50%;
    bottom: 10vh;
  }

  /* ── 2. Problem section — fix numeral/text overlap ── */
  .problem-numeral-wrap {
    font-size: clamp(1.6rem, 4.5vw, 3rem);
    margin-top: 3.5rem;
  }

  .problem-numeral-spacer {
    height: clamp(1.6rem, 4.5vw, 3rem);
    margin-bottom: 0.8rem;
    padding-top: 0.6rem;
  }

  .problem-img-wrap {
    height: 180px;
    margin-bottom: 1.2rem;
  }

  .problem-text {
    font-size: clamp(1.1rem, 4.2vw, 1.5rem);
    width: min(520px, 88vw);
    line-height: 1.6;
  }

  .problem-panel {
    padding: 0 6vw;
  }

  /* ── 3. Waitlist form — prevent overflow on small screens ── */
  .waitlist-inline.open .waitlist-form {
    max-width: calc(100vw - 3rem);
  }

  .waitlist-input {
    width: min(180px, 45vw);
  }

  /* ── 4. Footer — clean stacking + bigger touch targets ── */
  .footer-bar {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
    padding: 1.25rem 5vw 1.75rem;
  }

  .footer-bar-left {
    justify-content: center;
  }

  .footer-bar-right {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .footer-brand-name {
    font-size: 0.7rem;
  }

  .footer-links {
    gap: 0.6rem;
  }

  .footer-link {
    font-size: 0.75rem;
    padding: 0.25rem 0;
  }

  .footer-social {
    gap: 1.25rem;
  }

  .footer-social-link {
    padding: 0.6rem;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }

  .footer-content {
    padding: 4rem 1.5rem 3rem;
  }
}

@media (max-width: 500px) {
  .problem-img-wrap {
    height: 150px;
    margin-bottom: 1rem;
  }

  .problem-numeral-wrap {
    font-size: 1.5rem;
    margin-top: 2.5rem;
  }

  .problem-numeral-spacer {
    height: 1.5rem;
    margin-bottom: 0.6rem;
    padding-top: 0.4rem;
  }

  .hero-cta {
    bottom: 8vh;
  }

  .waitlist-input {
    width: min(160px, 42vw);
    font-size: 0.75rem;
    padding: 0 0.75rem;
  }

  .waitlist-submit {
    padding: 0 1rem;
    font-size: 0.7rem;
  }
}
