/* ===========================================================
   Oscar The Olive — shared base
   Mobile-first, no dependencies.
   =========================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, video, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: .12s; }
.reveal-delay-2 { transition-delay: .24s; }
.reveal-delay-3 { transition-delay: .36s; }
.reveal-delay-4 { transition-delay: .48s; }

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

/* ---------- small utilities ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.rule {
  width: 32px; height: 1px;
  background: currentColor;
  opacity: .5;
  margin: 0 0 1.25rem;
}

/* ---------- container ---------- */
.wrap {
  width: 100%;
  max-width: 1240px;
  padding: 0 24px;
  margin: 0 auto;
}
@media (min-width: 768px) { .wrap { padding: 0 40px; } }
@media (min-width: 1100px) { .wrap { padding: 0 64px; } }

/* ---------- shared: mobile nav drawer base ---------- */
.nav-drawer {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease;
  display: flex; flex-direction: column;
}
.nav-drawer.open { opacity: 1; pointer-events: auto; }
.nav-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
}
.nav-drawer__close {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 28px;
  color: var(--ink);
}
.nav-drawer__list {
  list-style: none;
  padding: 0 24px;
  margin: auto 0;
  display: flex; flex-direction: column;
  gap: 28px;
}
.nav-drawer__list a {
  font-family: var(--font-display);
  font-size: clamp(32px, 9vw, 48px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: inline-block;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), opacity .4s;
  transform: translateY(16px); opacity: 0;
}
.nav-drawer.open .nav-drawer__list a {
  transform: none; opacity: 1;
}
.nav-drawer.open .nav-drawer__list li:nth-child(1) a { transition-delay: .10s; }
.nav-drawer.open .nav-drawer__list li:nth-child(2) a { transition-delay: .16s; }
.nav-drawer.open .nav-drawer__list li:nth-child(3) a { transition-delay: .22s; }
.nav-drawer.open .nav-drawer__list li:nth-child(4) a { transition-delay: .28s; }
.nav-drawer.open .nav-drawer__list li:nth-child(5) a { transition-delay: .34s; }
.nav-drawer__foot {
  padding: 24px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--hairline);
}

/* ---------- focus ring ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- tweaks panel (shared) ---------- */
.tweaks {
  position: fixed;
  right: 16px; bottom: 16px;
  width: 300px;
  max-height: 70vh;
  overflow: auto;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 18px 18px 14px;
  z-index: 500;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.35);
  font-family: var(--font-body);
  font-size: 13px;
  display: none;
}
.tweaks.open { display: block; }
.tweaks h4 {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 8px;
  font-weight: 600;
}
.tweaks h4:first-child { margin-top: 0; }
.tweaks .tw-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 10px;
}
.tweaks .tw-head strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -.01em;
}
.tweaks .tw-row {
  display: flex; align-items: center; gap: 8px;
  margin: 6px 0;
}
.tweaks label { flex: 1; }
.tweaks input[type="color"] {
  width: 36px; height: 24px; padding: 0; border: 1px solid var(--hairline);
  border-radius: 4px; background: transparent;
}
.tweaks input[type="range"] { width: 110px; }
.tweaks select {
  font: inherit; padding: 4px 6px; border: 1px solid var(--hairline);
  background: var(--bg); color: var(--ink); border-radius: 4px;
}
.tweaks .tw-swatches {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.tweaks .tw-swatch {
  height: 32px; border-radius: 4px; border: 1px solid var(--hairline);
  cursor: pointer; display: flex; align-items: flex-end; justify-content: center;
  font-size: 10px; padding-bottom: 2px;
}
.tweaks .tw-swatch.active { outline: 2px solid var(--ink); outline-offset: 2px; }
