/* ============================================================
   site.css — shared portfolio styles
   Loaded by every portfolio page (not standalone demos).
   Page-specific styles remain in the page's inline <style>
   and can override anything here via specificity or var() swaps.
   ============================================================ */

/* ─── DESIGN TOKENS ─────────────────────────────────────── */
:root {
  /* Background (per page; portfolio = #0d1021, case studies = #0a0a0a) */
  --bg: #0d1021;
  --bg-card: #10142a;
  --bg-surface: #0d0d0d;

  /* Text */
  --text: #f0ece4;
  --text-strong: #f0ece4;
  --text-muted: rgba(240, 236, 228, 0.6);
  --text-dim: rgba(240, 236, 228, 0.4);
  --text-faint: rgba(240, 236, 228, 0.25);

  /* Brand accent — overridable per page via inline style="--accent: #..." */
  --accent: #8573F5;
  --accent-soft: rgba(133, 115, 245, 0.4);
  --accent-glow: rgba(133, 115, 245, 0.06);
  --accent-hover: #B0A6F8;

  /* Lines */
  --line: rgba(240, 236, 228, 0.07);
  --line-strong: rgba(240, 236, 228, 0.15);

  /* Fonts */
  --font-display: 'Syne', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;

  /* Layout */
  --content-max: 1200px;
  --content-wide: 1400px;
}

/* Case studies use a darker base background — set on body via data attribute */
body[data-bg="case-study"] {
  --bg: #0a0a0a;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── FOCUS ─────────────────────────────────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ─── SKIP LINK (visually hidden until focused) ─────────── */
.skip-link {
  position: absolute;
  top: 0; left: 0;
  z-index: 999;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-100%);
  transition: transform 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--text);
  outline-offset: -4px;
}

/* ─── NAV (shared across all portfolio pages) ───────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(240, 236, 228, 0.55);
  text-decoration: none;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(240, 236, 228, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-back:hover { color: var(--text); }
.nav-back svg { transition: transform 0.2s; }
.nav-back:hover svg { transform: translateX(-3px); }

/* ─── SCROLL REVEAL ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── HERO DECORATIONS (used by index + all-projects) ───── */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob,
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.1;
  pointer-events: none;
}

@keyframes blobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(50px, -70px) scale(1.06); }
  66%       { transform: translate(-30px, 50px) scale(0.94); }
}

.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(240, 236, 228, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 0%, transparent 100%);
}

/* ─── TYPOGRAPHY PRIMITIVES ─────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 26px; height: 1px;
  background: var(--accent);
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin-bottom: 4rem;
}

/* ============================================================
   CASE STUDY PRIMITIVES
   Used across /projects/*.html files. Accent color is set per
   page via inline style="--accent: #f59e0b" on <body>.
   ============================================================ */

/* ─── CASE STUDY HERO ───────────────────────────────────── */
.cs-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.cs-hero-bg {
  position: absolute;
  inset: 0;
}

.cs-hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 3rem 5rem;
  max-width: 900px;
}

.cs-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.cs-tag::before {
  content: '';
  display: block;
  width: 26px; height: 1px;
  background: var(--accent);
}

.cs-hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(240, 236, 228, 0.5);
}

.cs-hero-title span {
  display: block;
  color: var(--text);
  -webkit-text-stroke: 0;
  -webkit-text-fill-color: var(--text);
}

.cs-hero-meta {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.meta-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(240, 236, 228, 0.35);
  margin-bottom: 0.3rem;
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

/* ─── CASE STUDY SECTIONS ───────────────────────────────── */
.cs-section {
  padding: 6rem 3rem;
  border-top: 1px solid var(--line);
  max-width: var(--content-max);
  margin: 0 auto;
}

.cs-section-full {
  padding: 6rem 3rem;
  border-top: 1px solid var(--line);
}

.cs-heading {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: 0.005em;
  margin-bottom: 2.5rem;
}

.cs-body {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: rgba(240, 236, 228, 0.7);
  line-height: 1.9;
  max-width: 720px;
}

.cs-body + .cs-body { margin-top: 1.25rem; }
.cs-body strong { color: var(--text); font-weight: 500; }

.amber { color: var(--accent); }

/* ─── TWO-COLUMN LAYOUTS ────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.two-col-wide {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 6rem;
  align-items: start;
}

/* ─── OVERVIEW STATS ────────────────────────────────────── */
.overview-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.stat-box {
  background: var(--bg-surface);
  padding: 2rem;
}

.stat-box-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3rem;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-box-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 236, 228, 0.4);
}

/* ─── PROBLEM / SOLUTION ────────────────────────────────── */
.ps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}

.ps-box {
  background: var(--bg-surface);
  padding: 3rem;
}

.ps-box-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240, 236, 228, 0.3);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ps-box-label::before {
  content: '';
  display: block;
  width: 18px; height: 1px;
  background: rgba(240, 236, 228, 0.3);
}

.ps-box-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: 0em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.ps-box:last-child .ps-box-heading { color: var(--accent); }

.ps-box-body {
  font-size: 0.95rem;
  color: rgba(240, 236, 228, 0.6);
  line-height: 1.8;
}

/* ─── AUDIENCE CARDS ────────────────────────────────────── */
.audience-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: 3rem;
}

.audience-card {
  background: var(--bg-surface);
  padding: 2.5rem 2rem;
}

.audience-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.audience-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.audience-desc {
  font-size: 0.88rem;
  color: rgba(240, 236, 228, 0.55);
  line-height: 1.75;
}

/* ─── FEATURES LIST ─────────────────────────────────────── */
.features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  margin-top: 3rem;
}

.feature-item {
  background: var(--bg-surface);
  padding: 2.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.feature-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  flex-shrink: 0;
  margin-top: 3px;
}

.feature-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.88rem;
  color: rgba(240, 236, 228, 0.55);
  line-height: 1.75;
}

/* ─── COLOR SWATCHES (case study brand work) ────────────── */
.colour-swatches {
  display: flex;
  gap: 1px;
  background: var(--line);
  margin-top: 3rem;
}

.swatch {
  flex: 1;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-surface);
}

.swatch-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}

.swatch-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}

.swatch-hex {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(240, 236, 228, 0.4);
  font-family: monospace;
}

/* ─── LOGO SHOWCASE ─────────────────────────────────────── */
.logo-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  margin-top: 3rem;
}

.logo-box {
  padding: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── OUTCOME ROW ───────────────────────────────────────── */
.outcome-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  margin-top: 3rem;
}

.outcome-box {
  background: var(--bg-surface);
  padding: 2.5rem;
}

.outcome-box-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.outcome-box-label {
  font-size: 0.88rem;
  color: rgba(240, 236, 228, 0.55);
  line-height: 1.6;
}

/* ─── NEXT PROJECT ──────────────────────────────────────── */
.next-project {
  padding: 6rem 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.next-label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(240, 236, 228, 0.35);
  margin-bottom: 0.5rem;
}

.next-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  letter-spacing: 0em;
}

.next-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2rem;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}

.next-cta:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* ─── RESPONSIVE BREAKPOINTS ────────────────────────────── */
@media (max-width: 960px) {
  nav { padding: 1.25rem 1.5rem; }
  .nav-links { gap: 1.5rem; }

  .cs-section,
  .cs-section-full { padding: 4rem 1.5rem; }
  .cs-hero-content { padding: 3rem 1.5rem 4rem; }

  .two-col,
  .two-col-wide { grid-template-columns: 1fr; gap: 3rem; }

  .ps-grid,
  .features-list { grid-template-columns: 1fr; }

  .audience-cards { grid-template-columns: 1fr 1fr; }
  .logo-showcase { grid-template-columns: 1fr; }
  .colour-swatches { flex-wrap: wrap; }
  .swatch { flex: 0 0 calc(50% - 1px); }

  .next-project { padding: 4rem 1.5rem; }
}

@media (max-width: 600px) {
  .section-heading { margin-bottom: 2.5rem; }
  .cs-hero-title { font-size: clamp(3rem, 14vw, 5rem); }
  .cs-hero-meta { gap: 1.5rem; }
  .audience-cards { grid-template-columns: 1fr; }
  .overview-stats { grid-template-columns: 1fr 1fr; }
  .outcome-row { grid-template-columns: 1fr; }
}
