/* ============================================================
   NYAKAMENTA FARM & LODGE — Design System
   Earthy / refined / editorial. Kashari, Uganda.
   ============================================================ */

/* ---- Tokens ---------------------------------------------- */
:root {
  /* Palette: EARTH (default) */
  --paper:      oklch(0.967 0.012 84);   /* warm oat */
  --paper-2:    oklch(0.945 0.016 80);   /* slightly deeper card */
  --ink:        oklch(0.245 0.018 60);   /* espresso text */
  --ink-soft:   oklch(0.40 0.020 60);
  --ink-faint:  oklch(0.55 0.018 65);
  --line:       oklch(0.86 0.014 80);    /* hairlines on paper */
  --espresso:   oklch(0.205 0.020 50);   /* dark section bg */
  --espresso-2: oklch(0.255 0.022 52);
  --cream-on-dark: oklch(0.93 0.020 82);
  --faint-on-dark: oklch(0.70 0.018 70);

  /* Accents — shared chroma/lightness, varied hue */
  --green:   oklch(0.52 0.085 150);
  --green-d: oklch(0.40 0.070 150);
  --clay:    oklch(0.585 0.105 47);
  --clay-d:  oklch(0.49 0.095 45);
  --gold:    oklch(0.74 0.090 78);

  /* Type */
  --display: "Cormorant Garamond", Georgia, serif;
  --body:    "Hanken Grotesk", system-ui, sans-serif;
  --mono:    "Space Mono", ui-monospace, monospace;

  --display-wght: 500;
  --h-tight: 1.02;
  --h-trim: -0.01em;

  /* Spacing rhythm */
  --gutter: clamp(20px, 5vw, 88px);
  --section-y: clamp(72px, 11vw, 168px);
  --maxw: 1320px;

  --radius: 3px;
  --shadow-card: 0 1px 2px oklch(0.2 0.02 60 / 0.06), 0 14px 40px oklch(0.2 0.02 60 / 0.08);
}

/* Palette: FOREST */
:root[data-palette="forest"] {
  --paper:      oklch(0.955 0.014 120);
  --paper-2:    oklch(0.93 0.018 125);
  --ink:        oklch(0.235 0.022 145);
  --line:       oklch(0.85 0.018 125);
  --espresso:   oklch(0.225 0.030 155);
  --espresso-2: oklch(0.275 0.032 155);
  --green:   oklch(0.55 0.095 150);
  --clay:    oklch(0.60 0.100 55);
}

/* Palette: CLAY */
:root[data-palette="clay"] {
  --paper:      oklch(0.972 0.014 70);
  --paper-2:    oklch(0.95 0.020 60);
  --ink:        oklch(0.265 0.030 45);
  --line:       oklch(0.87 0.020 60);
  --espresso:   oklch(0.30 0.055 40);
  --espresso-2: oklch(0.355 0.060 42);
  --clay:    oklch(0.60 0.120 45);
  --green:   oklch(0.52 0.085 155);
}

/* Type swap tweak */
:root[data-display="spectral"]  { --display: "Spectral", Georgia, serif; --display-wght: 500; }
:root[data-display="marcellus"] { --display: "Marcellus", Georgia, serif; --display-wght: 400; }

/* ---- Reset / base ---------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--clay); color: var(--paper); }

/* ---- Reusable type ---------------------------------------- */
.display {
  font-family: var(--display);
  font-weight: var(--display-wght);
  line-height: var(--h-tight);
  letter-spacing: var(--h-trim);
  font-feature-settings: "liga" 1, "dlig" 1;
}
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay-d);
  font-weight: 700;
}
.kicker.on-dark { color: var(--gold); }
.lede {
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 56ch;
}
.eyebrow-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

/* ---- Layout helpers --------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.rule { height: 1px; background: var(--line); border: 0; }
.rule-dark { height: 1px; background: oklch(1 0 0 / 0.12); border: 0; }

/* ---- Buttons ---------------------------------------------- */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; gap: 0.6em;
  background: var(--bg); color: var(--fg);
  padding: 0.95em 1.6em;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), background .25s, color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn .arr { transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.btn:hover .arr { transform: translateX(4px); }
.btn--clay { --bg: var(--clay); --fg: var(--paper); }
.btn--clay:hover { --bg: var(--clay-d); }
.btn--green { --bg: var(--green); --fg: var(--paper); }
.btn--ghost {
  --bg: transparent; --fg: var(--ink);
  border: 1px solid var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--ghost-light {
  --bg: transparent; --fg: var(--cream-on-dark);
  border: 1px solid oklch(1 0 0 / 0.35);
}
.btn--ghost-light:hover { background: var(--cream-on-dark); color: var(--espresso); }
.btn--lg { padding: 1.1em 2em; font-size: 15px; }

.link-underline {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-weight: 600; font-size: 14px;
  padding-bottom: 3px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .35s cubic-bezier(.2,.7,.2,1), gap .25s;
}
.link-underline:hover { background-size: 0% 1px; gap: 0.85em; }

/* ---- Image placeholder slot ------------------------------- */
.slot {
  position: relative;
  background-color: var(--paper-2);
  background-image:
    repeating-linear-gradient(135deg,
      oklch(0.5 0.02 60 / 0.05) 0 2px,
      transparent 2px 11px);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid; place-items: center;
  color: var(--ink-faint);
  isolation: isolate;
}
.slot.on-dark {
  background-color: var(--espresso-2);
  background-image:
    repeating-linear-gradient(135deg,
      oklch(1 0 0 / 0.04) 0 2px,
      transparent 2px 11px);
  border-color: oklch(1 0 0 / 0.12);
  color: var(--faint-on-dark);
}
.slot__tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid currentColor;
  border-radius: 100px;
  opacity: 0.85;
  text-align: center;
  background: oklch(1 0 0 / 0.04);
  backdrop-filter: blur(2px);
}

/* ---- Reveal animation -------------------------------------
   Visible is the default. Hidden pre-state applies only with JS
   active and before entrance (:not(.in)), with NO transition —
   so adding .in is an instant jump to full opacity. The entrance
   motion is a separate keyframe animation (decorative); if it
   never plays, the element still rests fully visible. */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal:not(.in) { opacity: 0; transform: translateY(22px); }
  html.js .reveal.in { animation: nyk-rise .9s cubic-bezier(.2,.7,.2,1); }
  html.js .reveal.in[data-d="1"] { animation-delay: .08s; }
  html.js .reveal.in[data-d="2"] { animation-delay: .16s; }
  html.js .reveal.in[data-d="3"] { animation-delay: .24s; }
  html.js .reveal.in[data-d="4"] { animation-delay: .32s; }
}
@keyframes nyk-rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
