/* Anchor: Bowling Score Keeper — marketing + policy site
   House Style: warm maple paper, lacquer red, espresso ink, brass + navy readouts.
   Signature: a printed scoresheet whose frames stamp in and total up.
   Matches the shared studio template (Fraunces / Hanken Grotesk / Space Mono). */

:root {
  --ink:        #241C16;   /* espresso — footer, ink sections, headings */
  --red:        #B23A2E;   /* lacquer red — the brand accent */
  --red-deep:   #8E2B21;   /* links, icon strokes, eyebrows */
  --paper:      #F5EEE0;   /* maple / cream page */
  --paper-2:    #EEE3D0;   /* banded sections */
  --brass:      #C79A46;   /* readouts / accents on dark */
  --navy:       #1E2C3A;   /* running-total numerals */
  --card:       #FFFDF8;   /* warm white card */
  --text:       #2A211B;
  --muted:      #6E6154;
  --line:       #E4D8C2;   /* hairline on paper */
  --tint:       #F3E7D6;   /* soft chip / tint */
  --red-tint:   #F5E4DE;   /* soft red chip */
  --radius:     20px;
  --radius-lg:  30px;
  --shadow:     0 24px 48px -28px rgba(36,28,22,.5);
  --shadow-sm:  0 10px 24px -18px rgba(36,28,22,.5);
  --maxw:       1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  font-size: 1.12rem;
  line-height: 1.62;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--red-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}

.eyebrow {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red-deep);
  margin: 0;
}

/* ---------- layout ---------- */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 96px 0; }
.section--tint  { background: var(--paper-2); }
.section--ink   { background: var(--ink); color: #F0E7D8; }
.section--ink h2, .section--ink h3 { color: #FFFFFF; }

.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin-top: 14px; }
.section-head p { color: var(--muted); font-size: 1.12rem; margin: 14px 0 0; }
.section--ink .section-head p { color: #CDBDA6; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,238,224,.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: 'Fraunces',serif; font-weight: 600; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.topnav { display: flex; gap: 26px; }
.topnav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 1rem; }
.topnav a:hover { color: var(--red-deep); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--red); color: #fff;
  padding: 15px 26px; border-radius: 999px;
  font-family: 'Hanken Grotesk',sans-serif; font-weight: 600; font-size: 1.06rem;
  text-decoration: none; border: 0; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -18px rgba(142,43,33,.6); }
.btn .apple { width: 19px; height: 22px; flex: 0 0 auto; }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn--soon { background: var(--ink); cursor: default; }
.btn--soon:hover { transform: none; box-shadow: var(--shadow-sm); }
/* ghost + soon (on the dark closer): keep the light pill so text stays visible */
.btn--ghost.btn--soon { background: #fff; color: var(--ink); }

/* ---------- hero (printed scoresheet) ---------- */

.hero { padding: 66px 0 84px; text-align: center; overflow: hidden; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--red-tint); color: var(--red-deep);
  font-family: 'Space Mono',monospace; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 15px; border-radius: 999px; margin-bottom: 30px;
}
.hero .pill .pin { width: 9px; height: 12px; background: var(--red); border-radius: 5px 5px 4px 4px / 7px 7px 4px 4px; display: inline-block; }

.phrase {
  font-family: 'Fraunces',serif; font-weight: 400;
  font-size: clamp(2.1rem, 6vw, 4rem);
  line-height: 1.1; color: var(--ink);
  max-width: 16ch; margin: 0 auto;
  animation: rise .7s .1s both cubic-bezier(.2,.7,.2,1);
}

/* the signature scoresheet strip */
.sheet-wrap { position: relative; display: inline-block; margin: 44px auto 0; max-width: 100%; }
.sheet {
  display: inline-flex; gap: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  max-width: 100%;
  overflow-x: auto;
}
.frame {
  flex: 0 0 auto;
  width: 92px;
  padding: 12px 10px 14px;
  border-right: 1px solid var(--line);
  text-align: center;
  animation: rise .5s both cubic-bezier(.2,.7,.2,1);
}
.frame:last-child { border-right: 0; }
.frame:nth-child(1){ animation-delay:.7s } .frame:nth-child(2){ animation-delay:.85s }
.frame:nth-child(3){ animation-delay:1s } .frame:nth-child(4){ animation-delay:1.15s }
.frame:nth-child(5){ animation-delay:1.3s }
.frame .fnum {
  font-family: 'Space Mono',monospace; font-size: .68rem; letter-spacing: .12em;
  color: var(--muted); background: var(--tint); border-radius: 6px; padding: 2px 0; margin-bottom: 8px;
}
.frame .balls { display: flex; justify-content: center; gap: 5px; height: 30px; }
.frame .ball {
  width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px;
  display: grid; place-items: center;
  font-family: 'Space Mono',monospace; font-weight: 700; font-size: 1.05rem; color: var(--text);
}
.frame .ball.x { color: var(--red); border-color: var(--red); }
.frame .ball.sp { color: var(--red-deep); }
.frame .ftotal {
  font-family: 'Fraunces',serif; font-weight: 600; font-size: 1.5rem; color: var(--navy);
  margin-top: 10px;
}
.frame.tenth { width: 118px; }
.frame.tenth .ball { width: 26px; }

/* the inked FINAL stamp */
.sheet-wrap .stamp {
  position: absolute; right: -12px; bottom: -14px;
  font-family: 'Space Mono',monospace; font-weight: 700; font-size: .8rem; letter-spacing: .18em;
  color: var(--red); border: 2.5px solid var(--red); border-radius: 8px;
  padding: 6px 12px; background: rgba(255,253,248,.9);
  transform: rotate(-8deg) scale(.4); opacity: 0;
  animation: pop .5s 1.7s both cubic-bezier(.2,1.5,.4,1);
}

.hero .lede { max-width: 42ch; margin: 44px auto 0; font-size: 1.22rem; color: var(--text); animation: fade .6s 1.9s both; }
.hero .cta-row { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 14px; animation: fade .6s 2.05s both; }
.hero .fine { font-family: 'Space Mono',monospace; font-size: .82rem; color: var(--muted); letter-spacing: .02em; }

/* ---------- feature bands ---------- */

.band-label { display: flex; align-items: center; gap: 14px; max-width: var(--maxw); margin: 0 auto 34px; }
.band-label .tag { font-family: 'Space Mono',monospace; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; padding: 6px 13px; border-radius: 999px; white-space: nowrap; }
.band-label .tag--free { background: var(--red-tint); color: var(--red-deep); }
.band-label .tag--pro { background: var(--ink); color: #fff; }
.band-label .rule { height: 1px; background: var(--line); flex: 1; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: var(--maxw); margin: 0 auto; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--red-tint); display: grid; place-items: center; margin-bottom: 18px; }
.feature .ico svg { width: 24px; height: 24px; stroke: var(--red-deep); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.4rem; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }

/* ---------- privacy band (ink) ---------- */

.privacy-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px 40px; max-width: 900px; margin: 44px auto 0; }
.promise { display: flex; gap: 15px; align-items: flex-start; }
.promise .mark { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; margin-top: 3px; }
.promise .mark svg { width: 17px; height: 17px; stroke: var(--brass); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.promise b { color: #fff; font-weight: 600; }
.promise span { display: block; color: #CDBDA6; font-size: 1.02rem; line-height: 1.5; }

/* ---------- screenshots ---------- */

.shots { display: flex; justify-content: safe center; gap: 22px; overflow-x: auto; padding: 8px 24px 22px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.shot { flex: 0 0 auto; width: 240px; scroll-snap-align: center; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }

/* ---------- final CTA ---------- */

.closer { text-align: center; }
.closer h2 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); }
.closer .cta-row { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.closer .fine { font-family: 'Space Mono',monospace; font-size: .82rem; color: #C6B191; letter-spacing: .02em; }

/* ---------- footer ---------- */

.foot { background: var(--ink); color: #C6B191; padding: 40px 0; text-align: center; }
.foot a { color: #F0E7D8; text-decoration: none; margin: 0 14px; font-weight: 500; }
.foot a:hover { text-decoration: underline; }
.foot p { margin: 20px 0 0; font-size: .95rem; }

/* ---------- content pages (support / privacy) ---------- */

.page-head { background: var(--ink); color: #F0E7D8; text-align: center; padding: 64px 0 72px; }
.page-head img.logo { width: 92px; height: 92px; border-radius: 22px; margin: 0 auto 22px; box-shadow: var(--shadow); }
.page-head h1 { color: #fff; font-size: clamp(2.4rem,6vw,3.4rem); }
.page-head .eyebrow { color: var(--brass); margin-bottom: 14px; }

.prose { max-width: 760px; margin: 0 auto; padding: 72px 24px; }
.prose h2 { font-size: 1.9rem; margin: 8px 0 24px; }
.prose h3 { font-size: 1.35rem; color: var(--ink); margin: 40px 0 12px; }
.prose p { margin: 0 0 18px; }
.prose ul { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 0 0 8px; }
.updated { display: inline-block; font-family: 'Space Mono',monospace; font-size: .85rem; color: var(--red-deep); background: var(--red-tint); padding: 8px 14px; border-radius: 10px; margin-bottom: 30px; }

.faq { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 14px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 22px 26px; font-weight: 600; font-size: 1.15rem; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: 'Space Mono',monospace; color: var(--red); font-size: 1.5rem; line-height: 1; transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 26px 24px; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }

.callout { background: var(--tint); border-radius: var(--radius); padding: 26px 30px; }
.callout--warn { background: var(--red-tint); }
.callout b { color: var(--ink); }
.back-link { display: inline-block; margin-top: 26px; color: #fff; background: rgba(255,255,255,.14); padding: 12px 22px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.back-link:hover { background: rgba(255,255,255,.24); }

/* ---------- motion primitives ---------- */

@keyframes rise  { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop   { from { opacity: 0; transform: rotate(-8deg) scale(.4); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }

/* ---------- accessibility floor ---------- */

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .frame, .phrase, .hero .lede, .hero .cta-row, .sheet .stamp { opacity: 1 !important; transform: none !important; }
  .sheet .stamp { transform: rotate(-8deg) !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  body { font-size: 1.08rem; }
  .section { padding: 68px 0; }
  .topnav { gap: 16px; font-size: .95rem; }
  .topnav a.hide-sm { display: none; }
  .grid, .privacy-grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 60px; }
  .sheet { margin-left: 12px; margin-right: 12px; }
}
