:root {
  color-scheme: dark;
  --bg: #07111a;
  --bg-deep: #04080d;
  --panel: rgba(12, 24, 38, 0.76);
  --panel-strong: rgba(10, 20, 32, 0.92);
  --line: rgba(170, 212, 255, 0.18);
  --line-strong: rgba(174, 216, 255, 0.3);
  --text: #eef6ff;
  --muted: #90a6bc;
  --accent: #91e3ff;
  --success: #7ff0c5;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shell: min(1180px, calc(100vw - 40px));
  --font-display: "Aptos Display", "Segoe UI Variable Display", "Trebuchet MS", sans-serif;
  --font-body: "Aptos", "Segoe UI Variable Text", "Gill Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(48, 199, 255, 0.14), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(255, 184, 111, 0.14), transparent 24%),
    linear-gradient(180deg, #09121c 0%, #05080d 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at center, black, transparent 88%);
}

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

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

.ambient {
  position: fixed;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  pointer-events: none;
}

.ambient-left {
  top: -10vw;
  left: -12vw;
  background: rgba(42, 148, 227, 0.46);
}

.ambient-right {
  top: 16vh;
  right: -16vw;
  background: rgba(255, 157, 84, 0.3);
}

.site-header,
.site-footer,
.hero,
.section-grid,
.access-grid,
.login-layout,
.recover-grid,
.subpage-shell,
.section-heading,
.catalog-grid {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-inline { margin-bottom: 18px; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, rgba(54, 215, 255, 0.24), rgba(255, 184, 111, 0.16));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-nav,
.footer-links,
.inline-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}

.site-nav a:hover,
.footer-links a:hover,
.inline-links a:hover,
.auth-row a:hover {
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover { transform: translateY(-1px); }

.button-primary {
  color: #041019;
  background: linear-gradient(135deg, var(--accent), #d8f4ff);
  box-shadow: 0 12px 30px rgba(48, 199, 255, 0.24);
}

.button-secondary,
.button-ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.hero,
.login-layout,
.recover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 34px;
}

.hero { padding: 40px 0 24px; }
.login-layout,
.recover-grid {
  align-items: stretch;
  min-height: 100vh;
  padding: 34px 0;
}

.hero-copy,
.hero-panel,
.feature-card,
.stat-card,
.catalog-card,
.access-card,
.auth-card,
.login-story,
.masthead-panel,
.library-card,
.timeline-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero-copy,
.login-story,
.masthead-panel {
  padding: 42px;
  border-radius: var(--radius-xl);
}

.hero-panel,
.auth-card,
.library-card,
.timeline-card {
  border-radius: var(--radius-xl);
}

.hero h1,
.login-story h1,
.feature-card h2,
.section-heading h2,
.access-card h2,
.auth-card h2,
.masthead-panel h1 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero h1,
.login-story h1 {
  font-size: clamp(2.9rem, 6vw, 5.2rem);
  max-width: 12ch;
}

.masthead-panel h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  max-width: 14ch;
}

.lede,
.feature-card p,
.section-heading p,
.access-card li,
.site-footer p,
.auth-card span,
.auth-row a,
.library-copy span,
.timeline-card p {
  color: var(--muted);
}

.lede {
  margin: 18px 0 0;
  max-width: 54ch;
  font-size: 1.08rem;
  line-height: 1.7;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.signal-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 30px 0 0;
  list-style: none;
}

.signal-list li {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-panel { padding: 18px; }

.screen-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(8, 19, 31, 0.7), rgba(6, 12, 20, 0.96)),
    radial-gradient(circle at top right, rgba(255, 178, 102, 0.18), transparent 30%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 22px;
}

.screen-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 174, 82, 0.22), transparent 20%),
    radial-gradient(circle at 30% 70%, rgba(51, 202, 255, 0.18), transparent 26%);
  pointer-events: none;
}

.screen-meta,
.screen-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.screen-meta span,
.catalog-copy p,
.library-copy p,
.label,
.timeline-date {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.screen-meta strong { font-size: 1rem; }

.screen-poster {
  position: relative;
  z-index: 1;
  min-height: 360px;
  margin: 18px 0;
  padding: 28px;
  border-radius: 22px;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(3, 8, 14, 0.05), rgba(3, 8, 14, 0.84)),
    linear-gradient(135deg, #0c1d31 10%, #17406f 46%, #ab5c3b 100%);
}

.poster-copy h2 {
  margin: 10px 0 6px;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 4rem);
}

.poster-copy span { color: rgba(255, 255, 255, 0.74); }

.screen-footer { align-items: flex-start; }

.screen-footer strong {
  display: block;
  margin-top: 6px;
  font-size: 0.98rem;
}

.section-grid,
.access-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 54px 0 10px;
}

.feature-card,
.stat-card,
.access-card {
  border-radius: var(--radius-lg);
  padding: 28px;
}

.feature-card p,
.stat-card p,
.timeline-card p { line-height: 1.65; }

.stat-card span {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
}

.section-heading { padding-top: 62px; }

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 12ch;
}

.catalog-grid,
.library-grid,
.timeline-list {
  display: grid;
  gap: 20px;
  padding-top: 24px;
}

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

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

.catalog-card {
  overflow: hidden;
  border-radius: 24px;
}

.catalog-card-large { grid-row: span 2; }

.catalog-art,
.library-art {
  min-height: 220px;
  background-size: cover;
  background-position: center;
}

.catalog-card-large .catalog-art { min-height: 100%; }

.art-ocean {
  background:
    radial-gradient(circle at 24% 30%, rgba(255, 194, 132, 0.24), transparent 20%),
    linear-gradient(145deg, #0f2032 10%, #14395e 46%, #247ea5 80%, #f4a968 100%);
}

.art-red { background: linear-gradient(155deg, #17060d 5%, #5b1129 45%, #f36552 100%); }
.art-gold { background: linear-gradient(150deg, #141108 0%, #564117 46%, #f3cb7f 100%); }
.art-violet { background: linear-gradient(150deg, #0b0b1c 0%, #362573 48%, #a362ff 100%); }
.art-slate { background: linear-gradient(150deg, #0d141f 0%, #304258 50%, #8ca6bf 100%); }
.art-ember { background: linear-gradient(150deg, #180a09 0%, #5a221f 48%, #ff8d63 100%); }

.catalog-copy,
.library-copy { padding: 22px; }

.catalog-copy h3,
.library-copy h2,
.timeline-card h2 {
  margin: 8px 0 4px;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.access-card ul {
  padding-left: 18px;
  margin: 20px 0 28px;
}

.access-card li + li { margin-top: 10px; }

.accent {
  background:
    linear-gradient(180deg, rgba(13, 24, 38, 0.84), rgba(15, 27, 42, 0.96)),
    radial-gradient(circle at top right, rgba(255, 184, 111, 0.12), transparent 24%);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 60px 0 34px;
}

.subpage-shell { padding: 24px 0 10px; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 0 6px;
}

.filter-pill {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.94rem;
}

.filter-pill.active {
  color: var(--text);
  border-color: var(--line-strong);
}

.login-promo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.login-promo div {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-panel { display: grid; }

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
  background: var(--panel-strong);
}

.auth-card label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.auth-card label span { font-size: 0.95rem; }

.auth-card input {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.auth-card input:focus {
  outline: 2px solid rgba(145, 227, 255, 0.34);
  border-color: rgba(145, 227, 255, 0.4);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 22px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.check input {
  width: 18px;
  height: 18px;
  min-height: auto;
  margin: 0;
}

.form-state {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--success);
}

.timeline-card { padding: 24px 26px; }

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  animation: lift-in 680ms cubic-bezier(.2,.75,.2,1) forwards;
}

[data-reveal]:nth-of-type(2) { animation-delay: 80ms; }
[data-reveal]:nth-of-type(3) { animation-delay: 140ms; }
[data-reveal]:nth-of-type(4) { animation-delay: 220ms; }

@keyframes lift-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .site-header,
  .site-footer,
  .hero,
  .section-grid,
  .catalog-grid,
  .access-grid,
  .login-layout,
  .recover-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .site-header,
  .site-footer { align-items: flex-start; }

  .site-header,
  .site-footer,
  .site-nav { flex-direction: column; }

  .signal-list,
  .login-promo { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero-copy,
  .hero-panel,
  .feature-card,
  .stat-card,
  .access-card,
  .login-story,
  .auth-card,
  .masthead-panel,
  .timeline-card {
    padding: 24px;
  }

  .hero h1,
  .login-story h1,
  .masthead-panel h1 {
    font-size: clamp(2.4rem, 12vw, 3.8rem);
  }
}
