/* Tokens */
:root{
  --bg: #0b0b0f;
  --bg-2: #1a0f14;
  --surface: rgba(255, 210, 170, 0.14);
  --surface-2: rgba(255, 140, 120, 0.18);
  --card: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.25);
  --text: #e9f6ff;
  --muted: #b6c4d6;
  --accent: #ff6b61;
  --accent-2: #ffb27a;
  --focus: #ffd3a3;
  --shadow: 0 8px 24px rgba(0,0,0,.28);
  --radius: 14px;
  --grid-gap: 1rem;
}

/* 1. Base reset and layered background (gradient + scanlines) */
html, body { height: 100%; }
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.5;
  background: 
    linear-gradient(135deg, rgba(255, 140, 120, 0.25), rgba(255, 170, 120, 0.18) 60%, rgba(60,60,90,0.30)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, rgba(0,0,0,0) 1px 2px),
    radial-gradient(circle at 60% -20%, rgba(255,200,160,0.08), transparent 40%),
    var(--bg);
  background-blend-mode: overlay, normal, normal, normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 2. Layout helpers */
.container{ width: 100%; max-width: clamp(320px, 92vw, 1120px); margin: 0 auto; padding: 0 1rem; }

/* 3. Typographic scale */
h1 { font-weight: 700; font-size: clamp(1.75rem, 4vw + 0.5rem, 2.75rem); margin: 0 0.25rem 0.5rem; letter-spacing: .2px; }
p { margin: 0 0 0.75rem; color: rgba(233,246,255,.92); }
small, .muted { color: var(--muted); }

/* 4. Page sections */
header, nav, main, article, aside, footer { display: block; }

/* 5. Header / hero (glass panel aesthetic) */
header {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(to right, rgba(10,10,16,.6), rgba(10,10,16,.25));
  border-bottom: 1px solid rgba(255,255,255,.25);
  backdrop-filter: saturate(1.15) blur(8px);
  -webkit-backdrop-filter: saturate(1.15) blur(8px);
  border-radius: 0 0 14px 14px;
}
header h1{ color: #fff; margin: 0; font-size: clamp(1.4rem, 2.8vw, 2.2rem); }
nav a{ color: var(--text); text-decoration: none; padding: .5rem .75rem; border-radius: 999px; transition: transform .2s ease, background .2s; }
nav a:hover{ background: rgba(255,255,255,.12); text-decoration: underline; transform: translateY(-1px); }
nav a:focus-visible{ outline: 2px solid var(--focus); outline-offset: 2px; }

/* 6. Main content */
main { padding: min(6vw, 48px) 1rem 2rem; }

/* 7. Image frame styling */
.image-frame { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); box-shadow: var(--shadow); background: #111; transform: translateZ(0); animation: fadeUp 0.6s ease both; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .image-frame { animation: none; } }

/* 8. Content area utility */
.content{ padding: 1rem 0; }

/* 9. Glass panel fallback (card) */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(8px)) {
  .card{ background: rgba(0,0,0,.28); border-color: rgba(255,255,255,.40); }
}

/* 10. Grid utilities for responsiveness */
.grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--grid-gap); }

/* 11. Product/ad + links styling */
.product-ad, .sponsored-page { display: block; }
.product-ad a, .sponsored-page a {
  display: block;
  padding: .75rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  color: var(--text);
}
.product-ad a:hover, .sponsored-page a:hover { background: rgba(255,255,255,.14); text-decoration: underline; }
.product-ad a:focus-visible, .sponsored-page a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* 12. Links & buttons (interactive states) */
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
button, .btn, .cta { cursor: pointer; }

/* 13. Button variants */
.btn {
  display:inline-flex; align-items:center; justify-content:center;
  padding:.75rem 1.25rem; border-radius:999px;
  font-weight:700; text-transform: none;
  color:#111; background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border:1px solid rgba(0,0,0,.15);
  text-decoration:none;
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border:1px solid rgba(255,255,255,.28);
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* 14. Utility tags */
.tag { display:inline-block; padding:.25em .6em; border-radius:999px; font-size:12px; background: rgba(255,255,255,.12); color:#fff; border:1px solid rgba(255,255,255,.25); }

/* 15. Lists (for accessibility) */
ul, li { margin: 0; padding: 0; list-style: none; }
li { padding-left: .5rem; }

/* 16. Print styles (basic readability) */
@media print {
  html, body { background: #fff; color: #000; }
  header, nav, main, article, aside, footer { display: block; }
  a { text-decoration: underline; color: #000; }
}
