/* L337Tech.com */

:root {
  --bg: #07090b;
  --bg-2: #0b0f12;
  --panel: #0f1418;
  --line: rgba(231, 236, 232, 0.09);
  --line-2: rgba(231, 236, 232, 0.16);
  --text: #e7ece8;
  --muted: #8d9892;
  --dim: #5d6862;
  --accent: #5cf2a6;
  --accent-ink: #04140c;
  --accent-soft: rgba(92, 242, 166, 0.12);

  /* QuickDecline brand */
  --qd-bg: #f3f6f9;
  --qd-ink: #12212e;
  --qd-text: #44515c;
  --qd-blue: #0f4c75;
  --qd-mid: #2a6f97;
  --qd-line: #dbe3ea;

  /* Covenant Labs brand */
  --cov-deep: #0b1420;
  --cov-panel: #131b28;
  --cov-cream: #ece7dc;
  --cov-gold: #f0ae4d;
  --cov-muted: #98917f;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --font-serif: "Fraunces", Georgia, serif;

  --radius: 18px;
  --ease: cubic-bezier(.25, 1, .5, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
p { margin: 0; }
.mono { font-family: var(--font-mono); color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
  background: rgba(7, 9, 11, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.brand { display: inline-flex; align-items: baseline; text-decoration: none; font-family: var(--font-mono); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand-mark span { color: var(--accent); }
.brand-word { color: var(--text); }
.topbar ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.topbar nav a {
  display: inline-block; padding: 8px 10px; text-decoration: none;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); transition: color .2s;
}
.topbar nav a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 110px 0 90px;
  background:
    radial-gradient(1200px 600px at 70% 10%, rgba(92, 242, 166, 0.07), transparent 60%),
    radial-gradient(900px 500px at 10% 90%, rgba(42, 111, 151, 0.10), transparent 60%),
    var(--bg);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 200px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero-inner { position: relative; z-index: 2; max-width: 880px; padding: 0 24px; text-align: center; }
.kicker {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted);
}
.wordmark { margin: 26px auto 0; line-height: 0; }
/* Logo artwork (built by tools/make-wordmark.js). */
.wordmark img {
  display: block; margin: 0 auto;
  width: min(780px, 88vw); height: auto;
  filter: drop-shadow(0 0 30px rgba(92, 242, 166, 0.22));
}
.tagline {
  margin-top: 22px;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(22px, 3.2vw, 32px); color: var(--text); letter-spacing: -0.01em;
}
.cursor {
  display: inline-block; width: 0.55em; height: 0.95em; margin-left: 6px; vertical-align: -0.12em;
  background: var(--accent); animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.lede { margin: 24px auto 0; max-width: 640px; font-size: 18px; line-height: 1.7; color: var(--muted); }
.lede a { color: var(--text); text-decoration-color: rgba(92, 242, 166, 0.5); text-underline-offset: 3px; }
.lede a:hover { color: var(--accent); }
.hero-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; z-index: 2; width: 1px; height: 48px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue { 0% { transform: translateY(-10px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  text-decoration: none; transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 40px -12px rgba(92, 242, 166, 0.6); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Stats ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.stats-grid { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-grid > div { padding: 28px 24px; border-left: 1px solid var(--line); }
.stats-grid > div:first-child { border-left: 0; }
.stats-grid dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.stats-grid dd { margin: 8px 0 0; font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }

/* ---------- Sections ---------- */
.section { padding: 120px 0; scroll-margin-top: 40px; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted);
}
.eyebrow-num { color: var(--accent); }
.eyebrow::after { content: ""; flex: 0 0 48px; height: 1px; background: var(--line-2); }
.section h2, .footer h2 { margin-top: 18px; font-size: clamp(32px, 4.6vw, 52px); }
.section-sub { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 680px; }

/* ---------- QuickDecline ---------- */
.qd {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 48px; align-items: center;
  background: var(--qd-bg); color: var(--qd-ink);
  border-radius: 24px; padding: 48px;
  box-shadow: 0 40px 120px -40px rgba(42, 111, 151, 0.55);
}
.qd-logo { width: 240px; }
.qd h3 { margin-top: 28px; font-size: 30px; color: var(--qd-blue); }
.qd-copy > p { margin-top: 14px; color: var(--qd-text); line-height: 1.7; }
.qd-features {
  grid-column: 1 / -1; list-style: none; margin: 0; padding: 32px 0 0; border-top: 1px solid var(--qd-line);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 32px;
}
.qd-features li {
  position: relative; padding-left: 22px; color: var(--qd-text); font-size: 15px; line-height: 1.55;
}
.qd-features li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 2px;
  background: linear-gradient(135deg, #4a96c0, var(--qd-blue));
}
.qd-features strong { display: block; color: var(--qd-ink); font-weight: 600; }
.qd-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn-qd { background: var(--qd-blue); color: #fff; box-shadow: 0 10px 30px -12px rgba(15, 76, 117, 0.7); }
.btn-qd:hover { background: var(--qd-mid); }
.btn-qd-ghost { border: 1px solid #b9c7d3; color: var(--qd-blue); }
.btn-qd-ghost:hover { border-color: var(--qd-blue); }

.qd-gallery { min-width: 0; }
.qd-shot { margin: 0; }
.qd-shot img { width: 100%; border-radius: 10px; transition: opacity .25s; }
.qd-shot img.is-swapping { opacity: 0; }
.qd-shot figcaption { margin-top: 12px; font-family: var(--font-mono); font-size: 12.5px; color: var(--qd-text); }
.qd-thumbs { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.qd-thumb {
  appearance: none; border: 1px solid var(--qd-line); background: #fff; border-radius: 10px; padding: 6px 6px 8px;
  cursor: pointer; text-align: left; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.qd-thumb img { border-radius: 5px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; width: 100%; }
.qd-thumb span { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--qd-text); }
.qd-thumb:hover { transform: translateY(-2px); border-color: #a9bccc; }
.qd-thumb.is-active { border-color: var(--qd-blue); box-shadow: 0 0 0 1px var(--qd-blue); }
.qd-thumb.is-active span { color: var(--qd-blue); font-weight: 500; }

/* ---------- Covenant Labs ---------- */
.cov {
  border-radius: 24px; padding: 48px;
  background:
    radial-gradient(800px 400px at 85% 0%, rgba(240, 174, 77, 0.10), transparent 60%),
    var(--cov-deep);
  border: 1px solid rgba(236, 231, 220, 0.08);
  color: var(--cov-cream);
}
.cov-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cov-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--cov-muted); }
.cov-name { margin-top: 14px; font-family: var(--font-serif); font-style: normal; font-size: clamp(36px, 5vw, 56px); line-height: 1; color: var(--cov-cream); letter-spacing: -0.01em; }
.cov-tag { margin-top: 10px; font-family: var(--font-serif); font-style: italic; font-size: 22px; color: var(--cov-gold); }
.cov-link {
  font-family: var(--font-mono); font-size: 13px; color: var(--cov-gold); text-decoration: none;
  border: 1px solid rgba(240, 174, 77, 0.35); border-radius: 999px; padding: 10px 18px; transition: background .2s, color .2s;
}
.cov-link:hover { background: var(--cov-gold); color: var(--cov-deep); }
.cov-products { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cov-card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--cov-panel); border: 1px solid rgba(236, 231, 220, 0.08); border-radius: 16px; padding: 28px;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
a.cov-card:hover { transform: translateY(-4px); border-color: rgba(240, 174, 77, 0.35); box-shadow: 0 24px 64px -24px rgba(240, 174, 77, 0.35); }
.cov-card-name { font-family: var(--font-serif); font-size: 22px; color: var(--cov-cream); }
.cov-mono { font-family: var(--font-mono); font-size: 15px; font-weight: 700; letter-spacing: 0.25em; }
.cov-mono span { color: var(--cov-gold); }
.cov-card h3 { margin-top: 22px; font-family: var(--font-serif); font-weight: 400; font-size: 24px; letter-spacing: 0; color: var(--cov-cream); }
.cov-card > p:not(.cov-card-name):not(.cov-card-foot) { margin-top: 12px; color: var(--cov-muted); font-size: 15px; line-height: 1.65; }
.cov-card-foot { margin-top: auto; padding-top: 24px; font-family: var(--font-mono); font-size: 12.5px; color: var(--cov-muted); }
.cov-card-foot span { color: var(--cov-gold); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 112px; top: 10px; bottom: 10px; width: 1px;
  background: linear-gradient(to bottom, var(--line-2), var(--line-2) 70%, var(--accent));
}
.tl-item { position: relative; display: grid; grid-template-columns: 112px 1fr; gap: 0; padding-bottom: 56px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: 107px; top: 9px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line-2);
}
.tl-current::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-year { font-family: var(--font-mono); font-size: 15px; font-weight: 500; color: var(--muted); padding-top: 2px; }
.tl-current .tl-year { color: var(--accent); }
.tl-body { padding-left: 40px; }
.tl-body h3 { font-size: 24px; }
.tl-body > p { margin-top: 8px; color: var(--muted); max-width: 640px; }
.apps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.apps li {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  transition: border-color .2s, transform .2s var(--ease);
}
.apps li:hover { border-color: var(--line-2); transform: translateY(-2px); }
.app-name { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--text); }
.app-tag {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(92, 242, 166, 0.25); border-radius: 999px; padding: 2px 8px;
}
.app-desc { grid-column: 1 / -1; font-size: 14px; line-height: 1.55; color: var(--muted); }

/* ---------- Story ---------- */
.story { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.story p:not(.eyebrow) { margin-top: 22px; font-size: 19px; line-height: 1.75; color: var(--muted); }
.story-rule {
  padding-left: 20px; border-left: 2px solid var(--accent);
  color: var(--text) !important; font-family: var(--font-display); font-size: 22px !important; line-height: 1.5 !important;
}

/* ---------- Footer ---------- */
.footer { padding: 110px 0 48px; scroll-margin-top: 40px; }
.footer-lines { margin-top: 18px; font-size: 18px; color: var(--muted); }
.email {
  display: inline-block; margin-left: 4px; color: var(--accent); text-decoration: none;
  font-family: var(--font-mono); font-size: 17px; border-bottom: 1px solid rgba(92, 242, 166, 0.3);
}
.email:hover { border-bottom-color: var(--accent); }
.footer-meta {
  margin-top: 80px; padding-top: 28px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
}
.footer-meta a { text-decoration: none; }
.footer-meta a:hover { color: var(--accent); }
.footer-fine { margin-top: 14px; font-size: 12.5px; color: var(--dim); }

/* ---------- 404 ---------- */
.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 24px; }
.notfound h1 { font-family: var(--font-mono); font-size: clamp(72px, 18vw, 160px); color: var(--accent); letter-spacing: -0.05em; }
.notfound p { margin-top: 12px; color: var(--muted); font-size: 18px; }
.notfound .btn { margin-top: 28px; }

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-stagger] > * { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-stagger].is-in > * { opacity: 1; transform: none; }
.js [data-stagger].is-in > *:nth-child(2) { transition-delay: .08s; }
.js [data-stagger].is-in > *:nth-child(3) { transition-delay: .16s; }
.js [data-stagger].is-in > *:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js [data-stagger] > * { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .qd { grid-template-columns: 1fr; padding: 36px; }
  .qd-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cov { padding: 36px; }
  .cov-products { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid > div:nth-child(3) { border-left: 0; }
  .stats-grid > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .topbar { padding: 12px 16px; }
  .topbar nav li:nth-child(n+3):not(:last-child) { display: none; }
  .topbar nav a { padding: 8px 6px; font-size: 11px; letter-spacing: 0.12em; }
  .wrap { padding: 0 16px; }
  .section { padding: 84px 0; }
  .section-head { margin-bottom: 40px; }
  .hero-inner { padding: 0 16px; }
  .kicker { font-size: 10.5px; letter-spacing: 0.22em; }
  .lede { font-size: 16.5px; }
  .qd, .cov { padding: 24px 20px; border-radius: 18px; }
  .qd-logo { width: 190px; }
  .qd h3 { font-size: 25px; }
  .qd-thumbs { grid-template-columns: repeat(2, 1fr); }
  .qd-features { grid-template-columns: 1fr; gap: 16px; }
  .cov-card { padding: 22px; }
  .stats-grid > div { padding: 20px 16px; }
  .stats-grid dd { font-size: 18px; }
  .timeline::before { left: 5px; }
  .tl-item { grid-template-columns: 1fr; padding-left: 28px; padding-bottom: 44px; }
  .tl-item::before { left: 0; }
  .tl-body { padding-left: 0; margin-top: 6px; }
  .apps { grid-template-columns: 1fr; }
  .story p:not(.eyebrow) { font-size: 17px; }
  .story-rule { font-size: 19px !important; }
  .email { font-size: 15px; margin-left: 0; word-break: break-all; }
  .footer-meta { margin-top: 56px; }
}
@media (max-width: 380px) {
  .topbar nav li:nth-child(2) { display: none; }
}
