/* ==========================================================================
   reverseengineer.eu — landing page styles
   Type: Red Hat Display (400–700) + Source Code Pro (400–600), self-hosted.
   Palette: #08080B canvas, #F5F5F8 text, blue → purple → pink accent.
   ========================================================================== */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Red Hat Display";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/red-hat-display-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Red Hat Display";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/red-hat-display-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Code Pro";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/source-code-pro-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Code Pro";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/source-code-pro-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */

:root {
  --bg: #08080b;
  --surface: #0c0c11;
  --surface-2: #0e0e13;
  --surface-3: #14141a;
  --line: #20202a;
  --line-soft: #1e1e26;
  --line-faint: #16161c;

  --text: #f5f5f8;
  --text-dim: #9c9caa;
  --text-muted: #8f8f9e;
  --text-faint: #6e6e7a;
  --text-fainter: #5e5e6b;
  --accent: #a78bfa;

  --grad: linear-gradient(90deg, #2c5bff 0%, #7b2ff7 55%, #f0214e 100%);

  --font-sans: "Red Hat Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, monospace;

  --mono-label: clamp(9.5px, 0.84vw, 12px);
  --mono-body: clamp(10.5px, 0.9vw, 13px);
  --body-sm: clamp(12.5px, 1.05vw, 15px);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  color-scheme: dark;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: #7b2ff7;
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Layout helpers ---------- */

.container {
  width: 100%;
  max-width: 1248px; /* 1200px of content + 2 × 24px gutter */
  margin-inline: auto;
  padding-inline: 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--mono-label);
  line-height: 1.25;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #8b8b99;
}

.eyebrow--faint {
  color: var(--text-fainter);
  letter-spacing: 1.4px;
}

.grad-text {
  display: inline-block;
  /* The gradient is clipped to the text, so give its background box enough
     room for descenders like the "g" in "working". */
  padding-bottom: 0.2em;
  margin-bottom: -0.2em;
  background-image: var(--grad);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.link {
  color: var(--text);
  text-decoration-color: #35353f;
  text-underline-offset: 3px;
}

.link:hover {
  text-decoration-color: var(--accent);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.06), rgb(255 255 255 / 0) 70%),
    rgb(8 8 11 / 0.55);
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.06),
    0 18px 45px rgb(0 0 0 / 0.28);
}

/* Specular highlight along the top edge of the glass. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(255 255 255 / 0.18),
    transparent
  );
  pointer-events: none;
}

/* Keep the bar readable when blur is unavailable or transparency is reduced. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: rgb(8 8 11 / 0.94);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-block: 24px;
}

.brand {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand__mark {
  width: 34px;
  height: 34px;
}

.brand__name {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.nav {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__link {
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav__link:hover {
  color: var(--text);
}

.header__actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6.4px;
  width: 44px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.menu-toggle__bar {
  display: block;
  width: 28px;
  height: 1.6px;
  background: var(--text);
  transition: transform 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.site-menu {
  background: rgb(11 11 16 / 0.72);
  border-top: 1px solid rgb(255 255 255 / 0.06);
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.site-menu[hidden] {
  display: none;
}

.site-menu__inner {
  display: flex;
  flex-direction: column;
  padding-block: 12px 20px;
}

.site-menu__link {
  padding-block: 13px;
  font-size: 16px;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--line-faint);
}

.site-menu__link:hover {
  color: var(--text);
}

.site-menu .btn {
  margin-top: 18px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding-inline: 48px;
  border: 0;
  border-radius: 28px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background-image: var(--grad);
  color: #fff;
}

.btn--primary:hover {
  filter: brightness(1.08);
}

.btn--outline {
  border: 1.4px solid #35353f;
  background: transparent;
  color: #e7e7ed;
}

.btn--outline:hover {
  border-color: #4b4b58;
  background: var(--surface);
}

.btn--nav {
  min-width: 180px;
  height: 42px;
  padding-inline: 32px;
  border: 1px solid #2c2c36;
  border-radius: 21px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 14px;
}

.btn--nav:hover {
  border-color: #3a3a46;
}

.btn--light {
  min-width: 180px;
  height: 52px;
  padding-inline: 40px;
  border-radius: 26px;
  background: var(--text);
  color: #0b0b10;
  font-weight: 600;
}

.btn--light:hover {
  background: #fff;
}

.btn__arrow {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 80px;
  text-align: center;
}

.hero__title {
  margin-top: 33px;
  font-size: clamp(44px, 6.4vw, 92px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.024em;
}

.title-line {
  display: block;
}

.hero__lede {
  max-width: 660px;
  margin: 42px auto 0;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.6;
  color: var(--text-dim);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 48px;
}

/* ---------- Showcase / terminal ---------- */

.showcase {
  position: relative;
  margin-top: 74px;
}

.showcase__glow {
  position: absolute;
  top: -70px;
  left: 50%;
  width: min(1120px, 100%);
  height: 500px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(
    560px 500px at 50% 50%,
    rgba(91, 33, 201, 0.3) 0%,
    rgba(91, 33, 201, 0.13) 45%,
    rgba(91, 33, 201, 0.03) 75%,
    rgba(91, 33, 201, 0) 100%
  );
  pointer-events: none;
}

.terminal {
  position: relative;
  max-width: 980px;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid #24242e;
  border-radius: 18px;
  background: var(--surface);
}

.terminal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 28px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--mono-label);
  line-height: 1.25;
}

.terminal__path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8b8b99;
}

.terminal__meta {
  white-space: nowrap;
  color: var(--text-fainter);
}

.terminal__live {
  display: none;
  color: var(--accent);
}

.terminal__body {
  padding: 29px 28px 56px;
}

.run-command {
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: var(--mono-body);
  color: #e3e3ea;
}

.run-lines {
  display: grid;
  row-gap: 15px;
}

.run-line {
  display: grid;
  grid-template-columns: 5.4em 1fr;
  column-gap: 1.4em;
  font-family: var(--font-mono);
  font-size: var(--mono-body);
  line-height: 1.45;
  color: #7e7e8c;
}

.run-line--done {
  color: var(--accent);
}

/* ---------- Sections ---------- */

.section {
  margin-top: 40px;
}

.section + .section {
  margin-top: 74px;
}

.section__title {
  margin-top: 16px;
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: -0.026em;
  text-wrap: balance;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 38px;
}

.card {
  min-height: 280px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

/* Collapse the doubled 1px border between neighbouring cards. */
.card + .card {
  margin-left: -1px;
}

.card__index {
  font-family: var(--font-mono);
  font-size: var(--mono-label);
  color: var(--text-fainter);
}

.card__title {
  margin-top: 27px;
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: -0.02em;
}

.card__body {
  max-width: 52ch;
  margin-top: 8px;
  font-size: var(--body-sm);
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 50px;
  margin-top: 20px;
  padding-top: 34px;
  border-top: 1px solid var(--line-soft);
}

.step__index {
  font-family: var(--font-mono);
  font-size: var(--mono-label);
  color: var(--text-fainter);
}

.step__title {
  margin-top: 16px;
  font-size: clamp(16px, 1.3vw, 18px);
  font-weight: 600;
  line-height: 1.33;
}

.step__body {
  margin-top: 2px;
  font-size: clamp(12.5px, 1vw, 14px);
  line-height: 1.57;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* ---------- Call to action ---------- */

.cta {
  margin-top: 60px;
}

.cta__frame {
  padding: 2px;
  border-radius: 20px;
  background-image: var(--grad);
}

.cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 152px;
  padding: 40px 48px;
  border-radius: 18px;
  background: #0b0b10;
}

.cta__title {
  font-size: clamp(21px, 2.2vw, 32px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.cta__body {
  margin-top: 10px;
  font-size: clamp(12px, 1vw, 14px);
  color: var(--text-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--line-soft);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px 56px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer__mark {
  width: 34px;
  height: 34px;
}

.footer__copy {
  font-size: 13px;
  color: var(--text-faint);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer__links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer__links a:hover {
  color: var(--text-dim);
}

/* ---------- Inner pages ---------- */

.page {
  padding-block: 76px 96px;
}

.page__title {
  margin-top: 16px;
  font-size: clamp(32px, 4.2vw, 56px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.page__lede {
  max-width: 640px;
  margin-top: 20px;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.6;
  color: var(--text-dim);
}

.page__back {
  margin-top: 40px;
}

.legal__note {
  max-width: 640px;
  margin-top: 24px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.legal {
  max-width: 640px;
  margin-top: 36px;
}

.legal dt {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: var(--mono-label);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-fainter);
}

.legal dd {
  margin-top: 6px;
  color: var(--text-dim);
}

.legal--prose h2 {
  margin-top: 32px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.legal--prose p {
  margin-top: 8px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ---------- Tablet ---------- */

@media (max-width: 900px) {
  .showcase__glow {
    display: none;
  }

  .nav,
  .btn--nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .header__actions {
    grid-column: 2;
    gap: 0;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card {
    min-height: 0;
  }

  .card + .card {
    margin-left: 0;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 36px;
  }
}

@media (min-width: 901px) {
  .site-menu {
    display: none;
  }
}

/* ---------- Phone ---------- */

@media (max-width: 640px) {
  .header-inner {
    padding-block: 16px;
  }

  .brand__mark {
    width: 26px;
    height: 26px;
  }

  .brand__name {
    font-size: 16px;
    letter-spacing: -0.2px;
  }

  .hero {
    padding-top: 38px;
  }

  html {
    scroll-padding-top: 72px;
  }

  .hero__title {
    margin-top: 12px;
    line-height: 1.16;
  }

  .hero__lede {
    margin-top: 16px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    margin-top: 35px;
  }

  .btn--primary {
    height: 52px;
    border-radius: 26px;
    padding-inline: 24px;
  }

  .btn--outline {
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    font-size: 14px;
  }

  .btn--outline:hover {
    background: none;
  }

  .btn__arrow {
    display: block;
  }

  .showcase {
    margin-top: 23px;
  }

  .terminal {
    border-radius: 14px;
  }

  .terminal__head {
    padding: 10px 14px;
  }

  .terminal__meta {
    display: none;
  }

  .terminal__live {
    display: inline;
  }

  .terminal__body {
    padding: 14px 14px 26px;
  }

  .run-command {
    margin-bottom: 12px;
    font-size: 10.5px;
  }

  .run-lines {
    row-gap: 11px;
  }

  .run-line {
    grid-template-columns: 4.4em 1fr;
    column-gap: 1em;
    font-size: 10.5px;
  }

  .section {
    margin-top: 40px;
  }

  .section + .section {
    margin-top: 50px;
  }

  .section__title {
    margin-top: 8px;
    font-size: 28px;
    line-height: 1.18;
    letter-spacing: -0.8px;
  }

  .cards {
    margin-top: 24px;
    gap: 16px;
  }

  .card {
    padding: 24px;
    border-radius: 14px;
  }

  .card__index {
    font-size: 9.5px;
  }

  .card__title {
    margin-top: 8px;
    font-size: 17px;
    letter-spacing: -0.3px;
  }

  .card__body {
    margin-top: 7px;
    font-size: 12.5px;
    line-height: 1.5;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 20px;
    padding-top: 0;
    border-top: 0;
  }

  .step {
    display: grid;
    grid-template-columns: 30px 1fr;
    row-gap: 8px;
    padding-block: 12px;
    border-top: 1px solid #1a1a22;
  }

  .step__index {
    grid-column: 1;
    grid-row: 1;
    padding-top: 2px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
  }

  .step__title {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
    font-size: 16px;
    letter-spacing: -0.2px;
  }

  .step__body {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0;
    font-size: 12.5px;
    line-height: 1.5;
  }

  .cta {
    margin-top: 44px;
  }

  .cta__frame {
    border-radius: 18px;
  }

  .cta__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    padding: 26px 22px;
    border-radius: 16px;
  }

  .cta__title {
    font-size: 21px;
    line-height: 1.3;
    letter-spacing: -0.6px;
  }

  .cta__body {
    margin-top: 8px;
    font-size: 12px;
  }

  .btn--light {
    width: 100%;
    height: 44px;
    margin-top: 22px;
    border-radius: 22px;
    font-size: 14px;
  }

  .site-footer {
    margin-top: 50px;
  }

  .footer-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding-block: 12px 40px;
  }

  .footer__brand {
    gap: 12px;
  }

  .footer__mark {
    width: 24px;
    height: 24px;
  }

  .footer__copy {
    font-size: 11px;
  }

  .footer__links {
    flex-basis: 100%;
    gap: 16px;
  }

  .footer__links a {
    font-size: 9.5px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
  }

  .page {
    padding-block: 48px 64px;
  }
}
