/* Scorecard – scorecardkeeper.app */

:root {
  --black: #000000;
  --bg: #131313;          /* off black (primary) */
  --text: #F5F5F5;        /* off white */
  --grey: #333333;
  --divider: #8E8E93;
  --muted: #8E8E93;
  --font: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1160px;
  --pad: clamp(20px, 5vw, 40px);
  --section: clamp(72px, 11vw, 140px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.narrow > * { max-width: 820px; }
.center { text-align: center; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  background: var(--grey); border: 1px solid #444; color: var(--text);
  text-decoration: none; font-weight: 500; padding: .9em 1.6em;
  transition: background .2s, border-color .2s;
}
.btn:hover { background: #3d3d3d; border-color: var(--divider); }
.btn-sm { padding: .5em 1em; font-size: 14px; }

/* Apple badge: 48px tall (min 40px onscreen); clear space = 1/4 height (12px) kept free via margin */
.appstore { display: inline-block; margin: 12px; transition: opacity .2s; }
.appstore:hover { opacity: .85; }
.appstore img { height: 48px; width: auto; }
.hero-copy .appstore { margin-left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(19,19,19,.85);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--grey); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 700; font-size: 22px; letter-spacing: .04em; text-decoration: none; }
.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-menu a:not(.btn) { text-decoration: none; font-size: 14px; color: var(--muted); }
.nav-menu a:not(.btn):hover { color: var(--text); }
/* Menu toggle styled as the app's + / - button: + when closed, - when open */
.nav-toggle {
  display: none; position: relative; width: 44px; height: 44px; padding: 0;
  background: var(--grey); border: 1px solid #3a3a3a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 2px 6px rgba(0,0,0,.4);
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle:active { background: #444; }
.nav-toggle span {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; margin: -1px 0 0 -9px;
  background: var(--text); transition: transform .25s ease;
}
.nav-toggle span:last-child { transform: rotate(90deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: rotate(0deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--grey);
    padding: 8px var(--pad) 24px;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--grey); font-size: 16px; color: var(--text); }
  .nav-menu .btn { margin-top: 20px; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 8vw, 96px) 0 var(--section); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 13px; color: var(--muted); margin-bottom: 1.4em; }
.hero h1 { font-size: clamp(36px, 6vw, 68px); letter-spacing: -.02em; margin-bottom: .45em; }
.lead { font-size: clamp(18px, 2vw, 22px); font-weight: 500; margin-bottom: .6em; }
.sub { color: var(--muted); margin-bottom: 2em; }

.try { margin-top: 48px; max-width: 420px; }
.try-label { font-size: 12px; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); margin-bottom: 12px; }
.score-row {
  display: grid; grid-template-columns: 76px 1fr 76px; align-items: center;
  padding-bottom: 16px; border-bottom: 1px solid var(--divider);
}
.score-btn {
  height: 88px; background: var(--grey); border: 1px solid #3a3a3a;
  font-size: 30px; font-weight: 400; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 2px 6px rgba(0,0,0,.4);
  transition: background .12s, transform .08s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.score-btn:hover { background: #3a3a3a; }
.score-btn:active { transform: scale(.96); background: #444; }
.score-mid { text-align: center; }
.score-num { display: block; font-size: 44px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.score-num.bump { animation: bump .18s ease-out; }
@keyframes bump { 50% { transform: scale(1.15); } }
.score-name { font-weight: 500; }

/* Phone frame */
.phone {
  border: 1px solid var(--grey); border-radius: 36px; padding: 8px;
  background: var(--black);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.phone img { border-radius: 28px; }
.hero-phone .phone { max-width: 360px; margin-left: auto; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .appstore { margin-left: 12px; }
  .try { margin-left: auto; margin-right: auto; }
  .hero-phone .phone { margin: 0 auto; max-width: 300px; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; border-top: 1px solid var(--grey); }
.section.alt { background: var(--black); }
.section-title {
  font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .2em;
  color: var(--muted); margin-bottom: 40px;
}
.big { font-size: clamp(20px, 2.6vw, 28px); line-height: 1.5; font-weight: 500; }
.display { font-size: clamp(30px, 5vw, 56px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-bottom: .6em; }

/* About tags */
.about p:not(.big) { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.tags li { border: 1px solid var(--grey); padding: 6px 14px; font-size: 14px; }

/* Features */
.feature-list {
  counter-reset: f;
  display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(32px, 6vw, 80px);
}
.feature-list li {
  counter-increment: f;
  display: grid; grid-template-columns: 56px 1fr; column-gap: 8px;
  padding: 28px 0; border-bottom: 1px solid var(--divider);
}
.feature-list li::before {
  content: counter(f, decimal-leading-zero);
  grid-row: span 2; font-weight: 700; color: var(--muted); font-size: 15px; padding-top: 2px;
}
.feature-list h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.feature-list p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .feature-list { grid-template-columns: 1fr; } }

/* Screenshots carousel */
.section-head { display: flex; justify-content: space-between; align-items: flex-start; }
.carousel-nav { display: flex; gap: 8px; }
.arrow {
  width: 48px; height: 48px; background: var(--grey); border: 1px solid #3a3a3a;
  font-size: 20px; transition: background .2s, opacity .2s;
}
.arrow:hover { background: #3d3d3d; }
.arrow:disabled { opacity: .35; cursor: default; }
.carousel {
  display: flex; gap: clamp(20px, 3vw, 40px);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 0 max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))) 24px;
  scroll-padding-inline: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  scrollbar-width: none; outline: none;
}
.carousel::-webkit-scrollbar { display: none; }
/* Screenshots include their own headline + device frame, on the page colour (#131313) */
.slide { margin: 0; flex: 0 0 clamp(260px, 27vw, 320px); scroll-snap-align: start; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.dots button { width: 8px; height: 8px; padding: 0; border: 0; background: var(--grey); }
.dots button.active { background: var(--text); }
@media (max-width: 600px) { .carousel-nav { display: none; } .slide { flex-basis: 72vw; } }

/* Privacy */
.privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 40px; max-width: 760px; }
.privacy-grid li {
  background: var(--grey); padding: 28px 20px; text-align: center; font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.privacy-grid .x { display: block; font-size: clamp(40px, 6vw, 64px); font-weight: 700; line-height: 1.1; margin-bottom: 4px; }
.narrow-text { max-width: 620px; color: var(--muted); }
.text-link { font-weight: 500; text-underline-offset: 4px; }
.text-link:hover { text-decoration-thickness: 2px; }
@media (max-width: 480px) { .privacy-grid li { padding: 20px 8px; font-size: 14px; } }

/* FAQ */
.faq-list { border-top: 1px solid var(--divider); }
.faq-list details { border-bottom: 1px solid var(--divider); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 24px 40px 24px 0; position: relative;
  font-weight: 700; font-size: 18px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 400;
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p { color: var(--muted); padding: 0 40px 24px 0; margin: 0; }

/* Download */
.download .display { margin: 0 auto .4em; max-width: 14em; }
.download p { color: var(--muted); margin-bottom: 2em; }
.app-icon { width: clamp(96px, 12vw, 128px); height: auto; margin: 0 auto 32px; border-radius: 22.4%; box-shadow: 0 0 0 1px var(--grey), 0 20px 50px rgba(0,0,0,.6); }

/* Footer */
.site-footer { border-top: 1px solid var(--grey); padding: 32px 0; font-size: 14px; color: var(--muted); }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-grid p { margin: 0; }
.footer-grid nav { display: flex; gap: 24px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
@media (max-width: 600px) { .footer-grid { flex-direction: column-reverse; text-align: center; } }
