/* ==========================================================================
   Rich Tramp — base.css
   Fonts, design tokens, reset, shared components (header, footer, buttons,
   lockups, utilities). Page-specific layout lives in home.css / edit.css,
   per-edit colour moods live in themes/*.css.
   ========================================================================== */

/* ---------- Brand fonts ------------------------------------------------- */
@font-face {
  font-family: "Photograph Signature";
  src: url("../assets/fonts/PhotographSignature.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "There Must Be";
  src: url("../assets/fonts/ThereMustBe.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens -------------------------------------------------------- */
:root {
  /* brand palette */
  --black: #0e1111;
  --gold: #b8860b;
  --gold-light: #d4a62a;
  --gold-pale: #e9cf7a;
  --green: #013220;
  --cream: #f6f1e7;
  --cream-2: #ede6d8;
  --ink: #1e2120;
  --muted: #6b6f6c;

  /* type */
  --font-script: "Photograph Signature", "Brush Script MT", "Segoe Script", cursive;
  --font-slab: "There Must Be", "Rockwell Extra Bold", Rockwell, "Roboto Slab", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;

  /* layout */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 76px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-btn: 4px;   /* buttons, chips and labels: square with soft corners */

  /* motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: .45s;

  /* default theme = brand dark (homepage, Rich Tramp edit) */
  --bg: var(--black);
  --bg-2: #171b1b;
  --fg: var(--cream);
  --fg-muted: rgba(246, 241, 231, .68);
  --line: rgba(246, 241, 231, .14);
  --accent: var(--gold);
  --accent-2: var(--gold-light);
  --accent-contrast: var(--black);
  --surface: #151919;
  --surface-2: #1d2222;
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

/* ---------- Reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout helpers ------------------------------------------------ */
.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.section { padding-block: clamp(72px, 10vw, 128px); }
.section--tight { padding-block: clamp(48px, 7vw, 88px); }

/* ---------- Typography ---------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: currentColor; opacity: .8;
}
.eyebrow--plain::before { display: none; }

.lockup {
  font-weight: 400; line-height: .95; margin: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .18em; row-gap: .05em;
}
.lockup .script {
  font-family: var(--font-script); color: var(--gold);
  font-size: 1.18em; line-height: 1; margin-right: .08em; letter-spacing: 0;
  position: relative; top: .04em;
}
.lockup .slab {
  font-family: var(--font-slab); letter-spacing: .02em; text-transform: uppercase;
}
.lockup--xl { font-size: clamp(44px, 7.5vw, 108px); }
.lockup--lg { font-size: clamp(36px, 5.5vw, 72px); }
.lockup--md { font-size: clamp(28px, 3.6vw, 44px); }
.lockup--sm { font-size: clamp(22px, 2.6vw, 30px); }

.lead { font-size: clamp(17px, 1.4vw, 21px); line-height: 1.6; color: var(--fg-muted); max-width: 62ch; }
.body-copy { color: var(--fg-muted); max-width: 64ch; }
.body-copy p + p { margin-top: 1em; }
.script-line { font-family: var(--font-script); color: var(--gold); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.1; }

/* ---------- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: var(--radius-btn);
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  border: 1.5px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--gold { background: var(--gold); color: var(--black); border-color: var(--gold); box-shadow: 0 10px 30px rgba(184, 134, 11, .25); }
.btn--gold:hover { background: var(--gold-light); border-color: var(--gold-light); }

.btn--ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--fg); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

.btn--black { background: var(--black); color: var(--cream); border-color: var(--black); }
.btn--black:hover { background: #222727; }

.btn--accent { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.btn--accent:hover { filter: brightness(1.08); }

.btn--sm { padding: 11px 20px; font-size: 12px; }
@media (max-width: 520px) {
  .btn { white-space: normal; text-align: center; line-height: 1.35; max-width: 100%; }
}

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.text-link svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.text-link:hover svg { transform: translateX(4px); }

/* ---------- Site header ------------------------------------------------------ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header::before {
  /* subtle gradient so the nav reads over bright hero imagery before scroll */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
  opacity: 1; transition: opacity .35s var(--ease);
}
.site-header.is-scrolled { background: var(--header-bg, rgba(14, 17, 17, .92)); backdrop-filter: blur(10px); border-color: var(--line); }
.site-header.is-scrolled::before { opacity: 0; }

.site-header__inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  position: relative;
}
.brand { display: inline-flex; align-items: center; height: 100%; }
.brand img { height: 30px; width: auto; }
.brand .brand__dark { display: none; }   /* light-theme pages swap this in once scrolled */

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  padding: 10px 14px; font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255, 255, 255, .82); position: relative; border-radius: var(--radius-btn);
  transition: color .25s var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 1.5px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: #fff; }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__cta { margin-left: 10px; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  align-items: center; justify-content: center; color: #fff;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: background .2s;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(14, 17, 17, .97); backdrop-filter: blur(12px);
    padding: 12px var(--gutter) 28px; border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__link { padding: 16px 4px; font-size: 14px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__link::after { display: none; }
  .nav__cta { margin: 20px 0 0; }
  .site-header.menu-open { background: rgba(14, 17, 17, .97); }
}

/* ---------- Site footer ------------------------------------------------------- */
.site-footer {
  background: var(--black); color: var(--cream);
  border-top: 1px solid rgba(246, 241, 231, .1);
  padding: clamp(56px, 7vw, 88px) 0 32px;
  position: relative; overflow: hidden;
}
.site-footer::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--green) 0 33.3%, var(--gold) 33.3% 66.6%, var(--cream) 66.6%);
  opacity: .9;
}
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
}
.footer__brand img { height: 36px; width: auto; }
.footer__brand p { color: rgba(246, 241, 231, .62); margin-top: 8px; max-width: 34ch; font-size: 14.5px; }
.footer__title { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; font-weight: 700; }
.footer__links li + li { margin-top: 10px; }
.footer__links a { color: rgba(246, 241, 231, .8); font-size: 14.5px; transition: color .2s; display: inline-flex; align-items: center; gap: 10px; }
.footer__links a:hover { color: #fff; }
.footer__links svg { width: 16px; height: 16px; color: var(--gold); }
.footer__bottom {
  margin-top: clamp(40px, 5vw, 64px); padding-top: 24px; border-top: 1px solid rgba(246, 241, 231, .12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 12.5px; color: rgba(246, 241, 231, .5); letter-spacing: .04em;
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Picture / hero media ------------------------------------------------ */
.media { position: relative; overflow: hidden; }
.media picture { display: contents; }   /* let the img size against .media directly */
.media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Scroll reveal --------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Skip link -------------------------------------------------------------- */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px;
  background: var(--gold); color: var(--black); border-radius: 6px; font-weight: 700;
}
.skip-link:focus { top: 16px; }
