/* === Custom Properties === */
:root {
  --color-text: #1a1a1a;
  --color-text-muted: #555;
  --color-bg: #fafafa;
  --color-bg-alt: #e8e5df;
  --color-accent: #0a6e6e;
  --color-accent-hover: #085858;
  --color-white: #fff;
  --color-dark: #0d1b1b;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --max-width: 960px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 7rem;
}

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

/* === Base === */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* === Typography === */
h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 400;
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-sm);
}

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section {
  padding: var(--space-xl) 0;
}

section.alt {
  background: var(--color-bg-alt);
}

/* === Dark Section === */
section.section-dark {
  background: var(--color-dark);
  color: var(--color-white);
}

section.section-dark p {
  color: rgba(255, 255, 255, 0.75);
}

section.section-dark .section-heading p {
  color: rgba(255, 255, 255, 0.6);
}

section.section-dark h2::after {
  background: rgba(255, 255, 255, 0.3);
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  text-decoration: none;
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(10, 110, 110, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(10, 110, 110, 0.3);
}

/* Ghost button for hero */
.btn-ghost {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
  color: var(--color-white);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

/* === Hero === */
.hero {
  padding: 8rem 0 6rem;
  text-align: center;
  background: linear-gradient(160deg, #0d1b1b 0%, #143838 50%, #0a6e6e 100%);
  color: var(--color-white);
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: var(--space-sm);
  color: var(--color-white);
}

.hero-logo {
  max-width: 520px;
  height: auto;
  margin: 0 auto var(--space-md);
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-sm);
}

.hero .tagline {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.hero .secondary-link {
  display: block;
  margin-top: var(--space-sm);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.hero .secondary-link a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
}

.hero .secondary-link a:hover {
  color: var(--color-white);
}

/* === Section Headings === */
.section-heading {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-heading h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-heading h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

.section-heading p {
  color: var(--color-text-muted);
  max-width: 600px;
  margin: var(--space-xs) auto 0;
}

.section-description {
  color: var(--color-text-muted);
  max-width: 640px;
  margin: var(--space-sm) auto var(--space-md);
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* === Cards === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.card {
  background: var(--color-white);
  border-radius: 12px;
  padding: var(--space-md);
  border: none;
  border-top: 3px solid var(--color-accent);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 12px 28px rgba(0,0,0,0.08);
}

.card h3 {
  color: var(--color-accent);
}

.card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* === Timeline === */
.timeline {
  list-style: none;
  position: relative;
  padding-left: var(--space-md);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--color-accent);
  opacity: 0.3;
  border-radius: 2px;
}

.timeline li {
  position: relative;
  margin-bottom: var(--space-md);
  padding-left: var(--space-sm);
  transition: transform 0.2s ease;
}

.timeline li:hover {
  transform: translateX(4px);
}

.timeline li::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-md) + 1px);
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-white);
  box-shadow: 0 0 0 3px var(--color-accent);
}

.timeline .time-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline .time-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* === Key Stats === */
.key-stats {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  margin-top: var(--space-lg);
  flex-wrap: wrap;
  background: var(--color-white);
  border-radius: 16px;
  padding: var(--space-md) var(--space-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

.stat {
  text-align: center;
  position: relative;
  padding: 0 var(--space-md);
}

.stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: #e0deda;
}

.stat .number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--color-accent);
  line-height: 1;
}

.stat .label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* === Values Grid === */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.value-item {
  position: relative;
  padding-top: var(--space-sm);
}

.value-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  transition: width 0.2s ease;
}

.value-item:hover::before {
  width: 48px;
}

.value-item h3 {
  margin-bottom: 0.25rem;
}

.value-item p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* === Chapters === */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.chapter-card {
  background: var(--color-white);
  border-radius: 12px;
  padding: var(--space-md);
  border: none;
  border-top: 3px solid var(--color-accent);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chapter-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 12px 28px rgba(0,0,0,0.08);
}

.chapter-card h3 {
  font-size: 1.35rem;
  margin-bottom: var(--space-xs);
}

.chapter-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}

.chapter-card-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.chapter-cta {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* === Footer === */
footer {
  padding: var(--space-lg) 0;
  background: var(--color-dark);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

footer .footer-links {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

footer .footer-links a {
  color: rgba(255, 255, 255, 0.5);
}

footer .footer-links a:hover {
  color: var(--color-white);
}

/* === Language Switcher === */
.lang-switcher {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(13, 27, 27, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-switcher a,
.lang-switcher span {
  display: block;
  padding: 0.35rem 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.lang-switcher span.active {
  background: var(--color-accent);
  color: #fff;
}

.lang-switcher a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}

/* === Responsive: Tablet === */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero {
    padding: 5rem 0 4rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-logo {
    max-width: 400px;
  }

  .card-grid,
  .values-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  section {
    padding: var(--space-lg) 0;
  }

  .stat:not(:last-child)::after {
    display: none;
  }
}

/* === Responsive: Mobile === */
@media (max-width: 480px) {
  h1 {
    font-size: 1.65rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-logo {
    max-width: 300px;
  }

  .hero {
    padding: 4rem 0 3rem;
  }

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

  .card-grid,
  .values-grid,
  .chapter-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .key-stats {
    gap: var(--space-md);
    flex-direction: column;
    align-items: center;
  }

  .stat:not(:last-child)::after {
    display: none;
  }
}
