:root {
  --ion-bg-dark: #020617;
  --ion-bg-soft: #0f172a;
  --ion-surface: #111827;
  --ion-surface-light: #1e293b;

  --ion-primary: #2563eb;
  --ion-primary-light: #38bdf8;
  --ion-accent: #14b8a6;

  --ion-text-main: #f8fafc;
  --ion-text-muted: #94a3b8;
  --ion-text-soft: #cbd5e1;

  --ion-border: rgba(148, 163, 184, 0.22);
  --ion-card-bg: rgba(15, 23, 42, 0.88);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --shadow-glow: 0 0 80px rgba(37, 99, 235, 0.18);
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.35);
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ion-text-soft);
  background-color: var(--ion-bg-dark);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--ion-primary-light);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

a:hover {
  color: var(--ion-text-main);
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(37, 99, 235, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 20%, rgba(20, 184, 166, 0.1), transparent),
    radial-gradient(ellipse 40% 30% at 0% 80%, rgba(37, 99, 235, 0.08), transparent),
    linear-gradient(180deg, var(--ion-bg-dark) 0%, var(--ion-bg-soft) 100%);
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, black 0%, transparent 75%);
}

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

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

    .control-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn--primary {
  color: var(--ion-text-main);
  background: linear-gradient(135deg, var(--ion-primary) 0%, #1d4ed8 100%);
  box-shadow: 0 4px 28px rgba(37, 99, 235, 0.4);
}

.btn--primary:hover {
  color: var(--ion-text-main);
  box-shadow: 0 8px 36px rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--ion-text-main);
  background: rgba(30, 41, 59, 0.5);
  border-color: var(--ion-border);
}

.btn--ghost:hover {
  color: var(--ion-text-main);
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(37, 99, 235, 0.12);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.9rem 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.84));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.16);
}

.site-header.is-scrolled {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.9));
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.26);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.site-header__right {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.85rem;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--ion-text-main);
  letter-spacing: 0.06em;
}

.site-header__brand:hover {
  color: var(--ion-primary-light);
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--ion-text-main);
  background: linear-gradient(135deg, var(--ion-primary), var(--ion-accent));
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

.site-header__logo-img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 3px;
}

.site-header__nav-shell {
  padding: 0.45rem;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 34px rgba(0, 0, 0, 0.16);
}

.brand-name {
  white-space: nowrap;
}

.brand-name .reg {
  margin-left: 0.05em;
  font-size: 0.45em;
  font-weight: 600;
  line-height: 0;
  vertical-align: super;
  color: var(--ion-text-muted);
}

.brand-name--ion .reg {
  font-size: 0.5em;
}

.hero__title .brand-name .reg {
  color: rgba(248, 250, 252, 0.65);
}

.site-footer__brand .reg,
.login-card__title .reg {
  font-size: 0.42em;
}

.login-card__logo {
  display: block;
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 1.5rem;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #fff;
  padding: 0.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.site-nav {
  display: none;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1rem;
  color: var(--ion-text-muted);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: var(--ion-text-main);
  background: rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.site-nav a.is-active {
  color: var(--ion-text-main);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.32), rgba(20, 184, 166, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-nav__demo {
  margin-left: 0.25rem;
  color: var(--ion-text-main) !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(20, 184, 166, 0.8));
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.28);
}

.site-nav__demo:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 1), rgba(20, 184, 166, 0.92));
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header__logout {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ion-text-muted);
  white-space: nowrap;
}

.site-header__logout:hover {
  color: var(--ion-accent);
}

.site-footer__logout-link {
  font-size: 0.75rem;
  color: var(--ion-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__logout-link:hover {
  color: var(--ion-primary-light);
}

.site-header__mobile-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ion-text-main);
  gap: 4px;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hamburger__line {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.site-header__mobile-toggle.is-open .hamburger__line:nth-child(1) {
  transform: rotate(45deg) translateY(11px);
}

.site-header__mobile-toggle.is-open .hamburger__line:nth-child(2) {
  opacity: 0;
}

.site-header__mobile-toggle.is-open .hamburger__line:nth-child(3) {
  transform: rotate(-45deg) translateY(-11px);
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }

  .site-header__actions {
    min-width: 8rem;
    justify-content: flex-end;
  }

  .site-header__mobile-toggle {
    display: none !important;
  }
}

@media (max-width: 899px) {
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
  }

  .site-header__brand {
    flex-shrink: 0;
  }

  .site-header__mobile-toggle {
    display: flex;
    order: 3;
    justify-self: end;
  }

  .site-header__right {
    position: fixed;
    top: calc(var(--header-h) + 0.9rem);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.96) 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    backdrop-filter: blur(12px);
    max-height: calc(100vh - var(--header-h) - 0.9rem);
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 99;
  }

  .site-header__right.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-header__nav-shell {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    width: 100%;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    padding-bottom: 1rem;
  }

  .site-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .site-nav a {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 0;
    font-size: 0.9375rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

  .site-nav__demo {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(20, 184, 166, 0.8));
    margin-left: 0;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
    border-radius: 6px;
    margin-bottom: 0.5rem;
  }

  .site-header__actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .site-header__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Hero */

.page-landing .landing {
  position: relative;
  z-index: 1;
  display: block;
}

.hero {
  padding: clamp(2rem, 5vw, 3rem) 0 0;
  scroll-margin-top: var(--header-h);
}

.section {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding-bottom: 2.5rem;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
  }
}

.hero__content {
  text-align: left;
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ion-text-main);
}

.hero__title .brand-name {
  color: var(--ion-text-main);
  background: linear-gradient(135deg, var(--ion-text-main) 0%, var(--ion-primary-light) 55%, var(--ion-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__title .brand-name {
    color: transparent;
  }

  .hero__title .brand-name .reg {
    color: rgba(248, 250, 252, 0.7);
    -webkit-text-fill-color: rgba(248, 250, 252, 0.7);
  }
}

.hero__tagline {
  margin: 0 0 1rem;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--ion-text-main);
}

.hero__subtitle {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  font-size: 1.0625rem;
  color: var(--ion-text-muted);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.hero__quote {
  margin: 0;
  padding: 1.25rem 1.35rem;
  max-width: 34rem;
  border-left: 3px solid var(--ion-accent);
  background: var(--ion-card-bg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-card);
}

.hero__quote p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ion-text-main);
  line-height: 1.55;
}

/* Hero screenshot image */

.hero__visual {
  display: none;
}

@media (min-width: 960px) {
  .hero__visual {
    display: block;
  }
}

.hero__screenshot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--ion-border);
  box-shadow: var(--shadow-card), var(--shadow-glow), 0 0 0 1px rgba(56,189,248,0.08);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* Metrics strip */

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  background: var(--ion-border);
  border: 1px solid var(--ion-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 768px) {
  .metrics {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metrics__item {
  padding: 1.35rem 1rem;
  text-align: center;
  background: var(--ion-card-bg);
}

.metrics__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ion-text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.metrics__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ion-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metrics__item--status .metrics__value {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
}

.pulse {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ion-accent);
  box-shadow: 0 0 12px var(--ion-accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* Manifesto */

.manifesto {
  padding: 0 0 clamp(3rem, 6vw, 5rem);
}

.manifesto__card {
  padding: clamp(2rem, 4vw, 3rem);
  text-align: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14) 0%, var(--ion-card-bg) 45%, rgba(20, 184, 166, 0.1) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glow);
}

.manifesto__text {
  margin: 0 auto;
  max-width: 44rem;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--ion-text-main);
}

/* Sections */

.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--ion-border);
}

.section--alt {
  background: rgba(15, 23, 42, 0.55);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.75rem;
}

.section__eyebrow {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ion-primary-light);
}

.section__title {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ion-text-main);
  letter-spacing: -0.03em;
}

.section__lead {
  margin: 0;
  max-width: 40rem;
  font-size: 1.0625rem;
  color: var(--ion-text-muted);
  line-height: 1.75;
}

.section__lead--narrow {
  margin-bottom: 2rem;
}

/* Split layouts */

.section-split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.operation-split {
  align-items: stretch;
}

.operation-media {
  display: flex;
  align-items: stretch;
}

.operation-media__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 18rem;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(56, 189, 248, 0.18);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(56, 189, 248, 0.05);
}

.operation-card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.operation-card .section__eyebrow {
  margin-bottom: 0.75rem;
}

.operation-card .section__title {
  margin-bottom: 1rem;
}

.operation-card .pitch-quote {
  margin-bottom: 1.25rem;
  max-width: none;
}

.operation-card__lead {
  max-width: none;
  margin-bottom: 0;
}

.economy-split {
  align-items: stretch;
}

.economy-card {
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
}

.economy-card .section__eyebrow {
  margin-bottom: 0.9rem;
}

.economy-card .section__title {
  margin-bottom: 1rem;
  max-width: 32rem;
}

.economy-card__lead {
  max-width: 36rem;
}

.economy-card__lead--secondary {
  margin-top: 0.9rem;
  color: var(--ion-text-soft);
}

.economy-highlight {
  margin-top: 1.2rem;
}

.economy-media {
  position: relative;
  min-height: 34rem;
}

.economy-media__image {
  display: block;
  position: absolute;
  width: min(100%, 31rem);
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(56, 189, 248, 0.18);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(56, 189, 248, 0.05);
}

.economy-media__image--primary {
  top: 0;
  right: 0;
  z-index: 2;
}

.economy-media__image--secondary {
  left: 0;
  bottom: 0;
  width: min(86%, 23rem);
  z-index: 1;
  transform: translateY(10%);
}

.patient-split {
  align-items: stretch;
}

.patient-media {
  display: flex;
  align-items: stretch;
}

.patient-media__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 32rem;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(56, 189, 248, 0.18);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(56, 189, 248, 0.05);
}

.patient-card {
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
}

.patient-card .section__eyebrow {
  margin-bottom: 0.9rem;
}

.patient-card .section__title {
  margin-bottom: 1rem;
  max-width: 34rem;
}

.patient-card__lead {
  max-width: 38rem;
}

.patient-card__lead--secondary {
  margin-top: 0.9rem;
}

.pill-list--patient {
  margin-top: 1.2rem;
}

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

  .section-split--reverse .section-split__content {
    order: 2;
  }

  .section-split--reverse .feature-box,
  .section-split--reverse .pill-list {
    order: 1;
  }

  .operation-split {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .economy-split {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
  }

  .patient-split {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 3rem;
  }
}

@media (max-width: 799px) {
  .economy-media {
    min-height: 0;
    display: grid;
    gap: 1rem;
  }

  .economy-media__image {
    position: static;
    width: 100%;
    transform: none;
  }

  .patient-media {
    min-height: 0;
  }

  .patient-media__image {
    min-height: 0;
  }
}

/* Pills */

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ion-text-soft);
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--ion-border);
  border-radius: 999px;
}

.pill-list--security .pill {
  border-color: rgba(20, 184, 166, 0.3);
}

/* Feature box */

.feature-box {
  padding: 1.75rem;
  background: var(--ion-card-bg);
  border: 1px solid var(--ion-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.feature-box--accent {
  border-color: rgba(20, 184, 166, 0.35);
  background: linear-gradient(160deg, rgba(20, 184, 166, 0.1), var(--ion-card-bg));
}

.feature-box--compact {
  padding: 1.15rem 1.2rem;
}

.operation-card__mini {
  margin-top: 1rem;
}

.feature-box__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ion-text-main);
}

.feature-box__text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ion-text-muted);
  line-height: 1.65;
}

.section--control {
  padding-top: clamp(4rem, 7vw, 6rem);
}

.control-section {
  display: grid;
  gap: 2rem;
}

.control-section__intro {
  max-width: 48rem;
}

.control-section .section__title {
  max-width: 36rem;
}

.control-section__lead {
  max-width: 44rem;
}

.control-section__lead--secondary {
  margin-top: 0.9rem;
}

.pill-list--control {
  margin-top: 1.2rem;
}

.control-grid {
  gap: 1rem;
}

.control-card {
  min-height: 100%;
}

.control-card--accent {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.12), var(--ion-card-bg));
  border-color: rgba(56, 189, 248, 0.3);
}

/* Experience */

.section--experience {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-top: none;
}

.experience__card {
  position: relative;
  margin-inline: auto;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.75rem, 4vw, 4rem);
  max-width: 58rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), var(--ion-card-bg));
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.experience__card--text-only {
  overflow: hidden;
}

.experience__card--text-only::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ion-primary-light), var(--ion-accent), transparent);
  opacity: 0.9;
}

.experience__title {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--ion-text-main);
  line-height: 1.2;
}

.experience__text {
  margin: 0 auto;
  max-width: 40rem;
  font-size: clamp(1.02rem, 2vw, 1.16rem);
  color: var(--ion-text-soft);
  line-height: 1.75;
}

.experience__text + .experience__text {
  margin-top: 1rem;
}

.experience__text--strong {
  color: var(--ion-text-main);
  font-weight: 600;
}

/* Cards grid */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 540px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
  }
}

@media (min-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  padding: 1.5rem;
  background: var(--ion-card-bg);
  border: 1px solid var(--ion-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
  transform: translateY(-3px);
}

.card--highlight {
  border-color: rgba(20, 184, 166, 0.4);
  background: linear-gradient(160deg, rgba(20, 184, 166, 0.08), var(--ion-card-bg));
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--ion-primary-light);
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
}

.card__icon--accent {
  color: var(--ion-accent);
  background: rgba(20, 184, 166, 0.15);
  border-color: rgba(20, 184, 166, 0.35);
}

.card__status {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ion-accent);
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 4px;
}

.section--pitch {
  text-align: center;
}

.pitch-quote {
  margin: 0 auto 1.5rem;
  padding: 1.75rem 2rem;
  max-width: 44rem;
  border: 1px solid var(--ion-border);
  border-radius: var(--radius-lg);
  background: var(--ion-card-bg);
  box-shadow: var(--shadow-card);
}

.pitch-quote p {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.65;
  color: var(--ion-text-main);
}

.section__lead--center {
  margin-inline: auto;
  text-align: center;
}

.card__title {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ion-text-main);
}

.card__desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ion-text-muted);
}

/* Principles (IA) */

.principle-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .principle-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.principle {
  padding: 1.5rem;
  background: var(--ion-card-bg);
  border: 1px solid var(--ion-border);
  border-radius: var(--radius-lg);
}

.principle__num {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ion-primary-light);
  letter-spacing: 0.08em;
}

.principle p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ion-text-soft);
  line-height: 1.6;
}

/* Migrations */

.migrations__card {
  padding: clamp(2rem, 4vw, 3rem);
  background: var(--ion-card-bg);
  border: 1px solid var(--ion-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.migrations__card .section__title {
  max-width: 32rem;
}

/* CTA */

.section--cta {
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.cta-card {
  padding: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.12), var(--ion-card-bg));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glow);
}

.cta-card .section__eyebrow,
.cta-card .section__title,
.cta-card .section__lead {
  margin-inline: auto;
}

.cta-card .section__lead {
  margin-bottom: 2rem;
}

/* Footer */

.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--ion-border);
  background: rgba(2, 6, 23, 0.9);
}

.site-footer__grid {
  display: grid;
  gap: 1.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 1fr auto;
    text-align: left;
    align-items: start;
  }
}

.site-footer__legal-block {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ion-border);
}

.site-footer__brand {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ion-text-main);
  letter-spacing: 0.06em;
}

.site-footer__tagline {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ion-text-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  .site-footer__links {
    justify-content: flex-end;
  }
}

.site-footer__links a {
  color: var(--ion-text-muted);
}

.site-footer__legal {
  margin: 0;
  font-size: 0.75rem;
  color: var(--ion-text-muted);
  opacity: 0.85;
}

/* Login */

.page-login .page-bg::after {
  opacity: 0.5;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: min(100%, 28rem);
  padding: 2.5rem;
  background: var(--ion-card-bg);
  border: 1px solid var(--ion-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.login-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--ion-text-main);
  letter-spacing: 0.06em;
}

.login-card__subtitle {
  margin: 0 0 1.75rem;
  color: var(--ion-text-muted);
  font-size: 0.875rem;
}

.login-card__error {
  margin: 0 0 1rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  color: #fecaca;
  background: rgba(185, 28, 28, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius-sm);
}

.login-form__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ion-text-soft);
}

.login-form__input {
  width: 100%;
  margin-bottom: 1.25rem;
  padding: 0.8rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ion-text-main);
  background: var(--ion-surface);
  border: 1px solid var(--ion-border);
  border-radius: var(--radius-sm);
}

.login-form__input:focus {
  outline: none;
  border-color: var(--ion-primary-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.login-form__submit {
  width: 100%;
}

/* Error page */

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.error-page__inner {
  text-align: center;
}

.error-page__inner h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 800;
  color: var(--ion-text-main);
}

.error-page__inner p {
  color: var(--ion-text-muted);
}

.error-page__legal {
  margin-top: 2rem;
}

/* Legal links */

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 500;
}

.legal-links a {
  color: var(--ion-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(148, 163, 184, 0.4);
}

.legal-links a:hover {
  color: var(--ion-primary-light);
  text-decoration-color: var(--ion-primary-light);
}

.login-card__legal {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ion-border);
}

.login-card__legal .legal-links {
  font-size: 0.75rem;
}

/* Cookie banner */

body.has-cookie-banner {
  padding-bottom: 7rem;
}

.cookie-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  padding: 1rem 0;
  background: rgba(2, 6, 23, 0.96);
  border-top: 1px solid var(--ion-border);
  backdrop-filter: blur(16px);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4);
}

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

.cookie-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .cookie-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }
}

.cookie-banner__title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ion-text-main);
}

.cookie-banner__text {
  margin: 0;
  max-width: 42rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ion-text-muted);
}

.cookie-banner__text a {
  color: var(--ion-primary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

/* Volver arriba */

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 5.5rem;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ion-text-main);
  background: var(--ion-primary);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.back-to-top:hover {
  color: var(--ion-text-main);
  transform: translateY(-2px);
}

.back-to-top[hidden] {
  display: none;
}

body.has-cookie-banner .back-to-top {
  bottom: 7.5rem;
}

/* ====================================================================
   SCROLL REVEAL
   ==================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Stagger delays (set via data-delay attribute by JS) */
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.55s; }

/* ====================================================================
   PARTICLE CANVAS
   ==================================================================== */

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ====================================================================
   HERO ENTRANCE ANIMATIONS
   ==================================================================== */

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-landing .hero__content > * {
  animation: heroFadeUp 0.82s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.page-landing .hero__content > *:nth-child(1) { animation-delay: 0.05s; }
.page-landing .hero__content > *:nth-child(2) { animation-delay: 0.18s; }
.page-landing .hero__content > *:nth-child(3) { animation-delay: 0.3s; }
.page-landing .hero__content > *:nth-child(4) { animation-delay: 0.42s; }
.page-landing .hero__content > *:nth-child(5) { animation-delay: 0.54s; }
.page-landing .hero__content > *:nth-child(6) { animation-delay: 0.68s; }

.page-landing .hero__visual {
  animation: heroFadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s backwards;
}

.page-landing .metrics {
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.6s backwards;
}

/* ====================================================================
   ANIMATED HERO TAGLINE GRADIENT
   ==================================================================== */

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero__tagline {
  background: linear-gradient(
    270deg,
    var(--ion-text-main) 0%,
    var(--ion-primary-light) 40%,
    var(--ion-accent) 70%,
    var(--ion-text-main) 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: gradientShift 7s ease infinite;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__tagline {
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

/* ====================================================================
   CONTROL SECTION OVERRIDES
   ==================================================================== */

.section--control {
  padding-top: clamp(4rem, 7vw, 6rem);
}

.control-section {
  display: grid;
  gap: 2rem;
  justify-items: center;
}

.control-section__intro {
  max-width: 54rem;
  text-align: center;
}

.control-section .section__title {
  max-width: 38rem;
  margin-inline: auto;
}

.control-section__lead {
  max-width: 46rem;
  margin-inline: auto;
}

.control-section__lead--secondary {
  margin-top: 0.9rem;
}

.pill-list--control {
  margin-top: 1.2rem;
  justify-content: center;
}

.control-grid {
  gap: 1rem;
  width: min(100%, 70rem);
  justify-self: center;
}

@media (min-width: 900px) {
  .control-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ====================================================================
   METRICS HOVER LIFT
   ==================================================================== */

.metrics__item {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;
  cursor: default;
}

.metrics__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(37, 99, 235, 0.22);
  z-index: 1;
}

/* ====================================================================
   ENHANCED CARD HOVER
   ==================================================================== */

.card {
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 16px 48px rgba(37, 99, 235, 0.2), 0 0 0 1px rgba(56, 189, 248, 0.15);
  transform: translateY(-5px);
}

/* ====================================================================
   PILL HOVER GLOW
   ==================================================================== */

.pill {
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.pill:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(37, 99, 235, 0.18);
  transform: translateY(-2px);
}

/* ====================================================================
   SECTION EYEBROW GLOW LINE
   ==================================================================== */

.section__eyebrow {
  position: relative;
  padding-left: 1.1em;
}

.section__eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.5em;
  height: 2px;
  background: var(--ion-primary-light);
  border-radius: 2px;
  box-shadow: 0 0 6px var(--ion-primary-light);
}

/* ====================================================================
   HEADER GLOW ON SCROLL (enhanced)
   ==================================================================== */

.site-header.is-scrolled {
  background: rgba(2, 6, 23, 0.96);
  box-shadow: 0 1px 0 var(--ion-border), var(--shadow-glow);
}

/* ====================================================================
   FEATURE-BOX HOVER
   ==================================================================== */

.feature-box {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-box:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.15);
  transform: translateY(-3px);
}

/* ====================================================================
   MANIFESTO CARD — subtle shimmer border
   ==================================================================== */

@keyframes borderGlow {
  0%, 100% { box-shadow: var(--shadow-glow), 0 0 0 0 rgba(56,189,248,0); }
  50%       { box-shadow: var(--shadow-glow), 0 0 40px 4px rgba(56,189,248,0.12); }
}

.manifesto__card {
  animation: borderGlow 5s ease-in-out infinite;
}

/* ====================================================================
   CTA BUTTON SHIMMER
   ==================================================================== */

@keyframes btnShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.btn--primary {
  background: linear-gradient(
    135deg,
    var(--ion-primary) 0%,
    #1d4ed8 40%,
    var(--ion-primary-light) 60%,
    var(--ion-primary) 100%
  );
  background-size: 200% auto;
  animation: btnShimmer 4s linear infinite;
}

.btn--primary:hover {
  animation-duration: 1.5s;
  box-shadow: 0 8px 36px rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}
