/* ============ Tokens ============ */
:root {
  --bg: #F6F1E8;
  --bg-2: #EFE7DA;
  --surface: #FFFDF9;
  --ink: #1B1A17;
  --ink-2: #4A463F;
  --ink-3: #7A746A;
  --line: #E2D8C8;
  --accent: #FF7A45;
  --accent-ink: #1B1A17;
  --dark: #1B1A17;
  --dark-ink: #F6F1E8;

  /* app brand tones */
  /* taken from each app's own icon */
  --side: #47A246;  --side-ink: #2E7A2E; --side-bg: #E3EFE2; --side-deep: #17351F;
  --tee: #125C2F;   --tee-bg: #0B3A1D;   --tee-hi: #8BD3A0; --tee-clay: #B5675B;
  --outfit: #FF9933; --outfit-bg: #FCEBD8;
  --joy: #FFA514;   --joy-bg: #FFF3D6;

  --radius: 22px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(27,26,23,.06), 0 12px 32px -12px rgba(27,26,23,.18);
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14130F; --bg-2: #1C1A16; --surface: #211F1A;
    --ink: #F3EDE2; --ink-2: #C9C1B3; --ink-3: #958D80; --line: #34302A;
    --dark: #0C0B09; --dark-ink: #F3EDE2;
    --side-bg: #1B2B1F; --outfit-bg: #2E2216; --joy-bg: #2E2712;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14130F; --bg-2: #1C1A16; --surface: #211F1A;
  --ink: #F3EDE2; --ink-2: #C9C1B3; --ink-3: #958D80; --line: #34302A;
  --dark: #0C0B09; --dark-ink: #F3EDE2;
  --side-bg: #1B2B1F; --outfit-bg: #2E2216; --joy-bg: #2E2712;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }

.eyebrow {
  font: 600 13px/1 var(--font-body);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg);
  font: 600 16px/1 var(--font-body);
  padding: 16px 24px; border-radius: 999px;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn span { transition: transform .2s ease; }
.btn:hover span { transform: translateX(3px); }
.btn--small { padding: 11px 18px; font-size: 14px; }
.btn--big { font-size: clamp(17px, 2.2vw, 22px); padding: 20px 30px; background: var(--accent); color: var(--accent-ink); }
.link { font-weight: 600; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }

/* ============ Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand__logo { height: 38px; width: auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand__logo { filter: invert(1) brightness(.95); } }
:root[data-theme="dark"] .brand__logo { filter: invert(1) brightness(.95); }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink-2); }
.nav__links a:not(.btn):hover { color: var(--ink); }
@media (max-width: 560px) { .nav__links a:not(.btn) { display: none; } }

/* ============ Hero ============ */
.hero { padding: 56px 0 72px; }
@media (min-width: 960px) { .hero { padding: 96px 0 120px; } }
.hero__grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.15fr .85fr; gap: 64px; } }
.hero h1 { font-size: clamp(42px, 7vw, 84px); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); position: relative; white-space: nowrap; }
.lede { margin-top: 26px; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px 28px; margin-top: 36px; }

.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 20px 40px; margin: 52px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.facts div { min-width: 0; }
.facts dt { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.facts dd { margin: 0; font: 700 clamp(20px, 2.4vw, 28px)/1.1 var(--font-display); letter-spacing: -0.01em; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr 1fr; } .facts div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; } }

.hero__tiles {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  max-width: 440px; width: 100%; margin: 0 auto;
}
.tile {
  aspect-ratio: 1; border-radius: 28px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 22px; text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  animation: rise .8s cubic-bezier(.2,.8,.2,1) both;
}
.tile__icon {
  width: 46%; height: auto; aspect-ratio: 1;
  border-radius: 23%; background: #fff; object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255,255,255,.55), 0 10px 22px -8px rgba(0,0,0,.35);
}
.tile__icon--pad { object-fit: contain; padding: 7%; }
.tile span { font: 700 clamp(15px, 1.6vw, 18px)/1.1 var(--font-display); letter-spacing: -0.01em; }
.tile--side   { background: var(--side); color: #fff; transform: rotate(-3deg); }
.tile--tee    { background: var(--tee); color: #fff; transform: rotate(2deg) translateY(18px); animation-delay: .08s; }
.tile--outfit { background: var(--outfit); color: #fff; transform: rotate(2deg); animation-delay: .16s; }
.tile--joy    { background: var(--joy); color: #3A2500; transform: rotate(-2deg) translateY(18px); animation-delay: .24s; }
.hero__tiles:hover .tile { transform: rotate(0) translateY(0); }
@keyframes rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }

/* ============ Section heads ============ */
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(34px, 5vw, 58px); }
.section-head p:not(.eyebrow) { margin-top: 20px; font-size: 18px; color: var(--ink-2); }
.section-head--light .eyebrow { color: color-mix(in srgb, var(--dark-ink) 55%, transparent); }
.section-head--light p:not(.eyebrow) { color: color-mix(in srgb, var(--dark-ink) 75%, transparent); }

/* ============ Apps ============ */
.apps { padding: 72px 0 96px; background: var(--bg-2); }
@media (min-width: 960px) { .apps { padding: 120px 0 140px; } }
.apps__list { display: grid; gap: 24px; }
@media (min-width: 860px) { .apps__list { grid-template-columns: 1fr 1fr; gap: 28px; } }

.app {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
  scroll-margin-top: 96px;
}
.app:hover { transform: translateY(-4px); }
.app__visual {
  position: relative; height: 280px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.app__body { padding: 28px 24px 26px; display: flex; flex-direction: column; flex: 1; }
@media (min-width: 720px) { .app__body { padding: 34px 34px 30px; } }
.app__cat { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--app-ink, var(--ink-3)); }
.app__id { display: flex; align-items: center; gap: 16px; }
.app__icon {
  flex: none; width: 64px; height: 64px; border-radius: 15px;
  background: #fff; object-fit: cover;
  box-shadow: 0 0 0 1px var(--line), 0 6px 14px -6px rgba(27,26,23,.3);
}
.app__icon--pad { object-fit: contain; padding: 6px; }
.app h3 { font-size: clamp(28px, 3.2vw, 38px); margin-top: 6px; }
.app__pitch { margin-top: 14px; color: var(--ink-2); }
.app__points { margin-top: 20px; display: grid; gap: 10px; }
.app__points li { position: relative; padding-left: 28px; font-size: 15.5px; }
.app__points li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--app-color);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8'/%3E%3C/svg%3E");
}
.app__points li::after {
  content: ""; position: absolute; left: 5px; top: calc(.42em + 4px);
  width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.app__foot { margin-top: auto; padding-top: 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12.5px; font-weight: 500; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
.app__link {
  font-weight: 600; text-decoration: none; font-size: 15px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--app-color); color: var(--app-on, #fff);
  transition: filter .2s ease;
}
.app__link:hover { filter: brightness(1.08); }

/* chips */
.chip {
  font-size: 13px; font-weight: 600;
  background: var(--surface); color: var(--ink);
  padding: 9px 14px; border-radius: 999px;
  box-shadow: var(--shadow); white-space: nowrap;
}
.chip--float { position: absolute; bottom: 22px; right: 22px; }

/* --- SideNumber visual --- */
.app--side { --app-color: var(--side); --app-ink: var(--side-ink); }
.app--side .app__visual { background: radial-gradient(120% 90% at 30% 0%, color-mix(in srgb, var(--side) 30%, var(--side-bg)) 0%, var(--side-bg) 60%); }
.app--side .app__link { background: var(--side-ink); }
.phone {
  width: 168px; height: 300px; margin-top: 80px;
  border-radius: 30px; background: var(--side-deep);
  border: 6px solid #0A1A0F;
  color: #E9F3EA; text-align: center; padding: 26px 14px;
  box-shadow: 0 30px 60px -20px rgba(10,30,15,.55);
  transform: rotate(-4deg);
}
.phone__label { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; opacity: .65; }
.phone__avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--side); margin: 16px auto 10px; display: grid; place-items: center; font: 700 22px/1 var(--font-display); }
.phone__name { font: 700 14px/1.2 var(--font-display); }
.phone__num { font-size: 10px; opacity: .6; margin-top: 3px; }
.phone__btns { display: flex; justify-content: center; gap: 30px; margin-top: 18px; }
.phone__btns span { width: 30px; height: 30px; border-radius: 50%; }
.phone__btns .dec { background: #E0533D; }
.phone__btns .acc { background: #44C36B; }

/* --- Tee Time Snipe visual --- */
.app--tee { --app-color: var(--tee); --app-ink: var(--tee); }
.app--tee .app__visual {
  background:
    radial-gradient(80% 60% at 80% 110%, color-mix(in srgb, var(--tee-clay) 40%, transparent), transparent 70%),
    linear-gradient(160deg, var(--tee) 0%, var(--tee-bg) 75%);
  flex-direction: column; gap: 12px; padding: 24px;
}
.alert {
  width: min(320px, 100%);
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  background: rgba(255,255,255,.95); color: #12251A;
  padding: 12px 14px; border-radius: 16px;
  box-shadow: 0 16px 30px -12px rgba(0,0,0,.5);
}
.alert__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--tee); display: grid; place-items: center; font-size: 17px; color: #fff; font-weight: 700; }
.alert__icon img { width: 100%; height: 100%; border-radius: 10px; background: #fff; padding: 3px; box-shadow: inset 0 0 0 1px #E4EAE6; }
.alert__title { font-weight: 600; font-size: 14px; }
.alert__body { font-size: 12.5px; color: #4D5E53; }
.alert__time { font-size: 11px; color: #7A8A80; align-self: start; }
.alert--ghost { opacity: .72; transform: scale(.94); }
.stat-row { display: flex; gap: 18px; color: #CFEBD8; font-size: 13px; margin-top: 6px; }
.stat-row b { color: var(--tee-hi); font-family: var(--font-display); font-size: 15px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .app--tee { --app-color: var(--tee-hi); --app-on: var(--tee-bg); --app-ink: var(--tee-hi); } }
:root[data-theme="dark"] .app--tee { --app-color: var(--tee-hi); --app-on: var(--tee-bg); --app-ink: var(--tee-hi); }

/* --- Outfit Tracker visual --- */
.app--outfit { --app-color: var(--outfit); --app-ink: #C9680C; }
.app--outfit .app__visual { background: linear-gradient(150deg, var(--outfit-bg) 0%, color-mix(in srgb, var(--outfit) 28%, var(--outfit-bg)) 100%); }
.cal {
  width: 250px; background: var(--surface); border-radius: 18px;
  padding: 16px 16px 18px; box-shadow: var(--shadow);
  transform: rotate(3deg) translateY(-14px);
}
.cal__month { font: 700 15px/1 var(--font-display); margin-bottom: 12px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.cal__grid span { font-size: 10px; font-weight: 600; color: var(--ink-3); }
.cal__grid i { aspect-ratio: 1; border-radius: 8px; background: var(--bg-2); position: relative; }
.cal__grid i.d::after, .cal__grid i.d2::after, .cal__grid i.d2::before {
  content: ""; position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--outfit);
}
.cal__grid i.d::after { left: calc(50% - 2.5px); }
.cal__grid i.d2::before { left: calc(50% - 6px); }
.cal__grid i.d2::after { left: calc(50% + 1px); background: #C9680C; }
.cal__grid i.sel { background: var(--outfit); box-shadow: 0 6px 14px -4px color-mix(in srgb, var(--outfit) 70%, transparent); }

/* --- Joyentic visual --- */
.app--joy { --app-color: var(--joy); --app-on: #3A2500; --app-ink: #B87800; }
.app--joy .app__visual { background: radial-gradient(90% 90% at 50% 40%, color-mix(in srgb, var(--joy) 35%, var(--joy-bg)) 0%, var(--joy-bg) 70%); }
.ring { position: relative; width: 170px; height: 170px; transform: translateY(-12px); }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.ring__track { stroke: color-mix(in srgb, var(--joy) 22%, transparent); }
.ring__fill { stroke: var(--joy); stroke-dasharray: 314; stroke-dashoffset: 72; }
.ring__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring__label b { font: 800 46px/1 var(--font-display); letter-spacing: -0.03em; }
.ring__label span { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.medals { position: absolute; top: 22px; left: 22px; display: flex; gap: 6px; }
.medals i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.7); }
.medals .b { background: #C27B45; } .medals .s { background: #B9BDC4; } .medals .g { background: #E8B923; }

/* ============ Approach ============ */
.approach { background: var(--dark); color: var(--dark-ink); padding: 88px 0 96px; }
@media (min-width: 960px) { .approach { padding: 128px 0 136px; } }
.principles { display: grid; gap: 1px; background: color-mix(in srgb, var(--dark-ink) 14%, transparent); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 860px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principles li { background: var(--dark); padding: 30px 26px 34px; }
@media (min-width: 860px) { .principles li { padding: 38px 34px 42px; } }
.principles__n { font: 700 14px/1 var(--font-display); color: var(--accent); }
.principles h3 { font-size: 24px; margin: 18px 0 12px; }
.principles p { color: color-mix(in srgb, var(--dark-ink) 70%, transparent); font-size: 16px; }

/* ============ Contact ============ */
.contact { padding: 88px 0; }
@media (min-width: 960px) { .contact { padding: 120px 0; } }
.contact__inner { display: grid; gap: 32px; align-items: end; }
@media (min-width: 900px) { .contact__inner { grid-template-columns: 1.3fr auto; gap: 48px; } }
.contact h2 { font-size: clamp(32px, 4.6vw, 54px); max-width: 16em; }
.contact p:not(.eyebrow) { margin-top: 18px; color: var(--ink-2); font-size: 18px; }
.contact .btn--big { justify-self: start; max-width: 100%; overflow-wrap: anywhere; }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--line); padding: 36px 0 44px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.brand--footer .brand__logo { height: 30px; }
.footer__apps { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer__apps a { text-decoration: none; font-size: 14px; color: var(--ink-2); }
.footer__apps a:hover { color: var(--ink); text-decoration: underline; }
.footer__copy { font-size: 13px; color: var(--ink-3); }
