/* erogen-ai.eu — independent Erogen review / AI chat affiliate guide
   Plain static CSS. Source-inspired charcoal + lavender palette. */

:root {
  --bg: #171717;
  --bg-2: #1f1f1f;
  --surface: #262626;
  --surface-2: #2e2e2e;
  --line: #3a3a3a;
  --text: #f5f5f5;
  --muted: #b8b8b8;
  --muted-2: #8f8f8f;
  --purple: #a855f7;
  --purple-light: #c084fc;
  --purple-deep: #7524b7;
  --white: #ffffff;
  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1200px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --focus: 0 0 0 3px rgba(192, 132, 252, 0.85);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--purple-light); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--purple);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Focus visibility */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 6px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(23, 23, 23, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand-tag {
  font-size: 0.72rem;
  color: var(--purple-light);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.primary-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 8px;
}
.primary-nav a:hover { color: var(--text); background: var(--surface); }
.nav-cta {
  background: var(--purple);
  color: var(--white) !important;
  font-weight: 600;
}
.nav-cta:hover { background: var(--purple-deep); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 22px; height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.18s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  color: var(--white);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--purple-light), var(--purple)); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--surface); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 54px 0 40px;
  background:
    radial-gradient(60% 80% at 85% 10%, rgba(168, 85, 247, 0.16), transparent 60%),
    radial-gradient(50% 70% at 5% 90%, rgba(117, 36, 183, 0.14), transparent 60%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  column-gap: 44px;
  align-items: center;
}
/* hero-copy is a passthrough so its children can share the hero grid/flow */
.hero-copy { display: contents; }
.hero-copy > :not(.hero-media) { grid-column: 1; }
.eyebrow {
  color: var(--purple-light);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}
.eyebrow-item { white-space: nowrap; }
.eyebrow-sep { color: var(--muted-2); }
h1 {
  font-size: clamp(1.9rem, 4vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.lede {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0 0 24px;
  max-width: 40ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.hero-note {
  font-size: 0.82rem;
  color: var(--muted-2);
  max-width: 46ch;
  margin: 0;
}

/* Hero media (mosaic + animation) — second column on desktop */
.hero-media {
  grid-column: 2;
  grid-row: 1 / 6;
  align-self: center;
  margin: 0;
}
.hero-media-note {
  color: var(--muted-2);
  font-size: 0.76rem;
  line-height: 1.45;
  margin: 12px 0 0;
}

/* Mosaic */
.hero-mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 74px;
  gap: 12px;
}
.hero-mosaic .m {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero-mosaic .m img,
.hero-mosaic .m video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* keep faces in frame across the varied tile aspect ratios */
  object-position: center top;
}
.hero-mosaic .m1 { grid-column: 1 / 4; grid-row: 1 / 4; }
.hero-mosaic .m2 { grid-column: 4 / 7; grid-row: 1 / 3; }
.hero-mosaic .m3 { grid-column: 4 / 7; grid-row: 3 / 6; }
.hero-mosaic .m4 { grid-column: 1 / 3; grid-row: 4 / 6; }
.hero-mosaic .m5 { grid-column: 3 / 4; grid-row: 4 / 6; }

/* Animation badge on video tiles */
.anim-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(23, 23, 23, 0.82);
  color: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ---------- Sections ---------- */
.section { padding: 52px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
h3 { font-size: 1.12rem; margin: 0 0 8px; }
.section-intro {
  color: var(--muted);
  max-width: 68ch;
  margin: 0 0 26px;
}
.prose p { color: var(--muted); max-width: 72ch; }
.prose strong { color: var(--text); }

.quick-facts {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.quick-facts li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.95rem;
}
.quick-facts span {
  display: block;
  color: var(--purple-light);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* ---------- Character grid ---------- */
.char-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}
.char-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.char-img { aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface-2); }
.char-img img { width: 100%; height: 100%; object-fit: cover; }
.char-body { padding: 14px 16px 16px; }
.char-body h3 { margin: 0 0 4px; }
.char-meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 6px; }
.char-src { color: var(--muted-2); font-size: 0.76rem; margin: 0; }

/* ---------- Animated source example ---------- */
.anim-figure {
  margin: 26px 0 0;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: center;
}
.anim-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 260px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.anim-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.anim-caption {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 60ch;
}
.anim-caption strong { color: var(--text); }

/* ---------- Global animation play/pause control ---------- */
.motion-toggle {
  margin: 12px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.motion-toggle:hover { background: var(--surface-2); }
.motion-toggle[hidden] { display: none; }
.motion-toggle-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: none;
}
/* Green dot while animations are playing (aria-pressed=true) */
.motion-toggle[aria-pressed="true"] .motion-toggle-dot { background: var(--purple-light); }

/* ---------- Feature grid ---------- */
.feature-grid {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.feature-card h3 { color: var(--purple-light); }
.feature-card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ---------- Pricing ---------- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.price-featured {
  border-color: var(--purple);
  box-shadow: 0 0 0 1px var(--purple), var(--shadow);
}
.price { margin: 6px 0 2px; }
.price .amount { font-size: 2.2rem; font-weight: 700; }
.price .per { color: var(--muted); font-size: 1rem; }
.price-note { color: var(--muted-2); font-size: 0.78rem; margin: 0 0 14px; }
.price-card ul { padding-left: 18px; margin: 0; color: var(--muted); }
.price-card li { margin-bottom: 6px; font-size: 0.95rem; }
.price-legal {
  color: var(--muted-2);
  font-size: 0.82rem;
  max-width: 80ch;
  margin: 22px 0 0;
}

/* ---------- Comparison ---------- */
.compare { overflow-x: auto; margin-bottom: 24px; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-table th,
.compare-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.compare-table thead th {
  background: var(--surface-2);
  color: var(--text);
}
.compare-table tbody th { color: var(--text); font-weight: 600; }
.compare-table td { color: var(--muted); }
.compare-table tr:last-child th,
.compare-table tr:last-child td { border-bottom: none; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; max-width: 80ch; }
.faq-list details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-list summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 44px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--purple-light);
  font-size: 1.3rem;
  line-height: 1;
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-a { padding: 0 18px 16px; }
.faq-a p { color: var(--muted); margin: 0; }

/* ---------- Sources ---------- */
.sources-list { color: var(--muted); max-width: 80ch; padding-left: 18px; }
.sources-list li { margin-bottom: 8px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 40px 0 24px;
  margin-top: 10px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 0.8fr;
  gap: 30px;
}
.footer-block p { color: var(--muted); font-size: 0.9rem; margin: 0 0 10px; }
.footer-brand { font-weight: 700; color: var(--text) !important; font-size: 1.05rem; }
.footer-heading {
  color: var(--purple-light) !important;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-block strong { color: var(--text); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--purple-light); }
.footer-legal {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
}
.footer-legal p { color: var(--muted-2); font-size: 0.8rem; margin: 0; }

/* ---------- Content pages ---------- */
.doc { padding: 40px 0 60px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.doc h2 { font-size: 1.3rem; margin-top: 32px; }
.doc p, .doc li { color: var(--muted); }
.doc a.back { display: inline-block; margin-bottom: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  /* Single-column hero: display:contents on .hero-copy lets these
     children flow in DOM order, so the visual sits between H1 and lede. */
  .hero-grid { display: flex; flex-direction: column; }
  .hero-media { order: 0; align-self: stretch; margin: 2px 0 18px; }
  /* Compact ~180px collage: animation + two stills, others hidden */
  .hero-mosaic {
    max-width: 440px;
    margin: 0 auto;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 84px;
  }
  .hero-mosaic .m1 { grid-column: 1 / 3; grid-row: 1 / 3; }
  .hero-mosaic .m2 { grid-column: 3 / 5; grid-row: 1 / 2; }
  .hero-mosaic .m3 { grid-column: 3 / 5; grid-row: 2 / 3; }
  .hero-mosaic .m4,
  .hero-mosaic .m5 { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }

  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed;
    inset: 62px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px;
    transform: translateY(-140%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow);
  }
  .primary-nav.open { transform: translateY(0); }
  .primary-nav a { padding: 12px 14px; font-size: 1rem; }
  .nav-cta { text-align: center; margin-top: 6px; }
}

@media (max-width: 600px) {
  .anim-figure { grid-template-columns: 1fr; gap: 14px; }
  .anim-frame { max-width: 240px; }
}

@media (max-width: 430px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 36px 0 28px; }
  .section { padding: 40px 0; }
  .char-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .brand-tag { display: none; }
  .motion-toggle { padding: 9px 14px; font-size: 0.85rem; }
}

@media (max-width: 360px) {
  .char-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* FEU: clickable source media without changing source-brand proportions. */
.media-link { display:block; inline-size:100%; block-size:100%; color:inherit; cursor:pointer; text-decoration:none; }
.media-link > img,.media-link > video { display:block; inline-size:100%; block-size:100%; object-fit:cover; }
.media-link:focus-visible { outline:3px solid var(--purple-light); outline-offset:-3px; }
.m::before,.m::after { pointer-events:none; }
.wrap { width:100%; margin-inline:auto; }
.hero-copy,.hero-media { min-inline-size:0; }
h1,h2,h3,.primary-nav a { overflow-wrap:anywhere; }
.faq-list,.sources-list,.price-legal { margin-inline:auto; }
@media(max-width:600px) { .anim-frame { margin-inline:auto; inline-size:min(240px,100%); } }

/* RTL: hide skip link vertically, never outside the horizontal scroll origin. */
html[dir="rtl"] .skip-link { left:auto; right:0; transform:translateY(-120%); }
html[dir="rtl"] .skip-link:focus { left:auto; right:0; transform:translateY(0); }
