/* ClosetCheck marketing — ink, warm stone, bottle green */

:root {
  --ink: #121110;
  --ink-soft: #2a2622;
  --muted: #6a635c;
  --stone: #e6e1d8;
  --stone-soft: #f1eee8;
  --paper: #faf8f4;
  --accent: #1f4a3c;
  --accent-hover: #16382e;
  --accent-soft: #d7e4de;
  --focus: #1f4a3c;
  --veil: linear-gradient(
    105deg,
    rgba(18, 17, 16, 0.84) 0%,
    rgba(18, 17, 16, 0.58) 40%,
    rgba(18, 17, 16, 0.3) 70%,
    rgba(18, 17, 16, 0.2) 100%
  );
  --font-display: "Syne", "Helvetica Neue", sans-serif;
  --font-sans: "Outfit", "Helvetica Neue", sans-serif;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --max: 42rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 8% -10%, #e8e3d9 0%, transparent 50%),
    radial-gradient(80% 50% at 100% 10%, #ddd8cf 0%, transparent 40%),
    linear-gradient(180deg, var(--paper) 0%, var(--stone-soft) 100%);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-hover);
}

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 0.25rem;
}

.skip-link:focus {
  top: var(--space-4);
}

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

/* Header */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 72rem;
  margin: 0 auto;
  padding: var(--space-5) var(--space-5);
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-decoration: none;
  opacity: 0.9;
}

.nav-brand:hover {
  color: var(--paper);
  opacity: 1;
}

.nav-cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(250, 248, 244, 0.45);
  padding-bottom: 0.1rem;
}

.nav-cta:hover {
  color: var(--paper);
  border-bottom-color: var(--paper);
}

/* Optional loading splash (shown only if splash image exists) */

.page-splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: var(--ink);
  background-size: cover;
  background-position: center;
  opacity: 1;
  transition: opacity 0.55s var(--ease);
  pointer-events: none;
}

.page-splash.is-done {
  opacity: 0;
}

/* Scroll-scrub — tall track + sticky full-bleed viewport */

.scrub-section {
  position: relative;
  height: 200vh;
  color: var(--paper);
  background: var(--ink);
}

.scrub-section--hero {
  height: 220vh;
}

.scrub-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: grid;
  align-items: end;
}

.scrub-media {
  position: absolute;
  inset: 0;
}

.scrub-poster,
.scrub-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.scrub-poster {
  z-index: 0;
  background: var(--ink);
}

.scrub-video {
  z-index: 1;
  /* Promote compositor layer for sticky scrub without over-using will-change */
  transform: translateZ(0);
  backface-visibility: hidden;
}

.scrub-video.is-reduced {
  display: none !important;
}

.scrub-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--veil);
  pointer-events: none;
}

.scrub-veil--soft {
  background: linear-gradient(
    180deg,
    rgba(18, 17, 16, 0.35) 0%,
    rgba(18, 17, 16, 0.15) 35%,
    rgba(18, 17, 16, 0.45) 70%,
    rgba(18, 17, 16, 0.78) 100%
  );
}

.scrub-copy {
  position: relative;
  z-index: 3;
  max-width: 36rem;
  padding: calc(var(--space-8) + 2rem) var(--space-5) var(--space-8);
}

.scrub-copy--hero {
  animation: hero-rise 1.1s var(--ease) both;
}

.scrub-copy--caption {
  max-width: 32rem;
  padding-bottom: var(--space-8);
}

.scrub-caption {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: rgba(250, 248, 244, 0.92);
  text-shadow: 0 1px 18px rgba(18, 17, 16, 0.45);
}

.brand {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.1rem, 11vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.headline {
  margin: 0 0 var(--space-4);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: rgba(250, 248, 244, 0.92);
}

.lede {
  margin: 0 0 var(--space-6);
  max-width: 28rem;
  font-size: 1.02rem;
  color: rgba(250, 248, 244, 0.78);
}

.cta-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.cta-status {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(250, 248, 244, 0.7);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.25rem;
  border-radius: 0.35rem;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--paper);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(250, 248, 244, 0.35);
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
}

.btn-ghost:hover {
  color: var(--paper);
  border-color: rgba(250, 248, 244, 0.8);
  background: rgba(250, 248, 244, 0.06);
}

.btn-on-dark {
  background: var(--paper);
  color: var(--ink);
  align-items: center;
}

.btn-on-dark:hover {
  background: var(--accent-soft);
  color: var(--ink);
  transform: translateY(-1px);
}

/* Sections below the fold */

.section {
  padding: var(--space-8) var(--space-5);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section h2 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.125rem;
  max-width: 34rem;
}

.section-privacy {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(31, 74, 60, 0.07) 100%
  );
}

.section-privacy h2 {
  color: var(--accent);
}

.section-final {
  background: var(--ink);
  color: var(--paper);
}

.section-final .final-brand {
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: var(--paper);
  margin-bottom: var(--space-3);
}

.final-lede {
  color: rgba(250, 248, 244, 0.78) !important;
  margin-bottom: var(--space-6) !important;
}

.testflight-note {
  margin-top: var(--space-5) !important;
  font-size: 0.95rem !important;
  color: rgba(250, 248, 244, 0.65) !important;
}

.testflight-note a {
  color: var(--accent-soft);
}

.waitlist-block {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(250, 248, 244, 0.12);
}

.waitlist-heading {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.waitlist-copy {
  color: rgba(250, 248, 244, 0.7) !important;
  font-size: 1rem !important;
  margin-bottom: 0 !important;
}

.waitlist-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
  max-width: 28rem;
  align-items: flex-end;
}

.field {
  flex: 1 1 14rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(250, 248, 244, 0.6);
}

.field input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(250, 248, 244, 0.22);
  border-radius: 0.35rem;
  background: rgba(250, 248, 244, 0.06);
  color: var(--paper);
  font: inherit;
}

.field input::placeholder {
  color: rgba(250, 248, 244, 0.4);
}

.field input:focus {
  border-color: var(--accent-soft);
  outline: none;
  box-shadow: 0 0 0 3px rgba(215, 228, 222, 0.25);
}

.form-fallback {
  margin-top: var(--space-4) !important;
  font-size: 0.95rem !important;
  color: rgba(250, 248, 244, 0.55) !important;
}

.form-fallback a {
  color: var(--accent-soft);
}

/* Legal pages (Privacy, Terms) */

.site-header-legal {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(18, 17, 16, 0.08);
}

.site-header-legal .nav-brand {
  color: var(--ink);
  opacity: 1;
}

.site-header-legal .nav-brand:hover {
  color: var(--accent);
}

.site-header-legal .nav-cta {
  color: var(--ink-soft);
  border-bottom-color: rgba(18, 17, 16, 0.25);
}

.site-header-legal .nav-cta:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.legal-page {
  padding: var(--space-7) var(--space-5) var(--space-8);
}

.legal-inner {
  max-width: 40rem;
  margin: 0 auto;
}

.legal-kicker {
  margin: 0 0 var(--space-3);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-page h1 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 2.85rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.legal-updated {
  margin: 0 0 var(--space-6);
  font-size: 0.95rem;
  color: var(--muted);
}

.legal-intro {
  margin: 0 0 var(--space-7);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid rgba(18, 17, 16, 0.1);
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.6;
}

.legal-toc {
  margin: 0 0 var(--space-7);
  padding: var(--space-5);
  background: rgba(31, 74, 60, 0.06);
  border-radius: 0.4rem;
}

.legal-toc-title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-toc a {
  color: var(--ink-soft);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.legal-section {
  margin: 0 0 var(--space-7);
  scroll-margin-top: 5rem;
}

.legal-section h2 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 1.45rem);
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--ink);
}

.legal-section h3 {
  margin: var(--space-5) 0 var(--space-3);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}

.legal-section p,
.legal-section li {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.65;
}

.legal-section p {
  margin: 0 0 var(--space-4);
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.35rem;
}

.legal-section li {
  margin-bottom: var(--space-2);
}

.legal-section li:last-child {
  margin-bottom: 0;
}

.legal-note {
  margin: var(--space-7) 0 0;
  padding-top: var(--space-5);
  border-top: 1px solid rgba(18, 17, 16, 0.1);
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.legal-contact-box {
  margin-top: var(--space-5);
  padding: var(--space-5);
  background: var(--stone-soft);
  border-radius: 0.4rem;
}

.legal-contact-box p {
  margin: 0 0 var(--space-2);
}

.legal-contact-box p:last-child {
  margin-bottom: 0;
}

/* Footer */

.site-footer {
  padding: var(--space-6) var(--space-5) var(--space-7);
  border-top: 1px solid rgba(18, 17, 16, 0.08);
  background: var(--paper);
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.footer-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-meta a {
  color: var(--muted);
  text-decoration: none;
}

.footer-meta a:hover {
  color: var(--ink);
}

/* Motion */

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(1rem);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scrub-section,
  .scrub-section--hero {
    height: auto;
    min-height: 100svh;
  }

  .scrub-sticky {
    position: relative;
    height: auto;
    min-height: 100svh;
  }

  .scrub-video,
  .scrub-video.is-reduced {
    display: none !important;
  }

  .scrub-copy--hero,
  .reveal,
  .btn,
  .page-splash {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  .reveal {
    opacity: 1;
  }

  .page-splash.is-done {
    display: none;
  }
}

@media (min-width: 768px) {
  .nav {
    padding: var(--space-6) var(--space-7);
  }

  .scrub-copy {
    padding: var(--space-8) var(--space-7) 5.5rem;
  }

  .scrub-copy--caption {
    padding-bottom: 5.5rem;
  }

  .scrub-section {
    height: 180vh;
  }

  .scrub-section--hero {
    height: 200vh;
  }

  .section {
    padding: 5.5rem var(--space-7);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }

  .legal-page {
    padding: var(--space-8) var(--space-7) 5.5rem;
  }

  .site-header-legal .nav {
    padding: var(--space-5) var(--space-7);
  }
}
