/* megi co. — parody corporate site */
:root {
  --primary: #2e0e74;
  --primary-light: #4c1d95;
  --accent: #e6004d;
  --accent-hover: #c4003f;
  --text: #1f2937;
  --text-muted: #4b5563;
  --bg: #f8f9fb;
  --white: #ffffff;
  --card-bg: #ffffff;
  --shadow: 0 10px 25px rgba(46, 14, 116, 0.1);
  --radius: 16px;
  --max-width: 1200px;
  --transition: 0.25s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 200;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid #e5e7eb;
  z-index: 100;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.logo-suffix {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.burger-line {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] .burger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .burger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .burger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-list a {
  color: var(--text);
  position: relative;
}

.nav-list a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-list a:hover::after,
.nav-list a:focus::after {
  width: 100%;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 5rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 1.5rem;
}

.hero-content p {
  font-size: 1.1rem;
  max-width: 560px;
  opacity: 0.9;
  margin: 0 0 2.5rem;
}

.scroll-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: var(--white);
  animation: bounce 2s infinite;
}

.scroll-cta svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.hero-visual svg {
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.25));
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--primary);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.section h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin: 1.5rem 0 0.75rem;
}

.section p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

/* Split sections */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.split-section.alt .split-grid {
  direction: rtl;
}

.split-section.alt .split-text,
.split-section.alt .split-visual {
  direction: ltr;
}

.split-visual svg {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
}

.check-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
}

/* Facts */
.facts-section {
  background: var(--white);
}

.facts-section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

.facts-list {
  max-width: 800px;
  margin: 0 auto;
}

.fact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid #e5e7eb;
  align-items: start;
}

.fact-row dt {
  font-weight: 600;
  color: var(--text-muted);
}

.fact-row dd {
  margin: 0;
  font-weight: 700;
  color: var(--text);
  display: flex;
  gap: 0.5rem;
}

.fact-marker {
  color: var(--accent);
}

/* Timeline */
.timeline-section {
  background: var(--bg);
}

.timeline-section h2,
.timeline-section .section-lead {
  text-align: center;
}

.section-lead {
  max-width: 600px;
  margin: 0 auto 3rem;
  color: var(--text-muted);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #d1d5db;
  transform: translateX(-50%);
}

.timeline-event {
  position: relative;
  width: 50%;
  padding: 1rem 2.5rem;
  margin-bottom: 2rem;
  opacity: 1;
  transform: scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-event.visible {
  opacity: 1;
  transform: scale(1);
}

.timeline-event.left {
  left: 0;
  text-align: right;
}

.timeline-event.right {
  left: 50%;
  text-align: left;
}

.timeline-event::after {
  content: "";
  position: absolute;
  top: 1.4rem;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent);
}

.timeline-event.left::after {
  right: -8px;
}

.timeline-event.right::after {
  left: -8px;
}

.year {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.event-card {
  background: var(--card-bg);
  padding: 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: inline-block;
  text-align: left;
}

.event-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  color: var(--primary);
}

.event-card p {
  margin: 0;
  font-size: 0.95rem;
}

.event-card code {
  background: #f3f4f6;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Group section */
.group-section {
  background: var(--white);
}

.group-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 900px;
}

.group-logo svg {
  width: 140px;
  height: 140px;
}

.group-text p {
  margin-bottom: 1.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--white);
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.75);
  padding: 4rem 0 1.5rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 1.4fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h4,
.footer-brand h4 {
  color: var(--white);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a:hover,
.footer-col a:focus {
  color: var(--white);
  text-decoration: underline;
}

.footer-brand {
  text-align: right;
}

.footer-logo {
  color: var(--white);
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.tagline {
  margin: 0 0 1rem;
  font-style: italic;
}

.socials {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.socials a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: background var(--transition);
}

.socials a:hover,
.socials a:focus {
  background: var(--accent);
}

.socials svg {
  width: 18px;
  height: 18px;
  fill: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.25rem;
  text-align: center;
}

.footer-bottom a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-brand {
    text-align: left;
    grid-column: 1 / -1;
  }

  .footer-logo {
    justify-content: flex-start;
  }

  .socials {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid #e5e7eb;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .main-nav.open {
    max-height: 400px;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 1rem;
  }

  .nav-list a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
  }

  .hero-grid,
  .split-grid,
  .group-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .split-section.alt .split-grid {
    direction: ltr;
  }

  .hero-visual svg {
    margin: 0 auto;
  }

  .scroll-cta {
    margin-top: 1rem;
  }

  .fact-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .timeline::before {
    left: 24px;
  }

  .timeline-event,
  .timeline-event.left,
  .timeline-event.right {
    width: 100%;
    left: 0;
    text-align: left;
    padding-left: 64px;
    padding-right: 0;
  }

  .timeline-event.left::after,
  .timeline-event.right::after {
    left: 16px;
    right: auto;
  }

  .event-card {
    display: block;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 3.5rem 0 4.5rem;
  }

  .section {
    padding: 3rem 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .socials {
    flex-wrap: wrap;
  }
}
