/* ==========================================================================
   EMBER & OLIVE — base: tokens, fonts, reset, type, utilities
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-italic-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../assets/fonts/hanken-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour: warm stone & cream, deep olive, terracotta */
  --cream: #f6f0e4;
  --paper: #efe7d6;
  --stone: #e3d9c4;
  --stone-dk: #cdc0a5;
  --olive: #2b3623;
  --olive-2: #384630;
  --olive-lt: #7d8a63;
  --terra: #b04f2b;
  --terra-dk: #933f1f;
  --terra-lt: #e0906a;
  --ink: #23201b;
  --ink-2: #4d473c;
  --mute: #6d6553;
  --line: rgba(35, 32, 27, 0.16);
  --line-strong: rgba(35, 32, 27, 0.34);
  --line-inv: rgba(246, 240, 228, 0.22);

  --font-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 4.4vw, 76px);
  --maxw: 1440px;
  --section-y: clamp(84px, 11vw, 176px);
  --header-h: 84px;

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-soft: cubic-bezier(0.25, 0.6, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  background: var(--cream);
}

body {
  position: relative;
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Paper grain: barely-there texture across the whole site */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .28  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

body.is-locked {
  overflow: hidden;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

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

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

address {
  font-style: normal;
}

::selection {
  background: var(--terra);
  color: var(--cream);
}

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

.on-dark :focus-visible,
.hero :focus-visible,
.site-header:not(.is-scrolled) :focus-visible {
  outline-color: var(--terra-lt);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 400;
  padding: 0.85em 1.3em;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translateY(-200%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

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

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.on-dark {
  color: var(--cream);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.display {
  font-family: var(--font-serif);
  font-weight: 350;
  font-optical-sizing: auto;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(2.6rem, 6vw, 5.6rem);
}

.display em,
.it {
  font-style: italic;
  font-weight: 300;
  color: var(--terra);
}

.on-dark .display em,
.on-dark .it,
.hero .display em {
  color: var(--terra-lt);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra);
  line-height: 1;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.on-dark .eyebrow {
  color: var(--terra-lt);
}

.lede {
  font-size: clamp(1.1rem, 1.35vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 32em;
}

.on-dark .lede {
  color: rgba(246, 240, 228, 0.8);
}

/* --------------------------------------------------------------------------
   Reveals (only when JS is running)
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Images: a soft curtain lift with a slow settle */
.js [data-reveal="img"] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 calc(100% - 2px) 0); /* 2px sliver keeps IntersectionObserver aware of the element */
  transition: clip-path 1.3s var(--ease);
  transition-delay: var(--d, 0ms);
}

.js [data-reveal="img"] img {
  transform: scale(1.12);
  transition: transform 1.8s var(--ease);
  transition-delay: var(--d, 0ms);
}

.js [data-reveal="img"].is-in {
  clip-path: inset(0 0 0 0);
}

.js [data-reveal="img"].is-in img {
  transform: scale(1);
}

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

  .js [data-reveal],
  .js [data-reveal="img"],
  .js [data-reveal="img"] img {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }
}
