/* Section: Tokens & Theme */
:root{
  --bg: #fbdce4;          /* pastel pink */
  --bg-2: #f0e0cb;        /* sand */
  --text: #0b0b0b;
  --muted: #5b5b5b;
  --accent: #ff5e95;        /* cyberpunk pink accent */
  --accent-2: #f5d6b3;      /* sand highlight */
  --surface: rgba(255,255,255,.08);
  --surface-2: rgba(255,255,255,.14);
  --border: rgba(255,255,255,.40);
  --shadow: 0 8px 24px rgba(0,0,0,.15);
  --focus: #ffffff;
}

/* Section: Layered Background (gradient + subtle noise/scanlines) */
html, body {
  height: 100%;
}
body{
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* subtle scanlines + soft noise */
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,0) 60%),
    radial-gradient(circle at 10% 0%, rgba(255,255,255,.15), transparent 30%);
  mix-blend-mode: overlay;
  opacity: .6;
  filter: saturate(110%);
  transform: translateZ(0);
}

/* Section: Layout & Glass Panels */
.container{
  width: min(1100px, 92%);
  margin-inline: auto;
  padding-block: 24px;
}
header, main, footer{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin: 14px auto;
}
header{ padding: 20px 16px; }
main{ padding: 22px 16px; }
footer{ padding: 16px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Fallback for environments without backdrop-filter */
@supports not (backdrop-filter: blur(12px)){
  :root{ --surface: rgba(255,255,255,.92); --border: rgba(0,0,0,.15); }
  header, main, footer{ background: rgba(255,255,255,.92); border: 1px solid rgba(0,0,0,.12); }
}
.image-frame, .featured-image, .image-frame img{
  display: block;
}
.image-frame{
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}
.image-frame img{ width: 100%; height: 100%; object-fit: cover; }

/* Additional media container used by HTML (fallback style) */
.featured-image{ border-radius: 12px; overflow: hidden; }
.featured-image img{ width: 100%; height: auto; display: block; }

/* Content helpers */
.content{ padding: 0; margin: 0; }

/* Product / ad blocks in footer */
.product-ad, .sponsored-page{
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  transition: transform .25s ease;
}
.product-ad a, .sponsored-page a{ color: var(--text); text-decoration: none; display: block; }
.product-ad:hover, .sponsored-page:hover{ transform: translateY(-1px); }

/* Section: Typography & Content Structure */
.grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card{ background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 12px; box-shadow: 0 6px 16px rgba(0,0,0,.08); }

/* Lists & tags */
ul, li{ margin: 0; padding: 0; }
ul{ padding-left: 1.25rem; }
li{ margin: .4em 0; }
.tag{ display: inline-block; padding: .25em .5em; border-radius: 999px; font-size: .75rem; background: rgba(255,255,255,.22); }

/* Links & Buttons (interactive) */
a, button, .btn, .cta{
  font-family: inherit;
  color: inherit;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
  transition: opacity .2s ease, transform .2s ease;
}
a{ color: var(--text); }
a:hover, a:focus{ text-decoration: underline; text-underline-offset: 2px; }

/* Buttons: solid + outline variants */
.btn{ display: inline-block; padding: .6em 1.05em; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; }
.btn:hover{ opacity: .95; transform: translateY(-1px); }
.btn:active{ transform: translateY(0); opacity: .9; }
.btn.outline{ background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* Focus states (accessible) */
button:focus-visible, a:focus-visible, .btn:focus-visible, .cta:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 8px;
}
.cta{ background: var(--accent); color: #fff; border-radius: 8px; padding: .6em 1em; }

/* Hero & typography helpers */
h1, h2, h3{ color: var(--text); margin: .25em 0; }
h1{ font-size: clamp(1.75rem, 3.5vw + 1rem, 3.25rem); line-height: 1.04; letter-spacing: -0.02em; }
h2{ font-size: clamp(1.25rem, 2vw + .8rem, 1.75rem); margin-top: .75rem; }
h3{ font-size: 1.05rem; margin: .5rem 0; }
p{ margin: 0 0 1rem; color: var(--muted); }
blockquote{ margin: 1rem 0; padding: .5rem 1rem; border-left: 4px solid var(--accent); background: rgba(255,255,255,.08); border-radius: 6px; color: var(--text); }

/* Paragraph width & readability */
.main p, .content p{ max-width: 62ch; }

/* Section spacing improvements */
header > h1{ font-weight: 700; }
main{ display: block; }

/* Print styles */
@media print{
  body{ background: #fff; color: #000; }
  header, main, footer{ background: transparent; border: none; box-shadow: none; }
  a{ text-decoration: underline; }
}

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

/* Section: Accessibility helpers for structure */
ul, ol{ margin-block: .5em; padding-inline: 1.25rem; }

/* Section: Global helpers (logical properties where sensible) */
:focus-visible{ outline: 3px solid var(--focus); outline-offset: 2px; }

/* Extra: page-wide content alignment for narrow viewports */
@media (max-width: 720px){
  footer{ grid-template-columns: 1fr; }
  .container{ width: 94%; padding-block: 16px; }
}