:root {
  /* Palette (beige metallic + blue accents) */
  --bg: #0b0f14;
  --bg-2: #141b22;
  --surface: rgba(230, 223, 210, 0.20);
  --surface-2: rgba(230, 223, 210, 0.12);
  --text: #e7f2ff;
  --muted: #a5b6cc;
  --accent: #3aa0ff;
  --accent-2: #8bdcff;
  --beige: #e6d9c3;
  --shadow: 0 10px 28px rgba(0,0,0,.5);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 2px solid #89c8ff;
}

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

html, body { height: 100%; }

html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif; }

body {
  margin: 0;
  color: var(--text);
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(182,145,112,0.25), rgba(28,60,120,0.25)),
              linear-gradient(#0b0f14 0%, #0b0f14 100%);
  background-blend-mode: overlay, normal;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  /* subtle noise/scanline layer (pure CSS) */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 2px),
    linear-gradient(135deg, rgba(160,120,90,0.25), rgba(20,60,120,0.25));
  opacity: 0.6;
  mix-blend-mode: overlay;
}

/* Layout primitives */
html, body, header, nav, main, article, aside, footer { display: block; }

.header, .content, .image-frame { will-change: transform; }

.nav { display: block; }

/* Global utility containers */
.container { width: 100%; max-width: clamp(720px, 90vw, 1100px); margin-inline: auto; padding-inline: 1rem; }

/* Grid helpers (responsive utilities) */
.grid { display: grid; gap: 1rem; }
.grid.auto-fit { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Card / glass panel (soft frosted glass with fallback) */
.card, .product-ad, aside, section { background: rgba(255,255,255,0.04); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.20); padding: 1rem; box-shadow: var(--shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* Glass panel fallback if backdrop-filter unsupported */
@supports not (backdrop-filter: blur(12px)) {
  .card, .product-ad, aside, section { background: rgba(255,255,255,0.14); }
}

/* Hero / header styling */
header {
  padding: 1.25rem;
  text-align: center;
}
header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw + 1rem, 2.8rem);
  line-height: 1.15;
  letter-spacing: .2px;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}

/* Main content layout */
main { padding: 1rem; display: grid; place-items: center; }

/* Image frame styling */
.image-frame {
  width: min(90%, 800px);
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.28);
  background: #0a0f14;
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(1.05);
  transform: translateZ(0);
}

/* Content area (text blocks if present) */
.content { padding: 0.75rem 0; color: var(--text); }

/* Links & interactive elements */
a, button, .btn, .cta {
  color: inherit;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  outline: none;
}
a { color: var(--text); }
a:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--accent-2); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus); outline-offset: 2px;
}
.btn, .cta {
  display: inline-block;
  padding: .65rem 1rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(120,180,255,.8);
  background: linear-gradient(135deg, rgba(60,140,240,.95), rgba(80,170,255,.85));
  color: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.btn:active, .cta:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(120,180,255,.9);
}
.btn--ghost {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--text);
}
@media (prefers-reduced-motion: reduce) {
  .btn, .cta { transition: none; }
  a, button { transition: none; }
}

/* Glass panels for sections (like product ad) */
.product-ad {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .75rem;
}
.product-ad a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .65rem 1rem;
  border-radius: 999px;
  background: rgba(20,80,180,.55);
  border: 1px solid rgba(120,180,255,.9);
  color: #eaf5ff;
  font-weight: 600;
}
.product-ad a:hover { background: rgba(20,80,180,.75); }

/* Footer layout and items */
footer {
  padding: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
}

/* Simple inline lists (if used) */
ul { padding: 0; margin: 0; list-style: none; display: flex; gap: .5rem; }
li { display: inline-block; }

/* Utilities / tokens */
.tag { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .75rem; color: #072c4a; background: rgba(138, 218, 255, .35); }

/*dark-mode: gentle swap for readability in light mode*/
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f2e8;
    --bg-2: #ece5d9;
    --surface: rgba(230, 223, 210, 0.28);
    --surface-2: rgba(230, 223, 210, 0.22);
    --text: #0a1b2a;
    --muted: #4b5b70;
    --accent: #1a5dff;
    --accent-2: #0c7bdc;
    --beige: #f0e6d7;
  }
  body { background: linear-gradient(135deg, rgba(210,190,170,0.25), rgba(120,150,210,0.25)), #f7f7f7; color: var(--text); }
  body::before { opacity: .5; background-image: 
    repeating-linear-gradient(0deg, rgba(0,0,0,0.04) 0 1px, transparent 1px 2px),
    linear-gradient(135deg, rgba(180,140,90,0.25), rgba(60,110,180,0.25)); }
  header h1 { color: #11213a; text-shadow: none; }
  .image-frame { border-color: rgba(0,0,0,.15); background: #fff; }
  .product-ad a { background: rgba(10,60,140,.25); border-color: rgba(10,60,140,.6); color: #07233e; }
  a { color: #0a1b2a; }
}

/* Print-friendly tweaks (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
}
