/* Base tokens */
:root {
  --bg: #0a0711;
  --bg-2: #1a0a25;
  --surface: rgba(255,255,255,.08);
  --surface-2: rgba(255,255,255,.14);
  --text: #e8e0ff;
  --muted: #b6a9c8;
  --accent: #ff7a18;
  --accent-2: #7c5cff;
  --ring: rgba(255,255,255,.9);
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --border: rgba(255,255,255,.25);
  --gap: 1rem;
}

/* Reset & base typography (mobile-first) */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: auto; }
html { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
body {
  margin: 0;
  color: var(--text);
  background-color: #0b0b12;
  background-image:
    linear-gradient(135deg, rgba(255,140,0,.25) 0%, rgba(124,92,255,.25) 50%, rgba(255,140,0,.25) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 70% -10%, rgba(124,92,255,.15), transparent 40%);
  background-blend-mode: screen, overlay, normal;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout primitives (apply to required selectors) */
html, body, header, nav, main, article, footer, aside { }
header { padding: 1.25rem; position: relative; z-index: 1; }
header h1 { font-size: clamp(1.6rem, 2.6vw, 2.5rem); line-height: 1.15; margin: 0 0 .25rem; }
header .meta { font-size: .9rem; color: var(--muted); margin: 0; }
nav { margin-top: .25rem; }

/* Glass panel styling (with fallback) */
.glass {
  background: rgba(14, 12, 40, 0.22);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
}
.no-backdrop { background: rgba(14,12,40,.28); }

/* Image frame (frame around hero image) */
.image-frame { aspect-ratio: 16/9; width: 100%; border-radius: calc(var(--radius) + 4px); overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 6px 18px rgba(0,0,0,.25); margin: .5rem 0; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content helpers */
.container { width: 100%; max-width: clamp(720px, 85vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Card & tag utilities */
.card { padding: 1rem; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.15); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }

/* Content & typography tokens */
.content { line-height: 1.6; color: var(--text); }
ul { padding-left: 1.25rem; margin: .75rem 0; }
li { margin: .25rem 0; }

/* Headings scale for hierarchy in hero */
h2, h3, h4 { color: #fff; margin: .75rem 0 .5rem; line-height: 1.25; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.6rem); }

/* Link & interactive element styling (AA accessible focus) */
a, button, .btn, .cta { font: inherit; color: #fff; text-decoration: none; cursor: pointer; }
a { color: #fff; }
a:hover, a:focus-visible { text-decoration: underline; color: var(--accent-2); outline: none; }
button, .btn, .cta { background: none; border: none; padding: 0; }

/* Button variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: linear-gradient(135deg, rgba(255,122,24,.95) 0%, rgba(124,92,255,.95) 100%);
  color: #111;
  font-weight: 600;
  transition: transform .15s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Outline variant */
.btn--outline {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
}
.cta { padding: .7rem 1.2rem; border-radius: 999px; }

/* Tag style utility */
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(124, 92, 255, .25);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
}

/* Footer styling */
footer { padding: 1rem; text-align: center; color: var(--muted); }

/* Image frame focus for accessibility */
.image-frame:focus { outline: 2px solid #fff; outline-offset: 2px; }

/* Section flow helpers for header hero look */
header { display: block; }
header > * + * { margin-top: .25rem; }

/* Responsive tweaks */
@media (min-width: 700px) {
  .container { padding-inline: 2rem; }
}

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

/* Print styles */
@media print {
  body { background: #fff; color: #000; }
  .glass, .no-backdrop { background: #fff; border: 1px solid #ccc; color: #000; }
}
