/* ==========================================================================
   BLOOMRIFT — Style System
   Thoughtfully made. Instantly yours.
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --bark: #2C1F14;
  --soil: #3D2B1A;
  --terracotta: #B5541E;
  --terracotta-hover: #9A4718;
  --clay: #C97A4A;
  --sand: #E8D5B2;
  --linen: #FAF6EE;
  --cream: #F8F0E6;
  --sage: #6B8C68;
  --moss: #4A6341;
  --gold: #B9955A;
  --stone: #9E9488;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 128px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-normal: 0.3s;
  --duration-slow: 0.6s;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  color: var(--bark);
  background-color: var(--linen);
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

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

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--terracotta);
  color: var(--linen);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  z-index: 1000;
  transition: top var(--duration-normal) var(--ease-out);
}

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

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

/* Focus states */
:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

/* ---------- Typography Helpers ---------- */
.section-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: var(--space-lg);
}

.section-label--light {
  color: var(--sand);
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  color: var(--bark);
  margin-bottom: var(--space-2xl);
}

.section-heading--light {
  color: var(--linen);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.5px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-out);
  min-height: 48px;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--terracotta);
  color: var(--linen);
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--terracotta);
  border: 1.5px solid var(--terracotta);
}

.btn-secondary:hover {
  background-color: var(--terracotta);
  color: var(--linen);
  transform: translateY(-1px);
}

/* ====================================================================
   HEADER / NAV
   ==================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-normal) var(--ease-out),
              padding var(--duration-normal) var(--ease-out);
  padding: var(--space-md) 0;
}

.site-header.scrolled {
  border-bottom-color: var(--sand);
  padding: var(--space-sm) 0;
}

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

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo svg {
  display: block;
}

.nav-list {
  display: flex;
  gap: var(--space-xl);
  align-items: center;
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--soil);
  letter-spacing: 0.3px;
  position: relative;
  transition: color var(--duration-normal) var(--ease-out);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--terracotta);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav-link:hover {
  color: var(--terracotta);
}

.nav-link:hover::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 1.5px;
  background-color: var(--bark);
  transition: transform var(--duration-normal) var(--ease-out),
              opacity var(--duration-normal) var(--ease-out);
  transform-origin: center;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ====================================================================
   HERO
   ==================================================================== */
.hero {
  background-color: var(--linen);
  padding: clamp(var(--space-3xl), 10vw, var(--space-4xl)) 0 var(--space-3xl);
  text-align: center;
}

.hero-inner {
  max-width: 820px;
  margin: 0 auto;
}

.hero-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5.5vw, 64px);
  line-height: 1.15;
  color: var(--bark);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.01em;
}

.hero-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  color: var(--stone);
  margin-bottom: var(--space-xl);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero-ctas {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* Decorative Divider */
.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-3xl);
}

.divider-line {
  display: block;
  width: 80px;
  height: 1px;
  background-color: var(--sand);
}

.divider-leaf {
  flex-shrink: 0;
}

/* ====================================================================
   BRAND STORY
   ==================================================================== */
.story {
  padding: clamp(var(--space-3xl), 8vw, var(--space-4xl)) 0;
  background-color: var(--linen);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
  align-items: start;
}

.story-text p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--soil);
  margin-bottom: var(--space-md);
}

.story-text p:last-child {
  margin-bottom: 0;
}

.manifesto-card {
  background-color: var(--cream);
  border-left: 3px solid var(--terracotta);
  padding: var(--space-xl) var(--space-lg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.manifesto-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.5vw, 26px);
  line-height: 1.4;
  color: var(--bark);
  margin-bottom: var(--space-md);
}

.manifesto-cite {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--stone);
}

/* Brand Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
}

.pillar-card {
  background-color: var(--cream);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--sand);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(44, 31, 20, 0.06);
}

.pillar-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  color: var(--bark);
  margin-bottom: var(--space-sm);
}

.pillar-desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.55;
  color: var(--stone);
}

/* ====================================================================
   PRODUCTS
   ==================================================================== */
.products {
  padding: clamp(var(--space-3xl), 8vw, var(--space-4xl)) 0;
  background-color: var(--linen);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.product-card {
  background-color: var(--cream);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--sand);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(44, 31, 20, 0.08);
}

.product-icon {
  margin-bottom: var(--space-lg);
}

.product-icon svg {
  display: block;
}

.product-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  color: var(--bark);
  margin-bottom: var(--space-sm);
}

.product-desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  color: var(--stone);
}

.products-soon {
  text-align: center;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: var(--stone);
}

/* ====================================================================
   HOW IT WORKS
   ==================================================================== */
.how-it-works {
  background-color: var(--soil);
  padding: clamp(var(--space-3xl), 8vw, var(--space-4xl)) 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.step-card {
  position: relative;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
}

.step-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(48px, 6vw, 72px);
  color: var(--clay);
  opacity: 0.18;
  line-height: 1;
  margin-bottom: var(--space-md);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.step-icon {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
  padding-top: var(--space-xl);
}

.step-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  color: var(--linen);
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
}

.step-desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  color: var(--sand);
  position: relative;
  z-index: 1;
}

/* ====================================================================
   NEWSLETTER
   ==================================================================== */
.newsletter {
  padding: clamp(var(--space-3xl), 8vw, var(--space-4xl)) 0;
  background-color: var(--linen);
}

.newsletter-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--stone);
  margin-bottom: var(--space-xl);
}

.newsletter-form {
  margin-bottom: var(--space-md);
}

.form-row {
  display: flex;
  gap: var(--space-sm);
}

.email-input {
  flex: 1;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  padding: 14px 20px;
  background-color: var(--cream);
  border: 1.5px solid var(--sand);
  border-radius: var(--radius-sm);
  color: var(--bark);
  transition: border-color var(--duration-normal) var(--ease-out);
  min-height: 48px;
}

.email-input::placeholder {
  color: var(--stone);
  opacity: 0.7;
}

.email-input:focus {
  outline: none;
  border-color: var(--terracotta);
}

.btn-submit {
  flex-shrink: 0;
}

.newsletter-disclaimer {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  color: var(--stone);
}

/* ====================================================================
   FOOTER
   ==================================================================== */
.site-footer {
  background-color: var(--bark);
  padding: var(--space-2xl) 0 var(--space-xl);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(232, 213, 178, 0.12);
}

.footer-logo svg {
  display: block;
}

.footer-columns {
  display: flex;
  gap: var(--space-2xl);
}

.footer-col-title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: var(--space-md);
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  color: var(--stone);
  transition: color var(--duration-normal) var(--ease-out);
}

.footer-links a:hover {
  color: var(--linen);
}

.footer-bottom {
  text-align: center;
}

.footer-bottom p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  color: var(--stone);
  opacity: 0.7;
}

/* ====================================================================
   SCROLL REVEAL ANIMATIONS
   ==================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

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

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

/* Staggered children in pillars */
.pillars .pillar-card:nth-child(2) { transition-delay: 0.08s; }
.pillars .pillar-card:nth-child(3) { transition-delay: 0.16s; }
.pillars .pillar-card:nth-child(4) { transition-delay: 0.24s; }
.pillars .pillar-card:nth-child(5) { transition-delay: 0.32s; }

/* Staggered product cards */
.products-grid .product-card:nth-child(2) { transition-delay: 0.1s; }
.products-grid .product-card:nth-child(3) { transition-delay: 0.2s; }

/* Staggered steps */
.steps-grid .step-card:nth-child(2) { transition-delay: 0.12s; }
.steps-grid .step-card:nth-child(3) { transition-delay: 0.24s; }

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ====================================================================
   RESPONSIVE — TABLET
   ==================================================================== */
@media (max-width: 1024px) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
  }

  .pillars .pillar-card:nth-child(4),
  .pillars .pillar-card:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 860px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .step-card:last-child {
    grid-column: 1 / -1;
    max-width: 360px;
    margin: 0 auto;
  }

  .footer-top {
    flex-direction: column;
    gap: var(--space-xl);
  }
}

/* ====================================================================
   RESPONSIVE — MOBILE
   ==================================================================== */
@media (max-width: 640px) {
  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  /* Nav Mobile */
  .hamburger {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100dvh;
    background-color: var(--linen);
    padding: 80px var(--space-lg) var(--space-xl);
    transform: translateX(100%);
    transition: transform var(--duration-normal) var(--ease-out),
                visibility 0s linear var(--duration-normal);
    box-shadow: -4px 0 24px rgba(44, 31, 20, 0.08);
    z-index: 99;
    visibility: hidden;
  }

  .main-nav.open {
    transform: translateX(0);
    visibility: visible;
    transition: transform var(--duration-normal) var(--ease-out),
                visibility 0s linear 0s;
  }

  .nav-list {
    flex-direction: column;
    gap: var(--space-lg);
    align-items: flex-start;
  }

  .nav-link {
    font-size: 18px;
  }

  /* Mobile overlay */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(44, 31, 20, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-normal) var(--ease-out);
    z-index: 98;
  }

  .nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Hero */
  .hero {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .hero-heading br {
    display: none;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .hero-ctas .btn {
    width: 100%;
    max-width: 280px;
  }

  /* Story */
  .section-heading br {
    display: none;
  }

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

  /* Products */
  .products-grid {
    grid-template-columns: 1fr;
  }

  /* Steps */
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .step-card:last-child {
    grid-column: auto;
    max-width: none;
  }

  /* Newsletter */
  .form-row {
    flex-direction: column;
  }

  .btn-submit {
    width: 100%;
  }

  /* Footer */
  .footer-columns {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .footer-bottom p {
    font-size: 12px;
  }
}

@media (max-width: 375px) {
  .hero-heading {
    font-size: 28px;
  }

  .logo svg {
    width: 140px;
    height: auto;
  }
}
