/* costore-webm — futuristic dark, neon-accent, monospace-flavored */

:root {
  --bg:        #07090d;
  --bg-2:     #0e1218;
  --surface:  #141a23;
  --surface-2:#1c2330;
  --line:     #1f2a3a;
  --text:     #d4e0ed;
  --text-dim: #8da0b8;
  --text-faint:#5b6b80;
  --cyan:     #00e7ff;
  --cyan-dim: #008aa3;
  --purple:   #c0a3ff;
  --magenta:  #ff3c8c;
  --green:    #43ffae;
  --warn:     #ffb84d;
  --danger:   #ff5571;

  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', ui-monospace, Menlo, monospace;

  --radius: 2px;
  --glow-cyan: 0 0 0 1px rgba(0,231,255,.35), 0 0 16px rgba(0,231,255,.18);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;700&family=JetBrains+Mono:wght@300;400;500&display=swap');

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(circle at 8% 12%,  rgba(0,231,255,.06), transparent 40%),
    radial-gradient(circle at 92% 88%, rgba(192,163,255,.05), transparent 45%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
}

/* hairline grid in the background */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 40px 40px;
}

a { color: var(--cyan); text-decoration: none; transition: color .15s, text-shadow .15s; }
a:hover { color: #fff; text-shadow: 0 0 8px var(--cyan); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; color: #fff; }
h1 { font-size: 2.4rem; line-height: 1.1; margin: 0 0 1rem; }
h2 { font-size: 1.6rem; margin: 1.5rem 0 1rem; }
h3 { font-size: 1.2rem; margin: 1.2rem 0 .6rem; }

code, pre, .mono { font-family: var(--font-mono); font-size: .9em; }

/* ===== layout ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ===== nav / header ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,9,13,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; max-width: 1100px; margin: 0 auto; }
.nav-logo {
  font-family: var(--font-mono); font-weight: 500; font-size: 14px;
  color: var(--text); letter-spacing: .04em;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo .glyph {
  display: inline-block; width: 22px; height: 22px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%);
}
.nav-logo:hover { color: #fff; text-shadow: none; }
.nav-links { display: flex; gap: 22px; align-items: center; font-size: 13px; }
.nav-links a { color: var(--text-dim); font-weight: 400; }
.nav-links a:hover { color: var(--cyan); text-shadow: none; }
.cart-pill {
  font-family: var(--font-mono); font-size: 12px;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--text); background: var(--surface);
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .2s, box-shadow .2s;
}
.cart-pill:hover { border-color: var(--cyan); box-shadow: 0 0 12px rgba(0,231,255,.25); }
.cart-pill .count { color: var(--cyan); font-weight: 500; }

/* ===== hero ===== */
.hero {
  position: relative; padding: 80px 24px 60px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }
.hero h1 { font-size: 3rem; line-height: 1.05; }
.hero h1 .accent { color: var(--cyan); }
.hero .tagline { font-size: 1.2rem; color: var(--text-dim); max-width: 640px; margin: 12px 0 24px; }
.hero .cta {
  display: inline-block;
  font-family: var(--font-mono); font-size: 14px;
  padding: 12px 22px; margin-top: 8px;
  background: linear-gradient(135deg, rgba(0,231,255,.15), rgba(192,163,255,.1));
  color: var(--cyan); border: 1px solid var(--cyan-dim); border-radius: var(--radius);
  transition: all .2s;
}
.hero .cta:hover { background: linear-gradient(135deg, rgba(0,231,255,.3), rgba(192,163,255,.2)); color: #fff; box-shadow: var(--glow-cyan); text-shadow: none; }

/* hero glow accents */
.hero::after {
  content: ''; position: absolute; right: -200px; top: -100px; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,231,255,.08) 0%, transparent 60%);
  pointer-events: none;
}

/* ===== feature/stat strip ===== */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px;
  padding: 40px 0;
}
.stats .stat {
  font-family: var(--font-mono);
  border-left: 2px solid var(--cyan-dim);
  padding-left: 14px;
}
.stats .stat .num { font-size: 1.8rem; color: var(--cyan); display: block; }
.stats .stat .label { font-size: .85rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }

/* ===== product grid ===== */
.products {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; padding: 40px 0;
}
.product {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s, transform .15s, box-shadow .2s;
  position: relative;
}
.product:hover { border-color: var(--cyan-dim); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,231,255,.08); }
.product .pname { font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; color: #fff; line-height: 1.3; }
.product .pdesc { font-size: .88rem; color: var(--text-dim); line-height: 1.5; flex: 1; }
.product .price-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.product .price { font-family: var(--font-mono); font-size: 1.2rem; color: var(--cyan); }
.product .price::before { content: '$'; opacity: .6; font-size: .85em; }
.product button.add {
  font-family: var(--font-mono); font-size: 12px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; color: var(--text); cursor: pointer;
  transition: all .15s;
}
.product button.add:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: var(--glow-cyan); }

/* ===== forms / checkout ===== */
form, .form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}
input[type=text], input[type=email], input[type=tel], input[type=number],
select, textarea {
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 10px; font-family: var(--font-body); font-size: 14px;
  width: 100%; box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(0,231,255,.4), 0 0 12px rgba(0,231,255,.18);
}
label { font-size: .82rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; display: block; margin: 0 0 4px; }

button[type=submit], .btn-primary {
  font-family: var(--font-mono); font-size: 14px;
  padding: 12px 22px;
  background: var(--cyan); color: var(--bg);
  border: none; border-radius: var(--radius); cursor: pointer; font-weight: 600;
  transition: all .15s;
}
button[type=submit]:hover, .btn-primary:hover { background: #fff; color: var(--bg); box-shadow: 0 0 24px rgba(0,231,255,.4); }

/* ===== misc ===== */
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-family: var(--font-mono); font-size: .8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }

.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.success { color: var(--green); }
.warn { color: var(--warn); }
.danger { color: var(--danger); }

/* footer */
.footer {
  margin-top: 80px; padding: 40px 24px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  font-size: .9rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; max-width: 1100px; margin: 0 auto; }
.footer h4 { font-family: var(--font-mono); font-size: .8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 12px; }
.footer a { display: block; color: var(--text); padding: 4px 0; font-size: .9rem; }
.footer a:hover { color: var(--cyan); text-shadow: none; }

/* responsive */
@media (max-width: 700px) {
  .hero h1 { font-size: 2rem; }
  .nav-links { gap: 14px; font-size: 12px; }
  .container { padding: 0 16px; }
}

/* ============================================================
 * CINEMATIC LAYER — fixed bg image + grid + scroll-aware nav + footer
 * Applied site-wide via partials/header.php + partials/footer.php
 * Home page sets <body class="has-hero"> for the 100vh transparent hero pattern.
 * ============================================================ */

html { background: var(--bg); }
body { background: transparent; min-height: 100vh; }

.cine-bg {
  position: fixed; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: grayscale(100%) brightness(.32) contrast(1.15) blur(1px);
  transform: scale(1.05);
}
.cine-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% 35%, rgba(0,231,255,.22), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(192,163,255,.18), transparent 60%),
    linear-gradient(180deg, rgba(4,6,10,.55) 0%, rgba(4,6,10,.75) 60%, rgba(4,6,10,.95) 100%);
}
.cine-grid {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Sticky transparent → solid nav */
.cine-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 32px; max-width: 1200px; margin: 0 auto;
  background: rgba(4,6,10,.4); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: background .25s, border-color .25s;
}
.cine-nav.scrolled { background: rgba(4,6,10,.85); border-bottom: 1px solid var(--line); }
.cine-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em;
}
.cine-logo:hover { color: #fff; text-shadow: none; }
.cine-logo-glyph {
  width: 22px; height: 22px;
  background: linear-gradient(135deg, var(--cyan), #ff3c8c);
  clip-path: polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);
}
.cine-nav-links { display: flex; gap: 22px; align-items: center; font-size: 13px; }
.cine-nav-links a { color: var(--text-dim); text-decoration: none; transition: color .15s; }
.cine-nav-links a:hover, .cine-nav-links a.active { color: var(--cyan); }
.cine-cart {
  font-family: var(--font-mono); font-size: 12px;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(20,26,35,.7); color: var(--text);
  border: 1px solid var(--line);
}
.cine-cart:hover { border-color: var(--cyan); }
.cine-cart .count { color: var(--cyan); font-weight: 500; }

/* All page content sits above the fixed bg layers */
.container, .section, .prose, .hero, .products,
.cine-nav, .cine-footer, footer.cine-footer {
  position: relative; z-index: 5;
}

/* Existing wrappers get solid bg so they render cleanly over the fixed image */
.container, .section, .prose, .form-card {
  background: var(--bg);
}
.container, .section { box-shadow: 0 0 0 1000vw var(--bg); /* extend past max-width */ clip-path: inset(0); }

/* Home-page hero: transparent over the bg so image shows through */
body.has-hero .hero {
  background: transparent !important; box-shadow: none !important;
  clip-path: none !important;
}

/* The transition from transparent hero to solid below */
body.has-hero .below-fold {
  position: relative; z-index: 5; background: var(--bg); padding: 80px 32px;
}
body.has-hero .below-fold::before {
  content: ''; position: absolute; top: -80px; left: 0; right: 0; height: 80px;
  background: linear-gradient(180deg, transparent, var(--bg));
}

/* Cinematic footer */
.cine-footer {
  margin-top: 80px; padding: 40px 24px 28px;
  background: rgba(4,6,10,.85); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  font-size: .9rem;
}
.cine-footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px;
}
.cine-footer h4 {
  font-family: var(--font-mono); font-size: .8rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .1em; margin: 0 0 12px;
}
.cine-footer a { display: block; color: var(--text); padding: 4px 0; font-size: .9rem; text-decoration: none; }
.cine-footer a:hover { color: var(--cyan); }
.cine-build {
  text-align: center; margin-top: 28px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-faint); opacity: .6;
}

/* ===== Cinematic hero — used when body.has-hero ===== */
body.has-hero .hero {
  min-height: 100vh; padding: 0 32px; display: flex; align-items: center;
  border-bottom: none; overflow: visible;
}
body.has-hero .hero::after { display: none; }
.hero-inner { max-width: 1100px; width: 100%; margin: 0 auto; }
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .25em;
  color: var(--cyan); margin-bottom: 32px; text-transform: uppercase;
}
body.has-hero .hero h1 {
  font-size: clamp(2.8rem, 8vw, 6rem); line-height: .95; letter-spacing: -.02em;
  color: #fff; max-width: 1000px; margin-bottom: 28px;
}
body.has-hero .hero h1 .accent {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
body.has-hero .hero .tagline {
  color: var(--text); font-size: 1.2rem; max-width: 580px;
  margin: 0 0 36px; line-height: 1.6; opacity: .9;
}
.hero-cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  font-family: var(--font-mono); font-size: 13px; padding: 14px 24px;
  background: var(--cyan); color: var(--bg); border: 1px solid var(--cyan);
  border-radius: var(--radius); text-decoration: none; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; transition: box-shadow .2s;
}
.btn-primary:hover { box-shadow: 0 0 28px rgba(0,231,255,.5); color: var(--bg); }
.btn-glass {
  font-family: var(--font-mono); font-size: 13px; padding: 13px 23px;
  background: rgba(255,255,255,.06); color: var(--text);
  border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(12px);
  border-radius: var(--radius); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s, border-color .2s;
}
.btn-glass:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; text-shadow: none; }
.scroll-hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  color: var(--text-dim); font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .2em; animation: scrollBounce 2.5s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: .5; }
  50%      { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* Stat block — override existing .stats for cinematic look */
body.has-hero .stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; padding: 0; background: var(--line); border: 1px solid var(--line);
  margin-bottom: 60px;
}
body.has-hero .stats .stat {
  background: var(--surface); padding: 28px 24px;
  border-left: none; padding-left: 24px;
}
body.has-hero .stats .stat .num {
  font-family: var(--font-display); font-size: 2.4rem; color: var(--cyan);
  font-weight: 500; display: block;
}
body.has-hero .stats .stat .label {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-dim);
  letter-spacing: .15em; text-transform: uppercase; margin-top: 8px;
}

/* Below-fold container override — make container full-width for stats/products grid */
.below-fold .container {
  background: transparent; max-width: 1100px; padding: 0 32px;
}

/* Empty-cart indicator: not a link, dimmed, no hover */
.cine-cart-empty { color: var(--text-faint); cursor: default; opacity: .55; }
.cine-cart-empty:hover { border-color: var(--line); box-shadow: none; }
.cine-cart-empty .count { color: var(--text-faint); }
