/* ============================================================
   CREMA — global design system
   Bright, warm, editorial, cinematic. Never dim or muddy.
   ============================================================ */

:root {
  /* Brand palette */
  --espresso: #342018;
  --roasted: #6e4532;
  --caramel: #b98257;
  --cream: #f3e7d6;
  --beige: #d9be9c;
  --offwhite: #faf7f1;

  /* Derived tones */
  --espresso-soft: rgba(52, 32, 24, 0.66);
  --espresso-faint: rgba(52, 32, 24, 0.42);
  --line: rgba(52, 32, 24, 0.14);
  --line-strong: rgba(52, 32, 24, 0.26);
  --card: #fffdf9;

  /* Type — common, widely-available fonts */
  --font-display: Georgia, "Times New Roman", Times, serif;
  --font-sans: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system,
    sans-serif;

  /* Layout */
  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 72px);
  --nav-h: 76px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--offwhite);
  color: var(--espresso);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
  font-variation-settings: "wght" 400;
}

/* Lenis smooth scroll */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

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

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

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

ul {
  list-style: none;
}

input {
  font: inherit;
}

::selection {
  background: var(--caramel);
  color: var(--offwhite);
}

/* ---------------- Typography ---------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  color: var(--espresso);
  text-wrap: balance;
}

.display {
  font-size: clamp(2.9rem, 8.4vw, 8rem);
  line-height: 0.93;
  letter-spacing: -0.03em;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--caramel);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  display: inline-block;
  opacity: 0.75;
}

.lede {
  font-size: clamp(1.05rem, 1.55vw, 1.28rem);
  color: var(--espresso-soft);
  max-width: 46ch;
  line-height: 1.55;
}

.serif-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "opsz" 40, "SOFT" 80;
  color: var(--caramel);
}

/* ---------------- Layout helpers ---------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(80px, 12vh, 168px);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 780px;
}
.section-head h2 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.95em 1.7em;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  transition: transform 0.45s var(--ease), background 0.4s var(--ease),
    color 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
  will-change: transform;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn--primary {
  background: var(--espresso);
  color: var(--offwhite);
  box-shadow: 0 10px 30px -14px rgba(52, 32, 24, 0.7);
}
.btn--primary:hover {
  background: var(--roasted);
  box-shadow: 0 16px 40px -14px rgba(52, 32, 24, 0.8);
}
.btn--accent {
  background: var(--caramel);
  color: #fff;
  box-shadow: 0 12px 30px -14px rgba(185, 130, 87, 0.95);
}
.btn--accent:hover {
  background: #a5714a;
}
.btn--ghost {
  background: transparent;
  color: var(--espresso);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover {
  border-color: var(--espresso);
  background: rgba(52, 32, 24, 0.04);
}
.btn__arrow {
  transition: transform 0.4s var(--ease);
}
.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* ---------------- Reveal (IntersectionObserver) ---------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}
[data-reveal-fade] {
  opacity: 0;
  transition: opacity 1.1s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
[data-reveal-fade].is-in {
  opacity: 1;
}

/* Screen-reader only */
.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) {
  [data-reveal],
  [data-reveal-fade] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  * {
    scroll-behavior: auto !important;
  }
}
