/* ============================================================
   GROD — Global Stylesheet
   Oswald (display) + EB Garamond (body) + DM Mono (labels)
   ============================================================ */

/* Fonts loaded via <link> in each HTML file for parallelism */

/* ─── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ─── Variables ───────────────────────────────────────────── */
:root {
  --bg:       #080808;
  --surface:  #0f0f0f;
  --raised:   #181614;
  --text:     #e6dfd4;
  --muted:    #8a8078; /* lightened from #524941 — WCAG AA contrast on dark bg */
  --faint:    #1a1714;
  --accent:   #c47a2a;
  --accent-hi:#e8953c;
  --border:   rgba(230, 223, 212, 0.07);
  --border-hi:rgba(230, 223, 212, 0.18);
  --f-head:   'Oswald', sans-serif;
  --f-body:   'EB Garamond', Georgia, serif;
  --f-mono:   'DM Mono', 'Courier New', monospace;
}

/* ─── Base ────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Grain texture — strong enough to actually feel it */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.09;
  pointer-events: none;
  z-index: 9998;
}

/* ─── Focus & skip link ───────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -9999px; left: -9999px;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #000;
  font-family: var(--f-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 9999;
}
.skip-link:focus {
  top: 1rem; left: 1rem;
  outline: none;
}

/* Visually hidden but screen-reader accessible */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ─── SVG Logo ────────────────────────────────────────────── */
.grod-logo { fill: currentColor; overflow: visible; }

/* ─── Navigation ──────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 1.4rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, rgba(8,8,8,0.97) 40%, transparent);
}

.nav-logo-link {
  display: block;
  width: 68px;
  flex-shrink: 0;
  color: rgba(230,223,212,0.45);
  transition: color 0.25s ease;
}
.nav-logo-link:hover { color: var(--text); }

.nav-links {
  display: flex;
  gap: 2.75rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--f-head);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding-bottom: 3px;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { width: 100%; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: 0.2rem;
  z-index: 501;
  position: relative;
}
.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}
.nav-toggle-icon span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform 0.25s, opacity 0.25s;
}
body.nav-open .nav-toggle-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle-icon span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 620px) {
  .site-nav { padding: 1.2rem 1.5rem; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: fixed; inset: 0;
    background: rgba(8,8,8,0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 499;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    font-size: 1.4rem;
    letter-spacing: 0.2em;
    color: var(--text);
  }
}

/* ─── Layout ──────────────────────────────────────────────── */
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 2.5rem;
}
@media (max-width: 620px) { .wrap { padding: 0 1.5rem; } }

/* ─── Typography utilities ────────────────────────────────── */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
}

.display-heading {
  font-family: var(--f-head);
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 0.9;
  color: var(--text);
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.72rem 2rem;
  font-family: var(--f-head);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--border-hi);
  color: var(--text);
  background: transparent;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }

.btn-fill {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 700;
}
.btn-fill:hover {
  background: var(--accent-hi);
  border-color: var(--accent-hi);
  color: #000;
}

/* ─── Page header (subpages) ──────────────────────────────── */
.page-header {
  padding: 9rem 2.5rem 5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 620px) { .page-header { padding: 8rem 1.5rem 3.5rem; } }

.page-header-inner {
  max-width: 1040px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.page-header-ghost {
  position: absolute;
  right: -0.02em; top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-head);
  font-size: clamp(7rem, 22vw, 18rem);
  font-weight: 700;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(196, 122, 42, 0.1);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
}
.page-header .eyebrow { margin-bottom: 1rem; }
.page-header-sub {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 1rem;
}

/* ─── Footer ──────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2.5rem;
}
.site-footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-left { display: flex; flex-direction: column; gap: 1rem; }
.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  list-style: none;
}
.footer-nav a {
  font-family: var(--f-head);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--accent); }
.footer-copy {
  font-family: var(--f-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  opacity: 0.5;
}
.footer-logo-link {
  display: block;
  width: 88px;
  color: var(--text);
  opacity: 0.12;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.footer-logo-link:hover { opacity: 0.3; }
@media (max-width: 620px) {
  .site-footer { padding: 2.5rem 1.5rem; }
  .footer-logo-link { display: none; }
}

/* ─── Social links ────────────────────────────────────────── */
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  font-family: var(--f-head);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.social-link:hover { color: var(--text); border-color: var(--border-hi); }
.social-link .arrow { font-size: 0.75em; opacity: 0.5; margin-left: 0.1em; }

/* ─── Horizontal rule ─────────────────────────────────────── */
.rule { border: none; border-top: 1px solid var(--border); }

/* ─── Animations ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes drawLine {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
