@import url('https://fonts.googleapis.com/css2?family=Karla:wght@300;400;500;600;700&family=Playfair+Display+SC:wght@400;700&display=swap');

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-primary: #ff0080;
  --c-secondary: #ff00ff;
  --c-dark: #26171f;
  --c-dark2: #1a0f16;
  --c-dark3: #321e29;
  --c-text: #f5e8ef;
  --c-text-muted: #c89eb5;
  --c-glass: rgba(255, 0, 128, 0.08);
  --c-glass-border: rgba(255, 0, 255, 0.18);
  --radius-card: 28px;
  --radius-sm: 12px;
  --font-display: 'Playfair Display SC', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --font-body: 'Karla', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --nav-height: 110px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--c-dark);
  color: var(--c-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

div[id] {
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

/* ===== Aurora Background ===== */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-layer {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  mix-blend-mode: screen;
}

.aurora-layer.a1 {
  width: 120vw;
  height: 80vh;
  top: -20vh;
  left: -20vw;
  background: radial-gradient(ellipse at 40% 50%, #ff0080 0%, #ff00ff 45%, transparent 70%);
  animation: aurora-drift1 18s ease-in-out infinite alternate;
}

.aurora-layer.a2 {
  width: 90vw;
  height: 70vh;
  bottom: -10vh;
  right: -15vw;
  background: radial-gradient(ellipse at 60% 40%, #ff00ff 0%, #ff0080 40%, #6600cc 70%, transparent 90%);
  animation: aurora-drift2 22s ease-in-out infinite alternate;
}

.aurora-layer.a3 {
  width: 70vw;
  height: 60vh;
  top: 30vh;
  left: 15vw;
  background: conic-gradient(from 0deg at 50% 50%, #ff008040, #ff00ff30, #ff008020, transparent 60%);
  animation: aurora-drift3 28s linear infinite;
  opacity: 0.25;
}

@keyframes aurora-drift1 {
  0% { transform: translate(0, 0) scale(1); filter: blur(80px) hue-rotate(0deg); }
  100% { transform: translate(8vw, 6vh) scale(1.12); filter: blur(100px) hue-rotate(30deg); }
}
@keyframes aurora-drift2 {
  0% { transform: translate(0, 0) scale(1.05); filter: blur(90px) hue-rotate(0deg); }
  100% { transform: translate(-6vw, -8vh) scale(0.95); filter: blur(70px) hue-rotate(-25deg); }
}
@keyframes aurora-drift3 {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== Layout Wrapper ===== */
.site-header, .hero-section, .site-main, .site-footer {
  position: relative;
  z-index: 1;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(38,23,31,0.97) 0%, rgba(38,23,31,0.92) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--c-glass-border);
}

.header-announce {
  background: linear-gradient(90deg, #ff0080 0%, #ff00ff 50%, #ff0080 100%);
  background-size: 200% 100%;
  animation: announce-scroll 6s linear infinite;
  text-align: center;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
}

@keyframes announce-scroll {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.header-brand-row {
  padding: 14px 32px;
  border-bottom: 1px solid rgba(255,0,128,0.1);
}

.header-brand-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  height: 36px;
  width: auto;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  background: linear-gradient(90deg, #ff0080, #ff00ff, #ff0080);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.04em;
  animation: brand-shimmer 5s linear infinite;
}

@keyframes brand-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ===== Navigation ===== */
.header-nav-row {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Desktop nav */
.nav-desktop {
  display: block;
}

.nav-desktop-menu,
.nav-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  margin: 0;
}

.nav-desktop-menu li a,
.nav-menu li a {
  display: block;
  padding: 12px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nav-desktop-menu li a:hover,
.nav-menu li a:hover {
  color: #fff;
  background: var(--c-glass);
}

.nav-desktop-menu li a:focus-visible,
.nav-menu li a:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

/* Mobile nav */
.nav-details {
  display: none;
}

.nav-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
  min-height: 48px;
}

.nav-summary::-webkit-details-marker { display: none; }
.nav-summary::marker { display: none; }

.nav-summary-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-muted);
  letter-spacing: 0.06em;
}

.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

details[open] .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
details[open] .nav-hamburger span:nth-child(2) { opacity: 0; }
details[open] .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

details[open] > menu {
  display: flex;
  flex-direction: column;
  padding-bottom: 12px;
}

details > menu {
  display: none;
}

/* ===== Hero ===== */
.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 80px 48px 60px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,0,128,0.06) 60%, rgba(255,0,255,0.1) 100%);
  pointer-events: none;
}

.hero-content {
  max-width: 720px;
  text-align: right;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #fff 0%, #ffb3d9 40%, #ff00ff 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--c-text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin-left: auto;
}

.hero-badge-group {
  position: absolute;
  top: 60px;
  left: 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--c-glass-border);
  border-radius: 40px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-text-muted);
  background: rgba(38,23,31,0.6);
  backdrop-filter: blur(8px);
  text-transform: uppercase;
}

.hero-badge.shimmer {
  border-color: rgba(255,0,128,0.4);
  color: #ff80c0;
  background: rgba(255,0,128,0.1);
  animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,0,128,0); }
  50% { box-shadow: 0 0 16px 4px rgba(255,0,128,0.3); }
}

.hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.deco-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,0,255,0.12);
}

.deco-ring.r1 {
  width: 400px; height: 400px;
  top: -100px; right: -80px;
  animation: ring-rotate 20s linear infinite;
}

.deco-ring.r2 {
  width: 260px; height: 260px;
  top: 20px; right: 60px;
  border-color: rgba(255,0,128,0.15);
  animation: ring-rotate 14s linear infinite reverse;
}

.deco-ring.r3 {
  width: 160px; height: 160px;
  top: 80px; right: 140px;
  border-color: rgba(255,0,255,0.2);
  animation: ring-rotate 9s linear infinite;
}

@keyframes ring-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== Main Content ===== */
.site-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

/* Content div with aside + figure */
.content-section {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  margin-bottom: 60px;
  align-items: start;
}

.content-aside {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.aside-inner {
  background: rgba(38,23,31,0.7);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius-card);
  padding: 28px 22px;
  backdrop-filter: blur(12px);
}

.aside-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--c-primary);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.aside-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aside-nav-list a {
  display: block;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-nav-list a:hover {
  color: #fff;
  background: var(--c-glass);
}

.aside-tip {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,0,255,0.1);
}

.aside-tip small {
  font-size: 11px;
  color: var(--c-text-muted);
  letter-spacing: 0.06em;
  opacity: 0.7;
}

.content-figure {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 200px;
  background: linear-gradient(135deg, rgba(255,0,128,0.12) 0%, rgba(255,0,255,0.08) 50%, rgba(102,0,204,0.1) 100%);
  border: 1px solid var(--c-glass-border);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.figure-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,0,128,0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,0,255,0.2) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(102,0,204,0.15) 0%, transparent 60%);
  animation: mesh-shift 12s ease-in-out infinite alternate;
}

@keyframes mesh-shift {
  0% { background-position: 0% 0%, 100% 100%, 50% 50%; opacity: 0.8; }
  100% { background-position: 10% 20%, 85% 80%, 55% 45%; opacity: 1; }
}

.figure-caption {
  position: relative;
  z-index: 1;
  padding: 20px 24px;
  font-family: var(--font-display);
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
  text-align: right;
}

/* ===== Page Content (the injected HTML) ===== */
.page-content-section {
  margin-bottom: 40px;
}

.page-content-wrap {
  background: rgba(38,23,31,0.5);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius-card);
  padding: 48px 52px;
  backdrop-filter: blur(10px);
}

/* Styles for injected content */
.page-content-wrap h2,
.page-content-wrap h3 {
  font-family: var(--font-display);
  color: #fff;
  margin-bottom: 16px;
  margin-top: 40px;
  line-height: 1.3;
}

.page-content-wrap h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  background: linear-gradient(90deg, #ff80c0, #ff00ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-content-wrap h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: #ffb3d9;
  -webkit-text-fill-color: #ffb3d9;
}

.page-content-wrap p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-text-muted);
  margin-bottom: 16px;
}

.page-content-wrap a {
  color: var(--c-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.page-content-wrap a:hover {
  color: var(--c-secondary);
}

.page-content-wrap ul,
.page-content-wrap ol {
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--c-text-muted);
}

.page-content-wrap li {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.7;
}

.page-content-wrap div {
  padding-top: 32px;
  border-top: 1px solid rgba(255,0,255,0.08);
  margin-top: 32px;
}

.page-content-wrap div:first-child {
  padding-top: 0;
  border-top: none;
  margin-top: 0;
}

.page-content-wrap small {
  font-size: 11px;
  display: block;
  letter-spacing: 0.15em;
  color: var(--c-primary);
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 700;
}

/* Eyebrow pattern: small + h2 */
.page-content-wrap small + h2,
.page-content-wrap small + h3 {
  margin-top: 0;
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,0,128,0.15);
  padding: 40px 48px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(38,23,31,0.85);
  backdrop-filter: blur(16px);
}

.footer-brand-line {
  margin: 0;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 700;
  background: linear-gradient(90deg, #ff0080, #ff00ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.04em;
}

.footer-copy {
  font-size: 12px;
  color: rgba(200, 158, 181, 0.6);
  letter-spacing: 0.04em;
  text-align: right;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .content-section {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
  }

  .aside-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .aside-nav-list a {
    font-size: 12px;
    padding: 8px 12px;
  }

  .content-figure {
    min-height: 120px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 130px;
  }

  .header-brand-row {
    padding: 12px 20px;
  }

  .header-nav-row {
    padding: 0 20px;
  }

  .nav-desktop {
    display: none;
  }

  .nav-details {
    display: block;
  }

  .hero-section {
    min-height: 70vh;
    padding: 60px 24px 48px;
    justify-content: center;
    align-items: flex-end;
  }

  .hero-content {
    text-align: right;
    max-width: 100%;
  }

  .hero-badge-group {
    top: 32px;
    left: 24px;
  }

  .site-main {
    padding: 0 20px 60px;
  }

  .page-content-wrap {
    padding: 32px 24px;
  }

  .site-footer {
    padding: 32px 24px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-copy {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-badge-group {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== Focus Visible ===== */
:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--c-dark2); }
::-webkit-scrollbar-thumb { background: rgba(255,0,128,0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,0,255,0.6); }
