/* Section: Tokens & Palette */
:root {
  --bg: #0b0f14;
  --bg-2: #141820;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.12);
  --text: #F7FBFF;
  --muted: #B6BDC9;
  --accent: #B76E79;        /* rose gold core */
  --accent-2: #E7C2A1;      /* rose gold highlight */
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --container-max: 1100px;
}

/* Section: Layered Background & Base */
html, body { height: 100%; }
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.55;
  background: 
    linear-gradient(135deg, rgba(14,16,21,0.96) 0%, rgba(14,16,21,0.92) 60%, rgba(12,14,19,0.98) 100%),
    linear-gradient(0deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 2px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 2px);
  background-blend-mode: overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 2px),
              repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  z-index: 0;
  opacity: 0.6;
}

/* Section: Layout Helpers */
.header, .main, .footer { z-index: 1; }

/* Section: Containers & Grid */
.container {
  width: 100%;
  max-width: clamp(720px, 90vw, var(--container-max));
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Section: Glass Panels (with fallback) */
.card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px) saturate(110%);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
}
@supports not (backdrop-filter: blur(1px)) {
  .card { background: rgba(255,255,255,0.22); }
}
.section-glass { padding: .75rem; }

/* Section: Image Frame */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.15), 0 8px 20px rgba(0,0,0,.25);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform 0.3s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Section: Typography & Helpers */
.content { padding: 0.5rem 0; color: var(--text); }
h1, h2, h3 { line-height: 1.15; margin: .25em 0 .75em; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw + 1rem, 3.6rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 0.8vw + 1rem, 2rem); }
h3 { font-size: clamp(1rem, 0.6vw + 0.9rem, 1.25rem); color: #e8eefc; }

/* Section: Lists & Tags */
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; color: var(--muted); }
.tag { display:inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; background: rgba(183,110,121,.25); border:1px solid rgba(183,110,121,.6); color: #fff; }

/* Section: Content & Navigation Elements */
a, button, .btn, .cta {
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
}
a { color: var(--accent-2); text-decoration: underline; text-decoration-color: rgba(231,194,161,.8); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.btn {
  background: var(--accent);
  color: #fff;
  padding: 0.66rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,.15);
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); background: #a65a66; }
.btn:active { transform: translateY(0); opacity: .95; }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.cta {
  background: transparent;
  color: var(--accent-2);
  padding: 0.66rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(183,110,121,.6);
}
.cta:hover { background: rgba(183,110,121,.15); }

/* Section: Layout Semantics */
header, nav, main, article, aside, footer {
  display: block;
}
header { padding: 1.25rem 0 0.75rem; text-align: center; }
header h1 { margin: 0 auto; font-size: clamp(1.4rem, 1vw + 1.4rem, 2.4rem); }
header .meta { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas; font-size: .9rem; margin-top: .25rem; }

/* Section: Printing */
@media print {
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  .card { background: white; border: none; box-shadow: none; }
}

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

/* Section: Helpers for common elements (non-semantic placeholders) */
ul, li { list-style: disc; }
.image-frame { margin: 0 0 1rem; }

/* Section: Specific structural selectors for page layout targets */
html, body, header, nav, main, article, footer, aside { /* structural semantics preserved */ }
.image-frame, .image-frame img { will-change: transform; }