/* Tokens */
:root{
  --bg: #0b1020;
  --bg-2: #0e1b2a;
  --text: #e9f2ff;
  --muted: #a9b6d6;
  --accent: #ff6f61;      /* coral */
  --accent-2: #5cc8ff;     /* cobalt/cyan */
  --card: rgba(255,255,255,.08);
  --card-border: rgba(255,255,255,.25);
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --radius: 14px;
  --pad: 1rem;
}

/* Layered background (gradient + diagonal lines + soft noise) */
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif; font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(4,9,30,.95) 0%, rgba(8,18,40,.95) 60%, rgba(4,9,30,.95) 100%),
    repeating-linear-gradient(-45deg, rgba(0,255,255,.04) 0 2px, transparent 2px 6px),
    linear-gradient(to bottom right, rgba(4,9,30,.6), rgba(4,9,30,.6));
  background-blend-mode: overlay, overlay, normal;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Layout utilities */
.container { max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: .75rem; padding: 1rem; box-shadow: var(--shadow); }

/* Glass panels (fallback included) */
header, main, article, aside, footer {
  background: rgba(8,12,28,.22);
  border: 1px solid rgba(140, 200, 255, .35);
  border-radius: var(--radius);
  padding: var(--pad);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, aside, footer {
    background: rgba(8,12,28,.34);
    border-color: rgba(140,200,255,.6);
  }
}

/* Section/element targets */
header { margin: 1rem auto; max-width: clamp(320px, 90vw, 1100px); }
main { padding: 0; }
article { padding: 0; max-width: 860px; margin: 0 auto; }
footer { padding: 1rem; text-align: center; }

/* Image frame */
.image-frame { width: min(92%, 720px); aspect-ratio: 16/9; margin: 0 auto 1rem; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content typography */
.content { padding: 0; margin: 0 auto; color: var(--text); }
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; margin: .25rem 0 .5rem; color: var(--text); }
h2 { font-size: clamp(1.25rem, 3vw, 2rem); margin: 1rem 0 .5rem; color: var(--text); }
h3 { font-size: 1.2rem; margin: .75rem 0; color: var(--text); }
p { margin: .75rem 0; color: var(--muted); }
blockquote { margin: .75rem 0; padding-left: .75rem; border-left: 3px solid var(--accent-2); color: var(--text); }

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

/* Buttons & CTAs */
.btn, .cta { display:inline-flex; align-items:center; justify-content:center; padding:.65rem 1rem; border-radius:999px; border:1px solid rgba(255,255,255,.6); text-decoration:none; cursor:pointer; font-weight:600; transition: transform .15s ease, background-color .2s ease, color .2s; }
.btn { background: var(--accent); color:#fff; }
.btn:hover { transform: translateY(-1px); }
.btn.secondary { background: rgba(255,255,255,.08); color: var(--text); border-color: rgba(255,255,255,.4); }
.btn.outline { background: transparent; color: var(--text); border:1px solid rgba(255,255,255,.6); }

/* Lists & tags */
ul { margin: .75rem 0; padding-left: 1.25rem; color: var(--muted); }
li { margin: .25rem 0; }

/* Utility: tags */
.tag { display:inline-block; padding:.15em .5em; font-size:.75rem; border-radius:999px; background: rgba(92,200,255,.25); border:1px solid rgba(92,200,255,.65); color:#e8f6ff; }

/* Footer ad sections */
.product-ad, .sponsored-page { display:block; padding:.75rem; margin:.5rem 0; text-align:center; }
.product-ad a, .sponsored-page a { text-decoration:none; color:inherit; display:block; }

/* Misc helpers */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* Print styles */
@media print {
  body { background:#fff; color:#000; }
  a { text-decoration: underline; }
}

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

/* Accessibility: layout helpers applied to main content for better readability on narrow screens */
@media (min-width: 760px) {
  article { padding: .25rem 0; }
}