/* ==========================================================================
   In The Pot — website
   One stylesheet for every page. Tokens mirror the app (Typography.swift,
   PlayerScorecardCard.swift): lime #B2FF42 on near-black, Druk Text Wide
   for headings and big results, the system face (SF on Apple devices) for
   everything else. Scorecard red/blue are the app's ScorecardPalette.
   ========================================================================== */

@font-face {
  font-family: "Druk Wide";
  src: url("../fonts/druk-wide-bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0b0b0b;
  --bg-2: #111211;
  --card: #161716;
  --card-2: #1d1f1c;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f5f6f2;
  --text-2: rgba(245, 246, 242, 0.68);
  --text-3: rgba(245, 246, 242, 0.45);
  --lime: #b2ff42;
  --lime-ink: #3a6b00;       /* lime as text on light grounds */
  --lime-soft: rgba(178, 255, 66, 0.14);
  --red: #ff6b61;            /* ScorecardPalette.under, dark */
  --red-light: #d12121;      /* ScorecardPalette.under, light */
  --blue: #73a6ff;           /* ScorecardPalette.over, dark */
  --blue-light: #1a5cc7;     /* ScorecardPalette.over, light */
  --live: #ff3b30;
  --paper: #f2f2ee;          /* the app's light screens */
  --paper-card: #ffffff;
  --ink: #0b0b0b;

  --display: "Druk Wide", "Helvetica Neue", Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  --round: ui-rounded, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--lime); color: var(--ink); }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

.display, h1, h2 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.98;
  margin: 0;
}
h1 { font-size: clamp(2.1rem, 4.1vw, 3.7rem); }
h2 { font-size: clamp(1.7rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.2rem; line-height: 1.25; margin: 0 0 0.4em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-2); max-width: 36em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--lime); margin: 0 0 1.1rem;
}
.lime { color: var(--lime); }
.muted { color: var(--text-2); }
.small { font-size: 0.88rem; }

/* ---------- Buttons & badges ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0 1.4em; border-radius: 999px;
  font: 700 0.98rem/1 var(--sans); text-decoration: none; letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { background: #c4ff6b; }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,0.03); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.32); }
.btn-ink { background: var(--ink); color: #fff; }

.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 18px 0 14px; border-radius: 12px;
  background: #fff; color: #000; text-decoration: none;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.store-badge svg { width: 24px; height: 24px; }
.store-badge .sb-1 { display: block; font-size: 0.68rem; line-height: 1; letter-spacing: 0.02em; }
.store-badge .sb-2 { display: block; font-size: 1.28rem; font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }
.store-badge[aria-disabled="true"] { cursor: default; }
.store-badge:not([aria-disabled="true"]):hover { transform: translateY(-1px); }

/* Pre-launch: email capture that becomes the App Store button at launch
   (see SITE.appStoreURL in assets/js/site.js). */
.notify {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 6px; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line-2);
  max-width: 470px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.notify input {
  flex: 1 1 140px; min-width: 0; height: 44px; padding: 0 16px;
  border: 0; border-radius: 999px; background: transparent; color: var(--text);
  font: 500 1rem var(--sans); outline: none;
}
.notify input::placeholder { color: var(--text-3); }
/* A sign-up form stacks (email above a full-width button) when its column
   is too narrow for one line, as in the lime band on a phone, rather than
   wrapping into a lopsided pill. Measured against the column, not the screen. */
.when-prelaunch { container-type: inline-size; }
@container (max-width: 340px) {
  .notify { width: 100%; flex-direction: column; align-items: stretch; gap: 6px; border-radius: 26px; }
  .notify input { flex: none; width: 100%; text-align: center; }
  .notify button { width: 100%; }
}
.notify.on-lime { background: rgba(11,11,11,0.08); border-color: rgba(11,11,11,0.22); }
.notify.on-lime input { color: var(--ink); }
.notify.on-lime input::placeholder { color: rgba(11,11,11,0.55); }
.notify button { flex: 0 0 auto; }
.notify-msg { min-height: 1.4em; margin: 10px 4px 0; font-size: 0.9rem; color: var(--text-2); }
.notify-msg.ok { color: var(--lime); }
.notify-msg.err { color: var(--red); }
.cta-note { font-size: 0.86rem; color: var(--text-3); margin-top: 12px; }
.when-live { display: none; }
.is-live .when-live { display: revert; }
.is-live .when-prelaunch { display: none; }

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

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 11, 11, 0.72);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-color: var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.02em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) { text-decoration: none; font-size: 0.94rem; font-weight: 600; color: var(--text-2); transition: color 0.2s; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links .btn { min-height: 40px; padding: 0 1.1em; font-size: 0.9rem; }
.nav-pro { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 760px) {
  .nav-links a:not(.btn):not(.keep) { display: none; }
  .nav-links { gap: 14px; }
}

/* ---------- Sections ---------- */

section { position: relative; padding: clamp(80px, 11vw, 150px) 0; }
.sec-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 70px); }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head.center .lede { margin-inline: auto; }
.sec-head h2 + .lede { margin-top: 1.1rem; }

.split {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: center;
}
.split.flip > :first-child { order: 2; }
/* Grid items default to min-width:auto, so a wide mockup would stretch the column past the screen. */
.split > *, .hero-grid > * { min-width: 0; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
}

.ticks { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; color: var(--text-2); }
.ticks li b { color: var(--text); font-weight: 650; }
.ticks li::before {
  content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--lime-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B2FF42' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/13px no-repeat;
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  background: rgba(255,255,255,0.07); color: var(--text-2); border: 1px solid var(--line);
}
.pro-chip {
  display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 5px;
  background: var(--lime); color: var(--ink); font: 800 0.62rem/1 var(--sans); letter-spacing: 0.08em;
}

/* Scroll reveal. Content is visible by default; JS opts in. */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: 0.08s; }
.js .reveal.d2 { transition-delay: 0.16s; }
.js .reveal.d3 { transition-delay: 0.24s; }

/* ==========================================================================
   Devices
   ========================================================================== */

.phone {
  --w: 300px;
  position: relative; width: var(--w); aspect-ratio: 1206 / 2622; flex: 0 0 auto;
  border-radius: calc(var(--w) * 0.165); padding: calc(var(--w) * 0.032);
  background: linear-gradient(145deg, #3a3b3d, #18191a 40%, #2c2d2f);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 40px 80px -20px rgba(0,0,0,0.75), 0 18px 36px -18px rgba(0,0,0,0.6);
}
.phone .screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: calc(var(--w) * 0.135);
  background: #000; color: #fff; isolation: isolate;
  font-size: calc(var(--w) * 0.044);
}
.phone .island {
  position: absolute; z-index: 30; top: calc(var(--w) * 0.03); left: 50%; translate: -50% 0;
  width: 32%; height: calc(var(--w) * 0.098); border-radius: 999px; background: #000;
}
.phone .status {
  position: absolute; z-index: 25; inset: 0 0 auto 0; height: calc(var(--w) * 0.15);
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--w) * 0.012) calc(var(--w) * 0.085) 0;
  font: 600 calc(var(--w) * 0.05)/1 var(--sans); letter-spacing: -0.01em;
}
.phone .status .bars { display: flex; gap: calc(var(--w) * 0.014); align-items: center; }
.phone .status i { display: block; width: calc(var(--w) * 0.075); height: calc(var(--w) * 0.036); border-radius: 3px; border: 1.5px solid currentColor; position: relative; }
.phone .status i::after { content: ""; position: absolute; inset: 1.5px; width: 70%; background: currentColor; border-radius: 1px; }
.phone.light .status { color: #000; }

.watch {
  --w: 180px;
  position: relative; width: var(--w); aspect-ratio: 0.84; flex: 0 0 auto;
  border-radius: calc(var(--w) * 0.27); padding: calc(var(--w) * 0.055);
  background: linear-gradient(150deg, #4a4b4e, #1b1c1e 45%, #333437);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 30px 60px -18px rgba(0,0,0,0.8);
}
.watch::before { /* digital crown */
  content: ""; position: absolute; right: calc(var(--w) * -0.035); top: 27%;
  width: calc(var(--w) * 0.05); height: calc(var(--w) * 0.17); border-radius: 6px;
  background: linear-gradient(90deg, #2a2b2d, #5a5b5e);
}
.watch .screen {
  width: 100%; height: 100%; border-radius: calc(var(--w) * 0.22); overflow: hidden;
  background: #000; color: #fff; font-size: calc(var(--w) * 0.075);
}

/* ==========================================================================
   App UI pieces (shared by mockups)
   ========================================================================== */

.ui-ground { position: absolute; inset: 0; z-index: -1; background: #0e110c center/cover no-repeat; }
.ui-ground::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.7)); }
.ui-glass {
  background: rgba(22, 24, 20, 0.62); border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.ui-title { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.ui-avatar {
  display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%;
  font-weight: 700; color: #fff; background: #3b4a2a;
}

/* Tab bar, as in the app: Mates · Play · Courses · My Golf */
.ui-tabbar {
  position: absolute; z-index: 20; left: 4%; right: 4%; bottom: 3.2%;
  height: 8.5%; border-radius: 999px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center;
  font-size: 0.62em; font-weight: 600;
}
.ui-tabbar span { display: grid; justify-items: center; gap: 2px; color: rgba(255,255,255,0.9); }
.ui-tabbar span.on { color: var(--lime); }
.ui-tabbar svg { width: 1.9em; height: 1.9em; }
.ui-tabbar span.on::before { content: ""; position: absolute; }

/* Score marks — club-card shapes (ScoreMark) */
.sm { display: inline-grid; place-items: center; width: 1.55em; height: 1.55em; font-weight: 600; font-variant-numeric: tabular-nums; position: relative; }
.sm.b1 { border: 1.5px solid var(--red-light); border-radius: 50%; }
.sm.b2 { border: 1.25px solid var(--red-light); border-radius: 50%; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3.25px var(--red-light); }
.sm.b3 { background: var(--red-light); color: #fff; border-radius: 50%; }
.sm.o1 { border: 1.25px solid var(--blue-light); border-radius: 2px; }
.sm.o2 { border: 1.25px solid var(--blue-light); border-radius: 2px; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px var(--blue-light); }
.sm.o3 { background: var(--blue-light); color: #fff; border-radius: 2px; }
.dark-card .sm.b1, .dark-card .sm.b2 { border-color: var(--red); }
.dark-card .sm.b2 { box-shadow: inset 0 0 0 2px #1a1c18, inset 0 0 0 3.25px var(--red); }
.dark-card .sm.o1, .dark-card .sm.o2 { border-color: var(--blue); }
.dark-card .sm.o2 { box-shadow: inset 0 0 0 2px #1a1c18, inset 0 0 0 3px var(--blue); }
.sm .shot { position: absolute; top: -0.32em; left: 50%; width: 0.26em; height: 0.26em; margin-left: -0.13em; border-radius: 50%; background: currentColor; opacity: 0.55; }

/* Live dot */
.live-dot { display: inline-block; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255,59,48,0.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,59,48,0.6); } 70% { box-shadow: 0 0 0 0.6em rgba(255,59,48,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,48,0); } }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer { border-top: 1px solid var(--line); padding: 64px 0 40px; color: var(--text-2); font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer h4 { margin: 0 0 14px; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); }
.footer a { display: block; text-decoration: none; padding: 4px 0; color: var(--text-2); }
.footer a:hover { color: var(--text); }
.footer .brand { display: inline-flex; margin-bottom: 14px; color: var(--text); }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 0.82rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ==========================================================================
   Long-form pages (privacy, terms, support)
   ========================================================================== */

.doc { padding: 140px 0 90px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 0.4em; }
.doc h2 { font-size: 1.05rem; margin: 2.4em 0 0.7em; line-height: 1.3; }
.doc h3 { font-size: 0.95rem; margin: 1.6em 0 0.5em; line-height: 1.3; }
.doc p, .doc li { color: var(--text-2); }
.doc a { color: var(--lime); }
.doc .updated { color: var(--text-3); font-size: 0.92rem; margin-bottom: 2.4em; }
.doc .callout { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 24px 0; }
.doc .callout p { margin: 0; }
.doc .back { display: inline-block; margin-bottom: 28px; color: var(--text-3); text-decoration: none; font-size: 0.92rem; font-weight: 600; }
.doc .back:hover { color: var(--text); }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 0.45em 0; }
.doc strong { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .closer video { display: none; }
}
