/* ======================================
   SELVAGE — Design System
   Dark craft-luxury, editorial serif hero
   ====================================== */

:root {
  --bg:             #0b0908;
  --surface:        #131110;
  --surface-raised: #1c1916;
  --border:         #2c2620;
  --text:           #f0e8d8;
  --text-muted:     #7a6e60;
  --text-faint:     #3d3630;
  --accent:         #c46b3c;
  --accent-deep:    #8a4522;
  --accent-soft:    rgba(196, 107, 60, 0.12);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 100px;

  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 4px;
  color: var(--text);
  text-decoration: none;
  text-transform: lowercase;
}

.nav-cta {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  transition: border-color 0.2s var(--ease-smooth), background 0.2s var(--ease-smooth);
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 40px 80px;
}

/* Three.js canvas — transparent overlay above video, below content */
.hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  /* pointer events enabled by JS so cut/sew interactions work */
  z-index: 1;
  cursor: crosshair;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 680px;
  /* Hidden until cloth cut peels away */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out 0.8s, transform 1s ease-out 0.8s;
  pointer-events: none;
}

body.cut-done .hero-content {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

body.cut-done .hero-form, body.cut-done .form-row, body.cut-done .form-input, body.cut-done .form-btn {
  pointer-events: auto;
}

/* All sections sit above the fixed 3D canvas */
.nav, .problem, .how-it-works, .features, .cta-final, .footer {
  position: relative;
  z-index: 2;
  background: var(--bg);
}

.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;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(16px);
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(24px);
}

.hero-headline em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.hero-sub {
  font-size: 17px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto 44px;
}

/* ===== FORMS ===== */

.form-row {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

.form-input {
  flex: 1;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 13px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
  border-color: var(--accent);
}

.form-input--light {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
  color: #f0e8d8;
}

.form-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 13px 24px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s var(--ease-spring);
}

.form-btn:hover {
  background: var(--accent-deep);
  transform: scale(1.02);
}

.form-btn--light {
  background: var(--text);
  color: var(--bg);
}

.form-btn--light:hover {
  background: #fff;
}

.form-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  letter-spacing: 0.3px;
}

.form-note--light {
  color: rgba(240, 232, 216, 0.5);
}

/* ===== SECTION SHARED ===== */
.section-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.section-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 64px;
}

/* ===== PROBLEM ===== */
.problem {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.problem-card {
  background: var(--surface);
  padding: 40px 36px;
}

.problem-icon {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 300;
  color: var(--text-faint);
  line-height: 1;
  margin-bottom: 20px;
}

.problem-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.problem-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: 120px 0;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 60px 1fr 280px;
  gap: 40px;
  align-items: center;
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

.step-reverse {
  grid-template-columns: 60px 1fr 280px;
}

.step-number {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 300;
  color: var(--text-faint);
  line-height: 1;
}

.step-content h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}

.step-content p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 420px;
}

.step-visual {
  width: 200px;
  height: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transform: translateX(30px);
}

.step-visual svg {
  width: 100%;
  height: 100%;
}

.step-divider {
  height: 0;
}

/* ===== FEATURES ===== */
.features {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature-card {
  background: var(--surface);
  padding: 40px 36px;
}

.feature-card--large {
  grid-column: span 2;
}

.feature-card--dark {
  background: var(--surface-raised);
}

.feature-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.25;
}

.feature-card--large h3 {
  font-size: 30px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== FINAL CTA ===== */
.cta-final {
  padding: 140px 0;
  border-top: 1px solid var(--border);
}

.cta-inner {
  max-width: 560px;
}

.cta-headline {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 24px;
}

.cta-headline em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.cta-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
}

.cta-form .form-row {
  margin: 0;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

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

.footer-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 4px;
  color: var(--text-muted);
}

.footer-by {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-by a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}

.footer-by a:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* ===== SUCCESS STATE ===== */
.form-success {
  display: none;
  font-size: 14px;
  color: var(--accent);
  padding: 12px 0;
  letter-spacing: 0.5px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav { padding: 16px 20px; }

  .hero { padding: 100px 20px 60px; }

  .hero-headline { font-size: 52px; }

  .form-row { flex-direction: column; }
  .form-btn { width: 100%; }

  .container { padding: 0 20px; }

  .problem { padding: 80px 0; }
  .problem-grid { grid-template-columns: 1fr; }

  .how-it-works { padding: 80px 0; }
  .step {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
  }
  .step-visual { display: none; }

  .features { padding: 80px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card--large { grid-column: span 1; }

  .cta-final { padding: 100px 0; }
  .section-headline { margin-bottom: 40px; }

  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}
