/* ============ GHOOLF BOOK v2 — BROADCAST GREEN ============ */

:root {
  --bone: #F4EFE3;
  --bone-2: #EBE4D2;
  --bone-3: #E1D8C2;
  --fairway: #0E3D2A;
  --fairway-2: #1B5A3E;
  --fairway-dim: rgba(14, 61, 42, 0.62);
  --fairway-faint: rgba(14, 61, 42, 0.38);
  --hair: rgba(14, 61, 42, 0.14);
  --hair-strong: rgba(14, 61, 42, 0.22);
  --green-live: #2FB67C;
  --green-glow: #7CE8B0;
  --live: #E5202E;
  --sand: #D9C9A3;
  --sand-2: #C7B486;
  --pin: #F2C94C;

  --serif: "Fraunces", "PP Editorial New", Georgia, serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --ui-curve: cubic-bezier(0.22, 1, 0.36, 1);
  --snap: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html, body {
  background: var(--bone);
  color: var(--fairway);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "tnum";
  overflow-x: hidden;
}

body { cursor: none; }
@media (hover: none), (max-width: 900px) { body { cursor: auto; } }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: none; padding: 0; }
@media (hover: none) { button { cursor: pointer; } }

::selection { background: var(--green-live); color: var(--bone); }

/* ============ BACKGROUND TEXTURES ============ */
.paper {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.06 0 0 0 0 0.24 0 0 0 0 0.16 0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.topo {
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  will-change: transform;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='900' height='900' viewBox='0 0 900 900'><g fill='none' stroke='%230E3D2A' stroke-width='0.8'><ellipse cx='450' cy='450' rx='80' ry='60'/><ellipse cx='450' cy='450' rx='130' ry='100'/><ellipse cx='450' cy='450' rx='190' ry='150'/><ellipse cx='450' cy='450' rx='260' ry='210'/><ellipse cx='450' cy='450' rx='340' ry='280'/><ellipse cx='450' cy='450' rx='430' ry='360'/><ellipse cx='170' cy='180' rx='40' ry='28'/><ellipse cx='170' cy='180' rx='72' ry='52'/><ellipse cx='170' cy='180' rx='112' ry='82'/><ellipse cx='760' cy='720' rx='50' ry='38'/><ellipse cx='760' cy='720' rx='90' ry='68'/><ellipse cx='760' cy='720' rx='140' ry='106'/><path d='M0 200 Q 450 350 900 220'/><path d='M0 300 Q 450 450 900 320'/><path d='M0 600 Q 450 700 900 620'/></g></svg>");
  background-size: 900px 900px;
}
.topo.active { opacity: 0.09; transition: opacity 1.2s var(--ui-curve); }

/* dimple pattern reusable */
.dimples {
  background-image: radial-gradient(circle, rgba(14, 61, 42, 0.18) 1px, transparent 1.5px);
  background-size: 8px 8px;
}

/* ============ BALL-CAM CURSOR ============ */
.ball-cursor {
  position: fixed; top: 0; left: 0;
  width: 14px; height: 14px;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-100px, -100px, 0);
  transition: width 0.3s var(--ui-curve), height 0.3s var(--ui-curve);
  will-change: transform;
}
.ball-cursor::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #f3eee2 60%, #d9d2bf 100%);
  background-image:
    radial-gradient(circle at 30% 30%, rgba(14, 61, 42, 0.0) 0%, transparent 30%),
    radial-gradient(circle, rgba(14, 61, 42, 0.18) 0.8px, transparent 1.2px);
  background-size: auto, 4px 4px;
  box-shadow: 0 1px 3px rgba(14, 61, 42, 0.35), inset -1px -1px 2px rgba(14, 61, 42, 0.18);
}
.ball-cursor.snap { width: 18px; height: 18px; }
.ball-cursor.snap::before {
  box-shadow: 0 0 0 1px rgba(47, 182, 124, 0.5), 0 0 14px rgba(124, 232, 176, 0.7), inset -1px -1px 2px rgba(14, 61, 42, 0.18);
}
@media (hover: none), (max-width: 900px) {
  .ball-cursor { display: none; }
}

.tracer-canvas {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9998;
}

/* ============ TYPOGRAPHY ============ */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--fairway);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding-bottom: 10px;
}
.eyebrow::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 28px; height: 1px;
  background: var(--fairway);
}
.eyebrow .num {
  font-family: var(--mono);
  color: var(--green-live);
  font-weight: 600;
}

/* line-sweep section header */
.reveal-header { position: relative; }
.reveal-header::before {
  content: "";
  position: absolute;
  left: 0; top: -10px;
  width: 0; height: 2px;
  background: var(--green-live);
  box-shadow: 0 0 10px rgba(47, 182, 124, 0.6);
  transition: width 0.45s var(--snap);
}
.reveal-header.in::before { width: 64px; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6.2vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  color: var(--fairway);
  text-wrap: pretty;
}
.display em {
  font-style: italic;
  position: relative;
  display: inline-block;
}
.display em::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 3px;
  background: var(--green-live);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ui-curve) 0.2s;
  border-radius: 2px;
}
.reveal-header.in .display em::after,
.display.in em::after { transform: scaleX(1); }

.body-lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--fairway-dim);
  max-width: 56ch;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ============ LAYOUT ============ */
.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 4;
}
@media (max-width: 700px) { .wrap { padding: 0 20px; } }

main { position: relative; z-index: 4; }

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(244, 239, 227, 0.7);
  transition: padding 0.4s var(--ui-curve), background 0.4s var(--ui-curve);
}
.nav.scrolled { padding: 12px 32px; background: rgba(244, 239, 227, 0.88); }
.nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--fairway);
  opacity: 0;
  transition: opacity 0.4s var(--ui-curve);
}
.nav.scrolled::after { opacity: 0.4; }

.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  color: var(--fairway);
  display: inline-flex;
  align-items: baseline;
}
.wordmark .dot {
  font-style: italic;
  color: var(--green-live);
  margin-left: 1px;
}

.nav-center {
  display: flex;
  gap: 32px;
  font-size: 13.5px;
  color: var(--fairway-dim);
}
.nav-center a {
  position: relative;
  padding: 6px 0;
  transition: color 0.3s var(--ui-curve);
  font-weight: 500;
}
.nav-center a:hover { color: var(--fairway); }
.nav-center a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--green-live);
  transition: width 0.4s var(--ui-curve);
}
.nav-center a:hover::after { width: 100%; }

.nav-right {
  display: flex;
  gap: 18px;
  justify-self: end;
  align-items: center;
  font-size: 13.5px;
}
.nav-right .signin {
  color: var(--fairway-dim);
  font-weight: 500;
  transition: color 0.3s;
}
.nav-right .signin:hover { color: var(--fairway); }

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

/* ============ BUTTONS ============ */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--green-live);
  color: var(--fairway);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(124, 232, 176, 0.6) inset, 0 0 0 1px rgba(14, 61, 42, 0.18), 0 0 22px rgba(47, 182, 124, 0.2);
  transition: transform 0.3s var(--ui-curve), box-shadow 0.3s var(--ui-curve), background 0.3s var(--ui-curve);
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--green-glow);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 0 0 1px rgba(14, 61, 42, 0.22), 0 0 40px rgba(47, 182, 124, 0.45);
}
.btn-primary .arrow {
  display: inline-block;
  transition: transform 0.4s var(--snap);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--fairway);
  color: var(--fairway);
  font-size: 13.5px;
  font-weight: 600;
  background: transparent;
  transition: all 0.3s var(--ui-curve);
}
.btn-outline:hover {
  background: var(--fairway);
  color: var(--bone);
  border-color: var(--fairway);
}

/* ============ LOADER ============ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bone);
  display: grid;
  place-items: center;
  transition: clip-path 1.1s var(--snap);
  clip-path: inset(0 0 0 0);
}
.loader.lift { clip-path: inset(0 0 100% 0); }
.loader-wrap {
  position: relative;
  text-align: center;
}
.loader-mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 72px;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  opacity: 0;
  animation: markIn 0.55s var(--ui-curve) 0.2s forwards;
  color: var(--fairway);
}
.loader-mark .dot { color: var(--green-live); font-style: italic; }
@keyframes markIn { to { opacity: 1; } }

.loader-tracer {
  position: absolute;
  inset: -80px -120px;
  pointer-events: none;
}
.loader-tracer svg { width: 100%; height: 100%; overflow: visible; }
.loader-tracer path {
  fill: none;
  stroke: var(--green-live);
  stroke-width: 1.5;
  stroke-dasharray: 3 5;
  stroke-linecap: round;
  stroke-dashoffset: 600;
  animation: loaderDraw 1.1s var(--snap) 0.55s forwards;
}
@keyframes loaderDraw { to { stroke-dashoffset: 0; } }
