/* Affiliation Atlas - institutional homepage (Nexus family) */
:root {
  --bg: #070b14;
  --bg-elevated: #0e1524;
  --bg-deep: #05080f;
  --text: #eef2ff;
  --text-muted: #8b9bb8;
  --border: #1c2740;
  --accent: #22d3ee;
  --accent-bright: #67e8f9;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --font-sans: "IBM Plex Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", "IBM Plex Sans", sans-serif;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
}

p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Shell --- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  padding: 1.25rem 1.5rem;
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.brand-lockup img {
  width: 28px;
  height: 28px;
}

.nav-skip {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.nav-skip:hover,
.nav-skip:focus-visible {
  color: var(--accent-bright);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero__visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 15% -5%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 95% 15%, rgba(14, 165, 233, 0.08), transparent 50%),
    var(--bg);
}

.hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 40%;
  opacity: 0.85;
  animation: hero-drift 28s var(--ease) infinite alternate;
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 11, 20, 0.92) 0%, rgba(7, 11, 20, 0.72) 42%, rgba(7, 11, 20, 0.35) 68%, rgba(7, 11, 20, 0.55) 100%),
    linear-gradient(180deg, rgba(7, 11, 20, 0.35) 0%, transparent 28%, rgba(7, 11, 20, 0.75) 78%, var(--bg) 100%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 7.5rem 1.5rem 4.5rem;
}

.brand-hero {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #ffffff 20%, #c7d2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 0.9s var(--ease) both;
}

.hero__headline {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 500;
  max-width: 18ch;
  margin-bottom: 1rem;
  color: var(--text);
  animation: rise 0.9s var(--ease) 0.12s both;
}

.hero__support {
  max-width: 36ch;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  animation: rise 0.9s var(--ease) 0.22s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.9s var(--ease) 0.32s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  padding: 0.7rem 1.25rem;
  border-radius: 0.55rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

.btn--primary {
  background: var(--accent);
  color: #041018;
}

.btn--primary:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  color: var(--accent-bright);
  transform: translateY(-1px);
}

.btn--outline {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  color: var(--accent-bright);
}

.btn--outline:hover {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.18);
  transform: translateY(-1px);
}

/* --- Sections --- */
.section {
  padding: 5.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

.section__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section__label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section__title {
  font-size: clamp(1.85rem, 3.5vw, 2.65rem);
  max-width: 16ch;
  margin-bottom: 1.15rem;
}

.section__lead {
  max-width: 52ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section--what {
  background:
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(34, 211, 238, 0.06), transparent 55%),
    var(--bg);
}

.what-list {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

.what-list li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.what-list__index {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  padding-top: 0.2rem;
}

.what-list h3 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.what-list p {
  color: var(--text-muted);
  max-width: 48ch;
  font-size: 0.98rem;
}

/* --- Audiences --- */
.section--audiences {
  background: var(--bg-deep);
}

.audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 2.75rem;
  border-top: 1px solid var(--border);
}

.audience {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.audience h3 {
  font-size: 1.45rem;
  margin-bottom: 0.65rem;
}

.audience p {
  color: var(--text-muted);
  max-width: 40ch;
  margin-bottom: 1.25rem;
}

@media (min-width: 800px) {
  .audience-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0 3.5rem;
  }

  .audience {
    padding: 2.25rem 0;
  }

  .audience:first-child {
    border-right: 1px solid var(--border);
    padding-right: 2.5rem;
  }

  .audience:last-child {
    padding-left: 0.5rem;
  }

  .what-list li {
    grid-template-columns: 5.5rem 1fr;
  }
}

/* --- Edge --- */
.section--edge {
  background:
    radial-gradient(ellipse 50% 60% at 0% 50%, rgba(34, 211, 238, 0.07), transparent 55%),
    var(--bg);
}

.edge-list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.edge-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  max-width: 54ch;
}

.edge-list__mark {
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.edge-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.edge-list p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* --- Final CTA --- */
.section--portals {
  background: var(--bg-elevated);
  text-align: left;
}

.portals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.contact-line {
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-line a {
  color: var(--accent-bright);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contact-line a:hover {
  color: #fff;
  border-bottom-color: var(--accent);
}

/* --- Footer --- */
.site-footer {
  padding: 2rem 1.5rem 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer a:hover {
  color: var(--accent-bright);
}

/* --- Motion --- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-drift {
  from {
    transform: scale(1.02) translate(0, 0);
  }
  to {
    transform: scale(1.08) translate(-1.5%, 1%);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

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

  .hero__visual img,
  .brand-hero,
  .hero__headline,
  .hero__support,
  .cta-row,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --- Steps / How it works --- */
.steps {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
  padding-top: 0.2rem;
}

.steps h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.steps p {
  color: var(--text-muted);
  max-width: 48ch;
  font-size: 0.98rem;
}

/* --- Proof --- */
.proof-note {
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  max-width: 52ch;
}

.proof-note strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

/* --- FAQ --- */
.faq {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}

.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 500;
}

.faq details[open] summary::after {
  content: "-";
}

.faq p {
  margin-top: 0.75rem;
  color: var(--text-muted);
  max-width: 54ch;
  font-size: 0.98rem;
}

/* --- Contact form --- */
.contact-layout {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.75rem;
  max-width: 44rem;
}

.contact-aside {
  padding-top: 0.15rem;
}

.contact-aside p {
  color: var(--text-muted);
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
  max-width: none;
}

.contact-aside a {
  color: var(--accent-bright);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.form {
  position: relative;
  display: grid;
  gap: 1.15rem;
  padding: 1.5rem 1.35rem 1.6rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(34, 211, 238, 0.06), transparent 40%),
    #0b1220;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

@media (min-width: 640px) {
  .form {
    padding: 1.85rem 1.85rem 1.9rem;
    gap: 1.25rem;
  }
}

.form__field {
  min-width: 0;
}

.form label,
.form__field > label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.form input[type="text"],
.form input[type="email"],
.form select,
.form textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid #243044;
  background-color: #070b14;
  background-image: none;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form select {
  padding-right: 2.5rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position:
    calc(100% - 1.15rem) calc(50% - 0.12rem),
    calc(100% - 0.75rem) calc(50% - 0.12rem);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.form select option {
  background: #0b1220;
  color: var(--text);
}

.form textarea {
  min-height: 9rem;
  resize: vertical;
  line-height: 1.55;
}

.form input::placeholder,
.form textarea::placeholder {
  color: #5d6d88;
  opacity: 1;
}

.form input:hover,
.form select:hover,
.form textarea:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, #243044);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background-color: #0a101c;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.form input:-webkit-autofill,
.form input:-webkit-autofill:hover,
.form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #070b14 inset;
  box-shadow: 0 0 0 1000px #070b14 inset;
  transition: background-color 9999s ease-in-out 0s;
  caret-color: var(--text);
}

.form__row {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 640px) {
  .form__row {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

.form__consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0.15rem 0 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid #1c2740;
  background: rgba(7, 11, 20, 0.55);
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

.form__consent input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  margin: 0.15rem 0 0;
  padding: 0;
  border-radius: 0.3rem;
  border: 1px solid #243044;
  background: #070b14;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.form__consent input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.form__consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 0.34rem;
  top: 0.12rem;
  width: 0.28rem;
  height: 0.55rem;
  border: solid #041018;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form__consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form__consent a {
  color: var(--accent-bright);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  margin-top: 0.25rem;
}

.form__actions .btn {
  min-width: 10rem;
  min-height: 3rem;
  padding: 0.8rem 1.4rem;
}

/* Honeypot - must never appear in layout */
.hp-field {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space:nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form__status {
  min-height: 1.25rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--accent-bright);
}

.form__status.is-error {
  color: #fca5a5;
}

.form__status.is-ok {
  color: #86efac;
}

/* --- Sticky CTA --- */
.sticky-cta {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #041018;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.25s ease;
}

.sticky-cta:hover {
  background: var(--accent-bright);
  transform: translateY(-2px);
}

.sticky-cta.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

/* --- Legal / interior --- */
.page-hero {
  padding: 7rem 1.5rem 3rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 50% at 90% 0%, rgba(34, 211, 238, 0.08), transparent 55%),
    var(--bg);
}

.page-hero__inner,
.prose {
  max-width: var(--max);
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 48ch;
}

.prose {
  padding: 3rem 1.5rem 5rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}

.prose p,
.prose li {
  color: var(--text-muted);
  max-width: 68ch;
}

.prose ul {
  padding-left: 1.2rem;
}

.prose a {
  color: var(--accent-bright);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.site-header--solid {
  position: absolute;
}

.thank {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 7rem 1.5rem 4rem;
}

.thank__inner {
  max-width: 40rem;
  margin: 0 auto;
}

.thank h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}

.thank p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* --- Cookie banner (GDPR) --- */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 80;
  padding: 1rem;
  pointer-events: none;
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner__panel {
  pointer-events: auto;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.15rem 1.25rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .cookie-banner__panel {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 1.25rem;
    padding: 1.35rem 1.5rem;
  }
}

.cookie-banner__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.cookie-banner__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.cookie-banner__text a {
  color: var(--accent-bright);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.cookie-banner__toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.85rem;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}

.cookie-banner__toggle input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-start;
}

@media (min-width: 720px) {
  .cookie-banner__actions {
    justify-content: flex-end;
    flex-direction: column;
    min-width: 11.5rem;
  }

  .cookie-banner__actions .btn {
    width: 100%;
  }
}

body.has-cookie-banner .sticky-cta {
  bottom: 7.5rem;
}

@media (min-width: 720px) {
  body.has-cookie-banner .sticky-cta {
    bottom: 1rem;
  }
}
