/* Base Tokens */
:root {
  --bg: #0b0b0f;
  --bg-2: #141414;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(0,0,0,0.28);
  --text: #e9e9e9;
  --muted: #b6b6b6;
  --accent: #FF6F61;
  --accent-2: #FF3B30;
  --card-border: rgba(255,255,255,.28);
  --shadow: 0 10px 28px rgba(0,0,0,.42);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7f7;
    --bg-2: #ffffff;
    --surface: rgba(0,0,0,.08);
    --surface-2: rgba(0,0,0,.12);
    --text: #141414;
    --muted: #555;
    --accent: #D24C41;
    --accent-2: #C6372F;
    --card-border: rgba(0,0,0,.15);
  }
}

/* Global */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  line-height: 1.5;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,111,97,.25), transparent 40%),
    radial-gradient(circle at 75% 25%, rgba(255,60,60,.20), transparent 40%),
    linear-gradient(135deg, #0b0b0f 0%, #141414 60%, #0b0b0f 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 3px);
  background-blend-mode: overlay, overlay, normal, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
header, main, footer, nav, article, aside { display: block; }

/* Layout Utilities */
.container {
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
}

/* Typography */
h1, h2, h3 { margin: 0 0 .25rem 0; line-height: 1.25; }
p { margin: 0 0 .75rem 0; }
a, button, .btn, .cta { cursor: pointer; text-decoration: none; color: var(--accent); }
ul { margin: 0; padding: 0; list-style: none; }

/* Header */
header {
  padding: clamp(1rem, 2vw, 2rem) 1rem;
  text-align: center;
}
header h1 {
  font-size: clamp(1.6rem, 4vw + 0.5rem, 3rem);
  font-weight: 700;
  letter-spacing: .2px;
  color: #fff;
  text-shadow: 0 6px 20px rgba(0,0,0,.6);
}
header:focus-within { outline: 2px solid transparent; }

/* Main / Content */
main { padding: 1rem; }
.image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  background: #0b0b0f;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 28px rgba(0,0,0,.45);
  display: block;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}
.article { display: grid; gap: 1rem; place-items: center; padding: 1rem 0; }

/* Glass panels */
.product-ad, .sponsored-page {
  border-radius: 12px;
  padding: .75rem;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.product-ad a, .sponsored-page a {
  display: block;
  color: #fff;
  text-decoration: none;
}
.product-ad:hover, .sponsored-page:hover { transform: translateY(-1px); transition: transform .15s ease; }
.product-ad { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.25); }
.product-ad p, .sponsored-page p { margin: 0; }

/* Links & Buttons */
a:hover, a:focus-visible { text-decoration: underline; color: #ffd6cc; outline: none; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

/* Button variants */
.btn, .cta {
  display: inline-block;
  padding: .6rem .95rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.4);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-align: center;
  transition: transform .15s ease, background .2s ease;
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,.6);
}
.btn:where(:hover, :focus-visible) { transform: translateY(-1px); }
.cta { background: var(--accent-2); }

/* Accessible controls */
button, input, textarea, select { font-family: inherit; font-size: 1rem; color: inherit; }
button { background: transparent; border: none; padding: 0; }

/* Lists & miscellaneous */
ul { padding-left: 1rem; }
li { margin: .25rem 0; }

/* Layout helpers for potential sections */
aside { display: none; }

/* Footer */
footer {
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  color: var(--muted);
}
footer p { margin: .25rem 0 0; }

/* Print */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; color: #000; }
  a, .btn { text-decoration: underline; color: #000; }
}

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

/* Dark mode safeguard for light-scheme users (improve legibility) */
@media (prefers-color-scheme: light) {
  body { background: var(--bg-2); }
  header h1 { text-shadow: none; color: #111; }
  .image-frame { border-color: rgba(0,0,0,.15); background: #fff; }
  .card, .product-ad, .sponsored-page { background: rgba(255,255,255,.75); border-color: rgba(0,0,0,.15); }
  a, .btn, .cta { color: #1a1a1a; }
}
