/* ─── FONTS ──────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Nasalization';
  src: url('/fonts/Nasalization Rg.otf') format('opentype');
  font-weight: 400;
}
@font-face {
  font-family: 'IBMPlex';
  src: url('/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf') format('truetype');
  font-weight: 100 700;
}
@font-face {
  font-family: 'IBMPlexItalic';
  src: url('/fonts/IBMPlexSans-Italic-VariableFont_wdth,wght.ttf') format('truetype');
  font-style: italic;
  font-weight: 100 700;
}

/* ─── TOKENS ─────────────────────────────────────────────────────────── */
:root {
  --navy:        #0C1E4A;
  --cyan:        #00A2FF;
  --mint:        #16E7CF;
  --bg-light:    #F0FAFF;

  --bg-page:     #dff0fb;
  --bg-footer:   #c8e3f5;

  --text:        #0C1E4A;       /* navy as base text */
  --text-dim:    rgba(12,30,74,0.58);
  --text-faint:  rgba(12,30,74,0.35);

  --accent:      #00A2FF;       /* cyan */
  --line:        rgba(0,162,255,0.22);
  --border:      rgba(12,30,74,0.12);

  --pad-x:       10vw;
  --pad-frame:   32px;
  --logo-h:      100px;
  --topbar-h:    100px;
  --footer-h:    56px;
}

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

html, body, #root {
  height: 100%;
}

body {
  font-family: 'IBMPlex', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  /* full-page gradient: white top → bg-light mid → slightly grey at bottom */
  background: #dff0fb;
  background-attachment: fixed;
}

/* noise grain overlay — very subtle */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.016;
  pointer-events: none;
  z-index: 200;
}

/* ─── SHELL ──────────────────────────────────────────────────────────── */
.shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* ─── TOPBAR ─────────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 var(--pad-x);
  flex-shrink: 0;
  /* sits above gradient, no bg — logo reads against white */
  position: relative;
  z-index: 50;
}

.topbar__logo img {
  height: var(--logo-h);
  width: auto;
  max-width: 50vw;
  display: block;
  filter: brightness(1.35);
}

/* ─── FOOTER ─────────────────────────────────────────────────────────── */
.footer {
  height: var(--footer-h);
  background: var(--bg-footer);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  flex-shrink: 0;
}

.footer__copy {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.footer__link {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__link:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ─── ANIMATIONS ─────────────────────────────────────────────────────── */
@keyframes fadeUp    { to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp   { to { opacity: 1; transform: translateY(0); } }
@keyframes lineIn    { to { opacity: 1; } }
@keyframes orbReveal { to { opacity: 1; } }
@keyframes expandLine { to { width: min(560px, 80vw); } }
@keyframes blink     { 0%,100% { opacity: 1; } 50% { opacity: 0.2; } }
@keyframes scan {
  0%   { top: -2px;  opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100%;  opacity: 0; }
}
@keyframes progress {
  0%   { width: 0%;  }
  15%  { width: 23%; }
  40%  { width: 41%; }
  65%  { width: 58%; }
  85%  { width: 73%; }
  100% { width: 78%; }
}

/* ─── HOME PAGE ──────────────────────────────────────────────────────── */
.home {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 0 var(--pad-x) calc(var(--pad-frame) * 2);
  gap: 4vh;
}

/* ambient orbs */
.home__orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  opacity: 0;
  animation: orbReveal 2.5s ease forwards;
}
.home__orb--a {
  width: 640px; height: 640px;
  top: -220px; left: -140px;
  background: radial-gradient(circle, rgba(0,162,255,0.13) 0%, transparent 70%);
  animation-delay: 0.3s;
}
.home__orb--b {
  width: 520px; height: 520px;
  bottom: -160px; right: -120px;
  background: radial-gradient(circle, rgba(22,231,207,0.10) 0%, transparent 70%);
  animation-delay: 0.6s;
}

/* scan line */
.home__scanline {
  position: absolute;
  left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,162,255,0.15) 40%, rgba(0,162,255,0.15) 60%, transparent);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  animation: scan 9s linear infinite;
  animation-delay: 2.2s;
}

/* frame lines */
.home__hr {
  position: absolute;
  left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
  opacity: 0;
  animation: lineIn 1.4s cubic-bezier(0.16,1,0.3,1) forwards;
  z-index: 2;
}
.home__hr--top    { top:    calc(var(--pad-frame) + 16px); animation-delay: 0.8s; }
.home__hr--bottom { bottom: calc(var(--pad-frame) + 16px); animation-delay: 1.0s; }

/* corner marks */
.home__corner {
  position: absolute;
  width: 18px; height: 18px;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 1.3s;
  z-index: 2;
}
.home__corner::before,
.home__corner::after {
  content: '';
  position: absolute;
  background: rgba(0,162,255,0.45);
}
.home__corner::before { width: 100%; height: 1px; top: 0; left: 0; }
.home__corner::after  { width: 1px; height: 100%; top: 0; left: 0; }
.home__corner--tl { top: var(--pad-frame);    left:  var(--pad-frame); }
.home__corner--tr { top: var(--pad-frame);    right: var(--pad-frame); transform: scaleX(-1); }
.home__corner--bl { bottom: var(--pad-frame); left:  var(--pad-frame); transform: scaleY(-1); }
.home__corner--br { bottom: var(--pad-frame); right: var(--pad-frame); transform: scale(-1); }

/* side ticker */
.home__ticker {
  position: absolute;
  right: calc(var(--pad-frame) + 8px);
  top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 1.6s;
  z-index: 5;
}
.home__tick { width: 1px; height: 18px; background: var(--border); }
.home__tick--active { background: rgba(0,162,255,0.5); height: 34px; }
.home__tick-label {
  font-size: 9px; letter-spacing: 0.12em;
  color: var(--text-faint);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  margin-top: 8px;
}

/* left meta */
.home__meta {
  position: absolute;
  left: calc(var(--pad-frame) + 8px);
  bottom: calc(var(--pad-frame) + 20px);
  opacity: 0;
  animation: fadeUp 1s ease forwards;
  animation-delay: 1.8s;
  z-index: 5;
}
.home__meta p {
  font-size: 10px; letter-spacing: 0.14em;
  color: var(--text-faint); font-weight: 400;
  line-height: 2.2; text-transform: uppercase;
  display: flex; align-items: center;
}
.home__meta-sub { padding-left: 12px; }
.home__dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--mint);
  margin-right: 8px;
  box-shadow: 0 0 7px rgba(22,231,207,0.6);
  animation: blink 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

/* content block */
.home__content {
  position: relative;
  z-index: 10;
  max-width: min(860px, 85vw);
}

/* eyebrow */
.home__eyebrow {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
  opacity: 0; transform: translateY(10px);
  animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) forwards;
  animation-delay: 0.4s;
}
.home__eyebrow-line {
  width: 32px; height: 1px;
  background: rgba(0,162,255,0.6);
  flex-shrink: 0;
}
.home__eyebrow-text {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cyan);
}

/* headline */
.home__headline {
  font-family: 'Nasalization', sans-serif;
  font-size: clamp(28px, 5vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--navy);
  max-width: min(860px, 85vw);
  overflow: hidden;
}
.home__hl {
  display: block;
  opacity: 0; transform: translateY(105%);
  animation: slideUp 1s cubic-bezier(0.16,1,0.3,1) forwards;
}
.home__hl--1 { animation-delay: 0.55s; }
.home__hl--2 { animation-delay: 0.70s; }
.home__hl--3 {
  animation-delay: 0.85s;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(12,30,74,0.28);
}

/* divider */
.home__divider {
  width: 0; height: 1px;
  background: linear-gradient(90deg, rgba(0,162,255,0.5), transparent);
  margin: 28px 0;
  animation: expandLine 1.2s cubic-bezier(0.16,1,0.3,1) forwards;
  animation-delay: 1.1s;
}

/* sub copy */
.home__sub {
  font-size: 14px; font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  opacity: 0; transform: translateY(8px);
  animation: fadeUp 0.9s ease forwards;
  animation-delay: 1.2s;
}

/* status */
.home__status {
  margin-top: 32px;
  opacity: 0; transform: translateY(8px);
  animation: fadeUp 0.9s ease forwards;
  animation-delay: 1.45s;
}
.home__pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: rgba(240,250,255,0.6);
}
.home__pill span:last-child {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-dim);
}
.home__pip {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px rgba(22,231,207,0.7);
  animation: blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

/* progress */
.home__progress-track {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(12,30,74,0.06);
  z-index: 20;
}
.home__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--mint));
  width: 0;
  animation: progress 12s cubic-bezier(0.4,0,0.2,1) forwards;
  animation-delay: 1.8s;
  box-shadow: 0 0 10px rgba(0,162,255,0.4);
}

/* ─── CONTACT BANNER ────────────────────────────────────────────────── */
.home__contact {
  position: relative;
  z-index: 10;
  max-width: min(860px, 85vw);
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp 0.9s ease forwards;
  animation-delay: 1.8s;
}

.home__contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.75rem 2rem;
  border: 1px solid rgba(0,162,255,0.22);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(220,242,255,0.7) 60%, rgba(200,235,255,0.55) 100%);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 32px rgba(0,100,200,0.08), 0 1px 0 rgba(255,255,255,0.9) inset;
}

.home__contact-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.home__contact-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.home__contact-text p {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-dim);
  margin: 0;
  letter-spacing: 0.02em;
}

.home__contact-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.4rem;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.home__contact-btn:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  text-decoration: none;
}

@media (max-width: 640px) {
  .home__contact-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* ─── IMPRINT PAGE ───────────────────────────────────────────────────── */
.imprint {
  flex: 1;
  max-width: 680px;
  padding: 3rem var(--pad-x) 4rem;
  background: transparent;
}

.imprint__title {
  font-family: 'Nasalization', sans-serif;
  font-size: clamp(22px, 4vw, 40px);
  color: var(--navy);
  margin-bottom: 3rem;
  font-weight: 400;
}

.imprint__section {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-bottom: 2rem;
}

.imprint__label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.imprint__section p {
  font-size: 15px; font-weight: 300;
  line-height: 1.85; color: var(--text-dim);
}

.imprint__section a {
  color: var(--cyan); text-decoration: none;
}
.imprint__section a:hover { text-decoration: underline; }

.imprint__note {
  margin-top: 6px;
  font-size: 13px !important;
  color: var(--text-faint) !important;
}

/* ─── ADMIN ──────────────────────────────────────────────────────────── */
.admin-main {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem var(--pad-x);
}

.notfound {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
}
.notfound a { color: var(--cyan); }

/* ─── ADMIN CARRY-OVERS ──────────────────────────────────────────────── */
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 2rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.6rem; margin: 0 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }
p  { margin: 0.5rem 0; }

input[type="password"], input[type="text"] {
  font: inherit; padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px; width: 100%; max-width: 320px;
  background: #fff; color: var(--text);
}
.form-row { margin: 0.6rem 0; }
.error { color: #c0002a; margin: 0.5rem 0; }
.muted { color: var(--text-dim); }

.btn {
  display: inline-block; padding: 0.55rem 1rem;
  font: inherit; border: 1px solid currentColor;
  background: var(--navy); color: #fff;
  border-radius: 4px; cursor: pointer; text-decoration: none;
}
.btn:hover { opacity: 0.88; text-decoration: none; }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn.danger    { background: #c0002a; color: #fff; border-color: #c0002a; }

.badge {
  display: inline-block; margin-left: 0.5rem;
  padding: 0.1rem 0.45rem; font-size: 0.7rem;
  border-radius: 999px; background: var(--cyan); color: #fff; vertical-align: middle;
}
.badge--added { background: #1a7f3c; }
.badge--muted { background: #888; }

.adminHome__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }

.modal {
  position: fixed; inset: 0;
  background: rgba(12,30,74,0.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 1rem;
}
.modal__panel {
  background: #fff; color: var(--text);
  border-radius: 12px; padding: 1.25rem 1.5rem;
  max-width: 560px; width: 100%; max-height: 90vh; overflow: auto;
  border: 1px solid var(--border);
}
.modal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 1rem 0; }
@media (max-width: 520px) { .modal__grid { grid-template-columns: 1fr; } }
.modal__choice {
  display: flex; flex-direction: column; gap: 0.25rem;
  text-align: left; padding: 0.7rem 0.9rem;
  border: 1px solid var(--border); border-radius: 8px;
  background: #fff; cursor: pointer; font: inherit; color: inherit;
}
.modal__choice:hover { border-color: var(--navy); }
.modal__choice .muted { font-size: 0.85rem; }
.modal__actions { display: flex; justify-content: flex-end; }

.catalog__header { margin-bottom: 1rem; }
.catalog__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1.25rem; }
.catalog__tile { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: transform .12s, border-color .12s, box-shadow .12s; }
.catalog__tile:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(12,30,74,0.08); }
.catalog__tile--hidden { opacity: 0.55; }
.catalog__tileBody { display: block; width: 100%; text-align: left; background: transparent; border: none; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.catalog__unhide { position: absolute; top: .5rem; right: .5rem; font-size: .8rem; padding: .3rem .6rem; }
.catalog__addTile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; min-height: 220px; background: transparent; border: 2px dashed var(--border); border-radius: 10px; cursor: pointer; font: inherit; color: var(--text-dim); transition: border-color .12s, color .12s; }
.catalog__addTile:hover { border-color: var(--navy); color: var(--text); }
.catalog__addPlus { font-size: 2.5rem; line-height: 1; font-weight: 300; }
.catalog__addLabel { font-size: .95rem; }
.catalog__previewWrap { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-light); border-bottom: 1px solid var(--border); pointer-events: none; }
.catalog__preview { position: absolute; top: 0; left: 0; width: 1440px; height: 810px; transform: scale(0.195); transform-origin: top left; }
.catalog__meta { padding: .9rem 1rem 1rem; }
.catalog__name { font-weight: 600; margin-bottom: .15rem; }
.catalog__id { font-size: .75rem; margin-bottom: .5rem; }
.catalog__desc { font-size: .9rem; color: var(--text-dim); }

.editor__topbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.editor__title { margin-left: auto; flex: 1; }
.editor__previews { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.editor__previews--split { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .editor__previews--split { grid-template-columns: 1fr; } }
.editor__previewCell { display: flex; flex-direction: column; gap: .4rem; }
.editor__previewLabel { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); font-weight: 600; }
.editor__previewLabel--proposed { color: var(--cyan); }
.editor__previewWrap { position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-light); aspect-ratio: 16/9; }
.editor__preview { position: absolute; top: 0; left: 0; width: 1440px; height: 810px; transform: scale(0.42); transform-origin: top left; }
.editor__preview--proposed { outline: 3px solid var(--cyan); outline-offset: -3px; }
.editor__previews--split .editor__preview { transform: scale(0.28); }
@media (max-width: 900px) { .editor__preview, .editor__previews--split .editor__preview { transform: scale(0.30); } }
.editor__panel { border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.1rem; }
.editor__panel textarea { width: 100%; font: inherit; padding: .6rem; border: 1px solid var(--border); border-radius: 6px; margin-top: .4rem; resize: vertical; }
.editor__actions { margin-top: .8rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.editor__diff { margin-top: 1rem; font-size: .85rem; }
.editor__diff pre { background: var(--navy); color: #e6edf3; padding: .8rem; border-radius: 6px; overflow: auto; max-height: 320px; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .home__ticker, .home__meta { display: none; }
}
@media (max-width: 768px) {
  :root { --pad-x: 8vw; --pad-frame: 22px; --topbar-h: 72px; }
  .topbar__logo img { height: auto; width: 55vw; max-width: 260px; }
  .home__headline { font-size: clamp(24px, 9vw, 52px); }
}
@media (max-width: 480px) {
  :root { --pad-x: 6vw; --pad-frame: 16px; }
  .home__corner--tr, .home__corner--br { display: none; }
}
@media (max-height: 500px) {
  .home__eyebrow { margin-bottom: 14px; }
  .home__divider { margin: 14px 0; }
  .home__status  { margin-top: 16px; }
  .home__hr, .home__corner { display: none; }
}
