/* Base reset & Tokens */
:root {
  --bg: #0a0a0a;
  --bg-2: #141414;
  --text: #e9e9e9;
  --muted: #a6a6a6;
  --accent: #FF6F61;
  --accent-2: #FF9A7A;
  --card: rgba(20, 20, 20, 0.65);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass: rgba(15, 15, 15, 0.5);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  --radius: 14px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

html { color-scheme: dark; }

body {
  margin: 0;
  font-family: UI-Sans-Serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
  font-size: clamp(14px, 1.4vw, 18px);
  line-height: 1.6;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(255, 111, 97, 0.15) 0%, rgba(0,0,0,0.20) 50%, rgba(0,0,0,0.75) 100%),
    #000;
  min-height: 100%;
  position: relative;
  overflow-x: hidden;
}

/* Layered background: subtle scanlines + noise (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.06) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 0 0, rgba(255,255,255,0.04) 0, transparent 40px);
  mix-blend-mode: overlay;
  opacity: 0.25;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 2px),
    radial-gradient(circle at 6px 6px, rgba(0,0,0,0.05) 2px, transparent 3px);
  background-size: 6px 6px, 20px 20px;
  mix-blend-mode: overlay;
  opacity: 0.25;
}

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

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

.card {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
}
@supports not (backdrop-filter: blur(12px)) {
  .card {
    background: rgba(12,12,12,0.85);
  }
}

header, main, footer, aside {
  display: block;
}

header {
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 1rem;
  margin: 0.5rem auto;
  max-width: 1200px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
header h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.6rem, 4vw + 0.5rem, 2.8rem);
  line-height: 1.04;
  letter-spacing: .2px;
}
header .meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
nav {
  margin-top: .25rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
  border: 1px solid transparent;
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  outline: none;
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.04);
}
main { padding: 1rem; }
.article, article { display: block; }

/* Image frame styling */
.image-frame {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
  background: #111;
  overflow: hidden;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: crisp-edges;
  filter: saturate(1.05);
}

/* Glass panels & content surfaces */
.glass {
  background: rgba(16, 16, 16, 0.6);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(16,16,16,0.8); }
}

.product-ad {
  display: block;
  text-align: center;
  padding: 1rem;
  border-radius: 10px;
  background: rgba(12,12,12,0.6);
  border: 1px solid rgba(255,255,255,.25);
  transition: transform .2s ease;
}
.product-ad:hover { transform: translateY(-2px); }
.product-ad a { color: var(--text); text-decoration: none; display: block; }

/* Content & typography */
.content { color: var(--muted); }

/* Lists & tags */
ul, li { margin: 0 0 0.5rem 0; padding-left: 1.25em; }
li { line-height: 1.6; }

/* Hero + text emphasis */
h2, h3 { margin-top: 1.25rem; color: var(--text); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

blockquote {
  margin: .75rem 0;
  padding: .75rem 1rem;
  background: rgba(255,255,255,.04);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  color: #f5f5f5;
}

/* Links & interactive elements */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
a { cursor: pointer; }
a:hover, a:focus-visible { text-decoration: underline; color: var(--accent-2); outline: none; }

.btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: var(--text);
  cursor: pointer;
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #ff4b3e);
  border: none;
}
.btn.secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.cta {
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  display: inline-block;
  color: var(--text);
}
@media (hover: hover) and (pointer: fine) {
  a:hover, .cta:hover { text-decoration: underline; }
}

/* Image frames across the page (fallback utility) */
.image-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  background: #111;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Layout helpers */
.section { padding: .75rem 0; }

/* Form elements (if present) */
input, textarea, select {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--text);
  padding: .5rem .75rem;
  border-radius: 6px;
  outline: none;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,111,97,.25);
}

/* Print styles: basic readability */
@media print {
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  .glass, .card { background: #fff; color: #000; border: 1px solid #000; }
}

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