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

html {
  scroll-behavior: smooth;
  font-size: 112.5%;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  font-size: 1.0625rem;
  line-height: 1.78;
  letter-spacing: 0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(106, 48, 210, 0.35);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--ease), color var(--ease);
}
a:hover { text-decoration-color: var(--socio); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 6.5vw, 5rem); font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.5vw, 3.15rem); text-wrap: balance; }
h3 { font-size: clamp(1.28rem, 2.5vw, 1.68rem); }

p {
  max-width: 54ch;
  line-height: 1.78;
}

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

[id] { scroll-margin-top: calc(var(--nav-height) + 32px); }

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

/* ── Page Header ── */
.page-header {
  background: linear-gradient(160deg, var(--deep) 0%, var(--deep-mid) 55%, #352060 100%);
  color: #f5f3ff;
  padding: 72px 48px 80px;
}
.page-header h1 {
  color: #fff;
  margin-bottom: 20px;
}
.page-header p {
  color: rgba(245, 243, 255, 0.72);
  font-size: 1.2rem;
  line-height: 1.75;
  max-width: 48ch;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px;
}

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b7fb8;
  margin-bottom: 12px;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 16px 36px;
  border: 2px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease), box-shadow var(--ease), transform var(--ease);
  text-decoration: none;
  box-shadow: var(--shadow-card);
}
.btn:hover {
  border-color: var(--socio);
  color: var(--socio);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card-hover);
}
.btn-primary {
  border: none;
  color: #fff;
  background: var(--gradient-cta);
  background-size: 200% 100%;
  background-position: 0% 50%;
  box-shadow: 0 4px 20px rgba(106, 48, 210, 0.25);
}
.btn-primary:hover {
  background-position: 100% 50%;
  color: #fff;
  border: none;
  box-shadow: 0 8px 28px rgba(106, 48, 210, 0.32);
}

/* ── Footer ── */
.site-footer {
  background: linear-gradient(180deg, var(--deep-mid) 0%, var(--deep) 100%);
  color: rgba(245, 243, 255, 0.55);
  padding: 64px 48px;
  margin-top: 80px;
  font-size: 0.9375rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 48px;
}
.footer-brand {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  position: relative;
  isolation: isolate;
  padding: 4px 2px 6px;
}
.footer-brand::before {
  content: '';
  position: absolute;
  left: -6px;
  right: -8px;
  top: -2px;
  bottom: -2px;
  z-index: 0;
  pointer-events: none;
  border-radius: 10px;
  opacity: 0.55;
  background:
    radial-gradient(1px 1px at 10% 40%, rgba(255, 255, 255, 0.9) 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 88% 30%, rgba(186, 230, 253, 0.85) 50%, transparent 52%),
    radial-gradient(1px 1px at 70% 75%, rgba(255, 255, 255, 0.7) 50%, transparent 52%),
    radial-gradient(1px 1px at 42% 65%, rgba(199, 210, 254, 0.65) 50%, transparent 52%),
    radial-gradient(1px 1px at 55% 20%, rgba(165, 243, 252, 0.55) 50%, transparent 52%);
  animation: logo-space-twinkle 7s ease-in-out infinite;
}
.footer-brand .logo-az,
.footer-brand .logo-tronomic,
.footer-brand .logo-life {
  position: relative;
  z-index: 1;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: logo-gradient-drift 10s ease-in-out infinite;
}
.footer-brand .logo-az {
  background-image: var(--gradient-logo-space-az-footer);
  font-weight: 800;
}
.footer-brand .logo-tronomic {
  background-image: var(--gradient-logo-space-tronomic-footer);
  font-weight: 600;
  letter-spacing: 0.018em;
  animation-delay: -3s;
}
.footer-brand .logo-life {
  background-image: var(--gradient-logo-space-tronomic-footer);
  font-weight: 600;
  letter-spacing: 0.04em;
  animation-delay: -5s;
}
.footer-tagline {
  color: rgba(245, 243, 255, 0.55);
  line-height: 1.6;
  max-width: 40ch;
}
.footer-links {
  list-style: none;
  display: flex;
  gap: 24px;
}
.footer-links a {
  color: rgba(245, 243, 255, 0.55);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color var(--ease);
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(245, 243, 255, 0.35);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .page-header { padding: 56px 20px 56px; }
  .site-footer { padding: 48px 20px; }
  .footer-inner {
    flex-direction: column;
    gap: 24px;
  }
  .footer-links { flex-wrap: wrap; gap: 16px; }
}
