/* PulseMyBasket marketing site — shared styles.
   Design tokens match frontend/src/index.css exactly so this site and the
   app at app.pulsemybasket.co.za read as the same product. */

:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-2: #eef2f7;
  --line: rgba(10, 23, 39, 0.1);
  --text: #0a1727;
  --muted: #5c6b80;
  --accent: #0f9d68;
  --accent-2: #2f7dd6;
  --danger: #d1414f;
  --shadow: 0 12px 32px rgba(10, 23, 39, 0.08);
  --radius: 16px;
  --max: 1120px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07111f;
    --panel: #0d1b2e;
    --panel-2: #10233b;
    --line: rgba(255, 255, 255, 0.1);
    --text: #f7f9fc;
    --muted: #93a4ba;
    --accent: #5ee7b3;
    --accent-2: #42b8ff;
    --danger: #ff7b88;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--accent-2);
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 800;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #06111d;
  padding: 12px 18px;
  font-weight: 700;
  z-index: 1000;
  border-radius: 0 0 10px 0;
}

.skip-link:focus {
  left: 0;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

/* ---------- Header ---------- */

.site-header {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

/* The logo artwork's wordmark is white ("Basket"), designed to sit on a
   dark surface -- unusable as-is against this site's light default
   background, so two pre-rendered variants exist (see website/assets) and
   swap with the OS color scheme rather than relying on one asset to work
   on both. Sized well above a nav-icon scale per the brand's own request:
   a primary mark on desktop, not a small corner logo. */
.brand img {
  height: 52px;
  width: auto;
  aspect-ratio: 1200 / 333;
}

.brand .logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .brand .logo-light {
    display: none;
  }

  .brand .logo-dark {
    display: block;
  }
}

@media (min-width: 640px) {
  .brand img {
    height: 76px;
  }
}

@media (min-width: 1024px) {
  .brand img {
    height: 92px;
  }
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  color: var(--text);
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
}

.main-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.main-nav a[aria-current="page"] {
  color: var(--accent-2);
}

.main-nav a:hover {
  color: var(--accent-2);
}

.nav-cta {
  display: flex;
  gap: 10px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 12px 20px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06111d;
  border: none;
}

.btn-secondary {
  background: transparent;
}

.btn-block {
  width: 100%;
}

/* ---------- Layout helpers ---------- */

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.muted {
  color: var(--muted);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

section {
  padding: 64px 0;
}

section.tight {
  padding: 40px 0;
}

/* A page's intro heading block is capped at reading width and centered so
   it reads as connected to the full-width grid/cards below it, whether
   `.section-head` sits on the same element as `.container` (most inner
   pages) or nested inside it (a couple of Home's sections) -- previously
   this set `margin: 0 0 40px`, which zeroed the left/right auto-centering
   inherited from `.container` on the combined-class pages, so those
   pages' headings rendered flush against the browser's left edge instead
   of centered inside the page's own max-width column. Only margin-bottom
   is set here now, on purpose, so centering is never fought again. */
.section-head {
  max-width: 640px;
  margin-bottom: 40px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head .eyebrow {
  display: block;
}


.grid {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 860px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 48px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
}

.hero .lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.entry-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.entry-method {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.entry-method .icon {
  font-size: 22px;
}

.entry-method h3 {
  font-size: 15px;
  margin: 10px 0 4px;
}

.entry-method p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

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

/* ---------- Feature cards ---------- */

.feature-card h3 {
  font-size: 17px;
}

.feature-card p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* ---------- Retailer chips ---------- */

.retailer-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.retailer-chip {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}

.status-table th,
.status-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.status-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
}

.status-live {
  background: rgba(15, 157, 104, 0.15);
  color: var(--accent);
}

.status-partial {
  background: rgba(47, 125, 214, 0.15);
  color: var(--accent-2);
}

.status-soon {
  background: var(--panel-2);
  color: var(--muted);
}

.status-table-wrap {
  overflow-x: auto;
}

@media (max-width: 640px) {
  .status-table thead {
    display: none;
  }

  .status-table,
  .status-table tbody,
  .status-table tr,
  .status-table td {
    display: block;
    width: 100%;
  }

  .status-table tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
  }

  .status-table td {
    border-bottom: none;
    padding: 6px 0;
  }

  .status-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
  }
}

/* ---------- FAQ ---------- */

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.faq-item h3 {
  font-size: 16px;
  margin: 0;
}

.faq-item p {
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0 0;
}

/* ---------- Legal content ---------- */

.legal-content h2 {
  font-size: 20px;
  margin-top: 2em;
}

.legal-content h3 {
  font-size: 16px;
  margin-top: 1.6em;
}

.legal-content p,
.legal-content li {
  color: var(--muted);
  font-size: 15px;
}

.legal-content ul {
  padding-left: 20px;
}

.legal-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 32px;
}

/* ---------- Forms ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.field input,
.field textarea,
.field select {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.form-note {
  font-size: 13px;
  color: var(--muted);
}

.form-status {
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 20px;
}

.form-status.success {
  background: rgba(15, 157, 104, 0.12);
  color: var(--accent);
}

.form-status.error {
  background: rgba(209, 65, 79, 0.12);
  color: var(--danger);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
}

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

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-brand img {
  height: 28px;
}

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

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

/* ---------- Mobile nav ---------- */

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 20px;
    z-index: 40;
  }

  .nav-panel.open {
    display: flex;
  }

  .nav-row {
    position: relative;
  }

  .main-nav {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  .nav-cta {
    width: 100%;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* ---------- Utility spacing (kept out of inline style="" so the CSP can
   drop 'unsafe-inline' for style-src) ---------- */

.narrow-640 {
  max-width: 640px;
}

.narrow-760 {
  max-width: 760px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-20 {
  margin-top: 20px;
}

.center-actions {
  justify-content: center;
}

.cf-turnstile {
  margin-bottom: 16px;
}

/* ---------- 404 ---------- */

.notfound {
  text-align: center;
  padding: 100px 0;
}

.notfound .code {
  font-size: 96px;
  font-weight: 900;
  color: var(--accent);
  margin: 0;
}

.hero-note {
  margin: 14px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 560px;
}
