/* ==========================================================================
   Big Saurus — accessibility-first portfolio + shop
   Design goals: high contrast, large hit targets, clear focus, motion-safe.
   ========================================================================== */

:root {
  --bg:            #0f1115;
  --bg-alt:        #171a21;
  --surface:       #1d212b;
  --surface-2:     #252b38;
  --text:          #f2f4f8;
  --text-muted:    #c2c9d6;   /* >= 7:1 on --bg */
  --accent:        #5fe3a1;   /* saurus green */
  --accent-strong: #1f6f4a;
  --accent-text:   #04150d;   /* text ON accent buttons */
  --border:        #333a48;
  --focus:         #ffd166;
  --radius:        14px;
  --maxw:          72rem;
  --pad:           clamp(1.1rem, 4vw, 2.5rem);
}

/* Light theme via manual toggle or system preference */
[data-theme="light"] {
  --bg:            #fbfcfe;
  --bg-alt:        #f0f3f8;
  --surface:       #ffffff;
  --surface-2:     #eef1f6;
  --text:          #15181f;
  --text-muted:    #41495a;   /* >= 7:1 on light bg */
  --accent:        #0c7a4d;
  --accent-strong: #0c7a4d;
  --accent-text:   #ffffff;
  --border:        #d3d9e3;
  --focus:         #9a5b00;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:            #fbfcfe;
    --bg-alt:        #f0f3f8;
    --surface:       #ffffff;
    --surface-2:     #eef1f6;
    --text:          #15181f;
    --text-muted:    #41495a;
    --accent:        #0c7a4d;
    --accent-strong: #0c7a4d;
    --accent-text:   #ffffff;
    --border:        #d3d9e3;
    --focus:         #9a5b00;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.075rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Accessibility helpers ---- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 0.5rem; top: -3.5rem;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.75rem 1.1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.container.narrow { max-width: 46rem; }

.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section-alt { background: var(--bg-alt); }
.section-intro { color: var(--text-muted); max-width: 46rem; font-size: 1.15rem; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-block: 0 0.5rem; }
h3 { font-size: 1.3rem; }
.subhead { margin-top: 3rem; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; color: var(--text); text-decoration: none; }
.brand-mark { font-size: 1.5rem; }
.brand-name { font-size: 1.2rem; }

.site-nav { margin-left: auto; }
.nav-menu { display: flex; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  display: inline-block; padding: 0.55rem 0.85rem; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 600;
}
.nav-menu a:hover { background: var(--surface-2); }

.nav-toggle { display: none; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 10px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); cursor: pointer; font-size: 1.1rem;
}
.theme-toggle:hover { background: var(--surface-2); }

/* ---- Hero ---- */
.hero { padding-block: clamp(3.5rem, 10vw, 7rem); background:
  radial-gradient(120% 80% at 80% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%); }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem;
  font-weight: 700; color: var(--accent); margin: 0 0 0.75rem;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 0 1.25rem; max-width: 18ch; }
.lede { font-size: clamp(1.15rem, 2.4vw, 1.4rem); color: var(--text-muted); max-width: 44rem; margin: 0 0 2rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.4rem; border-radius: 999px; font-weight: 700;
  font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.12s ease, background 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

/* ---- Cards ---- */
.card-grid {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--text-muted); }
.card-status { margin-bottom: 0.2rem; }
.card-link { margin-top: auto; padding-top: 0.5rem; }
.card-link a { font-weight: 700; }
.card-link--muted { color: var(--text-muted); font-style: italic; }

.badge {
  display: inline-block; padding: 0.25rem 0.7rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.02em;
  border: 1px solid var(--border);
}
.badge-live  { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }
.badge-open  { background: color-mix(in srgb, #5ea0ff 22%, transparent); color: var(--text); }
.badge-dev   { background: var(--surface-2); color: var(--text-muted); }
.badge-soon  { background: color-mix(in srgb, #ffb454 22%, transparent); color: var(--text); }

.product-card .price { font-weight: 800; color: var(--text); font-size: 1.1rem; }
.buy-slot { margin-top: auto; padding-top: 0.5rem; }
.shop-note { margin-top: 2rem; color: var(--text-muted); }

/* ---- App store rows (iOS / Android) ---- */
.store-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: auto; padding-top: 0.75rem; }
.store-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.5rem 1rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.85rem 1rem;
}
.store-name { font-weight: 700; }
.store-row .price { font-size: 1rem; font-weight: 800; text-align: right; }
.btn-store {
  grid-column: 1 / -1; margin-top: 0.2rem;
  padding: 0.65rem 1rem; font-size: 0.95rem;
  background: var(--surface); color: var(--text); border: 2px solid var(--border);
}
.btn-store:hover { background: var(--bg-alt); }
/* An anchor with no href is inert + not keyboard-focusable: the disabled state. */
.btn-store[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

/* ---- Mailing list signup ---- */
.notify {
  margin-top: 2.5rem; padding: 1.75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.notify h3 { margin: 0 0 0.4rem; }
.notify > p { color: var(--text-muted); margin: 0 0 1.1rem; max-width: 46rem; }
.notify-form label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.notify-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.notify-row input {
  flex: 1 1 16rem; min-width: 0;
  padding: 0.75rem 0.95rem; font-size: 1rem;
  color: var(--text); background: var(--bg);
  border: 2px solid var(--border); border-radius: 999px;
}
.notify-row input::placeholder { color: var(--text-muted); }
.notify-row input:focus-visible { border-color: var(--accent); }
.notify-row .btn { flex: 0 0 auto; }
.notify-fineprint { margin: 0.75rem 0 0; font-size: 0.9rem; color: var(--text-muted); }

/* ---- Pill list ---- */
.pill-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pill-list li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.5rem 1rem; color: var(--text-muted);
}

/* ---- About paragraphs ---- */
#about p { font-size: 1.12rem; margin-block: 0 1.1rem; }

/* ---- Contact ---- */
.contact-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.contact-link {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem 1.2rem;
  color: var(--text); text-decoration: none; font-weight: 600;
}
.contact-link:hover { background: var(--surface-2); }
.contact-icon { font-size: 1.2rem; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding-block: 2rem; background: var(--bg-alt); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; align-items: center; }
.site-footer p { margin: 0; color: var(--text-muted); }
.site-footer a { color: var(--text); }

/* ---- Mobile nav ---- */
@media (max-width: 46rem) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem; border-radius: 10px;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); cursor: pointer; margin-left: auto;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    display: block; width: 1.2rem; height: 2px; background: currentColor; position: relative;
  }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -6px; }
  .nav-toggle-bar::after  { top: 6px; }

  .site-nav { margin-left: 0; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 0.5rem var(--pad);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 0.85rem 0.5rem; border-radius: 8px; }
}
