/* ============================================================
   SITE.CSS — Shared base stylesheet for all static pages
   Source of truth for: tokens, reset, nav, footer,
   buttons, scroll reveal, and base utilities.

   DO NOT duplicate these in page-level <style> blocks.
   Page-specific styles stay in each page's <style> block.
   ============================================================ */


/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --bg:        #ffffff;
  --ink:       #0A0A0A;
  --ink-2:     #6B7280;
  --ink-3:     #9CA3AF;
  --border:    #E5E7EB;
  --surface:   #F8FAFC;
  --surface-2: #f0f2f5;
  --accent:    #9B6B57;
  --px:        clamp(24px, 5vw, 80px);
  --max:       1160px;
}


/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}


/* ── Base ─────────────────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  font-optical-sizing: auto;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video {
  display: block;
  max-width: 100%;
}


/* ── Container ────────────────────────────────────────────── */
.container {
  width: 100%;
  padding: 0 var(--px);
  max-width: calc(var(--max) + var(--px) * 2);
  margin: 0 auto;
}


/* ── Eyebrow / Label ──────────────────────────────────────── */
/* Base text treatment — no built-in margin (add per-page if needed). */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
}

.label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
}


/* ── Navigation ───────────────────────────────────────────── */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

#site-nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  width: 100%;
  padding: 22px var(--px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.15s;
}

.nav-links a:hover {
  opacity: 0.5;
}

.nav-links a.active {
  color: var(--accent);
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
}


/* ── Buttons ──────────────────────────────────────────────── */
/*
 * All buttons use the dark ink system.
 * Primary CTA = near-black (#0A0A0A). NOT terracotta.
 * Three variants: primary, secondary (outline), ghost.
 */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: #222;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-secondary:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 18px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 10px;
  color: var(--ink-2);
  background: transparent;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.btn-ghost:hover {
  color: var(--ink);
  background: var(--surface);
}

/* Base .btn class used on résumé page (paired with .btn-primary or .btn-outline) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 13px 24px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s, opacity 0.2s;
}

/* When .btn and .btn-primary are both applied */
.btn.btn-primary {
  background: var(--ink);
  color: #fff;
  border: none;
}

.btn.btn-primary:hover {
  background: #222;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  color: var(--ink-2);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-outline:hover {
  border-color: var(--ink);
  color: var(--ink);
}


/* ── Back link (case study pages) ────────────────────────── */
.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--ink);
}


/* ── Arrow SVG utility ────────────────────────────────────── */
.arrow-svg {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex-shrink: 0;
}


/* ── Footer ───────────────────────────────────────────────── */
/*
 * Standard footer: 3-column row — brand / links / copyright.
 * Classes: .footer-left  .footer-links  .footer-right
 */

footer {
  border-top: 1px solid var(--border);
  padding: clamp(36px, 4vw, 56px) 0;
  margin-top: clamp(36px, 4vw, 56px);
}

.footer-inner {
  max-width: calc(var(--max) + var(--px) * 2);
  margin: 0 auto;
  padding: 0 var(--px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-left {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.footer-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.footer-links a {
  font-size: 14px;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-right {
  font-size: 13px;
  color: var(--ink-3);
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ── Scroll reveal ────────────────────────────────────────── */
/*
 * Two patterns in use across the site:
 *   Pattern A: .fade-up + .visible  (used by most pages)
 *   Pattern B: .reveal  + .is-visible  (used by index.html)
 *   Both .reveal.visible and .reveal.is-visible are supported.
 */

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: none;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible,
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Staggered children */
.reveal-group > *,
.reveal-children > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal-group.is-visible > *:nth-child(1),
.reveal-children.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s;     }
.reveal-group.is-visible > *:nth-child(2),
.reveal-children.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.07s;  }
.reveal-group.is-visible > *:nth-child(3),
.reveal-children.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.14s;  }
.reveal-group.is-visible > *:nth-child(4),
.reveal-children.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.21s;  }
.reveal-group.is-visible > *:nth-child(5),
.reveal-children.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.28s;  }
.reveal-group.is-visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.35s;  }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-up,
  .reveal,
  .reveal-group > *,
  .reveal-children > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
