/* =========================================
   REDLINE — CLEAN DESIGN SYSTEM
========================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Inter:wght@400;500;600;700;800&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  color-scheme: dark;

  --bg: #151617;
  --surface: #1b1c1e;
  --surface-hover: #222426;
  --code-bg: #111213;

  --border: #2c2e31;
  --border-hover: #44474b;

  --text: #f4f4f5;
  --muted: #a1a3a7;
  --soft: #777b80;

  --red: #ed2542;
  --red-hover: #ff3654;
  --green: #55d6aa;

  --radius: 10px;
  --content: 1120px;

  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

.logo-redline {
  width: 90px;
  height: 30px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(237, 37, 66, .3);
  color: white;
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

/* =========================================
   NAVIGATION
========================================= */

.topbar {
  height: 70px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;

  position: sticky;
  top: 0;
  z-index: 100;

  background: rgba(21, 22, 23, .86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;

  font-family: 'Manrope', sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.8px;
  white-space: nowrap;
}

.brand-mark {
  width: 27px;
  height: 25px;

  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;

  transform: skew(-27deg);
}

.brand-mark i {
  display: block;
  background: var(--red);
  border-radius: 2px;
}

.brand-mark i:nth-child(2),
.brand-mark i:nth-child(3) {
  opacity: .72;
}

.brand-version {
  color: var(--muted);
  border-left: 1px solid var(--border);
  padding-left: 12px;
  font: 11px 'DM Mono', monospace;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 29px;
}

.main-nav a,
.top-actions {
  font-size: 12px;
  color: var(--muted);
}

.main-nav a {
  transition: color var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: white;
}

.main-nav a.active::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 8px;
  background: var(--red);
  border-radius: 5px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 19px;
}

.github-link span {
  color: var(--red);
}

.theme-toggle {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--border);
  padding-left: 17px;
  color: var(--text);
  font-size: 19px;
  cursor: pointer;
  transition: color var(--transition);
}

.theme-toggle:hover {
  color: var(--red);
}

.search-shortcut {
  display: flex;
  align-items: center;
  gap: 9px;

  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;

  transition: border-color var(--transition);
}

.search-shortcut:hover {
  border-color: var(--border-hover);
}

.search-icon {
  font-size: 18px;
}

kbd {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-hover);
  font: 10px 'DM Mono', monospace;
}

/* =========================================
   HERO
========================================= */

.hero {
  max-width: var(--content);
  margin: auto;
  padding: 115px 24px 55px;
  position: relative;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 420px;
  left: 50%;
  top: 0;
  transform: translateX(-50%);

  background: radial-gradient(ellipse,
      rgba(237, 37, 66, .12),
      transparent 68%);

  pointer-events: none;
}

.hero-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  position: relative;
}

.hero-mark {
  width: 84px;
  height: 84px;
  border: 1px solid #55575b;
  border-radius: 50%;

  display: grid;
  place-items: center;

  box-shadow:
    0 0 0 7px rgba(255, 255, 255, .025),
    0 0 40px rgba(237, 37, 66, .08);
}

.brand-mark.large {
  width: 39px;
  height: 37px;
  gap: 4px;
}

.hero-copy {
  max-width: 530px;
  text-align: left;
}

.eyebrow {
  color: #aeb0b5;
  font: 10px 'DM Mono', monospace;
  letter-spacing: 1.5px;
}

.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(237, 37, 66, .8);
}

h1 {
  font: 800 clamp(48px, 6vw, 72px)/1.05 'Manrope', sans-serif;
  letter-spacing: -3.5px;
  margin-bottom: 12px;
}

.period {
  color: var(--red);
}

.hero-subtitle {
  color: #e6e6e8;
  font: 700 21px/1.4 'Manrope', sans-serif;
  letter-spacing: -.5px;
  margin-bottom: 12px;
}

.hero-description {
  max-width: 470px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
  margin-bottom: 23px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;

  padding: 12px 17px;
  border-radius: 6px;

  font-size: 12px;
  font-weight: 700;

  transition:
    transform var(--transition),
    background var(--transition),
    border-color var(--transition);
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--red);
  color: white;
  box-shadow: 0 5px 24px rgba(237, 37, 66, .16);
}

.button-primary:hover {
  background: var(--red-hover);
}

.button-secondary {
  border: 1px solid #45474b;
  color: #e6e6e8;
}

.button-secondary:hover {
  border-color: #777;
  background: var(--surface);
}

.hero-footnote {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;

  margin-top: 65px;

  color: var(--soft);
  font: 10px 'DM Mono', monospace;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.hero-footnote .line {
  width: 55px;
  height: 1px;
  background: var(--border);
}

/* =========================================
   GLOBAL SECTIONS
========================================= */

.section-wrap {
  width: min(var(--content), calc(100% - 56px));
  margin: 0 auto;
}

.features,
.examples,
.updates,
.ecosystem {
  border-top: 1px solid var(--border);
}

.section-heading {
  text-align: center;
  margin-bottom: 35px;
}

.section-heading .eyebrow {
  display: block;
  margin-bottom: 10px;
}

.section-heading h2 {
  font: 800 27px 'Manrope', sans-serif;
  letter-spacing: -1px;
  margin-bottom: 9px;
}

.section-heading p {
  color: var(--muted);
  font-size: 13px;
}

.section-heading.compact h2 {
  font-size: 21px;
}

/* =========================================
   FEATURES
========================================= */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 65px 0 75px;
}

.feature {
  text-align: center;
  padding: 28px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background var(--transition), border-color var(--transition);
}

.feature:hover {
  background: var(--surface);
  border-color: var(--border);
}

.feature-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 17px;

  display: grid;
  place-items: center;

  color: var(--red);
  border: 1px solid rgba(237, 37, 66, .3);
  border-radius: 12px;
  background: rgba(237, 37, 66, .07);
}

.feature-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h2 {
  font: 700 15px 'Manrope', sans-serif;
  margin-bottom: 9px;
}

.feature p {
  max-width: 260px;
  margin: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

/* =========================================
   CODE EXAMPLES
========================================= */

.examples {
  padding: 65px 0;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.code-card {
  min-width: 0;
  overflow: hidden;

  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 9px;

  transition: border-color var(--transition);
}

.code-card:hover {
  border-color: #484b50;
}

.code-top {
  height: 43px;
  display: flex;
  align-items: center;
  gap: 11px;

  padding: 0 15px;

  background: #18191b;
  border-bottom: 1px solid var(--border);

  color: var(--muted);
  font: 11px 'DM Mono', monospace;
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots b {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ed5360;
}

.window-dots b:nth-child(2) {
  background: #e9b94a;
}

.window-dots b:nth-child(3) {
  background: #45bd83;
}

.copy-btn {
  margin-left: auto;
  padding: 5px 9px;

  border: 1px solid transparent;
  border-radius: 5px;

  background: transparent;
  color: var(--muted);

  font: 10px 'DM Mono', monospace;
  cursor: pointer;

  transition: all var(--transition);
}

.copy-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border);
  color: white;
}

pre {
  padding: 23px;
  overflow-x: auto;

  color: #d9dade;
  font: 12px/2 'DM Mono', monospace;
}

.kw {
  color: #d58bff;
}

.str {
  color: #9bcf83;
}

.fn {
  color: #70c9e8;
}

.example-note {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 20px;
}

.example-note a,
.small-link {
  color: var(--green);
  transition: color var(--transition);
}

.example-note a:hover,
.small-link:hover {
  color: #8af0c9;
}

/* =========================================
   UPDATES
========================================= */

.updates {
  padding: 55px 0;
}

.updates-list {
  width: min(600px, 100%);
  margin: auto;
}

.updates-list a {
  display: grid;
  grid-template-columns: 105px 1fr 20px;
  align-items: center;
  gap: 15px;

  padding: 15px 8px;
  border-bottom: 1px solid var(--border);

  color: #d5d6d8;
  font-size: 12px;

  transition: color var(--transition);
}

.updates-list a:hover {
  color: white;
}

.updates-list time {
  color: var(--soft);
  font: 10px 'DM Mono', monospace;
}

.update-arrow {
  color: var(--red);
  text-align: right;
}

/* =========================================
   ECOSYSTEM
========================================= */

.ecosystem {
  padding: 60px 0 65px;
  text-align: center;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  margin: 30px 0 23px;
}

.tech-tile {
  min-height: 82px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;

  color: var(--muted);
  font-size: 10px;

  transition: all var(--transition);
}

.tech-tile:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
  border-color: rgba(237, 37, 66, .45);
  color: white;
}

.tech-symbol {
  color: #e9e9eb;
  font: 700 18px 'Manrope', sans-serif;
}

.tech-symbol.node {
  color: #8fbd63;
}

.small-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}

/* =========================================
   CLOSING CTA
========================================= */

.closing-cta {
  width: min(var(--content), calc(100% - 56px));
  margin: 0 auto 55px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;

  padding: 38px 42px;

  background:
    radial-gradient(ellipse at 10% 50%,
      rgba(237, 37, 66, .12),
      transparent 65%),
    #1b1b1d;

  border: 1px solid rgba(237, 37, 66, .23);
  border-radius: 12px;
}

.closing-cta h2 {
  font: 800 25px/1.35 'Manrope', sans-serif;
  letter-spacing: -.7px;
  margin-top: 9px;
}

/* =========================================
   FOOTER
========================================= */

footer {
  min-height: 85px;
  padding: 20px 5%;

  display: flex;
  align-items: center;
  gap: 20px;

  border-top: 1px solid var(--border);
  color: var(--soft);
  font-size: 10px;
}

.footer-brand {
  color: var(--text);
  font-size: 16px;
}

.footer-brand .brand-mark {
  width: 22px;
  height: 20px;
}

.footer-tagline {
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.footer-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.footer-links a {
  transition: color var(--transition);
}

.footer-links a:hover {
  color: white;
}

.copyright {
  margin-left: 12px;
  color: var(--soft);
}

/* =========================================
   LIGHT THEME
========================================= */

.light-mode {
  color-scheme: light;

  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-hover: #f0f0f2;
  --code-bg: #202124;

  --border: #e3e3e6;
  --border-hover: #c7c7cb;

  --text: #202124;
  --muted: #686a70;
  --soft: #888a90;
}

.light-mode .topbar {
  background: rgba(247, 247, 248, .88);
  border-color: var(--border);
}

.light-mode .main-nav a:hover,
.light-mode .main-nav a.active {
  color: var(--text);
}

.light-mode .hero-subtitle {
  color: #303136;
}

.light-mode .hero-mark {
  border-color: #c5c5c8;
}

.light-mode .feature-icon {
  color: var(--red);
}

.light-mode .feature:hover,
.light-mode .tech-tile {
  background: white;
}

.light-mode .feature h2,
.light-mode .tech-symbol {
  color: #252629;
}

.light-mode .updates-list a {
  color: #424348;
}

.light-mode .closing-cta {
  background:
    radial-gradient(ellipse at 10% 50%, rgba(237, 37, 66, .08), transparent 65%),
    #fff;
}

.light-mode .footer-brand {
  color: var(--text);
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1000px) {
  .topbar {
    padding: 0 3%;
  }

  .main-nav {
    gap: 17px;
  }

  .top-actions {
    gap: 12px;
  }

  .tech-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 760px) {
  .main-nav {
    display: none;
  }

  .hero {
    padding-top: 85px;
  }

  .hero-brand {
    gap: 20px;
  }

  .features {
    gap: 10px;
  }

  .feature {
    padding: 22px 12px;
  }

  .code-grid {
    grid-template-columns: 1fr;
  }

  .closing-cta {
    padding: 30px;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 62px;
    padding: 0 18px;
  }

  .brand-version,
  .github-link {
    display: none;
  }

  .top-actions {
    margin-left: auto;
  }

  .search-shortcut {
    display: flex;
    padding: 6px 9px;
  }

  .hero {
    padding: 65px 20px 35px;
  }

  .hero-brand {
    flex-direction: column;
    gap: 20px;
  }

  .hero-mark {
    width: 72px;
    height: 72px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero .eyebrow {
    justify-content: center;
  }

  h1 {
    font-size: 53px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-description {
    font-size: 13px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-footnote {
    margin-top: 42px;
  }

  .features {
    grid-template-columns: 1fr;
    padding: 35px 0 45px;
    gap: 8px;
  }

  .feature p {
    max-width: 290px;
  }

  .section-wrap,
  .closing-cta {
    width: calc(100% - 36px);
  }

  .examples,
  .updates,
  .ecosystem {
    padding-top: 45px;
    padding-bottom: 45px;
  }

  .section-heading h2 {
    font-size: 23px;
  }

  pre {
    padding: 17px;
    font-size: 10px;
  }

  .updates-list a {
    grid-template-columns: 85px 1fr 15px;
    gap: 9px;
    font-size: 11px;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .closing-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 25px;
    margin-bottom: 35px;
  }

  .closing-cta h2 {
    font-size: 22px;
  }

  footer {
    padding: 22px 18px;
    flex-wrap: wrap;
    gap: 13px;
  }

  .footer-links {
    width: 100%;
    margin: 8px 0 0;
    order: 3;
  }

  .copyright {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
