/* scarletsystems.co.nz — Premium Main Stylesheet
 * Sleek Dark Mode, Glassmorphism, Micro-animations, Typography-driven
 */

:root {
  --bg: #09090b;
  --bg-gradient: radial-gradient(circle at 50% 0%, #2a1014 0%, #09090b 40%);
  --bg-elev: rgba(255, 255, 255, 0.03);
  --bg-elev-hover: rgba(255, 255, 255, 0.06);
  --bg-panel: rgba(255, 255, 255, 0.03);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(196, 36, 58, 0.4);

  --fg: #fafafa;
  --fg-mute: #a1a1aa;
  --fg-quiet: #52525b;

  --scarlet: #c4243a;
  --scarlet-glow: #ff2a54;
  --scarlet-gradient: linear-gradient(135deg, #ff4d6d 0%, #c4243a 100%);
  --gold: #d4b562;

  --maxw-text: 44rem;
  --maxw-page: 72rem;
  --r-card: 16px;
  --r-pill: 999px;

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* { box-sizing: border-box; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, html {
  margin: 0; padding: 0;
  min-height: 100%;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ─────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em 0;
}

h1 {
  font-size: 3.1rem;
  line-height: 1.15;
  margin-top: 4rem;
  margin-bottom: 2rem;
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: var(--maxw-text);
}

h2 {
  font-size: 2rem;
  margin-top: 5rem;
  color: var(--fg);
}

h3 {
  font-size: 1.4rem;
  color: var(--fg);
}

h4 {
  font-size: 1.1rem;
  color: var(--scarlet-glow);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

p {
  margin: 0 0 1.5em 0;
  max-width: var(--maxw-text);
  color: var(--fg-mute);
  font-size: 1.1rem;
}

.lede {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #e4e4e7;
  font-weight: 300;
}

a {
  color: var(--scarlet-glow);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

a:hover {
  color: #fff;
  border-bottom-color: var(--scarlet-glow);
  text-shadow: 0 0 12px rgba(255, 42, 84, 0.4);
}

strong { color: var(--fg); font-weight: 600; }
em { color: var(--fg-mute); font-style: italic; }

code {
  font-family: var(--font-mono);
  background: var(--bg-elev);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--gold);
}

/* ── Layout ─────────────────────────────────────────────────────── */

.page {
  max-width: var(--maxw-page);
  margin: 0 auto;
  padding: 2rem 2rem 6rem 2rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand a {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  border: none;
}

.brand a:hover {
  text-shadow: none;
  color: var(--scarlet-glow);
}

.brand .sub {
  color: var(--fg-quiet);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav {
  display: flex;
  gap: 2rem;
  font-weight: 500;
}

.nav a {
  color: var(--fg-mute);
  border: none;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--scarlet-gradient);
  transition: width 0.3s ease;
}

.nav a:hover { color: #fff; text-shadow: none; }
.nav a:hover::after { width: 100%; }

/* ── Cards & Glassmorphism ──────────────────────────────────────── */

.use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.use-case, .entry-point {
  background: var(--bg-elev);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  padding: 2rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease;
}

.use-case:hover, .entry-point:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(196, 36, 58, 0.15);
  border-color: var(--border-hover);
  background: var(--bg-elev-hover);
}

.use-case p {
  font-size: 1rem;
  margin: 0;
}

.entry-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.entry-point h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.entry-point code {
  font-size: 1.2rem;
  background: rgba(196, 36, 58, 0.1);
  color: var(--scarlet-glow);
  border: 1px solid rgba(196, 36, 58, 0.2);
}

.draft {
  display: inline-block;
  padding: 0.2em 0.8em;
  background: rgba(196, 36, 58, 0.1);
  border: 1px solid var(--border-hover);
  border-radius: var(--r-pill);
  color: var(--scarlet-glow);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 1rem;
}

/* Lists */
ul {
  color: var(--fg-mute);
  font-size: 1.1rem;
  padding-left: 1.2rem;
  max-width: var(--maxw-text);
}

ul li { margin-bottom: 0.8rem; }
ul li strong { color: var(--fg); }

/* Footer */
.footer {
  margin-top: 6rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--fg-quiet);
  font-size: 0.9rem;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  .header { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .nav { flex-wrap: wrap; gap: 1rem; }
  .page { padding: 1.5rem; }
}

/* ── design-review pass (open-design/kaihanga, 2026-06-20): CTA + price ── */
.cta {
  display: inline-block; margin: 0.5rem 0;
  padding: 0.75em 1.4em; border-radius: var(--r-pill);
  background: var(--scarlet-gradient); color: #fff !important;
  font-weight: 600; border: none; letter-spacing: 0.01em;
  box-shadow: 0 4px 16px rgba(196,36,58,0.25);
}
.cta:hover { color:#fff; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(196,36,58,0.38); text-shadow:none; border:none; }
.price { font-family: var(--font-mono); color: var(--gold); font-weight: 700; }

/* ── Shared components (single source of truth) ─────────────────── */

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 3rem 0;
}

/* Preformatted code blocks */
pre {
  background: var(--bg-elev);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  max-width: var(--maxw-text);
  margin: 1.5rem 0;
}
pre code {
  background: none;
  padding: 0;
  color: var(--fg-mute);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* Provenance strip — fact/spec line under product sections */
.provenance-strip {
  margin-top: 1.5rem;
  padding: 0.7rem 1rem;
  border-left: 2px solid var(--scarlet);
  background: rgba(196, 36, 58, 0.05);
  border-radius: 0 6px 6px 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
}

/* Figures (inline SVG diagrams) */
.figure-svg {
  margin: 2.5rem 0 1rem;
}
.figure-caption,
figcaption.figure-caption {
  color: var(--fg-quiet);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 0.8rem;
  max-width: var(--maxw-text);
}

/* Release / status pills */
.released {
  display: inline-block;
  padding: 0.2em 0.8em;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: var(--r-pill);
  color: #86efac;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Journal list */
.journal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: var(--maxw-text);
}
.journal-list li {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.journal-list .title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--fg);
  margin-bottom: 0.4rem;
}
.journal-list .meta {
  display: block;
  font-size: 0.85rem;
  color: var(--fg-quiet);
  margin-bottom: 0.7rem;
}
.journal-list .meta .date { color: var(--fg-mute); }
.journal-list .summary {
  display: block;
  color: var(--fg-mute);
  font-size: 1rem;
  line-height: 1.6;
}

/* Status page — public service/product status */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.status-card {
  background: var(--bg-elev);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  padding: 1.5rem;
}
.status-card .name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.status-card .desc {
  color: var(--fg-mute);
  font-size: 0.95rem;
  margin: 0;
}
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.dot.live { background: #4ade80; box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }
.dot.build { background: var(--gold); box-shadow: 0 0 8px rgba(212, 181, 98, 0.4); }
.dot.planned { background: var(--fg-quiet); }

/* ════════════════════════════════════════════════════════════════
 * PRODUCT HERO — premium above-the-fold band (shared, single source)
 * design pass 2026-06-21 (lux-claude). crimson #c4243a → gold #d4b562.
 * ════════════════════════════════════════════════════════════════ */

/* Full-bleed dark hero band that bleeds past the text column,
 * sits flush under the header, and frames the SVG + value prop. */
.product-hero {
  position: relative;
  margin: 0.5rem 0 4rem 0;
  padding: 3.5rem 0 0.5rem 0;
  isolation: isolate;
}
.product-hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background:
    radial-gradient(60rem 32rem at 78% 18%, rgba(196,36,58,0.18), transparent 60%),
    radial-gradient(46rem 30rem at 12% 90%, rgba(212,181,98,0.08), transparent 55%);
  pointer-events: none;
}
/* hairline glow that traces the bottom edge of the hero band */
.product-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,36,58,0.5), rgba(212,181,98,0.4), transparent);
}

/* small uppercase eyebrow label above the product name */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem 0;
  padding: 0.35em 0.9em;
  border: 1px solid rgba(212,181,98,0.3);
  border-radius: var(--r-pill);
  background: rgba(212,181,98,0.06);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--scarlet-glow);
  box-shadow: 0 0 8px rgba(255,42,84,0.7);
}

/* hero h1 — larger, gradient ink, tight leading. Scopes to the band
 * so other pages' h1 spacing is untouched. */
.product-hero h1 {
  margin: 0 0 1.5rem 0;
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  max-width: 22ch;
}
.product-hero h1 .accent {
  background: linear-gradient(105deg, #ff4d6d 0%, #c4243a 45%, #d4b562 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.product-hero .lede { max-width: 40rem; }

/* the framed SVG inside the hero — premium card chrome */
.hero-art {
  margin: 2.75rem 0 0 0;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)) ,
    #0c0a09;
  border: 1px solid var(--border-subtle);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 30px 60px -30px rgba(196,36,58,0.35),
    0 2px 8px rgba(0,0,0,0.5);
}
.hero-art svg { display: block; width: 100%; height: auto; }

/* ── Value-prop pillars — the "above the fold" proof grid ──────── */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1px;
  margin: 2.75rem 0 0 0;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  overflow: hidden;
}
.pillar {
  background: var(--bg);
  padding: 1.5rem 1.4rem;
  transition: background 0.25s ease;
}
.pillar:hover { background: var(--bg-elev); }
.pillar .k {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.pillar .v {
  display: block;
  color: var(--fg);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.45;
}
.pillar .v em { color: var(--fg-mute); font-style: normal; }

/* ── Buy band — premium price + CTA panel ─────────────────────── */
.buy-band {
  margin: 2rem 0;
  padding: 2rem 2rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  background:
    radial-gradient(40rem 20rem at 100% 0%, rgba(196,36,58,0.1), transparent 60%),
    var(--bg-elev);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--maxw-text);
}
.buy-band .offer { margin: 0; }
.buy-band .offer .tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-quiet);
  margin-bottom: 0.4rem;
}
.buy-band .offer .amount {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.buy-band .offer .amount .per {
  font-size: 0.95rem;
  color: var(--fg-mute);
  font-weight: 400;
  margin-left: 0.5rem;
}
.buy-band .cta { margin: 0; font-size: 1.05rem; padding: 0.85em 1.6em; }
.buy-band.coming .amount { color: var(--fg-mute); }

@media (max-width: 768px) {
  .product-hero { padding-top: 2rem; }
  .product-hero h1 { font-size: clamp(2.1rem, 9vw, 2.8rem); }
  .buy-band { padding: 1.5rem; }
}

/* ════════════════════════════════════════════════════════════════
 * SHOP — the storefront grid. One confident page, every product.
 * design pass 2026-06-21 (lux-claude). crimson #c4243a → gold #d4b562.
 * ════════════════════════════════════════════════════════════════ */

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0 0 0;
  max-width: none;
}

/* a single product card — full-height flex so CTAs line up at the floor */
.shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0)) ,
    var(--bg-elev);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  padding: 1.8rem 1.7rem 1.6rem;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1),
              box-shadow 0.3s cubic-bezier(0.4,0,0.2,1),
              border-color 0.3s ease, background 0.3s ease;
}
.shop-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px -18px rgba(196,36,58,0.4);
  border-color: var(--border-hover);
}
/* gold→crimson hairline that lights along the top edge on hover */
.shop-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--scarlet), var(--gold));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.shop-card:hover::before { opacity: 1; }

/* featured card — flagship gets a warmer wash + persistent edge */
.shop-card.featured {
  border-color: rgba(196,36,58,0.35);
  background:
    radial-gradient(38rem 18rem at 100% 0%, rgba(196,36,58,0.12), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)),
    var(--bg-elev);
}
.shop-card.featured::before { opacity: 1; }

/* card header row: name + status pill */
.shop-card .card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.shop-card h3 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}
.shop-card h3 a { color: var(--fg); border: none; }
.shop-card h3 a:hover { color: var(--scarlet-glow); text-shadow: none; }

/* status pill — live / soon / free */
.pill {
  flex: none;
  display: inline-block;
  padding: 0.25em 0.7em;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.pill.live { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.35); color: #86efac; }
.pill.soon { background: rgba(212,181,98,0.1); border: 1px solid rgba(212,181,98,0.35); color: var(--gold); }
.pill.free { background: rgba(196,36,58,0.1); border: 1px solid rgba(196,36,58,0.3); color: var(--scarlet-glow); }

/* the one-line hook under the name */
.shop-card .hook {
  margin: 0 0 1.1rem 0;
  font-size: 1.02rem;
  line-height: 1.45;
  color: #e4e4e7;
  font-weight: 400;
}

/* what-it-does bullets — tight, scannable */
.shop-card .does {
  list-style: none;
  margin: 0 0 1.4rem 0;
  padding: 0;
  font-size: 0.92rem;
}
.shop-card .does li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.55rem;
  color: var(--fg-mute);
  line-height: 1.45;
}
.shop-card .does li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--scarlet-glow), var(--gold));
}

/* price + CTA pinned to the floor of every card */
.shop-card .card-foot {
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.shop-card .card-price {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.shop-card .card-price .cents {
  font-size: 0.85rem;
  color: var(--fg-mute);
  font-weight: 400;
  margin-left: 0.35rem;
}
.shop-card .card-foot .cta {
  margin: 0;
  font-size: 0.95rem;
  padding: 0.7em 1.3em;
}
/* "coming soon" CTA — quiet, non-clickable look */
.cta.cta-quiet {
  background: var(--bg-elev-hover);
  color: var(--fg-mute) !important;
  box-shadow: none;
  border: 1px solid var(--border-subtle);
  cursor: default;
}
.cta.cta-quiet:hover { transform: none; box-shadow: none; color: var(--fg-mute) !important; }

/* secondary text link under a CTA (e.g. "read more →") */
.shop-card .more {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--fg-mute);
}
.shop-card .more:hover { color: var(--scarlet-glow); border-bottom-color: transparent; }

/* trust strip below the grid */
.shop-trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1px;
  margin: 3.5rem 0 0;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  overflow: hidden;
}
.shop-trust .t {
  background: var(--bg);
  padding: 1.4rem 1.4rem;
}
.shop-trust .t .h {
  display: block;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.3rem;
  font-size: 0.98rem;
}
.shop-trust .t .d {
  display: block;
  color: var(--fg-mute);
  font-size: 0.88rem;
  line-height: 1.5;
}

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