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

:root {
  --ink: #080f1c;
  --navy-deep: #0b1528;
  --navy: #13233f;
  --navy-mid: #1c3358;
  --navy-glow: #2d5088;
  --moon: #b8c9e4;
  --silver: #d2dae8;
  --silver-bright: #eef2fa;
  --star-glow: rgba(210, 222, 240, 0.85);
  --parchment: #f0ebe2;
  --parchment-light: #f8f4ed;
  --parchment-shadow: #ddd4c6;
  --text: #121820;
  --text-muted: #2f3848;
  --text-soft: #4b5568;
  --text-on-dark: #eef2f8;
  --text-on-dark-muted: #d4ddea;
  --accent: #1e3a66;
  --font-title: "Bodoni Moda", Georgia, serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Lora", Georgia, serif;
  --container: 780px;
  --header-nav-max: 940px;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-on-dark-muted);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(45, 80, 136, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 80%, rgba(30, 51, 88, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 40% at 100% 60%, rgba(30, 51, 88, 0.1), transparent 50%),
    linear-gradient(180deg, var(--ink) 0%, var(--navy-deep) 35%, var(--navy) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:focus-visible {
  outline: 2px solid var(--navy-glow);
  outline-offset: 3px;
}

a {
  color: inherit;
}

/* Starfield */

.page-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star,
.sparkle {
  position: absolute;
  transform-origin: center center;
  will-change: opacity, transform;
}

.star {
  background: linear-gradient(180deg, var(--silver-bright) 0%, var(--moon) 55%, rgba(184, 201, 228, 0.4) 100%);
  filter: drop-shadow(0 0 8px rgba(238, 242, 250, 0.5));
}

.star--4 {
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
}

.star--8 {
  clip-path: polygon(
    50% 0%, 58% 30%, 78% 18%, 68% 42%, 100% 50%,
    68% 58%, 78% 82%, 58% 70%, 50% 100%, 42% 70%,
    22% 82%, 32% 58%, 0% 50%, 32% 42%, 22% 18%, 42% 30%
  );
}

.sparkle {
  border-radius: 50%;
  background: radial-gradient(circle, var(--silver-bright) 0%, transparent 72%);
  box-shadow: 0 0 8px 1px rgba(238, 242, 250, 0.35);
}

.sparkle--flare {
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, var(--silver-bright), transparent);
  box-shadow: 0 0 10px rgba(238, 242, 250, 0.3);
}

.twinkle {
  animation: twinkle 4s ease-in-out infinite;
}

.float {
  animation: starFloat 9s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { filter: brightness(0.7); }
  45% { filter: brightness(1.4); }
}

@keyframes starFloat {
  0%, 100% {
    transform: rotate(var(--star-rotate)) scale(var(--star-scale)) translateY(0);
  }
  50% {
    transform: rotate(var(--star-rotate)) scale(var(--star-scale)) translateY(-4px);
  }
}

/* Header */

.site-header {
  position: relative;
  z-index: 100;
  color: #fff;
  padding: 1.6rem 1.25rem 1.35rem;
  background: rgba(8, 15, 28, 0.55);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 -1px 0 rgba(210, 218, 232, 0.18);
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 90% at 50% -30%, rgba(184, 201, 228, 0.14), transparent 60%),
    radial-gradient(circle at 8% 90%, rgba(210, 218, 232, 0.07), transparent 35%),
    radial-gradient(circle at 92% 80%, rgba(210, 218, 232, 0.06), transparent 32%);
  pointer-events: none;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(210, 218, 232, 0.25) 15%,
    rgba(238, 242, 250, 0.55) 50%,
    rgba(210, 218, 232, 0.25) 85%,
    transparent
  );
}

.header-inner {
  position: relative;
  z-index: 1;
  max-width: var(--header-nav-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
}

.title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.35rem);
}

.title-star {
  flex-shrink: 0;
  width: 10px;
  height: 30px;
  background: linear-gradient(180deg, var(--silver-bright), var(--moon));
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  filter: drop-shadow(0 0 10px rgba(238, 242, 250, 0.55));
  opacity: 0.85;
  animation: twinkle 5s ease-in-out infinite;
}

.title-star--right {
  animation-delay: 1.8s;
}

.site-title {
  font-family: var(--font-title);
  font-size: clamp(2.15rem, 5.5vw, 3rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-decoration: none;
  color: #fff;
  text-shadow: 0 1px 2px rgba(8, 15, 28, 0.35);
}

.site-title:hover {
  color: var(--silver-bright);
}

.site-tagline {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.site-nav a {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.58rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  position: relative;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.site-nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  translate: -120% 0;
  transition: translate 0.55s ease;
}

.site-nav a:hover::before {
  translate: 120% 0;
}

.site-nav a:hover,
.site-nav a.active {
  background: linear-gradient(135deg, var(--navy-glow), #4a7cc4);
  border-color: rgba(255, 255, 255, 0.38);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(12, 28, 58, 0.5);
}

.site-nav a.active {
  font-weight: 600;
}

.nav-toggle {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Main */

main {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: clamp(2.75rem, 7vw, 4.5rem) 1.25rem;
}

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

/* Ornamental cards */

.section-card {
  position: relative;
  color: var(--text);
  background: var(--parchment-light);
  border: 1px solid #d4cbbf;
  border-radius: 6px;
  padding: clamp(2rem, 5vw, 2.85rem);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.section-card::before,
.section-card::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 48px;
  background: linear-gradient(180deg, var(--silver-bright), var(--moon));
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  opacity: 0.55;
  filter: drop-shadow(0 0 6px rgba(210, 218, 232, 0.4));
}

.section-card::before {
  top: -10px;
  left: 1.5rem;
}

.section-card::after {
  bottom: -10px;
  right: 1.5rem;
  transform: rotate(180deg);
}

.section-card + .section-card,
.star-divider + .section-card {
  margin-top: 2.75rem;
}

.section-card--featured {
  border-color: #cfc6b8;
  background: #fffdf9;
}

.section-card--newsletter {
  background: #f5f0e8;
  border-color: #d8cfc2;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.kicker::before,
.kicker::after {
  content: "";
  width: 5px;
  height: 16px;
  background: linear-gradient(180deg, var(--moon), var(--accent));
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  opacity: 0.7;
}

.section-card h1,
.section-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--navy-deep);
  max-width: 22ch;
}

.section-card h1 {
  font-size: clamp(2.1rem, 4.5vw, 2.65rem);
  margin-bottom: 1.1rem;
}

.section-card h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.1rem);
  margin-bottom: 1rem;
  max-width: none;
}

.section-card p {
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  max-width: 42rem;
  text-wrap: pretty;
}

.section-card p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.75;
  max-width: 40rem;
}

.star-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2.75rem 0 0;
}

.star-divider::before,
.star-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(210, 218, 232, 0.35), transparent);
}

.star-divider span {
  width: 8px;
  height: 26px;
  background: linear-gradient(180deg, var(--silver-bright), var(--moon));
  clip-path: polygon(
    50% 0%, 58% 30%, 78% 18%, 68% 42%, 100% 50%,
    68% 58%, 78% 82%, 58% 70%, 50% 100%, 42% 70%,
    22% 82%, 32% 58%, 0% 50%, 32% 42%, 22% 18%, 42% 30%
  );
  filter: drop-shadow(0 0 8px rgba(184, 201, 228, 0.45));
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.72rem 1.5rem;
  margin-top: 0.65rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.25s ease, background 0.25s ease;
}

.btn::after {
  content: "✦";
  font-size: 0.65rem;
  opacity: 0.75;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-glow) 100%);
  box-shadow: 0 8px 22px rgba(19, 35, 63, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 12px 28px rgba(19, 35, 63, 0.38);
}

.btn-secondary {
  color: var(--text);
  background: #fff;
  border: 1px solid #b8b0a4;
  box-shadow: none;
}

.btn-secondary:hover {
  border-color: #8f8678;
  box-shadow: 0 6px 16px rgba(19, 35, 63, 0.1);
}

.btn-secondary::after {
  content: none;
}

/* Signup */

.signup-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.35rem;
}

.signup-form label {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.signup-form input {
  width: 100%;
  min-height: 50px;
  padding: 0.8rem 1rem;
  border: 1px solid #b8b0a4;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.signup-form input:focus {
  outline: none;
  border-color: var(--navy-glow);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(45, 80, 136, 0.14);
}

.signup-form input::placeholder {
  color: #6b7280;
  font-style: normal;
}

.signup-form .btn {
  margin-top: 0.4rem;
  width: fit-content;
}

.signup-note {
  margin-top: 1.1rem;
  font-size: 1rem;
  color: var(--text-soft);
  max-width: 42rem;
}

.signup-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.signup-note a:hover {
  color: var(--navy-deep);
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile-wrap {
  margin-top: 0.25rem;
}

.form-message {
  font-size: 0.98rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.form-message--error {
  color: #9b1c1c;
}

.form-message--success {
  color: #1f5a3a;
}

.signup-privacy {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-soft);
  max-width: 42rem;
}

.signup-form button:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.about-body p + p {
  margin-top: 1rem;
}

/* Footer */

.site-footer {
  position: relative;
  z-index: 1;
  padding: 2rem 1.25rem;
  text-align: center;
  background: transparent;
  border-top: 1px solid rgba(210, 218, 232, 0.2);
}

.site-footer p {
  font-size: 0.95rem;
  color: var(--text-on-dark-muted);
}

.site-footer::before {
  content: "✦";
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.55rem;
  color: var(--moon);
  letter-spacing: 0.5em;
}

/* Responsive */

@media (max-width: 640px) {
  .site-header {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
  }

  .header-inner {
    align-items: stretch;
    padding-right: 3rem;
  }

  .title-star {
    width: 7px;
    height: 22px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
  }

  .site-nav.is-open {
    display: block;
    background: var(--navy-deep);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0.75rem;
    margin-top: 0.5rem;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    text-align: center;
  }

  .signup-form .btn {
    width: 100%;
  }

  .section-card::before,
  .section-card::after {
    width: 12px;
    height: 32px;
  }
}

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

  .twinkle,
  .float,
  .title-star {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
