/* Base Tokens */
:root {
  --bg: #0b1020;          /* midnight blue backdrop */
  --bg-2: #0a1a2b;
  --text: #eaf3ff;         /* high-contrast on dark */
  --muted: #a5b6d9;
  --accent: #ff2b2b;        /* scarlet primary */
  --accent-2: #ff5a5a;      /* scarlet hover/focus */
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --card: rgba(255,255,255,.08);
  --radius: 14px;
  --focus: 2px solid var(--accent-2);
}

/* 1. Layout & Typographic Foundations */
html, body {
  height: 100%;
}
*,
*::before,
*::after { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif; line-height: 1.5; }

/* 2. Layered Background: gradient + hexagonal honeycomb illusion + subtle noise/scanlines */
html, body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  background-image:
    /* hex honeycomb illusion (two opposing gradients) */
    linear-gradient(30deg, rgba(255,255,255,.08) 12px, transparent 12px),
    linear-gradient(-30deg, rgba(255,255,255,.08) 12px, transparent 12px),
    /* subtle dark gradient for depth */
    linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.25)),
    /* optional faint noise-like texture via subtle opacity variation */
    radial-gradient(circle at 20px 20px, rgba(255,255,255,.03), transparent 20px);
  background-size: 60px 104px, 60px 104px, 100% 100%, 120px 120px;
  background-position: 0 0, 30px -26px, 0 0, 0 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (prefers-reduced-motion: reduce) {
  html, body { background-image: none; }
}

/* 3. Global Utilities & Core Elements */
.container { width: 100%; max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--card); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); }

/* 4. Glass Panels (with fallback) */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(0,0,0,.25);
  padding: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not (backdrop-filter: blur(10px)) {
  .glass { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.4); }
}

/* 5. Header / Hero */
header {
  padding: 1.25rem 1rem;
}
header h1 {
  font-size: clamp(1.6rem, 2.2vw + 1rem, 3.6rem);
  line-height: 1.08;
  margin: 0 0 .5rem;
  font-weight: 700;
  letter-spacing: .2px;
}
header nav a {
  color: var(--text);
  text-decoration: none;
  padding: .25rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.04);
  transition: transform .2s ease, background .2s ease;
}
header nav a:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }

/* 6. Image Frame / Media */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  background: rgba(255,255,255,.04);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(1.05);
}
@media (max-width: 700px) {
  .image-frame { border-radius: 10px; }
}

/* 7. Content & Typography Helpers */
.content { color: var(--text); font-size: clamp(14px, 1.2vw + 8px, 18px); line-height: 1.5; }
.content p { color: var(--muted); margin: 0 0 1rem; }
.content h2 { font-size: clamp(1.25rem, 1.2vw + 1rem, 2rem); margin: .75rem 0; }

/* 8. Product Ad / Calls-to-Action */
.product-ad {
  display: inline-block;
  margin: .5rem 0;
}
.product-ad a { text-decoration: none; color: white; display: inline-block; padding: .5rem 1rem; border-radius: 999px; background: var(--accent); border: 1px solid rgba(0,0,0,.2); }
.product-ad a:hover { background: #e11; }

/* 9. Link & Button Styling (ACCEPTABLE focus) */
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a { color: var(--accent-2); }
a:hover { text-decoration: underline; }

/* CTA Variants */
.btn, .cta {
  display: inline-block;
  padding: .75rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: var(--accent);
  color: #fff;
  transition: transform .15s ease, background .2s ease, box-shadow .2s;
}
.btn.secondary, .cta.secondary {
  background: transparent;
  color: var(--text);
}
.btn:focus-visible, .cta:focus-visible, a:focus-visible, button:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: #e21b1b; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(255,0,0,.4); }
.btn:active { transform: translateY(0); }

/* 10. List Styles */
ul { padding-left: 1.25rem; }
li { margin: .25rem 0; }

/* 11. Sectioned Layout Roles */
aside { display: none; } /* reserved for potential future panels */

/* 12. Print Styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a, .btn, .cta { text-decoration: none; color: #000; }
  .glass { background: #fff; border: 1px solid #aaa; }
}
 
/* 13. Reduced Motion Safety */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}