/* Gully Cricket Scorer — marketing site.
   Palette mirrors the app's default "Glacier" theme. */

:root {
  --ink: #0f2733;
  --ink-soft: #4a6270;
  --line: #dce6ec;
  --bg: #ffffff;
  --bg-soft: #f2f7fa;
  --brand: #0f3e5c;
  --brand-bright: #1aa3d6;
  --brand-deep: #0a2438;
  --radius: 14px;
  --wrap: 1080px;

  /* Every screenshot edge. Black, not a tint of the background: these are device
     captures whose own content runs to the edge, so a translucent border reads as a
     halo floating around the picture rather than as the edge of a phone. Deliberately
     one value for hero and gallery — two nearly-matching edges is how they drifted
     apart last time. */
  --shot-edge: #000;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8f1f6;
    --ink-soft: #9db4c2;
    --line: #1e3644;
    --bg: #0b1a24;
    --bg-soft: #10242f;
    --brand: #7cc7e8;
    --brand-bright: #4fb8e0;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-bright); }

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

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}

.brand img { width: 30px; height: 30px; border-radius: 8px; }

.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--brand-bright); }

@media (max-width: 620px) {
  .nav a.hide-sm { display: none; }
}

/* Narrow phones: stop the wordmark wrapping to two lines and crowding the nav. */
@media (max-width: 430px) {
  .brand { font-size: 15px; white-space: nowrap; }
  .brand img { width: 26px; height: 26px; }
  .nav { gap: 16px; }
  .nav a { font-size: 14px; }
  .site-header .wrap { padding: 0 16px; }
  .wrap { padding: 0 18px; }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--brand-deep), var(--brand) 60%, #14547a);
  color: #fff;
  padding: 72px 0 84px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hero p.lede {
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 28px;
  max-width: 46ch;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 11px;
  padding: 13px 22px;
  font-weight: 650;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
}

/* Flush to the container's right gutter, so the shot lines up with the header nav
   and the footer rather than floating mid-track with a void beside it. */
/* These are raw device captures: opaque rectangles with no baked-in corner rounding.
   That is why border-radius is right here and was wrong before — the earlier artwork
   carried its own rounded phone silhouette in the alpha channel, so a CSS radius drew a
   second, mismatched curve across transparent pixels. With a plain rectangle the radius
   defines the corner rather than fighting one. */
.hero-shot {
  justify-self: end;
  width: min(260px, 72vw);
  height: auto;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--shot-edge);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.45);
}

/* Stacked layout: the shot is no longer a second column, so centre it instead.
   Must come after the rule above — same specificity, later wins. */
@media (max-width: 860px) {
  .hero-shot { justify-self: center; }
}

/* ── Sections ─────────────────────────────────────────────── */
section { padding: 68px 0; }
section.alt { background: var(--bg-soft); }

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}

.section-lede {
  color: var(--ink-soft);
  margin: 0 0 34px;
  max-width: 60ch;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

section.alt .card { background: var(--bg); }

.card h3 { margin: 0 0 7px; font-size: 1.02rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }

.card .ico {
  font-size: 22px;
  line-height: 1;
  display: block;
  margin-bottom: 12px;
}

/* ── Screenshots ──────────────────────────────────────────── */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 22px;
  margin-top: 6px;
}

.shot { text-align: center; }

.shot img {
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--shot-edge);
  box-shadow: 0 10px 24px rgba(10, 36, 56, 0.22);
}

/* The themes row is two shots, not six — keep them the same size as the grid above
   rather than letting auto-fit stretch them across the full width. */
.shots-pair {
  grid-template-columns: repeat(2, minmax(190px, 240px));
  justify-content: center;
}

.shots-subhead {
  margin: 44px 0 6px;
  font-size: 1.15rem;
}

.shot figcaption {
  margin-top: 11px;
  font-size: 0.87rem;
  color: var(--ink-soft);
}

/* ── Get the app ──────────────────────────────────────────── */
.get {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

@media (max-width: 780px) {
  .get { grid-template-columns: 1fr; }
}

.get .card { display: flex; flex-direction: column; }
.get .card p { flex: 1; }

.qr {
  width: 172px;
  height: 172px;
  background: #fff;
  border-radius: 12px;
  padding: 9px;
  border: 1px solid var(--line);
  margin: 16px 0;
}

.badge-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 14px;
}

.btn-brand {
  background: var(--brand-bright);
  color: #04222f;
  align-self: flex-start;
  margin-top: 16px;
}

.btn-outline {
  border-color: var(--line);
  color: var(--ink);
  align-self: flex-start;
  margin-top: 16px;
}

/* ── Privacy strip ────────────────────────────────────────── */
.privacy-strip {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-bright);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: var(--bg);
}

.privacy-strip h3 { margin: 0 0 6px; }
.privacy-strip p { margin: 0 0 12px; color: var(--ink-soft); }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
}

footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--ink-soft); text-decoration: none; }
footer a:hover { color: var(--brand-bright); }

/* ── Legal page ───────────────────────────────────────────── */
.legal { padding: 52px 0 72px; max-width: 780px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 6px; }
.legal .meta { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 6px; }
.legal h2 {
  font-size: 1.2rem;
  margin: 38px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 7px; }

.summary-box {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-bright);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 26px 0 8px;
}

.summary-box p:last-child { margin-bottom: 0; }

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 6px;
  font-size: 0.93rem;
  display: block;
  overflow-x: auto;
}

.legal th, .legal td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.legal th { background: var(--bg-soft); font-weight: 650; }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 20;
  background: #fff;
  color: #0a2438;
  padding: 10px 14px;
  border-radius: 8px;
}
