/* =================================================================
   THE GRADE & THE SKY — personal site for a colorist / editor
   + wingsuit camera flyer.  Earthy, classic, cinematic.
   ================================================================= */

/* ---------- tokens ---------- */
:root {
  /* accent is tweakable; defaults to clay */
  --accent: oklch(0.58 0.085 45);
  --accent-soft: oklch(0.58 0.085 45 / 0.12);

  /* secondary (sky) — the wingsuit side */
  --sky: oklch(0.56 0.058 242);
  --sky-soft: oklch(0.56 0.058 242 / 0.12);

  --bg:        oklch(0.962 0.009 82);
  --bg-2:      oklch(0.935 0.012 80);
  --surface:   oklch(0.986 0.006 86);
  --surface-2: oklch(0.948 0.010 80);
  --ink:       oklch(0.255 0.018 58);
  --ink-2:     oklch(0.445 0.016 60);
  --ink-3:     oklch(0.605 0.012 62);
  --line:      oklch(0.862 0.011 74);
  --line-2:    oklch(0.805 0.012 72);

  --grain: 0.018;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 3px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.5s;
}

[data-theme="dark"] {
  --accent: oklch(0.7 0.092 47);
  --accent-soft: oklch(0.7 0.092 47 / 0.16);
  --sky: oklch(0.7 0.07 242);
  --sky-soft: oklch(0.7 0.07 242 / 0.16);

  --bg:        oklch(0.188 0.012 58);
  --bg-2:      oklch(0.218 0.013 58);
  --surface:   oklch(0.238 0.014 58);
  --surface-2: oklch(0.205 0.013 58);
  --ink:       oklch(0.922 0.012 84);
  --ink-2:     oklch(0.735 0.013 78);
  --ink-3:     oklch(0.565 0.013 70);
  --line:      oklch(0.318 0.013 64);
  --line-2:    oklch(0.392 0.014 64);
  --grain: 0.03;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  overflow-x: hidden;
}

/* faint film grain over everything for warmth */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
[data-theme="dark"] body::after { mix-blend-mode: screen; }

::selection { background: var(--accent-soft); }

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

/* ---------- type ---------- */
.serif { font-family: var(--serif); }
.mono  { font-family: var(--mono); }

.kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.02; letter-spacing: -0.01em; }

.display {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.015em;
  font-size: clamp(54px, 11vw, 168px);
}

.h-xl { font-size: clamp(40px, 7vw, 92px); line-height: 0.98; }
.h-lg { font-size: clamp(32px, 4.6vw, 60px); }
.h-md { font-size: clamp(26px, 3vw, 40px); }

.lead {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.35;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: 0;
}

.prose { max-width: 64ch; }
.prose p { margin-bottom: 1.1em; color: var(--ink-2); }
.prose p:first-of-type { color: var(--ink); }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap-wide { max-width: 1480px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.section { padding: clamp(60px, 9vw, 130px) 0; }
.divider { height: 1px; background: var(--line); border: 0; }

/* ---------- color bars: earthy film-leader motif ---------- */
.bars { display: flex; height: 6px; width: 100%; }
.bars > span { flex: 1; }
.bars.tall { height: 10px; }
.bar-1 { background: oklch(0.58 0.085 45); }
.bar-2 { background: oklch(0.62 0.07 70); }
.bar-3 { background: oklch(0.6 0.055 110); }
.bar-4 { background: oklch(0.56 0.05 160); }
.bar-5 { background: oklch(0.56 0.058 242); }
.bar-6 { background: oklch(0.5 0.06 300); }
.bar-7 { background: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 500;
  padding: 13px 22px; border-radius: var(--radius);
  border: 1px solid var(--ink); color: var(--ink); background: transparent;
  cursor: pointer; transition: all 0.35s var(--ease); position: relative; overflow: hidden;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-accent { border-color: var(--accent); color: var(--accent); }
.btn-accent:hover { background: var(--accent); color: var(--bg); }
.btn-ghost { border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: transparent; }
/* splash "Selected work" ghost button highlights like the primary "Enter" btn */
.splash-body .btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* "Enter the site" — disabled while under construction. Hazard diagonals,
   no navigation, no hover fill (pointer-events:none kills :hover); the wrapper
   carries the not-allowed cursor. Stripes use the adaptive --splash-fg so they
   stay legible over light or dark frames. */
.btn-blocked-wrap { display: inline-flex; cursor: not-allowed; }
.btn-blocked {
  pointer-events: none;
  background-color: transparent;
  background-image: repeating-linear-gradient(-45deg,
    color-mix(in oklch, var(--splash-fg, var(--ink)) 30%, transparent) 0 6px,
    transparent 6px 13px);
}

/* ---------- social icon buttons ---------- */
.social-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--ink-2);
  background: transparent; cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.social-btn:hover { color: var(--bg); background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
/* registration-mark separator between icons — quiet film-leader detail */
.social-sep { display: inline-flex; align-items: center; color: var(--ink-3); opacity: 0.6; pointer-events: none; }

.arrow { transition: transform 0.35s var(--ease); display: inline-block; }
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2); border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- tags / meta ---------- */
.meta { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--ink-3); }
.tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 100px; color: var(--ink-2);
  white-space: nowrap;
}
.tag.flight { border-color: color-mix(in oklch, var(--sky), transparent 55%); color: var(--sky); }
.tag.color { border-color: color-mix(in oklch, var(--accent), transparent 55%); color: var(--accent); }

/* ---------- placeholder imagery ---------- */
.ph {
  position: relative; overflow: hidden; background: var(--surface-2);
  border: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 13px,
    color-mix(in oklch, var(--ink) 5%, transparent) 13px 14px
  );
  display: flex; align-items: flex-end;
}
.ph[data-tone="sky"]  { background-color: color-mix(in oklch, var(--sky) 14%, var(--surface-2)); }
.ph[data-tone="clay"] { background-color: color-mix(in oklch, var(--accent) 14%, var(--surface-2)); }
.ph[data-tone="ink"]  { background-color: color-mix(in oklch, var(--ink) 18%, var(--surface-2)); }
.ph-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); padding: 12px 14px; line-height: 1.5; width: 100%;
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-end;
  background: linear-gradient(to top, color-mix(in oklch, var(--bg) 55%, transparent), transparent);
}

/* ---------- focusable ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- fade-in on view ----------
   Animate TRANSFORM ONLY — opacity always stays 1, so content is visible even
   if the transition clock is frozen (screenshots, thumbnails, background tabs,
   print). A stalled transform just leaves the element un-slid but fully shown. */
.reveal { transition: transform 0.8s var(--ease); }
html.anim .reveal { transform: translateY(16px); }
html.anim .reveal.in { transform: none; }
@media print, (prefers-reduced-motion: reduce) {
  .reveal, html.anim .reveal { transform: none !important; transition: none !important; }
  * { scroll-behavior: auto !important; }
}

/* ---------- utility ---------- */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-s { gap: 10px; } .gap-m { gap: 20px; } .gap-l { gap: 40px; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.accent { color: var(--accent); }
.upper { text-transform: uppercase; }
