/* Section: Global + Palette */
:root{
  --bg: #05060e;
  --bg-2: #0a1220;
  --text: #eaf4ff;
  --muted: #aebbd6;
  --accent: #7b4e2b;        /* Brown/copper accent */
  --accent-2: #4aa0ff;       /* Cosmic blue */
  --panel: rgba(8, 14, 30, 0.22);
  --panel-border: rgba(120, 90, 50, 0.38);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --focus: 0 0 0 3px rgba(74,144,226,.65);
  --radius: 12px;
}
*,
*::before,
*::after{ box-sizing: border-box; }

html, body { height: 100%; }
html { color-scheme: dark; }
body{
  margin: 0;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(5,9,20,.95) 0%, rgba(4,8,22,.95) 60%, rgba(2,6,16,.96) 100%),
    radial-gradient(circle at 20% 10%, rgba(0,150,255,.18), transparent 25%),
    radial-gradient(circle at 80% 0%, rgba(139,69,19,.15), transparent 25%);
  background-blend-mode: normal, screen, screen;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue", sans-serif;
  font-size: clamp(14px, 0.8vw + 12px, 18px);
  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: -1;
  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,.04) 0 1px, transparent 1px 2px);
  opacity: .25;
  mix-blend-mode: overlay;
}
@media (prefers-reduced-motion: reduce){
  body::before{ display:none; }
}

/* Section: Layout primitives */
.container{
  width: min(100%, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid{ display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Section: Core typography */
h1, h2, h3{ margin: 0; font-weight: 700; }
h1{ font-size: clamp(1.75rem, 1.1rem + 2.5vw, 3rem); line-height: 1.08; letter-spacing: .2px; }
p{ color: var(--muted); }

/* Section: Section wrappers (semantic blocks) */
header, main, footer, aside, article{ display: block; }

/* Section: Glass panels (frosted) */
.card, .content, .product-ad, .cta, .btn, a.btn{
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem;
  box-shadow: var(--shadow);
  color: var(--text);
}
.card{ padding: 1rem; }

/* Fallback for environments without backdrop-filter */
@supports not (backdrop-filter: blur(10px)){
  .card, .content, .product-ad, .cta, .btn{ background: rgba(5,8,20,.50); }
}
@media (prefers-reduced-motion: reduce){
  .card, .content, .product-ad, .cta, .btn{ transition: none; }
}

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

/* Section: Content blocks */
.content{ color: var(--text); }

/* Section: Links & buttons */
a{ color: var(--text); text-decoration: none; }
a:hover, a:focus{ text-decoration: underline; outline: none; }
a:focus-visible{ outline: none; box-shadow: var(--focus); border-radius: 4px; }

/* Buttons */
.btn, .cta, a.btn{ display: inline-block; padding: .6rem 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: var(--accent-2); color: #fff; text-align: center; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .2s ease, box-shadow .2s ease; }
.btn:hover, .cta:hover, a.btn:hover{ filter: brightness(1.05); transform: translateY(-1px); }
.btn:active, .cta:active, a.btn:active{ transform: translateY(1px) scale(0.99); }

/* Outline variant for buttons */
.btn.outline{ background: transparent; color: var(--text); border-color: rgba(123,78,43,.9); }
.btn.outline:hover{ background: rgba(123,78,43,.15); }

/* Focus ring for interactive elements */
:focus-visible{ outline: none; box-shadow: 0 0 0 3px rgba(74,144,226,.65); border-radius: 6px; }

/* Section: Lists (utility) */
ul{ margin: 0; padding: 0; list-style: none; }
li{ padding: .25rem 0; }

/* Section: Structural sections (semantic) */
header{ padding: 1.25rem 1rem; text-align: center; }
header nav{ margin-top: .5rem; }
header nav a{ display: inline-block; padding: .35rem .6rem; border-radius: 6px; font-size: .95rem; color: var(--muted); }

/* Section: Page scaffolding */
main{ padding: 1rem; display: block; }
footer{ padding: 1rem; display: block; }

/* Section: Page content helpers */
.sr-only{ position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Section: Product ad / footer panels */
.product-ad{ display: block; margin: .5rem 0; }
.product-ad a{ display: block; padding: .75rem 1rem; border-radius: 12px; text-decoration: none; background: rgba(10, 18, 28, 0.6); border: 1px solid rgba(120, 90, 50, 0.4); color: #fff; }

/* Section: Print styles (readability) */
@media print{
  body{ background: #fff; color: #000; }
  a{ text-decoration: underline; color: #000; }
  header, main, footer{ padding: 0.5rem; }
  .image-frame{ page-break-inside: avoid; }
}

/* Section: Accessibility helpers */
@media (max-width: 520px){
  header{ padding: .75rem 0.5rem; }
  .container{ padding-inline: .5rem; }
}
