/* 01. Tokens */
:root{
  --bg: #0a1020;
  --bg-2: #0b1a32;
  --text: #e9f2ff;
  --muted: #b8c7e6;
  --accent: #7bd0ff;
  --accent-2: #a9d0ff;
  --surface: rgba(255,255,255,.08);
  --surface-2: rgba(255,255,255,.14);
  --glass-border: rgba(255,255,255,.25);
}

/* 02. Base / Layout */
*{box-sizing:border-box}
html,body{height:100%}
html{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:16px}
body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(circle at 15% -5%, rgba(120,170,255,.15) 0 20%, transparent 40%),
    radial-gradient(circle at 85% 0%, rgba(100,140,255,.12) 0 25%, transparent 40%),
    linear-gradient(135deg, rgba(8,12,32,.95) 0%, rgba(12,22,52,.95) 60%, rgba(6,12,28,.95) 100%),
    #050914;
  background-blend-mode: overlay;
  min-height:100dvh;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  position:relative;
  isolation:isolate;
  line-height:1.6;
}
body:before{
  content:"";
  position:fixed;inset:0;
  pointer-events:none;
  z-index:0;
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(255,255,255,.03) 0 1px, transparent 1px 2px);
  mix-blend-mode:overlay;
  opacity:.6;
}
.container{width:100%;max-width:clamp(320px,88vw,1100px);margin-inline:auto;padding-inline:1rem}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem}
.card{background:var(--surface);border:1px solid var(--glass-border);border-radius:12px;padding:1rem;box-shadow:0 6px 18px rgba(0,0,0,.25);}

/* 03. Backgrounds & surfaces */
.glass{ /* Layered frosted glass with backdrop if supported */
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.25);
  border-radius:14px;
  padding:1rem;
  box-shadow:0 8px 24px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)){
  .glass{ background: rgba(255,255,255,.16); }
}
@media (prefers-reduced-motion: reduce){
  .glass{ backdrop-filter:none; -webkit-backdrop-filter:none; transition:none; }
}

/* 04. Typography scale */
h1,h2,h3{margin:0 0 .5rem}
h1{font-size:clamp(1.75rem,2.5vw+1rem,3.5rem);line-height:1.04}
h2{font-size:clamp(1.25rem,1.2vw+0.75rem,2rem);line-height:1.25}
p{font-size:clamp(0.95rem,0.8vw+0.9rem,1.05rem);margin:.75rem 0}
blockquote{margin:1rem 0;padding:.75rem 1rem;border-left:3px solid var(--accent);color:var(--muted)}
ul{margin:.75rem 0 1rem 1.25rem}
li{margin:.25rem 0}
a{color:var(--accent-2);text-decoration:none}
a:hover,a:focus-visible{text-decoration:underline; text-underline-offset:2px}
:focus-visible{outline:2px solid var(--accent); outline-offset:3px; border-radius:4px}

/* 05. Layout primitives */
header, nav, main, article, footer, aside{ display:block }
header{ padding:2rem 1rem; text-align:center; position:relative; z-index:1 }
header h1{ color:var(--text) }
header .meta{ color:var(--muted); font-size:.9rem; margin-top:.25rem }
nav{ margin-top:.5rem }
nav a{ display:inline-block;margin:0 .25rem;padding:.25rem .6rem;border-radius:6px;border:1px solid rgba(255,255,255,.25);color:var(--accent-2) }
main{ padding:1rem 0 2rem; }
article{ max-width:800px;margin:0 auto;padding:0 1rem }
aside{ padding:1rem 0 }

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

/* 07. Content helpers */
.content{ padding:1rem 0 }
.product-ad{ display:inline-block;margin:0.5rem 0 0 0 }
.product-ad a{ display:block;padding:.6rem 1rem;border-radius:8px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);color:var(--text); text-decoration:none }
.tag{ display:inline-block;padding:.25rem .6rem;border-radius:999px;border:1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.10); color:var(--text); font-size:.75rem }

/* 08. Footer & utilities */
footer{ padding:1.5rem 1rem; text-align:center; color:var(--muted) }

/* 09. Interaction improvements */
.btn, .cta{ display:inline-block; padding:.6rem 1rem;border-radius:999px;border:1px solid rgba(255,255,255,.25);background: rgba(255,255,255,.12);color:var(--text); text-decoration:none; font-weight:600; cursor:pointer; transition: transform .15s ease, background .2s ease }
.btn:hover, .cta:hover{ background: rgba(255,255,255,.18); transform: translateY(-1px) }
.btn:active, .cta:active{ transform: translateY(0) }
.btn.primary{ background: linear-gradient(135deg, #4aa0ff 0%, #1e5dff 100%); border:none; color:white; }
.btn.outline{ background: transparent; border:1px solid rgba(122,183,255,.8); }

/* 10. Print styles */
@media print{
  body{ background: white; color: black }
  a{ color: blue }
}
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important }
}