/* =========================================================
   Blow Ball — blowball.ing
   Played completely straight.
   ========================================================= */

:root {
  --black: #0b0b0b;
  --coal: #141414;
  --panel: #1a1a1a;
  --bone: #f2f0ea;
  --bone-2: #e6e3da;
  --grey: #9a9a93;
  --grey-2: #5f5f5a;
  --line: rgba(242, 240, 234, 0.14);
  --line-dark: rgba(11, 11, 11, 0.14);
  --orange: #ff5a1f;
  --display: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --nav-h: 64px;
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1320px;
}
@media (max-width: 760px) { :root { --nav-h: 96px; } }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--bone);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
::selection { background: var(--orange); color: var(--black); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 999; background: var(--bone); color: var(--black); padding: 8px 14px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */

.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0.005em;
  margin: 0;
  text-wrap: balance;
}
h1.display, .display.xl { font-size: clamp(3.6rem, 10.5vw, 10rem); }
h2.display, .display.lg { font-size: clamp(2.8rem, 7vw, 6.4rem); }
.display.md { font-size: clamp(2rem, 4vw, 3.4rem); }
.display.sm { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1; }
.display .accent { color: var(--orange); }

.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 20px;
}
.label::before { content: ""; width: 22px; height: 2px; background: var(--orange); }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.5; max-width: 34em; color: rgba(242, 240, 234, 0.85); margin-top: 22px; }
.light .lede { color: #3a3a37; }

.mono { font-family: var(--mono); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
  transition: background 0.25s, border-color 0.25s;
  border-bottom: 1px solid transparent;
}
.nav.solid { background: rgba(11, 11, 11, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom-color: var(--line); }

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--bone);
}
.wordmark .mark { width: 32px; height: 32px; flex: none; }

.tabs { display: flex; gap: 26px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none;
  position: relative;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(242, 240, 234, 0.72);
  padding: 8px 0;
  transition: color 0.15s;
}
.tabs a:hover { color: var(--bone); }
.tabs a[aria-current="page"] { color: var(--bone); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--orange); }
.tabs a.shop { color: var(--orange); }

@media (max-width: 760px) {
  .nav { flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; }
  .tabs { margin-left: 0; gap: 22px; }
}

/* ---------- Buttons ---------- */

.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  padding: 17px 26px;
  cursor: pointer;
  color: var(--black);
  background: var(--orange);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--bone); }
.btn .arr { transition: transform 0.15s; }
.btn:hover .arr { transform: translateX(4px); }
.btn.ghost { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1.5px rgba(242, 240, 234, 0.6); }
.btn.ghost:hover { background: var(--bone); color: var(--black); }
.light .btn.ghost { color: var(--black); box-shadow: inset 0 0 0 1.5px var(--black); }
.light .btn.ghost:hover { background: var(--black); color: var(--bone); }
.btn.sm { padding: 12px 16px; font-size: 0.72rem; }

/* ---------- Panels (tabs) ---------- */

.js .panel { display: none; }
.js .panel.is-active { display: block; }

/* ---------- Full-bleed scenes ---------- */

.scene {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.scene.short { min-height: 78vh; min-height: 78svh; }
.scene > .wrap { position: relative; z-index: 2; padding-top: calc(var(--nav-h) + 90px); padding-bottom: clamp(48px, 8vh, 96px); }

.media { position: absolute; inset: 0; z-index: 0; }
.media > img, .media > video { width: 100%; height: 100%; object-fit: cover; }
.scene .shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(11, 11, 11, 0.92) 0%, rgba(11, 11, 11, 0.35) 45%, rgba(11, 11, 11, 0.1) 70%, rgba(11, 11, 11, 0.45) 100%);
}

/* Placeholder: an unlit camera monitor */
.media.ph {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 60% 40%, #262626 0%, #121212 60%, #0b0b0b 100%);
}
.media.ph::before {
  /* viewfinder corners */
  content: "";
  position: absolute;
  inset: calc(var(--nav-h) + 16px) var(--gutter) 24px;
  background:
    linear-gradient(var(--grey-2), var(--grey-2)) top left / 28px 1.5px,
    linear-gradient(var(--grey-2), var(--grey-2)) top left / 1.5px 28px,
    linear-gradient(var(--grey-2), var(--grey-2)) top right / 28px 1.5px,
    linear-gradient(var(--grey-2), var(--grey-2)) top right / 1.5px 28px,
    linear-gradient(var(--grey-2), var(--grey-2)) bottom left / 28px 1.5px,
    linear-gradient(var(--grey-2), var(--grey-2)) bottom left / 1.5px 28px,
    linear-gradient(var(--grey-2), var(--grey-2)) bottom right / 28px 1.5px,
    linear-gradient(var(--grey-2), var(--grey-2)) bottom right / 1.5px 28px;
  background-repeat: no-repeat;
}
.media.ph::after {
  /* center crosshair */
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 36px; height: 36px;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(var(--grey-2), var(--grey-2)) center / 36px 1px no-repeat,
    linear-gradient(var(--grey-2), var(--grey-2)) center / 1px 36px no-repeat;
  opacity: 0.6;
}

.slate {
  position: absolute;
  z-index: 3;
  top: calc(var(--nav-h) + 32px);
  right: calc(var(--gutter) + 16px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  text-align: right;
  max-width: 60%;
}
.slate .rec { display: inline-flex; align-items: center; gap: 8px; color: var(--bone); }
.slate .rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); animation: blink 1.4s steps(1) infinite; }
.slate .rec.still::before { border-radius: 0; background: var(--grey); animation: none; }
.slate a { color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--orange); padding-bottom: 1px; }
.slate a:hover { color: var(--orange); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Content sections ---------- */

.section { padding: clamp(80px, 12vw, 160px) 0; }
.section.tight { padding: clamp(56px, 8vw, 96px) 0; }
.light { background: var(--bone); color: var(--black); }
.light .label { color: var(--grey-2); }
.coal { background: var(--coal); }

.head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.head .lede { margin: 0; }
@media (max-width: 860px) { .head { grid-template-columns: 1fr; gap: 16px; } }

/* Stat strip */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 34px 24px 30px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .n { font-family: var(--display); font-size: clamp(3rem, 6vw, 5.4rem); line-height: 1; }
.stat .k { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); margin-top: 8px; }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 22px 12px; }
  .stat:nth-child(4) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
}

/* Five balls */
.rack { display: flex; gap: clamp(12px, 2.4vw, 26px); margin: 40px 0 0; }
.rack i {
  width: clamp(44px, 7vw, 84px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--line);
  transition: background 0.4s, border-color 0.4s;
}
.rack.is-in i { background: var(--bone); border-color: var(--bone); }
.rack.is-in i:nth-child(1) { transition-delay: 0.1s; }
.rack.is-in i:nth-child(2) { transition-delay: 0.35s; }
.rack.is-in i:nth-child(3) { transition-delay: 0.6s; }
.rack.is-in i:nth-child(4) { transition-delay: 0.85s; }
.rack.is-in i:nth-child(5) { transition-delay: 1.1s; background: var(--orange); border-color: var(--orange); }

/* Rulebook */
.rulebook { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); }
.rulebook .aside { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
.rules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-dark); }
.rules li { display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line-dark); font-size: clamp(1.02rem, 1.5vw, 1.2rem); font-weight: 500; }
.rules .art { font-family: var(--mono); font-size: 0.85rem; color: var(--orange); padding-top: 3px; }
@media (max-width: 860px) { .rulebook { grid-template-columns: 1fr; } .rulebook .aside { position: static; } }

/* Column grids with ruled tops */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px); }
.cols.two { grid-template-columns: repeat(2, 1fr); }
.col { border-top: 1px solid var(--line); padding-top: 22px; }
.light .col { border-top-color: var(--line-dark); }
.col .num { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; color: var(--orange); margin-bottom: 18px; }
.col h3 { margin-bottom: 12px; }
.col p { color: rgba(242, 240, 234, 0.75); margin: 0; }
.light .col p { color: #3a3a37; }
@media (max-width: 860px) { .cols, .cols.two { grid-template-columns: 1fr; } }

/* Division picker */
.divisions { display: grid; grid-template-columns: repeat(3, 1fr); min-height: 100vh; min-height: 100svh; border-top: 1px solid var(--line); }
.division { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; border-left: 1px solid var(--line); text-decoration: none; }
.division:first-child { border-left: 0; }
.division .media { transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.division:hover .media { transform: scale(1.04); }
.division .shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(11, 11, 11, 0.9), rgba(11, 11, 11, 0.1) 60%); }
.division .copy { position: relative; z-index: 2; padding: 0 clamp(20px, 3vw, 40px) clamp(40px, 6vh, 64px); }
.division .copy p { margin: 12px 0 0; color: rgba(242, 240, 234, 0.8); }
.division .go { display: inline-block; margin-top: 18px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; border-bottom: 2px solid var(--orange); padding-bottom: 3px; }
.division .media.ph::before { inset: calc(var(--nav-h) + 16px) 16px 16px; }
.division .slate { right: 24px; max-width: 80%; }
@media (max-width: 860px) {
  .divisions { grid-template-columns: 1fr; }
  .division { min-height: 70vh; border-left: 0; border-top: 1px solid var(--line); }
}

/* Spec table */
.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td { text-align: left; padding: 20px 0; border-bottom: 1px solid var(--line-dark); vertical-align: top; }
.spec th { font-family: var(--mono); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey-2); width: 38%; padding-right: 24px; }
.spec td { font-size: clamp(1.05rem, 1.6vw, 1.3rem); font-weight: 600; }
.spec tr:first-child th, .spec tr:first-child td { border-top: 1px solid var(--line-dark); }

/* Handicap bars */
.bars { display: grid; gap: 0; border-top: 1px solid var(--line-dark); }
.bar { display: grid; grid-template-columns: 140px 1fr 110px; gap: 20px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line-dark); }
.bar .who { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey-2); }
.bar .track { height: 10px; background: var(--bone-2); position: relative; }
.bar .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--black); transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.bars.is-in .fill { width: var(--w); }
.bar:last-child .fill { background: var(--orange); }
.bar .ft { font-family: var(--display); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; text-align: right; }
@media (max-width: 600px) { .bar { grid-template-columns: 90px 1fr 70px; gap: 12px; } }

/* Scoring nomenclature (adults) */
.board { border-top: 1px solid var(--line); }
.board .row { display: grid; grid-template-columns: 180px 80px 1fr; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.board .pips { display: flex; gap: 8px; }
.board .pips i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--grey-2); }
.board .pips i.on { background: var(--bone); border-color: var(--bone); }
.board .row.top .pips i.on { background: var(--orange); border-color: var(--orange); }
.board .count { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.1em; color: var(--grey); }
.board .name { font-family: var(--display); font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1; text-transform: uppercase; }
.board .row.top .name { color: var(--orange); }
@media (max-width: 600px) {
  .board .row { grid-template-columns: 1fr auto; gap: 8px 16px; }
  .board .name { grid-column: 1 / -1; }
  .board .pips i { width: 14px; height: 14px; }
}

/* Dictionary (adults) */
.dict { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(32px, 5vw, 80px); }
.dict div { padding: 26px 0; border-top: 1px solid var(--line-dark); }
.dict dt { font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.4rem); text-transform: uppercase; line-height: 1; }
.dict dt em { font-family: var(--body); font-size: 0.9rem; font-style: italic; text-transform: none; color: var(--grey-2); margin-left: 8px; letter-spacing: 0; }
.dict dd { margin: 10px 0 0; font-size: 1.08rem; color: #2e2e2b; }
@media (max-width: 760px) { .dict { grid-template-columns: 1fr; } }

/* Age gate */
.gate { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; padding: var(--gutter); background: rgba(11, 11, 11, 0.94); backdrop-filter: blur(6px); }
.gate.is-open { display: flex; }
.gate .card { max-width: 560px; border: 1px solid var(--line); background: var(--coal); padding: clamp(28px, 5vw, 48px); }
.gate .card p { color: rgba(242, 240, 234, 0.8); margin-top: 18px; }

/* Course locator */
.locator { display: flex; gap: 0; margin-top: 36px; max-width: 720px; border-bottom: 2px solid var(--bone); }
.locator input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--bone);
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  text-transform: uppercase;
  padding: 12px 0;
}
.locator input::placeholder { color: rgba(242, 240, 234, 0.35); }
.locator input:focus { outline: none; }
.locator:focus-within { border-bottom-color: var(--orange); }
.locator .btn { align-self: center; }
.status { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey); margin-top: 18px; min-height: 1.4em; }
.status::before { content: "> "; color: var(--orange); }
.status:empty::before { content: ""; }

.results { display: none; margin-top: 30px; max-width: 720px; border: 1px solid var(--line); background: rgba(11, 11, 11, 0.8); backdrop-filter: blur(6px); }
.results.is-shown { display: block; animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.results .top { display: flex; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey); }
.results .top b { color: var(--orange); font-weight: 500; }
.results dl { margin: 0; padding: 6px 22px 10px; }
.results dl div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.results dl div:last-child { border-bottom: 0; }
.results dt { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey); padding-top: 4px; }
.results dd { margin: 0; font-weight: 600; font-size: 1.1rem; }
.results .foot { padding: 0 22px 22px; }
@media (max-width: 520px) { .results dl div { grid-template-columns: 1fr; gap: 4px; } .locator { flex-wrap: wrap; } .locator .btn { margin: 0 0 12px; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Equipment catalog */
.catalog { border-top: 1px solid var(--line-dark); }
.catalog .item { display: grid; grid-template-columns: 64px 1fr 170px auto; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line-dark); }
.catalog .idx { font-family: var(--mono); font-size: 0.8rem; color: var(--grey-2); }
.catalog h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1; margin: 0 0 6px; }
.catalog p { margin: 0; color: #3a3a37; }
.catalog .req { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey-2); }
.catalog .req.must { color: var(--orange); }
.catalog .btn { background: var(--black); color: var(--bone); }
.catalog .btn:hover { background: var(--orange); color: var(--black); }
@media (max-width: 760px) {
  .catalog .item { grid-template-columns: 40px 1fr; gap: 8px 14px; }
  .catalog .req, .catalog .btn { grid-column: 2; justify-self: start; }
}
.fine { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--grey-2); margin-top: 32px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.footer p { margin: 0; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); }
.footer a { color: var(--bone); }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: 0.1s; }
.js .reveal.d2 { transition-delay: 0.2s; }
.js .reveal.d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .bars .fill { width: var(--w); }
}
