/* KeyBraid Tools — landing & login */
:root {
  --bg: #0a0a0b;
  --panel: #121214;
  --text: #f4f4f5;
  --muted: #9b9ba3;
  --orange: #FF6600;
  --orange-soft: rgba(255, 102, 0, 0.14);
  --border: #2a2a30;
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --display: "Syne", "IBM Plex Sans", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.landing, body.login-page {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  background: var(--bg);
}
.o { color: var(--orange); }

/* —— Nav —— */
.l-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(10, 10, 11, 0.78);
  border-bottom: 1px solid transparent;
  animation: l-fade-down 0.6s ease both;
}
.l-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.l-brand img { width: 36px; height: 36px; object-fit: contain; }
.l-brand-text {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
}
.l-brand-text em {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.72rem;
  margin-left: 6px;
  letter-spacing: 0.18em;
}
.l-nav nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.l-nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.l-nav nav a:hover { color: var(--text); }
.l-cta {
  border: 1px solid var(--orange) !important;
  color: var(--text) !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
}
.l-cta:hover { background: var(--orange-soft); }

/* —— Hero full-bleed —— */
.l-hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: flex-end;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
}
.l-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 10, 11, 0.25) 0%, rgba(10, 10, 11, 0.55) 45%, var(--bg) 100%),
    radial-gradient(ellipse 70% 55% at 70% 20%, rgba(255, 102, 0, 0.28), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(255, 102, 0, 0.08), transparent 50%),
    url("/static/keybraid-logo.png") 78% 38% / min(42vw, 420px) no-repeat,
    linear-gradient(135deg, #141416 0%, #0a0a0b 55%, #101012 100%);
  animation: l-bg-drift 14s ease-in-out infinite alternate;
}
.l-hero-inner {
  width: 100%;
  padding: clamp(48px, 10vh, 100px) clamp(18px, 4vw, 56px) clamp(48px, 8vh, 88px);
  max-width: 920px;
  animation: l-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.l-brand-hero {
  margin: 0 0 18px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.04em;
  line-height: 1;
}
.l-hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  max-width: 14ch;
}
.l-lead {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.55;
  max-width: 36rem;
  margin: 0 0 28px;
}
.l-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 9px;
  transition: transform 0.12s, filter 0.12s, border-color 0.12s, background 0.12s;
}
.btn.primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #111;
}
.btn.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn.ghost:hover { border-color: var(--orange); color: var(--orange); }

/* —— Sections —— */
.l-section {
  padding: clamp(56px, 10vw, 96px) clamp(18px, 4vw, 56px);
  max-width: 1080px;
  margin: 0 auto;
  animation: l-rise 0.7s ease both;
}
.l-band {
  max-width: none;
  background:
    linear-gradient(180deg, rgba(255, 102, 0, 0.04), transparent 40%),
    #0e0e10;
  border-block: 1px solid var(--border);
}
.l-band > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.l-eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 500;
}
.l-section h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  max-width: 18ch;
  line-height: 1.15;
}
.l-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 40rem;
  margin: 0 0 32px;
  line-height: 1.55;
}
.l-split, .l-pain {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.l-split h3, .l-pain h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--text);
}
.l-split p, .l-pain p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.l-steps {
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}
.l-steps li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.l-step-n {
  font-family: var(--mono);
  color: var(--orange);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.l-steps h3 { margin: 0 0 6px; font-size: 1.05rem; }
.l-steps p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 0.95rem; }

.l-founder {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: stretch;
}
.l-founder-line {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 18px;
  letter-spacing: 0.04em;
}
.l-founder-card {
  border: 1px solid rgba(255, 102, 0, 0.4);
  background: linear-gradient(160deg, rgba(255, 102, 0, 0.12), transparent 70%);
  padding: 28px 24px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.l-quote {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.l-quote-attr { margin: 0; color: var(--muted); font-size: 0.85rem; }

.l-cta-final { padding-bottom: clamp(72px, 12vw, 120px); }
.l-contact-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 26px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 102, 0, 0.1), transparent 55%);
}
.l-contact-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
  font-weight: 600;
}
.l-contact-mail {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  margin-bottom: 8px;
}
.l-contact-mail:hover { color: var(--orange); }
.l-contact-box .muted { margin: 0; font-size: 0.88rem; }
.l-caps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.l-caps li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  line-height: 1.5;
  font-size: 1rem;
}
.l-caps li:first-child { border-top: 1px solid var(--border); }
.l-caps strong { color: var(--text); font-weight: 600; }

.l-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 28px 0 36px;
}
.l-trust > div {
  padding: 18px 16px;
  border-left: 2px solid var(--orange);
  background: linear-gradient(90deg, var(--orange-soft), transparent);
}
.l-trust-k {
  display: block;
  font-family: var(--mono);
  color: var(--orange);
  font-size: 0.78rem;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.l-trust p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}

.l-disclosure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 24px;
  border: 1px solid rgba(255, 102, 0, 0.35);
  background: linear-gradient(135deg, rgba(255, 102, 0, 0.1), transparent 60%);
  border-radius: 12px;
}
.l-disclosure h3 { margin: 0 0 6px; font-size: 1.05rem; }
.l-disclosure p { margin: 0; color: var(--muted); font-size: 0.92rem; max-width: 36rem; }

/* —— Footer —— */
.l-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 28px;
  align-items: center;
  padding: 28px clamp(18px, 4vw, 56px) 36px;
  border-top: 1px solid var(--border);
  background: #080809;
}
.l-foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.l-foot-brand img { width: 32px; height: 32px; }
.l-foot-brand strong { display: block; font-size: 0.95rem; }
.l-foot-brand span { color: var(--muted); font-size: 0.78rem; }
.l-foot-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.l-foot-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}
.l-foot-links a:hover { color: var(--orange); }
.l-foot-copy {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

/* —— Login —— */
.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(700px 360px at 80% -10%, rgba(255, 102, 0, 0.16), transparent 55%),
    var(--bg);
}
.login-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 28px 24px;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  animation: l-rise 0.5s ease both;
}
.login-card h1 { margin: 14px 0 6px; font-family: var(--display); font-size: 1.4rem; }
.login-card .muted { color: var(--muted); margin: 0 0 16px; }
.login-card .small { font-size: 0.82rem; margin-top: 16px; }
.login-card a { color: var(--orange); }
.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.login-form input {
  background: #0d0d0f;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  border-radius: 8px;
}
.login-form input:focus { outline: none; border-color: var(--orange); }
.login-form .btn { width: 100%; margin-top: 6px; }
.form-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid #ef4444;
  color: #fecaca;
  padding: 10px 12px;
  margin: 0 0 14px;
  font-size: 0.88rem;
  border-radius: 8px;
}

@keyframes l-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes l-fade-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@keyframes l-bg-drift {
  from { background-position: 78% 38%, 70% 20%, 10% 80%, 78% 38%, 0 0; }
  to { background-position: 80% 42%, 68% 18%, 12% 78%, 76% 40%, 0 0; }
}

@media (max-width: 900px) {
  .l-split, .l-pain, .l-trust, .l-founder { grid-template-columns: 1fr; }
  .l-steps li { grid-template-columns: 48px 1fr; }
  .l-nav nav a:not(.l-cta) { display: none; }
  .l-foot { grid-template-columns: 1fr; }
  .l-foot-links { justify-content: flex-start; }
  .l-hero-bg {
    background:
      linear-gradient(180deg, rgba(10, 10, 11, 0.35) 0%, var(--bg) 85%),
      radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 102, 0, 0.22), transparent 55%),
      url("/static/keybraid-logo.png") 50% 18% / min(55vw, 220px) no-repeat,
      #101012;
  }
  .l-hero { min-height: min(88vh, 700px); align-items: flex-end; }
}

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