/* Section: Global Reset & Token Palette */
:root{
  --bg: #0a0f1d;
  --bg-2: #081427;
  --text: #e9f6ff;
  --muted: #a8c6e8;
  --accent: #00e5ff;        /* electric blue */
  --accent-2: #2ee8a7;       /* jade */
  --glass: rgba(12, 18, 38, 0.22);
  --glass-border: rgba(120, 210, 255, 0.45);
  --card: rgba(255,255,255,0.08);
  --focus: 2px solid var(--accent);
  --shadow: 0 10px 28px rgba(0,0,0,.28);
  --radius: 14px;
  --text-strong: #eaffff;
  --text-soft: #cbdff5;
}

/* Section: Base & Layout */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Noto Sans", sans-serif;
  font-size: clamp(14px, 0.8rem + 1vw, 18px);
  line-height: 1.55;
  color: var(--text);
  background: 
    radial-gradient( circle at 15% -10%, rgba(0, 235, 255, .15), transparent 25% ),
    linear-gradient(135deg, rgba(6,12,28,.95) 0%, rgba(4,8,24,.92) 60%, rgba(0,0,0,.95) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-color: #04061a;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  isolation: isolate;
}

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

/* Section: Container & Utilities */
.container { max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding-inline: 1rem; }

/* Section: Typography helpers */
h1, h2, h3 { line-height: 1.15; margin: .75rem 0; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 1.4rem + 3vw, 3.25rem); color: var(--text-strong); }
h2 { font-size: clamp(1.25rem, 0.9rem + 1.5vw, 1.75rem); color: #e9f7ff; }
p { color: var(--text-soft); margin: .5em 0 1em; }

/* Section: Layout primitives */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card { background: var(--card); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .75rem; }

/* Section: Image frame */
.image-frame { aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: 12px; border: 1px solid rgba(120, 210, 255, 0.45); box-shadow: 0 8px 22px rgba(0,0,0,.25); display: block; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Glass panels (fallback + backdrop-filter) */
.glass {
  background: rgba(12, 18, 38, 0.22);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  color: var(--text);
}
@supports (backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px)) {
  .glass { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: rgba(12, 18, 38, 0.28); }
}

/* Section: Links & buttons */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Button variants */
.btn, .cta { display: inline-block; padding: .6em .95em; border-radius: 999px; border: 1px solid rgba(0, 229, 255, .65); font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .2s ease, color .2s ease; }
.btn { background: linear-gradient(to bottom right, rgba(0, 229, 255, .95), rgba(0, 128, 235, .95)); color: #001018; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.outline { background: transparent; color: var(--text); border-color: rgba(0, 229, 255, .9); }
.cta { background: linear-gradient(to bottom right, rgba(46,232,167,.95), rgba(10, 180, 120, .95)); color: #041e15; }

/* Section: Lists */
ul { padding-left: 1.25rem; margin: .5em 0 1em; }
li { margin: .35em 0; }

/* Section: Hints for structural selectors (targets in HTML) */
header, nav, main, article, aside, footer { display: block; }

/* Section: Content wrapper (for possible .content usage) */
.content { padding: .75rem; color: var(--text-soft); }

/* Section: Core layout for this page (themes) */
header {
  padding: 1rem;
  margin: 1rem auto;
  border-radius: var(--radius);
  background: rgba(12, 18, 38, 0.22);
  border: 1px solid rgba(120, 210, 255, 0.45);
  box-shadow: var(--shadow);
}
header h1 { font-size: clamp(1.6rem, 0.9rem + 2.5vw, 2.6rem); margin: 0 0 .25rem; color: var(--text-strong); }
header .meta { color: var(--muted); font-size: 0.92em; margin-top: 0.25rem; }
header nav { margin-top: .25rem; }
header nav a { padding: .25em .5em; border-radius: 6px; }

/* Main article styling (glass panel) */
main { padding: 1rem 0; }
article { padding: 1rem; margin: 0 auto 1rem; max-width: 800px; }
article h1 { font-size: clamp(1.6rem, 1.2rem + 2.5vw, 2.8rem); color: var(--text-strong); margin: .75rem 0 0.5rem; }
article h2 { margin-top: 1rem; }
article p { color: var(--text); }
article ul li { color: var(--text); }

/* Section: Footer with product-ad blocks (glass panels) */
footer { padding: 1rem 0; display: grid; gap: 0.75rem; }
.product-ad, .sponsored-page { display: inline-block; width: 100%; }
.product-ad a, .sponsored-page a { display: block; padding: .75rem; border-radius: 12px; text-align: center; text-decoration: none; color: #eaffff; background: rgba(0,0,0,.25); border: 1px solid rgba(120,210,255,.45); }
.product-ad a { background: linear-gradient(to bottom right, rgba(0, 230, 255, .25), rgba(0, 255, 210, .20)); }
.sponsored-page a { background: linear-gradient(to bottom right, rgba(0,0,0,.25), rgba(0,0,0,.18)); }

/* Section: Print (basic readability) */
@media print {
  html, body { background: #fff; color: #000; }
  header, nav, main, footer { background: transparent; box-shadow: none; border: none; }
  .glass { background: transparent; border: none; padding: 0; }
  a, button { text-decoration: underline !important; color: #000; }
}

/* Section: Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Section: Utility helpers (responsive) */
@media (min-width: 768px) {
  .container { padding-inline: 2rem; }
  article { padding: 1.25rem; }
}
