:root {
  --bg-0: #eef2f7;
  --bg-1: #f7f9fc;
  --bg-2: #ffffff;
  --ink: #152033;
  --ink-muted: #5a667a;
  --ink-faint: #8490a1;
  --line: rgba(21, 32, 51, 0.1);
  --accent: #0f766e;
  --accent-bright: #14b8a6;
  --accent-dim: rgba(15, 118, 110, 0.12);
  --accent-ink: #ffffff;
  --warn: #b45309;
  --danger: #b91c1c;
  --radius: 4px;
  --font-display: "Sora", sans-serif;
  --font-body: "Figtree", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --max: 1100px;
  --shadow: 0 18px 40px rgba(21, 32, 51, 0.08);
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(ellipse 85% 50% at 8% -5%, rgba(20, 184, 166, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(37, 99, 235, 0.1), transparent 50%),
    linear-gradient(180deg, #e8eef6 0%, var(--bg-0) 38%, #f4f6fa 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% 15%, #000 15%, transparent 70%);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #0a5c56;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 1.75rem 0 4rem;
}

.site-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 0 0 3.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 4.5vw, 2.45rem);
  letter-spacing: -0.05em;
  color: var(--ink);
  text-decoration: none;
  animation: rise 0.7s ease both;
}

.site-brand span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.95;
}

.hero {
  animation: rise 0.8s ease 0.08s both;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero .lede {
  margin: 0 0 2.25rem;
  max-width: none;
  width: 100%;
  color: var(--ink-muted);
  font-size: 1.08rem;
  white-space: nowrap;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 2rem 1.5rem;
  border: 1.5px dashed rgba(15, 118, 110, 0.4);
  background:
    linear-gradient(160deg, var(--accent-dim), transparent 60%),
    var(--bg-2);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  animation: rise 0.85s ease 0.16s both;
}

.dropzone:hover,
.dropzone:focus-within,
.dropzone.is-dragover {
  border-color: var(--accent);
  background:
    linear-gradient(160deg, rgba(20, 184, 166, 0.16), transparent 55%),
    #fff;
  transform: translateY(-2px);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-inner {
  text-align: center;
  pointer-events: none;
}

.dropzone-kicker {
  margin: 0 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.dropzone-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.dropzone-hint {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.92rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
  animation: rise 0.9s ease 0.22s both;
}

.trust-row li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.trust-row li::before {
  content: "▸ ";
  color: var(--accent);
}

.hub-intro {
  margin-bottom: 2.5rem;
  animation: rise 0.75s ease both;
}

.hub-intro h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 4.6vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.hub-intro p {
  margin: 0;
  max-width: none;
  width: 100%;
  color: var(--ink-muted);
  font-size: 1.28rem;
  line-height: 1.55;
}

.hub-intro p strong {
  color: var(--ink);
  font-weight: 600;
}

.track-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  animation: rise 0.85s ease 0.1s both;
}

.track-list a {
  display: grid;
  gap: 0.35rem;
  padding: 1.35rem 0.15rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: padding-left 0.2s ease, background 0.2s ease;
}

.track-list a:hover {
  padding-left: 0.55rem;
  background: linear-gradient(90deg, var(--accent-dim), transparent 55%);
}

.track-list a.is-featured {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.06), transparent 50%);
}

.track-list a.is-featured:hover {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), transparent 55%);
}

.track-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}

.track-path {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.track-list a.is-featured .track-path {
  color: #2563eb;
}

.arch-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink-muted);
  border: 1px solid var(--line);
  padding: 0.28rem 0.5rem;
  background: rgba(255, 255, 255, 0.55);
}

/* IBM Plex Mono digits sit optically low vs caps — nudge "100%" up */
.arch-badge .arch-num {
  display: inline-block;
  translate: 0 -0.07em;
}

.arch-badge-privacy {
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(37, 99, 235, 0.06);
}

.arch-badge-hybrid {
  color: var(--accent);
  border-color: rgba(15, 118, 110, 0.3);
  background: var(--accent-dim);
}

.track-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.track-blurb {
  color: var(--ink-muted);
  font-size: 1.22rem;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(21, 32, 51, 0.45);
  backdrop-filter: blur(8px);
  animation: fade 0.2s ease both;
}

.modal-panel {
  width: min(100%, 440px);
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid rgba(15, 118, 110, 0.22);
  background:
    linear-gradient(165deg, rgba(20, 184, 166, 0.1), transparent 45%),
    var(--bg-2);
  box-shadow: var(--shadow);
  animation: pop 0.28s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.modal-status {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--warn);
}

.modal-copy {
  margin: 0 0 1.35rem;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.modal.is-feedback .modal-status {
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.modal.is-feedback .modal-copy {
  margin-bottom: 1.5rem;
}

#modal-capture[hidden],
#modal-success[hidden] {
  display: none !important;
}

.modal form {
  display: grid;
  gap: 0.75rem;
}

.modal label {
  display: grid;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.modal input[type="email"] {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
}

.modal input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

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

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--line);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 50;
  transform: translateX(-50%) translateY(120%);
  max-width: min(92vw, 420px);
  padding: 0.85rem 1.1rem;
  border: 1px solid rgba(15, 118, 110, 0.3);
  background: var(--bg-2);
  color: var(--ink);
  font-size: 0.92rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.85rem;
  animation: rise 1s ease 0.28s both;
}

.site-footer a {
  color: var(--ink-muted);
}

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

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 1.25rem, var(--max));
    padding-top: 1.25rem;
  }

  .site-brand {
    margin-bottom: 2.5rem;
  }

  .hub-intro h1 {
    white-space: normal;
    font-size: clamp(1.7rem, 7.2vw, 2.15rem);
  }

  .hub-intro p {
    font-size: 1.12rem;
  }

  .hero .lede {
    white-space: normal;
  }

  .track-meta {
    flex-wrap: wrap;
  }

  .track-title {
    font-size: 1.5rem;
  }

  .track-blurb {
    font-size: 1.08rem;
  }

  .dropzone {
    min-height: 190px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
