/* Inner & Outer Journey — shared styles
   Tokens follow IOJ_Brand_Guideline.docx; see design-dna.json */

@font-face { font-family: "Auromiya"; src: url("fonts/Auromiya.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "The Rivers"; src: url("fonts/TheRivers-Regular.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "Interstate Condensed"; src: url("fonts/InterstateBoldCondensed.ttf") format("truetype"); font-display: swap; }

:root {
  --terracotta: #82542B;
  --ochre: #8D6008;
  --gold: #AB5C09;
  --sand: #F8E6C3;
  --sand-deep: #EFD6A6;
  --grey: #706F6F;
  --white: #FFFFFF;
  --ink: #4A3A2C;
  --ember: #22160E;
  --ember-2: #33231A;
  --logo-sand: #F5E3C3;

  --f-display: "Auromiya", "The Rivers", Georgia, serif;
  --f-quote: "The Rivers", Georgia, serif;
  --f-head: "Montserrat", system-ui, sans-serif;
  --f-body: "Lato", system-ui, sans-serif;
  --f-meta: "Interstate Condensed", "Montserrat", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --ease: cubic-bezier(.22,.8,.2,1);
  --section: clamp(96px, 14vw, 200px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 300 1.0625rem/1.7 var(--f-body);
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ember); color: var(--sand); padding: 10px 16px; }
.skip:focus { left: 8px; }

/* grain on a fixed layer, never on scrolling content */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* the brand gold is too dark to read on ember; dark sections use a lighter step of it */
.ethos, .pillars, .past, .why, .arc, .q, .next, .footer, .rh { --gold: #D9A05B; }

/* type */
.display { font-family: var(--f-display); font-weight: 400; line-height: 1.02; letter-spacing: -.005em; }
.quote { font-family: var(--f-quote); font-weight: 400; }
.meta { font-family: var(--f-meta); font-weight: 400; letter-spacing: .02em; font-size: .95rem; }
.h2 { font-family: var(--f-head); font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.1; letter-spacing: -.02em; }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.6; max-width: 36ch; }
.prose p + p { margin-top: 1em; }
.prose { max-width: 62ch; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 .95rem/1 var(--f-head); letter-spacing: .01em; text-decoration: none;
  padding: 16px 26px; border-radius: 2px; border: 1px solid currentColor;
  transition: transform .2s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--solid { background: var(--ember); color: var(--sand); border-color: var(--ember); }
.btn--solid:hover { background: var(--terracotta); border-color: var(--terracotta); }
.btn--sand { background: var(--sand); color: var(--ember); border-color: var(--sand); }
.btn--sand:hover { background: var(--white); border-color: var(--white); }
.btn--ghost:hover { background: currentColor; }
.btn--ghost:hover span { color: var(--sand); }
.on-dark .btn--ghost:hover span { color: var(--ember); }
.link { font: 600 .95rem/1.4 var(--f-head); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.link:hover { color: var(--gold); }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  color: var(--sand);
  transition: color .5s var(--ease), background-color .5s var(--ease), transform .5s var(--ease);
}
.nav[data-tone="light"] { color: var(--ember); }
.nav.is-solid { background: color-mix(in srgb, var(--sand) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--ember); }
.nav.is-solid[data-tone="dark"] { background: color-mix(in srgb, var(--ember) 86%, transparent); color: var(--sand); }
.nav__logo { display: block; width: 74px; height: 46px; position: relative; }
.nav__logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .4s; }
.nav__logo .l-dark { opacity: 0; }
.nav[data-tone="light"] .l-dark, .nav.is-solid:not([data-tone="dark"]) .l-dark { opacity: 1; }
.nav[data-tone="light"] .l-light, .nav.is-solid:not([data-tone="dark"]) .l-light { opacity: 0; }
.nav__links { display: flex; gap: clamp(18px, 2.4vw, 36px); align-items: center; font: 500 .9rem/1 var(--f-head); }
.nav__links a { text-decoration: none; padding: 8px 0; }
.nav__links a:hover { color: var(--gold); }
.nav__apply { border: 1px solid currentColor; padding: 11px 18px !important; border-radius: 2px; }
.nav__toggle { display: none; background: none; border: 0; color: inherit; font: 600 .9rem var(--f-head); padding: 12px 4px; cursor: pointer; }
@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 28px;
    background: var(--ember); color: var(--sand); font-size: 1.4rem;
    opacity: 0; pointer-events: none; transition: opacity .4s var(--ease);
  }
  .nav.is-open .nav__links { opacity: 1; pointer-events: auto; }
  .nav.is-open { color: var(--sand); background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav__toggle { position: relative; z-index: 2; }
}

/* footer */
.footer { background: var(--ember); color: color-mix(in srgb, var(--sand) 78%, transparent); padding: 56px 0 40px; font-size: .95rem; }
.footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.footer nav { display: flex; flex-wrap: wrap; gap: 12px 28px; font: 500 .9rem var(--f-head); }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--gold); }
.footer small { display: block; margin-top: 14px; opacity: .7; }
@media (max-width: 700px) { .footer .wrap { grid-template-columns: 1fr; } }

/* shared reveal — one orchestrated entrance per block, not per element */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}
