/* ===========================
   Fonts (self-hosted, SIL Open Font License: fonts/OFL-*.txt)
   =========================== */

/* Variable fonts, Latin subset: one file covers every weight */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/dm-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("fonts/fraunces-latin.woff2") format("woff2");
}

/* ===========================
   CSS Variables & Base Styles
   =========================== */

:root {
  --pink: #ff6b9d;
  --pink-light: #ffadc8;
  --pink-dark: #c9184a;
  --blue: #4cc9f0;
  --blue-light: #90e0ef;
  --blue-dark: #0070ab;
  --purple: #b565d8;
  --purple-dark: #7b2cbf;
  --white: #ffffff;
  --black: #1a1a1a;
  /* Text tones: >= 4.5:1 on every light background used (WCAG 1.4.3) */
  --gray: #4b5563;
  --gray-light: #f3f4f6;

  --font-display: "Fraunces", serif;
  --font-body: "DM Sans", sans-serif;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);

  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* Height of the fixed top bar, so anchors don't land under it */
  --bar-offset: 96px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-padding-top: var(--bar-offset);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-body);
  color: var(--black);
  line-height: 1.7;
  background: linear-gradient(135deg, #fef4f8 0%, #e8f4f8 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
  position: relative;
}

/* ===========================
   Accessibility Helpers
   =========================== */

.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: fixed;
  top: 16px;
  left: 50%;
  z-index: 1100;
  padding: 12px 24px;
  border-radius: 50px;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  transform: translate(-50%, -200%);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

main:focus {
  outline: none;
}

/* ===========================
   Citations
   =========================== */

.cite {
  margin-left: 1px;
  font-size: 0.7em;
  font-weight: 700;
  line-height: 0;
  white-space: nowrap;
}

/* Brackets are visual only ("/ ''" gives them empty alt text) */
.cite::before {
  content: "[";
  content: "[" / "";
}

.cite::after {
  content: "]";
  content: "]" / "";
}

.cite a {
  color: inherit;
  text-underline-offset: 2px;
}

/* ===========================
   Top Bar (navigation + language)
   =========================== */

.site-bar {
  position: fixed;
  top: 24px;
  left: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  /* Let clicks through the empty space between the two pills */
  pointer-events: none;
}

.site-bar > * {
  pointer-events: auto;
}

/* ===========================
   Main Navigation
   =========================== */

.main-nav {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 8px;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  animation: slideInLeft 0.6s var(--ease-smooth);
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  border: none;
  background: transparent;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.3s var(--ease-smooth),
    color 0.3s var(--ease-smooth),
    box-shadow 0.3s var(--ease-smooth),
    transform 0.3s var(--ease-smooth);
  color: var(--black);
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--gray-light);
  transform: scale(1.05);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--pink-dark), var(--blue-dark));
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

/* ===========================
   Language Selector
   =========================== */

.language-selector {
  margin-left: auto;
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 8px;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.6s var(--ease-smooth);
}

@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.lang-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.3s var(--ease-smooth),
    color 0.3s var(--ease-smooth),
    box-shadow 0.3s var(--ease-smooth),
    transform 0.3s var(--ease-smooth);
  color: var(--black);
}

.lang-btn:hover {
  background: var(--gray-light);
  transform: scale(1.05);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--pink-dark), var(--blue-dark));
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.language-select {
  display: none;
}

.language-select select {
  min-height: 44px;
  padding: 6px 32px 6px 14px;
  border: 2px solid var(--blue-dark);
  border-radius: 50px;
  background: var(--white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231a1a1a' stroke-width='2'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--black);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* ===========================
   Back-to-top Button
   =========================== */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--pink-dark), var(--blue-dark));
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease,
    box-shadow 0.2s ease;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px) scale(1.05);
}

.back-to-top:active {
  transform: translateY(0) scale(0.96);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
}

/* ===========================
   Hero Section
   =========================== */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

/* Set by script.js while the hero is off-screen */
.hero.is-paused,
.hero.is-paused * {
  animation-play-state: paused;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(255, 107, 157, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(76, 201, 240, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(181, 101, 216, 0.2) 0%,
      transparent 50%
    );
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

.color-bubbles {
  position: absolute;
  /* Keep the blurred bubbles behind the hero text */
  z-index: -1;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

.bubble-pink {
  width: 400px;
  height: 400px;
  background: var(--pink);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.bubble-blue {
  width: 350px;
  height: 350px;
  background: var(--blue);
  bottom: 20%;
  right: 10%;
  animation-delay: 5s;
}

.bubble-purple {
  width: 300px;
  height: 300px;
  background: var(--purple);
  top: 50%;
  left: 50%;
  animation-delay: 10s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-30px, 30px) scale(0.9);
  }
}

.hero .container {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 1300px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--black);
  animation: fadeInUp 0.8s var(--ease-smooth) 0.2s backwards;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--black);
  max-width: 700px;
  margin: 0 auto 48px;
  animation: fadeInUp 0.8s var(--ease-smooth) 0.4s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-indicator {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--black);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  animation:
    fadeInUp 0.8s var(--ease-smooth) 0.6s backwards,
    bounce 2s ease-in-out 2s infinite;
  cursor: pointer;
}

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

/* ===========================
   Introduction Section
   =========================== */

.intro {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.95)
  );
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.intro-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.intro-icon {
  font-size: 4rem;
  margin-bottom: 24px;
  display: inline-block;
  animation: rotateIn 1s var(--ease-bounce);
}

@keyframes rotateIn {
  from {
    transform: rotate(-180deg) scale(0);
    opacity: 0;
  }
  to {
    transform: rotate(0) scale(1);
    opacity: 1;
  }
}

.intro-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 24px;
  color: var(--black);
}

.intro-content p {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--gray);
  line-height: 1.8;
}

/* ===========================
   Timeline Section
   =========================== */

.timeline {
  position: relative;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: 64px;
  background: linear-gradient(135deg, var(--pink-dark), var(--blue-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.timeline-container {
  list-style: none;
  position: relative;
  padding-left: 40px;
}

.timeline-container::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    var(--pink) 0%,
    var(--purple) 50%,
    var(--blue) 100%
  );
  border-radius: 4px;
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateX(-30px);
  animation: slideInLeft 0.6s var(--ease-smooth) forwards;
}

.timeline-item:nth-child(1) {
  animation-delay: 0.1s;
}
.timeline-item:nth-child(2) {
  animation-delay: 0.2s;
}
.timeline-item:nth-child(3) {
  animation-delay: 0.3s;
}
.timeline-item:nth-child(4) {
  animation-delay: 0.4s;
}
.timeline-item:nth-child(5) {
  animation-delay: 0.5s;
}
.timeline-item:nth-child(6) {
  animation-delay: 0.6s;
}

.timeline-marker {
  position: absolute;
  left: -32px;
  top: 8px;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, var(--pink), var(--blue));
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.timeline-item.highlight .timeline-marker {
  width: 24px;
  height: 24px;
  left: -36px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.7);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(255, 107, 157, 0);
  }
}

.timeline-content {
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition:
    box-shadow 0.3s var(--ease-smooth),
    transform 0.3s var(--ease-smooth);
}

.timeline-content:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.timeline-period {
  display: inline-block;
  background: linear-gradient(135deg, var(--pink-light), var(--blue-light));
  color: var(--black);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--black);
}

.timeline-content p {
  color: var(--gray);
  line-height: 1.7;
}

.color-pink {
  color: var(--pink-dark);
  font-weight: 600;
}

.color-blue {
  color: var(--blue-dark);
  font-weight: 600;
}

/* Reverse Box (1918) */
.timeline-item.highlight {
  margin-bottom: 64px;
}

.timeline-item.highlight .timeline-content {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 157, 0.1),
    rgba(76, 201, 240, 0.1)
  );
  border: 2px solid rgba(181, 101, 216, 0.3);
}

.reverse-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
  padding: 24px;
  background: white;
  border-radius: 12px;
}

.reverse-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--gray-light);
  border-radius: 12px;
  font-weight: 600;
}

.reverse-icon {
  font-size: 2rem;
}

.reverse-color {
  font-size: 1.2rem;
}

.reverse-arrow {
  font-size: 1.5rem;
  color: var(--purple);
}

.reverse-label {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  padding: 8px 16px;
  border-radius: 8px;
}

.reverse-item:first-child .reverse-label {
  background: var(--pink-dark);
  color: white;
}

.reverse-item:last-child .reverse-label {
  background: var(--blue-dark);
  color: white;
}

/* ===========================
   Pink & Blue Project Section
   =========================== */

.pink-blue-project {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.95)
  );
}

.project-content {
  max-width: 1000px;
  margin: 0 auto;
}

.project-header {
  text-align: center;
  margin-bottom: 48px;
}

.project-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--pink-light), var(--blue-light));
  color: var(--black);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.project-subtitle {
  font-size: 1.2rem;
  color: var(--gray);
  max-width: 700px;
  margin: 16px auto 0;
}

.project-story {
  display: grid;
  gap: 32px;
  margin-bottom: 48px;
}

.project-text h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--black);
}

.project-text p {
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 16px;
}

.project-impact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 24px;
}

.impact-item {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.3s var(--ease-smooth),
    transform 0.3s var(--ease-smooth);
}

.impact-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.impact-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.impact-item h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--black);
}

.impact-item p {
  color: var(--gray);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ===========================
   Science Section
   =========================== */

.science {
  background: white;
}

.science-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.science-card {
  padding: 40px;
  background: linear-gradient(135deg, var(--gray-light) 0%, white 100%);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.3s var(--ease-smooth),
    transform 0.3s var(--ease-smooth);
  text-align: center;
}

.science-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.science-card:first-child {
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.1) 0%, white 100%);
}

.science-card:last-child {
  background: linear-gradient(135deg, rgba(76, 201, 240, 0.1) 0%, white 100%);
}

.science-icon {
  font-size: 4rem;
  margin-bottom: 24px;
}

.science-card h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--black);
}

.science-card p {
  color: var(--gray);
  line-height: 1.7;
}

/* ===========================
   Color Psychology Section
   =========================== */

.color-psychology {
  background: linear-gradient(135deg, var(--gray-light) 0%, white 100%);
}

.psychology-intro {
  text-align: center;
  font-size: 1.2rem;
  color: var(--gray);
  max-width: 800px;
  margin: 0 auto 48px;
  line-height: 1.8;
}

.psychology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.psychology-card {
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition:
    box-shadow 0.3s var(--ease-smooth),
    transform 0.3s var(--ease-smooth);
}

.psychology-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.pink-card {
  border-top: 4px solid var(--pink);
}

.blue-card {
  border-top: 4px solid var(--blue);
}

.purple-card {
  border-top: 4px solid var(--purple);
}

.psychology-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.psychology-color-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.pink-circle {
  background: linear-gradient(135deg, var(--pink-light), var(--pink));
}

.blue-circle {
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
}

.purple-circle {
  background: linear-gradient(135deg, var(--purple), var(--pink));
}

.psychology-header h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--black);
}

.psychology-aspects {
  margin-bottom: 24px;
}

.psychology-positive,
.psychology-negative {
  margin-bottom: 20px;
}

.psychology-positive h4,
.psychology-negative h4 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--black);
  font-weight: 600;
}

.psychology-aspects ul {
  list-style: none;
  padding-left: 0;
}

.psychology-aspects li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--gray);
}

.psychology-aspects li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: var(--purple);
  font-weight: bold;
}

.psychology-fact {
  background: var(--gray-light);
  padding: 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.psychology-fact strong {
  color: var(--black);
}

.psychology-fact span {
  color: var(--gray);
}

.psychology-note,
.psychology-cultural {
  margin-top: 16px;
}

.psychology-note p,
.psychology-cultural p {
  color: var(--gray);
  line-height: 1.7;
  font-size: 0.95rem;
}

.psychology-cultural h4 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--black);
}

/* ===========================
   Modern Impact Section
   =========================== */

.modern-impact {
  background: white;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}

.impact-card {
  background: linear-gradient(135deg, var(--gray-light) 0%, white 100%);
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.3s var(--ease-smooth),
    transform 0.3s var(--ease-smooth);
}

.impact-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.highlight-card {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 157, 0.1) 0%,
    rgba(76, 201, 240, 0.1) 100%
  );
  border: 2px solid rgba(181, 101, 216, 0.3);
}

.impact-emoji {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.impact-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--black);
}

.impact-card p {
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 16px;
}

.impact-result {
  background: white;
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
}

.impact-result strong {
  font-weight: 700;
  color: var(--black);
  display: block;
  margin-bottom: 8px;
}

.impact-quote {
  font-style: italic;
  color: var(--pink-dark);
  font-size: 1.1rem;
  margin-top: 16px;
  padding: 16px;
  background: white;
  border-left: 3px solid var(--pink);
  border-radius: 4px;
}

/* ===========================
   Facts Section
   =========================== */

.facts {
  background: linear-gradient(
    135deg,
    var(--pink-light) 0%,
    var(--blue-light) 100%
  );
  position: relative;
  overflow: hidden;
}

.facts::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 1px,
    transparent 1px
  );
  background-size: 50px 50px;
  animation: movePattern 20s linear infinite;
}

@keyframes movePattern {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(50px, 50px);
  }
}

.facts .container {
  position: relative;
  z-index: 10;
}

/* Gradient text is too faint on the pastel backgrounds */
.facts .section-title,
.did-you-know .section-title {
  color: var(--black);
  background: var(--black);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 24px;
}

.fact-card {
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition:
    box-shadow 0.3s var(--ease-smooth),
    transform 0.3s var(--ease-smooth);
}

.fact-card:hover {
  transform: translateY(-8px) rotate(1deg);
  box-shadow: var(--shadow-lg);
}

.fact-number {
  font-size: 3rem;
  margin-bottom: 16px;
}

.fact-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--black);
}

.fact-card p {
  color: var(--gray);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ===========================
   Genderless Fashion Section
   =========================== */

.genderless-fashion {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9),
    rgba(243, 244, 246, 0.9)
  );
}

.fashion-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 48px;
}

.fashion-intro p {
  font-size: 1.2rem;
  color: var(--gray);
  line-height: 1.8;
}

.fashion-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 32px;
  margin-bottom: 48px;
}

.fashion-movement,
.fashion-brands {
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.fashion-movement h3,
.fashion-brands h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 24px;
  color: var(--black);
}

.movement-points {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.movement-point {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.point-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.movement-point h4 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--black);
}

.movement-point p {
  color: var(--gray);
  line-height: 1.6;
}

.brands-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand-item {
  padding: 16px;
  background: var(--gray-light);
  border-radius: 8px;
}

.brand-item strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--black);
}

.brand-item p {
  color: var(--gray);
  line-height: 1.6;
  font-size: 0.95rem;
}

.fashion-quote {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 157, 0.1),
    rgba(76, 201, 240, 0.1)
  );
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 48px;
}

.fashion-quote blockquote {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--black);
  margin-bottom: 16px;
  line-height: 1.6;
}

.fashion-quote cite {
  color: var(--gray);
  font-style: normal;
  font-weight: 600;
}

.fashion-future {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.fashion-future h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--black);
}

.fashion-future p {
  font-size: 1.1rem;
  color: var(--gray);
  line-height: 1.8;
}

/* ===========================
   Did You Know Section
   =========================== */

.did-you-know {
  background: linear-gradient(
    135deg,
    var(--blue-light) 0%,
    var(--pink-light) 100%
  );
  position: relative;
  overflow: hidden;
}

.did-you-know::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 1px,
    transparent 1px
  );
  background-size: 40px 40px;
  animation: movePattern 30s linear infinite;
}

.trivia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
  position: relative;
  z-index: 10;
}

.trivia-card {
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition:
    box-shadow 0.3s var(--ease-smooth),
    transform 0.3s var(--ease-smooth);
}

.trivia-card:hover {
  transform: translateY(-8px) rotate(1deg);
  box-shadow: var(--shadow-lg);
}

.trivia-icon {
  font-size: 3.25rem;
  margin-bottom: 16px;
  display: block;
}

.trivia-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--black);
}

.trivia-card p {
  color: var(--gray);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ===========================
   Conclusion Section
   =========================== */

.conclusion {
  background: var(--black);
  color: white;
}

.conclusion-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.conclusion-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 32px;
  background: linear-gradient(135deg, var(--pink-light), var(--blue-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.conclusion-content p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
}

.conclusion-cta {
  margin-top: 48px;
  padding: 40px;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 157, 0.2),
    rgba(76, 201, 240, 0.2)
  );
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.conclusion-final {
  font-size: 1.3rem;
  color: white;
  margin-bottom: 16px;
}

.conclusion-highlight {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===========================
   Biological Sex Section
   =========================== */

.biology {
  background: linear-gradient(135deg, #fef4f8 0%, #eef7fb 100%);
}

.biology-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.biology-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--purple-dark), var(--blue-dark));
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.biology-header .section-title {
  margin-bottom: 16px;
}

.biology-subtitle {
  color: var(--gray);
  font-size: 1.1rem;
  line-height: 1.7;
}

.biology-intro {
  max-width: 760px;
  margin: 0 auto 48px;
}

.biology-intro p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--black);
}

.biology-concepts {
  max-width: 1000px;
  margin: 0 auto 56px;
}

.biology-concepts-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 28px;
  color: var(--black);
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 20px;
}

.concept-card {
  background: white;
  border: 2px solid var(--gray-light);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition:
    border-color 0.3s var(--ease-smooth),
    transform 0.3s var(--ease-smooth);
}

.concept-card:hover {
  border-color: var(--pink-light);
  transform: translateY(-4px);
}

.concept-card h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--black);
}

.concept-card p {
  color: var(--gray);
  font-size: 0.92rem;
  line-height: 1.6;
}

.spectrum-bar-wrapper {
  max-width: 700px;
  margin: 0 auto 56px;
  text-align: center;
}

.spectrum-bar {
  height: 16px;
  border-radius: 50px;
  background: linear-gradient(
    90deg,
    var(--pink) 0%,
    var(--purple) 50%,
    var(--blue) 100%
  );
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.spectrum-labels {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--black);
}

.spectrum-note {
  margin-top: 16px;
  color: var(--gray);
  font-size: 0.9rem;
  font-style: italic;
}

.biology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 24px;
  margin-bottom: 56px;
}

.biology-card {
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.3s var(--ease-smooth),
    transform 0.3s var(--ease-smooth);
}

.biology-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.biology-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.biology-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--black);
}

.biology-card p {
  color: var(--gray);
  line-height: 1.65;
  font-size: 0.95rem;
}

.biology-mosaic {
  max-width: 800px;
  margin: 0 auto 48px;
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.biology-mosaic h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--purple-dark), var(--pink-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.biology-mosaic p {
  color: var(--gray);
  line-height: 1.75;
}

.biology-stat {
  max-width: 700px;
  margin: 0 auto 48px;
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--black);
  color: white;
  border-radius: 20px;
  padding: 32px 40px;
}

.biology-stat-number {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.biology-stat-text h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-light);
  margin-bottom: 6px;
}

.biology-stat-text p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  font-size: 0.92rem;
}

.biology-example {
  max-width: 800px;
  margin: 0 auto 48px;
  background: white;
  border-left: 6px solid var(--purple);
  border-radius: 16px;
  padding: 32px 40px;
  box-shadow: var(--shadow-sm);
}

.biology-example-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--purple-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.biology-example h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--black);
}

.biology-example p {
  color: var(--gray);
  line-height: 1.75;
}

.biology-conclusion {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.biology-conclusion h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--black);
}

.biology-conclusion p {
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ===========================
   Footer
   =========================== */

.footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.6);
  padding: 48px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.footer-content p {
  margin-bottom: 24px;
}

.references {
  margin-top: 32px;
  text-align: left;
}

.references h2 {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--white);
  text-align: center;
}

.references-list {
  display: grid;
  gap: 10px;
  padding-left: 1.75em;
  font-size: 0.875rem;
  line-height: 1.5;
}

.references-list li::marker {
  color: var(--white);
  font-weight: 700;
}

/* Highlight the source a citation link jumped to */
.references-list li:target {
  color: var(--white);
}

/* Underlined: color alone doesn't set links apart from the text (WCAG 1.4.1) */
.references-list a {
  color: var(--pink-light);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
  transition: color 0.3s var(--ease-smooth);
}

.references-list a:hover {
  color: var(--blue-light);
  text-decoration-thickness: 2px;
}

.share {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.share h2 {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--white);
}

.share-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  list-style: none;
  padding: 0;
}

/* 44px targets (WCAG 2.5.5) */
.share-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition:
    color 0.3s var(--ease-smooth),
    border-color 0.3s var(--ease-smooth),
    background 0.3s var(--ease-smooth);
}

.share-link:hover {
  color: var(--black);
  background: var(--pink-light);
  border-color: var(--pink-light);
}

.share-link svg {
  width: 20px;
  height: 20px;
}

.footer-content .share-status {
  min-height: 1.5em;
  margin: 12px 0 0;
  font-size: 0.875rem;
  color: var(--blue-light);
}

.footer-content .license {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.license svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--white);
}

.license a {
  color: var(--pink-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.license a:hover {
  color: var(--blue-light);
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  :root {
    /* Fallback; script.js measures the real bar height */
    --bar-offset: 72px;
  }

  /* One solid navbar instead of two floating pills */
  .site-bar {
    top: 0;
    left: 0;
    right: 0;
    align-items: center;
    gap: 4px 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    pointer-events: auto;
  }

  .main-nav,
  .language-selector {
    padding: 0;
    gap: 2px;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    animation: none;
  }

  .lang-btn {
    padding: 6px 10px;
    font-size: 0.875rem;
  }

  .nav-link {
    padding: 6px 12px;
    font-size: 0.875rem;
  }

  .biology-stat {
    flex-direction: column;
    text-align: center;
    padding: 28px 24px;
  }

  .biology-example,
  .biology-mosaic {
    padding: 28px 24px;
  }

  .hero {
    padding: calc(var(--bar-offset) + 48px) 16px 60px;
  }

  .bubble {
    filter: blur(40px);
  }

  .timeline-container {
    padding-left: 32px;
  }

  .timeline-container::before {
    left: 12px;
  }

  .timeline-marker {
    left: -28px;
  }

  .timeline-item.highlight .timeline-marker {
    left: -32px;
  }

  .timeline-content {
    padding: 24px;
  }

  .reverse-box {
    padding: 16px;
  }

  .reverse-item {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .science-grid,
  .facts-grid {
    grid-template-columns: 1fr;
  }

  .project-story {
    grid-template-columns: 1fr;
  }

  .project-impact {
    grid-template-columns: 1fr;
  }

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

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

  .fashion-content {
    grid-template-columns: 1fr;
  }

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

  .fashion-quote blockquote {
    font-size: 1.2rem;
  }
}

/* Buttons no longer fit next to the links: use the dropdown */
@media (max-width: 560px) {
  .site-bar {
    flex-wrap: nowrap;
  }

  .language-selector {
    display: none;
  }

  .language-select {
    display: block;
    flex: none;
    margin-left: auto;
  }

  .main-nav {
    min-width: 0;
  }

  .nav-link {
    white-space: normal;
    line-height: 1.2;
    text-align: center;
  }
}

@media (max-width: 480px) {
  /* Long words (e.g. "sorprendentemente") must not overflow narrow screens */
  h1,
  h2,
  h3,
  h4 {
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .timeline-content h3 {
    font-size: 1.3rem;
  }

  .science-card,
  .fact-card {
    padding: 24px;
  }

  .project-badge {
    font-size: 0.75rem;
    padding: 6px 16px;
  }

  .impact-item,
  .trivia-card,
  .psychology-card {
    padding: 24px;
  }

  .psychology-header {
    flex-direction: column;
    text-align: center;
  }

  .movement-point {
    flex-direction: column;
    text-align: center;
  }
}

/* ===========================
   Print
   =========================== */

@media print {
  /* Interactive and decorative chrome has no use on paper */
  .skip-link,
  .site-bar,
  .back-to-top,
  .scroll-indicator,
  .hero-background,
  .color-bubbles {
    display: none !important;
  }

  /* Browsers drop backgrounds when printing: make all text plain black
     (gradient text and white-on-dark sections would otherwise vanish) */
  *,
  *::before,
  *::after {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
  }

  html {
    font-size: 11pt;
  }

  .hero {
    min-height: 0;
    padding: 0 0 24pt;
  }

  .section {
    padding: 18pt 0;
  }

  /* Normally revealed by an entry animation */
  .timeline-item {
    opacity: 1 !important;
    transform: none !important;
  }

  h1,
  h2,
  h3,
  h4 {
    break-after: avoid;
  }

  .timeline-item,
  .science-card,
  .psychology-card,
  .impact-card,
  .impact-item,
  .fact-card,
  .trivia-card,
  .concept-card,
  .biology-card,
  .brand-item,
  blockquote,
  .references-list li {
    break-inside: avoid;
  }

  .timeline-content,
  .science-card,
  .psychology-card,
  .impact-card,
  .fact-card,
  .trivia-card,
  .concept-card,
  .biology-card {
    border: 1px solid #999;
  }

  /* Paper readers can't click: print each source's address */
  .references-list a::after {
    content: " " attr(href);
    word-break: break-all;
    font-size: 0.85em;
  }
}

/* ===========================
   Accessibility
   =========================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

:focus-visible {
  outline: 3px solid var(--blue-dark);
  outline-offset: 4px;
}

/* Lighter ring on dark backgrounds (WCAG 2.4.7, 1.4.11) */
.conclusion :focus-visible,
.biology-stat :focus-visible,
.footer :focus-visible {
  outline-color: var(--blue-light);
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  :root {
    --gray: var(--black);
  }

  .hero-title,
  .section-title,
  .biology-mosaic h3 {
    -webkit-text-fill-color: var(--black);
    background: none;
  }

  .conclusion-content h2,
  .conclusion-highlight,
  .biology-stat-number {
    -webkit-text-fill-color: var(--white);
    background: none;
  }

  .conclusion-content p,
  .biology-stat-text p,
  .footer {
    color: var(--white);
  }

  .timeline-content,
  .science-card,
  .fact-card,
  .trivia-card,
  .impact-card,
  .impact-item,
  .psychology-card,
  .biology-card,
  .concept-card {
    border: 2px solid var(--black);
  }
}

/* Windows High Contrast / forced colors: system colors replace ours */
@media (forced-colors: active) {
  /* Gradient-clipped text would turn invisible */
  .section-title,
  .conclusion-content h2,
  .conclusion-highlight,
  .biology-mosaic h3,
  .biology-stat-number {
    -webkit-text-fill-color: currentColor;
    background: none;
  }

  /* Backgrounds are dropped, so mark the current page and language
     with a border instead */
  .nav-link.active,
  .lang-btn.active {
    border: 2px solid Highlight;
  }

  .main-nav,
  .language-selector,
  .back-to-top,
  .language-select select {
    border: 1px solid CanvasText;
  }

  :focus-visible {
    outline-color: Highlight;
  }
}
