/* ==========================================================================
   STZR Labs — styles.css
   Plain CSS, no frameworks/build tools. Mobile-first.
   Palette: "Sunlit Neutral" — warm paper background, forest green primary,
   serif display type, flat surfaces (no gradients, no glass, no shadows).
   ========================================================================== */

:root {
  /* Surface */
  --bg: #f3efe6;
  --bg-raised: #eae3d3;
  --border: rgba(32, 29, 24, 0.15);
  --border-strong: rgba(32, 29, 24, 0.32);

  /* Text */
  --text: #201d18;
  --text-muted: #55503f;
  --text-faint: #8a8371;

  /* Brand */
  --brand: #1f4a3d;
  --brand-dark: #163a30;

  /* Per-app accents */
  --accent-snooker: #1f4a3d;   /* table-felt green, ties to core brand */
  --accent-meal: #a8622e;      /* warm terracotta, food */

  --radius: 6px;
  --max-width: 1160px;

  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  background: var(--brand);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.wordmark .stzr {
  color: var(--text);
}

.wordmark .labs {
  color: var(--brand);
  font-style: italic;
  font-weight: 400;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
  border-color: var(--text-faint);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

@media (min-width: 860px) {
  .main-nav {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 20px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  padding: 12px 4px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

@media (min-width: 860px) {
  .mobile-nav {
    display: none !important;
  }
}

/* ==========================================================================
   Buttons — flat, no shadow, no gradient
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--text);
}

.btn-small {
  padding: 9px 16px;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   Journey markers — large faint serif numerals used instead of icons
   ========================================================================== */

.journey-marker {
  position: relative;
  z-index: 1;
}

.journey-marker .marker-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.marker-bg {
  position: absolute;
  top: -0.3em;
  right: -0.05em;
  font-family: var(--font-display);
  font-size: clamp(6rem, 16vw, 11rem);
  line-height: 1;
  color: var(--text);
  opacity: 0.045;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 76px;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.2vw, 3.3rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  font-weight: 400;
}

.hero .lede {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 0 36px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 52px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand);
}

.hero-stat span {
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ==========================================================================
   Section shell
   ========================================================================== */

section {
  position: relative;
  padding: 76px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.section-head {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 0 48px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  font-weight: 400;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.02rem;
  margin: 0;
}

/* ==========================================================================
   Apps section / product cards
   ========================================================================== */

.apps-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 780px) {
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.app-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 30px 28px 26px;
  display: flex;
  flex-direction: column;
}

.app-card--snooker {
  --accent: var(--accent-snooker);
}

.app-card--meal {
  --accent: var(--accent-meal);
}

.app-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 4px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-card .app-tagline {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 18px;
}

.app-card .app-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 20px;
}

.app-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.app-features li {
  position: relative;
  padding-left: 18px;
  font-size: 0.92rem;
  color: var(--text);
}

.app-features li::before {
  content: "\2013"; /* en dash */
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.app-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.app-store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-strong);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.store-badge:hover {
  color: var(--text);
  border-color: var(--text);
}

/* ==========================================================================
   About section
   ========================================================================== */

.about-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.about-copy p {
  color: var(--text-muted);
  font-size: 1.02rem;
  margin: 0 0 18px;
}

.about-copy strong {
  color: var(--text);
}

.about-facts {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.about-fact {
  background: var(--bg);
  padding: 20px 22px;
}

.about-fact h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
}

.about-fact p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ==========================================================================
   Support section
   ========================================================================== */

.support-card {
  position: relative;
  z-index: 1;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 420px;
  margin: 28px auto 0;
  border: 1px solid var(--border);
}

.support-item {
  background: var(--bg-raised);
  padding: 22px 24px;
}

.support-item h3 {
  font-size: 1rem;
  margin: 0 0 8px;
  font-weight: 700;
}

.support-item p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 12px;
}

.support-item a.contact-link {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.92rem;
  word-break: break-word;
  border-bottom: 1px solid var(--brand);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: 56px 0 32px;
  background: var(--bg-raised);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 320px;
  margin: 14px 0 0;
}

.footer-col h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin: 0 0 16px;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.85rem;
}

@media (min-width: 700px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-legal-note {
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   404 page
   ========================================================================== */

.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin: 0 0 12px;
  font-weight: 400;
}

.error-page p {
  color: var(--text-muted);
  margin: 0 0 28px;
  font-size: 1.05rem;
}

/* ==========================================================================
   Focus visibility (accessibility)
   ========================================================================== */

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