/* ==========================================================================
   One Kind World Foundation — main.css
   Design system (tokens) + reset + global type + layout primitives + nav + hero
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap');

/* ---------- Design tokens -------------------------------------------------- */
:root {
  /* Primary */
  --color-forest:     #1A3D2B;
  --color-forest-mid: #2D5A3E;
  --color-sage:       #6B8F71;
  --color-sage-light: #B8D4BC;

  /* Neutrals */
  --color-cream:      #FAF7F2;
  --color-cream-dark: #F0EAD8;
  --color-linen:      #F5EFE0;
  --color-stone:      #D4C9B4;
  --color-text:       #1C1C1A;
  --color-text-mid:   #3A3A38;
  --color-text-muted: #888683;

  /* Accent */
  --color-terra:      #C4622D;
  --color-terra-dark: #A3511F;

  /* Brand watercolour hues (from the OKWF logo system) + warm fusion */
  --color-teal:       #2E8B8B;
  --color-teal-dark:  #1F6E6E;
  --color-gold:       #D99A34;
  --color-coral:      #E07A5F;
  --color-taupe:      #AF9082;

  /* Dark surfaces */
  --color-dark:       #141F1A;
  --color-dark-mid:   #1A3D2B;

  /* Fonts */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale */
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 16px;
  --text-lg:   18px;
  --text-xl:   22px;
  --text-2xl:  28px;
  --text-3xl:  36px;
  --text-4xl:  48px;
  --text-5xl:  64px;

  /* Spacing (8px grid) */
  --space-1:  8px;
  --space-2:  16px;
  --space-3:  24px;
  --space-4:  32px;
  --space-5:  40px;
  --space-6:  48px;
  --space-8:  64px;
  --space-10: 80px;
  --space-12: 96px;

  /* Radii */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-pill: 999px;

  /* Effects */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lift: 0 18px 50px -22px rgba(20,31,26,0.45);
  --transition:  all 0.25s ease;

  /* Buttons */
  --btn-primary-bg:    var(--color-terra);
  --btn-primary-text:  var(--color-cream);
  --btn-primary-hover: var(--color-terra-dark);
  --btn-ghost-border:  rgba(245,239,224,0.35);
  --btn-ghost-text:    var(--color-linen);

  /* Layout */
  --container:    1200px;
  --gutter:       24px;
  --nav-h:        76px;
}

/* ---------- Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
:focus-visible { outline: 3px solid var(--color-terra); outline-offset: 2px; border-radius: 2px; }

/* ---------- Typography ----------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; color: var(--color-text); letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6vw, var(--text-5xl)); line-height: 1.08; }
h2 { font-size: clamp(28px, 4vw, var(--text-4xl)); line-height: 1.12; }
h3 { font-size: clamp(22px, 2.6vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }
p  { max-width: 70ch; }
em { font-style: italic; }
strong { font-weight: 600; }

.serif { font-family: var(--font-serif); }
.italic { font-style: italic; }

/* Eyebrow / label / caps */
.label {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.label--accent { color: var(--color-terra); }
.label--sage   { color: var(--color-sage-light); }

.lede { font-size: var(--text-lg); line-height: 1.7; color: var(--color-text-mid); }

/* ---------- Layout primitives --------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-10); position: relative; }
.section--tight { padding-block: var(--space-8); }
.section--cream      { background: var(--color-cream); }
.section--cream-dark { background: var(--color-cream-dark); }
.section--linen      { background: var(--color-linen); }
.section--forest     { background: var(--color-forest); color: var(--color-sage-light); }
.section--dark       { background: var(--color-dark); color: var(--color-sage-light); }

.section--forest h1, .section--forest h2, .section--forest h3,
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--color-cream); }

.section-head { max-width: 720px; margin-bottom: var(--space-6); }
.section-head .label { display: inline-block; margin-bottom: var(--space-2); }
.section-head h2 { margin-bottom: var(--space-2); }

.rule { width: 32px; height: 2px; background: var(--color-forest); border: 0; margin: var(--space-3) 0; }
.section--forest .rule, .section--dark .rule { background: var(--color-sage); }

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

/* ---------- Buttons -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1);
  font-family: var(--font-sans); font-weight: 500; font-size: var(--text-sm); letter-spacing: 0.04em;
  padding: 14px 28px; min-height: 44px; border-radius: var(--radius-pill);
  transition: var(--transition); cursor: pointer; white-space: nowrap; text-align: center;
}
.btn--primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); }
.btn--primary:hover { background: var(--btn-primary-hover); transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(196,98,45,0.7); }
.btn--ghost { background: transparent; color: var(--btn-ghost-text); border: 1px solid var(--btn-ghost-border); }
.btn--ghost:hover { background: rgba(245,239,224,0.12); border-color: rgba(245,239,224,0.7); }
.btn--dark { background: var(--color-forest); color: var(--color-cream); }
.btn--dark:hover { background: var(--color-forest-mid); transform: translateY(-2px); }
.btn--block { display: flex; width: 100%; }
.btn--lg { padding: 18px 34px; font-size: var(--text-base); }

.arrow-link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: var(--text-sm);
  letter-spacing: 0.04em; color: var(--color-terra); transition: var(--transition);
}
.arrow-link .arrow { transition: transform 0.25s ease; }
.arrow-link:hover { color: var(--color-terra-dark); }
.arrow-link:hover .arrow { transform: translateX(5px); }
.section--forest .arrow-link, .section--dark .arrow-link { color: var(--color-sage-light); }
.section--forest .arrow-link:hover, .section--dark .arrow-link:hover { color: #fff; }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 1000; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav__brand { display: flex; flex-direction: column; line-height: 1; color: var(--color-cream); transition: color 0.3s ease; }
.nav__brand .brand-name { font-family: var(--font-serif); font-weight: 600; font-size: var(--text-lg); letter-spacing: 0.02em; }
.nav__brand .brand-sub { font-family: var(--font-serif); font-style: italic; font-size: var(--text-xs); opacity: 0.7; margin-top: 3px; }
.nav__links { display: flex; align-items: center; gap: var(--space-4); }
.nav__links a {
  font-family: var(--font-serif); font-size: var(--text-base); font-weight: 500; letter-spacing: 0.01em; color: var(--color-linen);
  position: relative; padding: 6px 0; transition: color 0.25s ease;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 1.5px;
  background: var(--color-terra); transition: width 0.25s ease;
}
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { width: 100%; }
.nav__cta { display: flex; align-items: center; gap: var(--space-3); }

/* scrolled state */
.nav.is-scrolled { background: rgba(245,239,224,0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom-color: var(--color-stone); box-shadow: 0 2px 20px -12px rgba(0,0,0,0.3); }
.nav.is-scrolled .nav__brand { color: var(--color-forest); }
.nav.is-scrolled .nav__links a { color: var(--color-text-mid); }
.nav.is-scrolled .nav__links a:hover { color: var(--color-forest); }

/* solid variant for interior pages (no hero behind) */
.nav--solid { position: sticky; background: var(--color-linen); border-bottom-color: var(--color-stone); }
.nav--solid .nav__brand { color: var(--color-forest); }
.nav--solid .nav__links a { color: var(--color-text-mid); }
.nav--solid .nav__links a:hover { color: var(--color-forest); }

/* hamburger */
.nav__toggle { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 5px; align-items: center; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: currentColor; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav__brand, .nav.is-scrolled .nav__toggle, .nav--solid .nav__toggle { color: inherit; }
.nav__toggle { color: var(--color-cream); }
.nav.is-scrolled .nav__toggle, .nav--solid .nav__toggle { color: var(--color-forest); }

/* mobile overlay menu */
.nav__overlay {
  position: fixed; inset: 0; z-index: 1100; background: var(--color-forest);
  transform: translateX(100%); transition: transform 0.35s cubic-bezier(.5,0,.2,1);
  display: flex; flex-direction: column; padding: var(--space-6) var(--gutter);
  visibility: hidden;
}
.nav__overlay.is-open { transform: translateX(0); visibility: visible; }
.nav__overlay-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-8); }
.nav__overlay-head .brand-name { font-family: var(--font-serif); font-size: var(--text-lg); color: var(--color-cream); }
.nav__overlay-close { width: 44px; height: 44px; color: var(--color-cream); font-size: 28px; line-height: 1; }
.nav__overlay nav { display: flex; flex-direction: column; gap: var(--space-2); }
.nav__overlay nav a { font-family: var(--font-serif); font-size: var(--text-3xl); color: var(--color-cream); padding: var(--space-1) 0; }
.nav__overlay nav a:hover { color: var(--color-sage-light); }
.nav__overlay .btn { margin-top: var(--space-6); }
body.nav-open { overflow: hidden; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  color: var(--color-cream); overflow: hidden; padding-bottom: var(--space-8);
  isolation: isolate; /* contain the negative-z-index bg so it paints above the hero's own fallback color */
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg picture, .page-hero__bg picture { display: block; width: 100%; height: 100%; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  /* airy up top, strong at the bottom so the editorial band reads clearly */
  background: linear-gradient(180deg, rgba(20,31,26,0.30) 0%, rgba(20,31,26,0.18) 32%, rgba(20,31,26,0.55) 68%, rgba(20,31,26,0.92) 100%);
}
/* editorial bottom band: headline left, stat right, on a shared baseline */
.hero__band { position: relative; z-index: 1; width: 100%; }
.hero__rule { border: 0; height: 1px; background: rgba(245,239,224,0.30); margin: 0 0 var(--space-4); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--space-6); align-items: end; }
.hero__content { max-width: 720px; }
.hero .eyebrow { display: inline-block; font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-sage-light); margin-bottom: var(--space-2); }
.hero h1 { color: var(--color-cream); font-weight: 400; margin-bottom: var(--space-3); }
.hero h1 em { font-style: italic; font-weight: 600; }
.hero__sub { font-size: var(--text-base); line-height: 1.7; color: var(--color-sage-light); max-width: 480px; margin-bottom: var(--space-5); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hero__stat { text-align: right; align-self: end; padding-bottom: 6px; }
.hero__stat .big { display: block; font-family: var(--font-serif); font-weight: 700; font-size: clamp(52px, 7vw, 96px); line-height: 0.92; color: var(--color-cream); letter-spacing: -0.02em; }
.hero__stat .cap { display: block; font-size: var(--text-xs); letter-spacing: 0.08em; color: var(--color-sage-light); margin-top: var(--space-1); max-width: 220px; margin-left: auto; }
.hero__scroll { position: absolute; left: 50%; bottom: var(--space-3); transform: translateX(-50%); font-size: var(--text-xs); letter-spacing: 0.2em; text-transform: uppercase; color: rgba(250,247,242,0.6); animation: heroPulse 2.4s ease-in-out infinite; }
@keyframes heroPulse { 0%,100% { opacity: .4; transform: translate(-50%, 0); } 50% { opacity: 1; transform: translate(-50%, 6px); } }

/* compact page hero for interior pages */
.page-hero { position: relative; isolation: isolate; padding-top: calc(var(--nav-h) + var(--space-10)); padding-bottom: var(--space-10); color: var(--color-cream); overflow: hidden; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero__bg { position: absolute; inset: 0; z-index: -2; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,31,26,0.6), rgba(20,31,26,0.78)); }
.page-hero .eyebrow { display: inline-block; font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-sage-light); margin-bottom: var(--space-2); }
.page-hero h1 { color: var(--color-cream); font-weight: 400; max-width: 800px; }
.page-hero h1 em { font-weight: 600; }
.page-hero p { color: var(--color-sage-light); max-width: 600px; margin-top: var(--space-3); font-size: var(--text-lg); }

/* ---------- Scroll-reveal animation utilities ----------------------------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; will-change: opacity, transform; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1 !important; transform: none !important; } }

/* skip link */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000; background: var(--color-forest); color: var(--color-cream); padding: 12px 18px; border-radius: 0 0 var(--radius-md) 0; }
.skip-link:focus { left: 0; }

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