:root {
  --bg: #f7f2ec;
  --bg-2: #f2ebe3;
  --ink: #1b1b1b;
  --muted: #5d5650;
  --accent-1: #f4b36b;
  --accent-2: #7ed4ff;
  --accent-3: #ff8f70;
  --accent-4: #ffd36b;
  --surface: rgba(255, 255, 255, 0.8);
  --stroke: rgba(27, 27, 27, 0.12);
  --shadow: 0 24px 60px rgba(26, 25, 23, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html, body {
  padding: 0;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Space Grotesk", "Arial", sans-serif;
  line-height: 1.6;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.7), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(126, 212, 255, 0.35), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(244, 179, 107, 0.35), transparent 35%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.6), rgba(247, 242, 236, 0.7));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  z-index: 0;
}

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

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

a:hover {
  opacity: 0.85;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(247, 242, 236, 0.9);
  border-bottom: 1px solid var(--stroke);
}

.nav {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0 16px;
}

.brand {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.nav-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 320px;
  max-width: 360px;
}

.nav-identity .brand {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-left: 0.25rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  font-size: 0.95rem;
  padding-top: 0.55rem;
  flex: 1;
}

.nav-links a {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav-links a.active {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
}

.nav-back-home {
  display: none;
}

.site-mode-toggle {
  display: inline-flex;
  max-width: min(100%, 28rem);
  width: 100%;
  position: relative;
  will-change: transform, opacity;
}

.site-mode-toggle.is-launching {
  animation: toggle-launch-to-carob 640ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

/* Mirror the v2 projectile: travel to the opposite edge, flash on impact, then hand off surfaces. */
.site-mode-toggle.is-launching::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 2.2rem;
  width: 18rem;
  height: 2px;
  background: linear-gradient(90deg, rgba(126, 212, 255, 0), rgba(126, 212, 255, 0.6), rgba(244, 179, 107, 0));
  filter: blur(1.5px);
  transform: translateY(-50%);
  transform-origin: left center;
  animation: toggle-trail-mango 640ms linear forwards;
  pointer-events: none;
}

.site-mode-toggle.is-launching::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -0.45rem;
  width: 2.9rem;
  height: 3.05rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at right center, rgba(255, 255, 255, 0.8) 0 10%, rgba(126, 212, 255, 0.52) 18%, rgba(244, 179, 107, 0.14) 42%, rgba(244, 179, 107, 0) 72%);
  box-shadow:
    0 0 0 1px rgba(126, 212, 255, 0.1),
    0 0 14px rgba(126, 212, 255, 0.08);
  filter: blur(0.35px);
  transform: translate3d(0, -50%, 0) scale(0.2);
  opacity: 0;
  pointer-events: none;
  animation: toggle-impact-right 640ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.site-mode-toggle__track {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.2rem;
  width: min(100%, 27rem);
  padding: 0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(27, 27, 27, 0.1);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 242, 236, 0.9)),
    radial-gradient(circle at 18% 50%, rgba(126, 212, 255, 0.24), transparent 34%),
    radial-gradient(circle at 82% 50%, rgba(244, 179, 107, 0.24), transparent 36%);
  box-shadow:
    0 18px 38px rgba(26, 25, 23, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -1px 0 rgba(27, 27, 27, 0.03);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.site-mode-toggle__track::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.55) 46%, transparent 64%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.18), transparent 58%);
  opacity: 0.75;
  transform: translateX(16%);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), opacity 240ms ease;
  pointer-events: none;
}

.site-mode-toggle__track::after {
  content: "";
  position: absolute;
  inset: -140% auto -140% -18%;
  width: 40%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08) 18%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0.08) 82%,
    transparent
  );
  transform: rotate(14deg) translateX(160%);
  opacity: 0;
  pointer-events: none;
}

.site-mode-toggle__track:hover {
  opacity: 1;
  transform: translateY(-2px) scale(1.008);
  border-color: rgba(27, 27, 27, 0.18);
  box-shadow: 0 22px 42px rgba(26, 25, 23, 0.14);
}

.site-mode-toggle__track:hover::before,
.site-mode-toggle__track.is-switching::before {
  transform: translateX(-14%);
  opacity: 0.95;
}

.site-mode-toggle__track.is-switching::after {
  opacity: 1;
  animation: toggle-sheen-classic 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.site-mode-toggle__track.is-switching {
  animation: toggle-impact-bloom-mango 640ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.site-mode-toggle__thumb {
  position: absolute;
  top: 0.3rem;
  bottom: 0.3rem;
  right: 0.3rem;
  width: calc((100% - 0.6rem - 2.7rem - 0.48rem) / 2);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 198, 124, 0.5), rgba(126, 212, 255, 0.26)),
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.42), transparent 58%);
  box-shadow:
    0 12px 26px rgba(244, 179, 107, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition:
    transform 420ms cubic-bezier(0.2, 1.2, 0.22, 1),
    background 320ms ease,
    box-shadow 320ms ease;
  transform-origin: center;
}

.site-mode-toggle__track.is-switching .site-mode-toggle__thumb {
  animation: toggle-thumb-mango-to-carob 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  background:
    linear-gradient(135deg, rgba(124, 223, 255, 0.48), rgba(255, 143, 112, 0.28)),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.38), transparent 58%);
}

.site-mode-toggle__icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 1.94rem;
  border-radius: 999px;
  background: rgba(27, 27, 27, 0.05);
  border: 1px solid rgba(27, 27, 27, 0.08);
  font-size: 0.92rem;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), background 240ms ease;
}

.site-mode-toggle__option {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  min-width: 0;
  padding: 0.6rem 0.92rem;
  line-height: 1.1;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
}

.site-mode-toggle__option strong {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-mode-toggle__option small {
  font-size: 0.62rem;
  color: var(--muted);
}

.site-mode-toggle__option--active strong,
.site-mode-toggle__track.is-switching .site-mode-toggle__option--target strong {
  color: var(--ink);
}

.site-mode-toggle__option--target strong,
.site-mode-toggle__track.is-switching .site-mode-toggle__option--active strong {
  color: rgba(27, 27, 27, 0.56);
}

.site-mode-toggle__track:hover .site-mode-toggle__icon {
  transform: translateX(-2px) rotate(-8deg);
}

.site-mode-toggle__track.is-switching .site-mode-toggle__icon {
  transform: translateX(-2px) rotate(12deg) scale(1.06);
}

.site-mode-toggle__track.is-switching .site-mode-toggle__option--active {
  animation: toggle-label-left-classic 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.site-mode-toggle__track.is-switching .site-mode-toggle__option--target {
  animation: toggle-label-right-classic 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes toggle-thumb-mango-to-carob {
  0% {
    transform: translateX(0) scaleX(1) scaleY(1);
  }
  24% {
    transform: translateX(-12%) scaleX(1.12) scaleY(0.96);
  }
  56% {
    transform: translateX(calc(-100% - 0.18rem)) scaleX(1.22) scaleY(0.9);
  }
  78% {
    transform: translateX(calc(-100% - 0.28rem)) scaleX(0.96) scaleY(1.03);
  }
  100% {
    transform: translateX(calc(-100% - 0.24rem)) scaleX(1) scaleY(1);
  }
}

@keyframes toggle-label-left-classic {
  0% {
    transform: translateX(0) scale(0.98);
    opacity: 0.8;
  }
  42% {
    transform: translateX(-0.42rem) scale(1.01);
    opacity: 0.98;
  }
  100% {
    transform: translateX(-0.18rem) scale(1);
    opacity: 1;
  }
}

@keyframes toggle-label-right-classic {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  32% {
    transform: translateX(0.28rem) scale(0.98);
    opacity: 0.88;
  }
  100% {
    transform: translateX(0.18rem) scale(0.98);
    opacity: 0.78;
  }
}

@keyframes toggle-sheen-classic {
  0% {
    transform: rotate(14deg) translateX(160%);
  }
  100% {
    transform: rotate(14deg) translateX(-360%);
  }
}

@keyframes toggle-launch-to-carob {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
  10% {
    transform: translate3d(-1.4vw, 0, 0) scale(0.985);
    opacity: 1;
  }
  74% {
    transform: translate3d(61vw, 0, 0) scale(0.84);
    opacity: 1;
  }
  84% {
    transform: translate3d(66vw, 0, 0) scale(0.8);
    opacity: 1;
  }
  92% {
    transform: translate3d(63vw, 0, 0) scale(0.82);
    opacity: 1;
  }
  100% {
    transform: translate3d(64vw, 0, 0) scale(0.81);
    opacity: 1;
  }
}

@keyframes toggle-trail-mango {
  0% {
    opacity: 0.2;
    transform: translateY(-50%) scaleX(0.18);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) scaleX(2.2);
  }
}

@keyframes toggle-impact-right {
  0%,
  54% {
    opacity: 0;
    transform: translate3d(0, -50%, 0) scale(0.32) scaleX(0.52);
  }
  60% {
    opacity: 1;
    transform: translate3d(0, -50%, 0) scale(1.06) scaleX(1.56);
  }
  68% {
    opacity: 0.86;
    transform: translate3d(0, -50%, 0) scale(0.86) scaleX(1.02);
  }
  100% {
    opacity: 0;
    transform: translate3d(0, -50%, 0) scale(0.4) scaleX(0.66);
  }
}

@keyframes toggle-impact-bloom-mango {
  0%,
  54% {
    box-shadow:
      0 18px 38px rgba(26, 25, 23, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.75),
      inset 0 -1px 0 rgba(27, 27, 27, 0.03);
  }
  60% {
    box-shadow:
      0 14px 30px rgba(26, 25, 23, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.82),
      inset -14px 0 14px rgba(126, 212, 255, 0.1),
      0 0 16px rgba(126, 212, 255, 0.06);
  }
  69% {
    box-shadow:
      0 14px 30px rgba(26, 25, 23, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.82),
      inset -7px 0 8px rgba(126, 212, 255, 0.05),
      0 0 7px rgba(126, 212, 255, 0.025);
  }
  100% {
    box-shadow:
      0 18px 38px rgba(26, 25, 23, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.75),
      inset 0 -1px 0 rgba(27, 27, 27, 0.03);
  }
}

.hero {
  padding: 80px 0 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
}

.hero-title {
  font-family: "Fraunces", serif;
  font-size: clamp(2.6rem, 4vw, 4.2rem);
  line-height: 1.05;
  margin: 0 0 16px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 24px;
}

.hero-portrait {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--stroke);
}

.hero-portrait img {
  width: 100%;
  height: auto;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 30px rgba(27, 27, 27, 0.2);
}

.btn-accent {
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  border-color: transparent;
  color: var(--ink);
}

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

.section {
  padding: 60px 0;
}

.section-title {
  font-family: "Fraunces", serif;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  margin-bottom: 18px;
}

.section-subtitle {
  color: var(--muted);
  margin-bottom: 26px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 40px rgba(27, 27, 27, 0.08);
}

.card h3 {
  margin-top: 0;
  font-family: "Fraunces", serif;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--stroke);
}

.stat strong {
  display: block;
  font-size: 1.4rem;
  font-family: "Fraunces", serif;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}

.pill {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(27, 27, 27, 0.08);
  font-size: 0.85rem;
  margin-right: 8px;
  margin-bottom: 8px;
}

.list {
  margin: 0;
  padding-left: 18px;
}

.highlight {
  background: linear-gradient(120deg, rgba(244, 179, 107, 0.4), rgba(126, 212, 255, 0.35));
  padding: 2px 8px;
  border-radius: 999px;
}

.footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--stroke);
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.small {
  font-size: 0.9rem;
  color: var(--muted);
}

.callout {
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.9), rgba(244, 179, 107, 0.15));
  box-shadow: var(--shadow);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-identity {
    min-width: 0;
    width: 100%;
  }

  .nav-identity .brand {
    margin-left: 0;
  }

  .nav-links {
    justify-content: flex-start;
    padding-top: 0;
  }

  .site-mode-toggle {
    width: 100%;
  }

  .site-mode-toggle__track {
    width: 100%;
    grid-template-columns: 2.5rem minmax(0, 1fr) minmax(0, 1fr);
  }

  .site-mode-toggle__thumb {
    width: calc((100% - 0.68rem - 2.5rem - 0.4rem) / 2);
  }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }

  .btn {
    transition: none;
  }
}
