/* Tokens */
:root {
  --bg: #0b1020;
  --bg-2: #141a34;
  --surface: rgba(15, 23, 40, 0.78);
  --surface-2: rgba(24, 32, 60, 0.60);
  --text: #f7f7f4;
  --muted: #b29b85;
  --accent: #8a5a2a;
  --accent-2: #d2994a;
  --focus: #ffd166;
  --shadow: 0 8px 28px rgba(0,0,0,.45);
}

/* Layout & Background (mobile-first) */
/* Layered background: gradient + scanlines + subtle glow/noise via gradients */
html, body { height: 100%; }
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
  line-height: 1.5;
  /* Layered navy + subtle brown-tinged glow */
  background:
    linear-gradient(135deg, rgba(10,14,30,.95) 0%, rgba(15,23,40,.92) 60%, rgba(9,12,28,.95) 100%),
    radial-gradient(circle at 15% 0%, rgba(139, 90, 42, .12), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
  padding-block: 0.5rem;
  padding-inline: 1rem;
}

/* Hero and typography (responsive, fluid) */
header {
  padding-block: 1.5rem;
  text-align: center;
}

header h1 {
  font-size: clamp(1.4rem, 2vw + 1rem, 2.6rem);
  line-height: 1.1;
  margin: 0;
  font-weight: 700;
  letter-spacing: .02em;
  text-wrap: balance;
  color: #f4f0eb;
  text-shadow: 0 1px 0 rgba(0,0,0,.4);
}

/* Main content layout */
main {
  padding-block: 0.75rem;
}

.article, article { display: grid; justify-items: center; width: 100%; }

/* Image frame with aspect ratio, border glow, and glass-like edge */
.image-frame {
  width: min(860px, 92%);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: var(--shadow);
  background: #0b0f1a;
  display: block;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform 600ms ease;
}
.image-frame:hover img {
  transform: scale(1.04);
}

/* Glass panel utility (soft frosted look with fallback) */
.content {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  color: var(--text);
  max-width: 860px;
  width: 100%;
  margin-inline: auto;
}

@supports not (backdrop-filter: blur(12px)) {
  .content {
    background: rgba(255,255,255,.12);
  }
}

/* Product ad sections in footer */
.product-ad, .sponsored-page {
  width: min(420px, 92%);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: .75rem;
  text-align: center;
  box-shadow: inset 0 1px rgba(255,255,255,.15);
}

.product-ad a, .sponsored-page a {
  display: block;
  padding: .8rem;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
}
.product-ad {
  background: linear-gradient(to bottom right, rgba(138,90,42,.25), rgba(0,0,0,.25));
  border-color: rgba(138,90,42,.6);
}
.product-ad a { background: rgba(138,90,42,.7); }
.product-ad a:hover { background: rgba(138,90,42,.85); text-decoration: none; }
.sponsored-page { background: rgba(0,0,0,.25); border-color: rgba(0,0,0,.4); }
.sponsored-page a { background: rgba(0,0,0,.4); }

footer {
  padding-block: 1.5rem;
  padding-inline: 0;
  display: grid;
  gap: 1rem;
  justify-items: center;
  background: transparent;
  color: var(--muted);
}

footer p { margin: 0.25rem 0 0; font-size: 0.9rem; }

/* Links & interactive controls (high contrast focus) */
a, button, .btn, .cta {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
a:hover { text-decoration: underline; }

/* Buttons: solid and outline variants */
.btn {
  display: inline-block;
  padding: .75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  background: rgba(138,90,42,.85);
  font-weight: 600;
  font-size: clamp(0.9rem, 0.9vw + 0.2rem, 1rem);
  text-decoration: none;
}
.btn.primary { background: linear-gradient(to bottom right, #8a5a2a, #6b4724); border-color: rgba(0,0,0,.25); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid rgba(138,90,42,.75); }

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

.card {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  min-height: 100px;
  color: var(--text);
  box-shadow: var(--shadow);
}

.tag {
  display: inline-block;
  padding: .15rem .6rem;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(138,90,42,.85);
  color: #fff;
  margin-right: .25rem;
}

/* Lists (ul/li) */
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { color: inherit; text-decoration: underline; }
  .image-frame { page-break-inside: avoid; }
  .content { background: transparent; border: none; box-shadow: none; }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}