/* ============================================================
   Sonny Parlin — Mat White
   ============================================================ */

:root {
  --bg: #f1eee9;
  --bg-2: #e7e2da;
  --ink: #191919;
  --ink-2: #5c5852;
  --ink-3: #9b968e;
  --blue: #2a5bd7;
  --blue-2: #dfe7fb;
  --line: #d6d0c6;
  --head: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max: 1360px;
  --gutter: clamp(16px, 3vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
figure { margin: 0; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: -0.04em; margin: 0; }
h2 { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.02; margin-bottom: 12px; max-width: 900px; }
h3 { font-size: clamp(26px, 3vw, 40px); line-height: 1.05; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.sec { padding-top: clamp(60px, 8vw, 120px); padding-bottom: clamp(60px, 8vw, 120px); }
.kicker { font: 600 12px/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 18px; }
.lead { color: var(--ink-2); max-width: 600px; margin: 0 0 34px; font-size: 17px; }
.lead a, .life a { color: var(--ink); text-decoration-color: var(--blue); text-underline-offset: 3px; }
.dim { color: var(--ink-2); }

.pill {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font: 600 15px/1 var(--head);
  letter-spacing: -0.01em;
  padding: 14px 22px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.pill:hover { background: var(--blue); }

/* inline photo inside a sentence */
.inl {
  display: inline-block;
  height: 0.78em;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  vertical-align: -0.1em;
  border-radius: 6px;
  margin: 0 0.06em;
  filter: saturate(0.9);
}
.inl.logo { aspect-ratio: 1; border-radius: 50%; background: #fff; padding: 2px; height: 0.9em; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  padding: 14px var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: stretch;
}
.cell {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font: 600 15px/1 var(--head);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.cell.name { font-size: 18px; gap: 10px; padding-left: 12px; }
.mark { width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto; }
.cell.live { justify-content: space-between; }
.cell.live b { font: 500 13px var(--body); color: var(--ink-2); }
.cell.live span {
  background: var(--blue-2);
  color: var(--blue);
  padding: 4px 10px;
  border-radius: 999px;
  font: 600 13px var(--body);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cell.menu { gap: 18px; }
.cell.menu a { text-decoration: none; font: 500 14px var(--body); color: var(--ink-2); white-space: nowrap; }
.cell.menu a:hover, .cell.menu a.on { color: var(--ink); }
.cell.menu a.on { text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 5px; text-decoration-thickness: 2px; }
@media (max-width: 820px) {
  .nav { grid-template-columns: 1fr auto; padding: 10px var(--gutter); }
  .cell.live { display: none; }
  .cell { padding: 9px 12px; }
  .cell.menu { gap: 10px; }
  .cell.menu a { font-size: 12px; }
  .cell.name { font-size: 16px; }
}
@media (max-width: 400px) {
  .nav { grid-template-columns: 1fr; }
  .cell.menu { justify-content: space-between; gap: 6px; }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 110px); padding-bottom: clamp(30px, 4vw, 60px); }
.hero h1 { font-size: clamp(42px, 7.4vw, 112px); line-height: 1.0; letter-spacing: -0.045em; max-width: 1200px; }
.hero .meta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; color: var(--ink-2); font-size: 15px; }

/* ---------- Wash ---------- */
.wash { position: relative; margin: clamp(30px, 4vw, 60px) 0 0; height: min(78vh, 720px); overflow: hidden; background: var(--blue); }
.wash img { width: 100%; height: 100%; object-fit: cover; object-position: 22% 40%; filter: grayscale(1) contrast(1.15) brightness(1.05); mix-blend-mode: multiply; opacity: 0.95; }
.wash::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(0,0,0,0.12) 1px, transparent 1.2px); background-size: 3px 3px; pointer-events: none; opacity: 0.5; }
@media (max-width: 640px) { .wash { height: min(60vh, 460px); } }

/* ---------- Story ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 20px clamp(24px, 4vw, 60px); align-items: start; }
.story-head { grid-column: 1 / -1; }
.story-head h2 { max-width: 1000px; }
.story-body p { font-size: 18px; color: var(--ink-2); }
.story-body p:first-child { color: var(--ink); font-size: 20px; }
.story-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; border-radius: 8px; filter: saturate(0.9); }
@media (max-width: 820px) { .story { grid-template-columns: 1fr; } }

/* ---------- Lineage chain ---------- */
.chain { list-style: none; padding: 0; margin: 0 0 clamp(50px, 7vw, 90px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.chain li { border-top: 1px solid var(--ink); padding: 16px 12px 16px 0; display: flex; flex-direction: column; gap: 4px; }
.chain .n { font: 500 12px var(--body); color: var(--ink-3); margin-bottom: 6px; }
.chain b { font: 600 clamp(20px, 2.4vw, 30px)/1.05 var(--head); letter-spacing: -0.03em; }
.chain li > span:last-child { font-size: 14px; color: var(--ink-2); }
.chain li.me b { color: var(--blue); }
@media (max-width: 820px) { .chain { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .chain { grid-template-columns: 1fr; } }

/* ---------- Belt table ---------- */
.belts-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.belts-head p { margin: 0; color: var(--ink-2); max-width: 520px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font: 600 12px var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: 0 0 12px; border-bottom: 1px solid var(--ink); }
.tbl td { padding: 18px 12px 18px 0; border-bottom: 1px solid var(--line); font: 600 17px var(--head); letter-spacing: -0.01em; vertical-align: middle; }
.tbl td.dim { font: 400 15px var(--body); color: var(--ink-2); }
.sw { display: inline-block; width: 34px; height: 12px; border-radius: 2px; vertical-align: middle; margin-right: 12px; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); }
.sw.k::after { content: ""; position: absolute; right: 4px; top: 0; bottom: 0; width: 8px; background: #c8102e; }
.sw.k1::before, .sw.k2::before { content: ""; position: absolute; right: 14px; top: 0; bottom: 0; width: 2px; background: #fff; z-index: 1; }
.sw.k2::before { width: 6px; background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 4px); }
@media (max-width: 640px) { .tbl .hide { display: none; } }

.profs { margin-top: clamp(40px, 6vw, 80px); display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 32px); align-items: start; }
.prof img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 20%; border-radius: 8px; filter: saturate(0.9); }
.prof figcaption { margin-top: 14px; font: 600 clamp(17px, 1.6vw, 21px)/1.25 var(--head); letter-spacing: -0.03em; }
@media (max-width: 820px) { .profs { grid-template-columns: 1fr; } }

/* ---------- Academy ---------- */
.academy { background: var(--bg-2); max-width: none; padding-left: 0; padding-right: 0; }
.academy > * { max-width: var(--max); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.big { font: 600 clamp(28px, 3.6vw, 52px)/1.12 var(--head); letter-spacing: -0.035em; max-width: 1180px; margin: 0 0 clamp(40px, 5vw, 70px); }
.big .inl { height: 0.9em; border-radius: 5px; }
.big em { font-style: normal; color: var(--blue); }
.academy-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(24px, 4vw, 60px); align-items: start; }
.academy-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; filter: saturate(0.9); }
.academy-copy p { font-size: 18px; color: var(--ink-2); }
.facts { margin: 22px 0 30px; }
.facts td { padding: 12px 12px 12px 0; font-size: 15px; }
.facts td.dim { width: 120px; font: 600 12px var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 820px) { .academy-grid { grid-template-columns: 1fr; } }

/* ---------- Competition cards ---------- */
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.card { aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); border: 0; padding: 0; cursor: zoom-in; border-radius: 4px; }
.card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); transition: transform 0.6s ease, filter 0.4s ease; }
.card:hover img, .card:focus-visible img { transform: scale(1.04); filter: none; }
@media (max-width: 1100px) { .cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr 1fr; } }

/* ---------- Life ---------- */
.life { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 4vw, 70px); align-items: center; }
.life p { font-size: 18px; color: var(--ink-2); }
.life-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 10%; border-radius: 8px; filter: saturate(0.9); }
@media (max-width: 820px) { .life { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--ink); padding-top: 26px; padding-bottom: 60px; }
.foot-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; font: 500 13px var(--body); }
.foot-row + .foot-row { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.foot-name { font: 600 18px var(--head); letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 12px; }
.foot-name .mark { width: 36px; height: 36px; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-links a { text-decoration: none; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 3px; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(94vw, 1400px); max-height: 94vh; }
.lightbox::backdrop { background: rgba(25, 25, 25, 0.92); }
.lightbox img { max-width: min(94vw, 1400px); max-height: 88vh; width: auto; height: auto; margin: 0 auto; border-radius: 6px; }
.lightbox-close { position: fixed; top: 16px; right: 20px; background: transparent; border: 0; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; }

/* ---------- Reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}
