/* Grip & Balance — gripandbalance.com
   Skinned in the D-085 design system tokens (design/system/tokens/).
   The site deliberately commits to the brand's dark world; every colour is
   painted explicitly. Fonts are self-hosted — this site makes no third-party
   requests, matching the app's zero-egress architecture. */

/* ——— Fonts (bundled app fonts, SIL OFL) ——— */
@font-face {
  font-family: "Space Grotesk"; font-weight: 600; font-style: normal;
  font-display: swap; src: url("../fonts/SpaceGrotesk-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk"; font-weight: 700; font-style: normal;
  font-display: swap; src: url("../fonts/SpaceGrotesk-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans"; font-weight: 400; font-style: normal;
  font-display: swap; src: url("../fonts/InstrumentSans-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans"; font-weight: 500; font-style: normal;
  font-display: swap; src: url("../fonts/InstrumentSans-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans"; font-weight: 600; font-style: normal;
  font-display: swap; src: url("../fonts/InstrumentSans-SemiBold.woff2") format("woff2");
}

/* ——— Tokens (design/system/tokens/colors.css, dark theme) ——— */
:root {
  --gb-pine: #0A2A1D; --gb-fir: #12452F; --gb-fern: #2F8F5B;
  --gb-fern-dark: #4FBA79; --gb-leaf: #43B36A; --gb-mint: #D6F2DF; --gb-sage: #E2F0E6;

  --bg-0: #0A100D; --bg-1: #0F1713;
  --surface-1: #141E18; --surface-2: #1A2620; --surface-3: #223029;
  --border-1: rgba(214, 242, 223, 0.08);
  --border-2: rgba(214, 242, 223, 0.16);
  --text-1: #EDF5EF; --text-2: #9FB2A6; --text-3: #66786D;
  --text-on-tint: #06130C;
  --tint: var(--gb-fern-dark);
  --tint-soft: rgba(79, 186, 121, 0.14);
  --danger: #E07862; --danger-soft: rgba(224, 120, 98, 0.14);

  --font-display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-body: "Instrument Sans", -apple-system, "Helvetica Neue", sans-serif;

  color-scheme: dark;
}

/* ——— Base ——— */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text-1);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tint); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--tint); outline-offset: 3px; border-radius: 6px;
}
p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* ——— Type roles ——— */
.eyebrow {
  font: 600 11px/1.2 var(--font-body);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--tint); margin: 0 0 12px;
}
h1 {
  font: 600 clamp(36px, 6vw, 60px)/1.05 var(--font-display);
  letter-spacing: -0.015em; margin: 0 0 18px; text-wrap: balance;
}
h2 {
  font: 600 clamp(26px, 4vw, 36px)/1.15 var(--font-display);
  letter-spacing: -0.01em; margin: 0 0 10px; text-wrap: balance;
}
h3 { font: 600 17px/1.3 var(--font-body); margin: 0 0 6px; }
.sub { color: var(--text-2); font-size: 17.5px; max-width: 58ch; }
.metric {
  font-family: var(--font-display); font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}

/* ——— Nav ——— */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 16, 13, 0.78);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-1);
}
.nav-inner {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 20px; max-width: 1080px; margin: 0 auto;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font: 600 16px/1 var(--font-display); color: var(--text-1);
}
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--text-2); font: 500 14px/1 var(--font-body); }
.nav-links a:hover { color: var(--text-1); text-decoration: none; }
.nav-links .btn { color: var(--text-on-tint); }
@media (max-width: 560px) { .nav-links a:not(.btn) { display: none; } }

/* ——— Buttons (GBButtonStyle pill idiom) ——— */
.btn {
  display: inline-block;
  background: var(--tint); color: var(--text-on-tint);
  font: 600 15px/1 var(--font-body);
  border-radius: 999px; padding: 13px 24px;
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), filter 0.15s;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: scale(0.98); filter: brightness(0.94); }
.btn.small { padding: 9px 18px; font-size: 13px; }
.btn.quiet {
  background: var(--surface-2); color: var(--text-1);
  border: 1px solid var(--border-2);
}

/* Official App Store badge — Apple artwork, unmodified. Min height 40px and
   clear space of a quarter of its height per Apple's guidelines; one badge
   per layout (other CTAs are plain pills). */
.store-badge { display: inline-block; padding: 14px; }
.store-badge img { height: 54px; width: auto; }

/* ——— Hero ——— */
.hero {
  background: linear-gradient(180deg, var(--gb-fir) -65%, var(--bg-0) 52%);
  padding: 84px 0 0; text-align: center; overflow: hidden;
}
.hero .sub { margin: 0 auto 30px; }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero-note { color: var(--text-3); font-size: 13px; }
.trust {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px;
  margin: 34px 0 0; padding: 0; list-style: none;
}
.trust li {
  border: 1px solid var(--border-2); border-radius: 999px;
  padding: 8px 15px; font: 600 12.5px/1.2 var(--font-body);
  color: var(--gb-mint); white-space: nowrap;
}
.trust li::before { content: "●"; color: var(--gb-leaf); margin-right: 7px; font-size: 9px; }
.hero-shot { margin: 52px auto -1px; width: min(340px, 78vw); }
.hero-shot .device { margin: 0 auto; }

/* Screenshot device chrome — a neutral rounded frame, not an Apple bezel */
.device {
  background: #060B08;
  border: 1px solid var(--border-2);
  border-radius: 38px; padding: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.device img { border-radius: 28px; }
.device.watch { border-radius: 30px; width: 180px; }
.device.watch img { border-radius: 22px; }

/* ——— Sections ——— */
section { padding: 84px 0; }
section.alt { background: var(--bg-1); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .sub { margin: 0 auto; }

/* ——— Bento grid ——— */
.bento {
  display: grid; gap: 14px;
  grid-template-columns: repeat(6, 1fr);
}
.bento .cell {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: 20px; padding: 26px;
  display: flex; flex-direction: column; gap: 6px;
  overflow: hidden;
}
.bento .cell p { color: var(--text-2); font-size: 14.5px; margin: 0; }
.bento .cell .shot { margin: 20px -6px -60px; }
.bento .cell .shot img { border-radius: 22px; border: 1px solid var(--border-2); }
.bento .span3 { grid-column: span 3; }
.bento .span2 { grid-column: span 2; }
.bento .span4 { grid-column: span 4; }
.bento .span6 { grid-column: span 6; }
.bento .tall { grid-row: span 2; }
.bento .watch-cell { align-items: flex-start; }
.bento .watch-cell .device { margin: 18px auto 0; }
@media (max-width: 880px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento .span3, .bento .span2, .bento .span4, .bento .span6 { grid-column: span 2; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .bento .span3, .bento .span2, .bento .span4, .bento .span6 { grid-column: span 1; }
}

/* ——— Advisor section ——— */
.advisor { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 820px) { .advisor { grid-template-columns: 1fr; } }
.advisor .copy .sub { margin-bottom: 18px; }
.suggestion-card {
  background: var(--surface-1); border: 1px solid var(--border-1);
  border-radius: 20px; padding: 24px; max-width: 380px; margin: 0 auto;
}
.suggestion-card .label {
  font: 600 11px/1.2 var(--font-body); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-3); margin: 0 0 14px;
}
.suggestion-card .move { font: 600 17px/1.3 var(--font-body); margin: 0 0 16px; }
.suggestion-numbers {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  background: var(--surface-2); border-radius: 12px; padding: 18px 16px; margin-bottom: 10px;
}
.suggestion-numbers .metric { font-size: 26px; }
.suggestion-numbers .from { color: var(--text-3); }
.suggestion-numbers .arrow { color: var(--text-3); font-size: 18px; }
.suggestion-numbers .to { color: var(--tint); }
.suggestion-why { color: var(--text-2); font-size: 13.5px; text-align: center; margin: 0 0 18px; }
.suggestion-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.suggestion-actions span {
  text-align: center; border-radius: 999px; padding: 10px 0;
  font: 600 13px/1.2 var(--font-body);
  background: var(--surface-3); color: var(--text-1);
}
.suggestion-actions .accept { background: var(--tint-soft); color: var(--tint); }
.suggestion-footnote {
  margin: 14px auto 0; max-width: 380px;
  color: var(--text-3); font-size: 12.5px; text-align: center;
}

/* ——— Privacy pillars ——— */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 820px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  background: var(--surface-1); border: 1px solid var(--border-1);
  border-radius: 20px; padding: 26px;
}
.pillar h3 { color: var(--gb-mint); }
.pillar p { color: var(--text-2); font-size: 14.5px; }
.privacy-more { text-align: center; margin-top: 30px; color: var(--text-2); font-size: 14.5px; }

/* ——— Founder note ——— */
.founder {
  background: var(--surface-1); border: 1px solid var(--border-1);
  border-radius: 20px; padding: 40px; max-width: 720px; margin: 0 auto;
}
.founder .sig { color: var(--text-2); font: 600 14px/1.4 var(--font-body); margin-top: 20px; }
.founder .sig small { display: block; font-weight: 400; color: var(--text-3); }

/* ——— Final CTA ——— */
.closing { text-align: center; }
.closing .btn { margin-top: 8px; }

/* ——— Footer ——— */
footer {
  border-top: 1px solid var(--border-1);
  padding: 40px 0 60px; color: var(--text-3); font-size: 13px;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 18px; }
.foot-links a { color: var(--text-2); }
footer .legal { max-width: 72ch; line-height: 1.6; }

/* ——— Prose pages (privacy / support) ——— */
.prose { padding: 64px 0 84px; }
.prose h1 { font-size: clamp(30px, 5vw, 42px); }
.prose h2 { font: 600 20px/1.3 var(--font-body); margin: 34px 0 10px; }
.prose p, .prose li { color: var(--text-2); font-size: 15.5px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--tint); }
.prose .meta { color: var(--text-3); font-size: 13.5px; }
.prose strong { color: var(--text-1); }

/* ——— Scroll-driven reveals (pure CSS, progressive enhancement) ——— */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise both cubic-bezier(0.22, 1, 0.36, 1);
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
    @keyframes rise {
      from { opacity: 0; transform: translateY(26px); }
      to { opacity: 1; transform: none; }
    }
  }
}
