/* Blackrain Systems — colors from the Branding Kit */
:root {
  --teal: #3DDCC4;
  --blackout: #0B0D0F;
  --terminal: #15191D;
  --panel: #111417;
  --line: #2A3036;
  --line-strong: #3A4249;
  --white: #E8ECEF;
  --grey: #8E979F;
  --radius: 16px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--blackout);
  color: var(--white);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--teal); color: var(--blackout); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 16px; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.prompt, .accent, .cursor { color: var(--teal); }
.cursor { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  color: var(--teal);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  border-radius: 12px;
  background: var(--teal); color: var(--blackout);
  font-weight: 700; text-decoration: none;
  border: 1px solid var(--teal);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(61, 220, 196, .25); }
.btn--ghost { background: transparent; color: var(--white); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--teal); box-shadow: none; }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn--big { font-family: var(--mono); font-weight: 800; font-size: clamp(16px, 4vw, 22px); padding: 16px 28px; overflow-wrap: anywhere; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 13, 15, .82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { border-radius: 9px; }
.brand__word { font-family: var(--mono); font-weight: 800; font-size: 18px; }
.nav__links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--grey); text-decoration: none; font-size: 15px; }
.nav__links a:hover { color: var(--white); }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero__rain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 70% at 20% 40%, rgba(11,13,15,.92), rgba(11,13,15,.55) 60%, rgba(11,13,15,.2)),
    linear-gradient(to bottom, transparent 70%, var(--blackout));
}
.hero__inner { position: relative; z-index: 1; padding: clamp(72px, 13vw, 150px) 0 clamp(72px, 11vw, 130px); max-width: 780px; margin-left: max(16px, (100% - 1120px) / 2); }
.hero h1 { font-size: clamp(36px, 6.4vw, 66px); font-weight: 800; }
.lead { color: var(--grey); font-size: clamp(17px, 2.2vw, 20px); margin-top: 22px; max-width: 640px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Sections */
.section { padding: clamp(64px, 10vw, 110px) 0; }
.section--panel { background: var(--panel); border-block: 1px solid var(--line); }
.section h2 { font-size: clamp(28px, 4.2vw, 42px); font-weight: 800; max-width: 720px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.card {
  background: var(--terminal); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 20px;
  display: grid; place-items: center;
  background: rgba(61, 220, 196, .1); border: 1px solid rgba(61, 220, 196, .3);
}
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--grey); font-size: 16px; }

/* Work */
.work {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center;
  margin-top: 44px; padding: clamp(24px, 4vw, 40px);
  background: var(--terminal); border: 1px solid var(--line); border-radius: var(--radius);
}
.work__title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.work h3 { font-size: 28px; }
.work p { color: var(--grey); }
.pill {
  font-size: 13px; font-weight: 600; color: var(--teal);
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(61, 220, 196, .4); background: rgba(61, 220, 196, .08);
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 22px 0 0; }
.tags li { font-family: var(--mono); font-size: 13px; color: var(--white); padding: 5px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.term { background: var(--blackout); border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.term__bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.term__bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.term__body { margin: 0; padding: 20px 22px 24px; font-family: var(--mono); font-weight: 500; font-size: 15px; line-height: 1.8; color: var(--white); white-space: pre; overflow-x: auto; }
.t-dim { color: var(--grey); }
.t-ok { color: var(--teal); }
.t-accent { color: var(--teal); font-weight: 800; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: none; }
.steps li { border-top: 2px solid var(--line-strong); padding-top: 20px; }
.steps__num { font-family: var(--mono); font-weight: 800; color: var(--teal); font-size: 14px; }
.steps h3 { font-size: 19px; margin: 10px 0 8px; }
.steps p { color: var(--grey); font-size: 16px; }

/* Contact */
.contact { text-align: center; background: radial-gradient(60% 80% at 50% 100%, rgba(61,220,196,.12), transparent 70%); border-top: 1px solid var(--line); }
.contact__inner { display: flex; flex-direction: column; align-items: center; }
.contact h2 { margin-inline: auto; }
.contact .lead { margin-inline: auto; margin-bottom: 34px; }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; list-style: none; padding: 0; margin: 34px 0 0; }
.social a { color: var(--grey); text-decoration: none; font-weight: 600; }
.social a:hover { color: var(--teal); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--grey); font-size: 14px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer__inner > span:first-child { font-family: var(--mono); font-weight: 800; color: var(--white); }

/* Phones and small tablets */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .work { grid-template-columns: 1fr; }
}
.brand__word, .btn--small { white-space: nowrap; }

@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__inner { gap: 12px; }
  .brand__word { font-size: 16px; }
  .btn--small { padding: 8px 14px; font-size: 14px; }
  .steps { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
  .term__body { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
  .btn, .card { transition: none; }
}

/* Legal pages (privacy) */
.legal__inner { max-width: 760px; }
.legal h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 800; }
.legal__date { color: var(--grey); margin: 10px 0 30px; font-size: 15px; }
.legal h2 { font-size: 22px; margin: 36px 0 12px; }
.legal p, .legal li { color: #C9D0D5; }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 22px; margin: 12px 0 0; }
.legal li + li { margin-top: 10px; }
.legal a { color: var(--teal); }
.footer__inner a { color: var(--grey); text-decoration: none; }
.footer__inner a:hover { color: var(--teal); }
