/* ===================================================================
   Red Swift Systems — 2026 overhaul
   Dual dark/light editorial. Dark base #021622, warm paper, brand red.
   =================================================================== */

:root {
  --ink:        #021622;   /* dark base */
  --ink-800:    #041d2c;   /* raised dark panel */
  --ink-700:    #0a2a3a;   /* dark hover / borders */
  --ink-900:    #010d15;   /* deepest (footer) */
  --paper:      #f4efe6;   /* warm off-white */
  --paper-2:    #ece4d6;   /* deeper paper */
  --cream:      #f4efe6;   /* text on dark */
  --cream-60:   rgba(244, 239, 230, 0.62);
  --cream-40:   rgba(244, 239, 230, 0.40);
  --cream-15:   rgba(244, 239, 230, 0.15);
  --cream-08:   rgba(244, 239, 230, 0.08);
  --ink-70:     rgba(2, 22, 34, 0.70);
  --ink-50:     rgba(2, 22, 34, 0.48);
  --ink-12:     rgba(2, 22, 34, 0.12);
  --red:        #ff0000;
  --red-bright: #ff2e2e;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', system-ui, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 64px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: var(--red); color: #fff; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* --- Shared type ------------------------------------------------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-50);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--red);
}
.eyebrow--light { color: var(--cream-60); }

.h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.h2--light { color: var(--cream); }

.lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(21px, 2.6vw, 30px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink-70);
}
.mark { color: var(--ink); font-weight: 600; }

/* --- Sections ---------------------------------------------------- */
[id] { scroll-margin-top: 84px; }
.section { padding: clamp(72px, 11vw, 150px) 0; }
.section--paper { background: var(--paper); color: var(--ink); }
.section--ink   { background: var(--ink); color: var(--cream); }

/* --- Buttons ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-bright); }
.btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--cream-40);
}
.btn--ghost:hover { border-color: var(--cream); background: var(--cream-08); }
.btn__play {
  width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
}

/* ===================================================================
   HEADER
   =================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .35s ease, border-color .35s ease, padding .35s ease;
  border-bottom: 1px solid transparent;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
  transition: padding .35s ease;
}
.site-header.scrolled {
  background: rgba(2, 22, 34, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--cream-15);
}
.site-header.scrolled .site-header__inner { padding-top: 14px; padding-bottom: 14px; }
.brand__logo { height: 26px; width: auto; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: 0.01em;
  position: relative;
  padding: 4px 0;
}
.nav__link:not(.nav__link--cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.nav__link:not(.nav__link--cta):hover::after { transform: scaleX(1); }
.nav__link--cta {
  border: 1px solid var(--cream-40);
  border-radius: 999px;
  padding: 8px 20px;
  transition: background .25s, border-color .25s;
}
.nav__link--cta:hover { background: var(--red); border-color: var(--red); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--cream);
  transition: transform .3s, opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================================================================
   HERO
   =================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--cream);
  overflow: hidden;
  padding: 120px 0 90px;
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
}
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(2,22,34,0.55) 0%, rgba(2,22,34,0.35) 30%, rgba(2,22,34,0.78) 100%),
    radial-gradient(120% 90% at 75% 30%, rgba(2,22,34,0) 0%, rgba(2,22,34,0.65) 100%);
}
.hero__overlay::after {
  /* brand tint */
  content: "";
  position: absolute; inset: 0;
  background: var(--ink);
  mix-blend-mode: color;
  opacity: 0.32;
}
.hero__inner { position: relative; z-index: 2; max-width: 880px; }
.hero__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--cream);
}
.hero__lead {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
  color: var(--cream-60);
  max-width: 540px;
  margin-bottom: 40px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero__scroll {
  position: absolute;
  left: var(--pad); bottom: 34px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-60);
}
.hero__scroll svg { animation: nudge 2s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0);} 50% { transform: translateY(5px);} }

/* ===================================================================
   PRODUCT / INTRO
   =================================================================== */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
  padding-bottom: clamp(56px, 8vw, 100px);
  border-bottom: 1px solid var(--ink-12);
}
.intro__logo { height: 92px; width: auto; margin-top: 6px; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(56px, 8vw, 90px);
}
.feature { display: flex; gap: 18px; }
.feature__num {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--red);
  padding-top: 8px;
}
.feature__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.feature__text { color: var(--ink-70); font-size: 17px; }

/* ===================================================================
   SPEED
   =================================================================== */
.speed { padding: clamp(80px, 12vw, 160px) 0; }
.speed__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}
.speed__num {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(120px, 22vw, 300px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--cream);
}
.speed__x { color: var(--red); font-weight: 600; }
.speed__label {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.35;
  color: var(--cream-60);
  max-width: 460px;
}

/* ===================================================================
   DEVICES
   =================================================================== */
.devices {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.devices__img { filter: drop-shadow(0 30px 50px rgba(2,22,34,0.18)); }
.ticks { margin-top: 28px; }
.ticks li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-top: 1px solid var(--ink-12);
  color: var(--ink-70);
  font-size: 17px;
}
.ticks li:last-child { border-bottom: 1px solid var(--ink-12); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 22px;
  width: 14px; height: 8px;
  border-left: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(-45deg);
}

/* ===================================================================
   PROFIT
   =================================================================== */
.profit {
  position: relative;
  padding: clamp(96px, 16vw, 220px) 0;
  overflow: hidden;
}
.profit__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.profit__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(2,22,34,0.92) 0%, rgba(2,22,34,0.78) 45%, rgba(2,22,34,0.45) 100%);
}
.profit__inner { position: relative; z-index: 2; max-width: 620px; }
.profit__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 5.5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  color: var(--cream);
}
.profit__eq { color: var(--red); }
.profit__text { color: var(--cream-60); margin-bottom: 16px; font-size: 17px; }

/* ===================================================================
   WORK / PORTFOLIO
   =================================================================== */
.work__head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.worklist { border-top: 1px solid var(--cream-15); }
.worklink { border-bottom: 1px solid var(--cream-15); }
.worklink__a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.6fr) minmax(0, 1fr) 28px;
  gap: clamp(16px, 3vw, 40px);
  align-items: center;
  padding: clamp(22px, 3vw, 34px) clamp(8px, 2vw, 24px);
  position: relative;
  transition: background .3s ease, padding-left .3s ease;
}
.worklink__a::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent, var(--red));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.worklink__a:hover { background: var(--cream-08); padding-left: clamp(18px, 3vw, 36px); }
.worklink__a:hover::before { transform: scaleY(1); }
.worklink__num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cream-40);
}
.worklink__name {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.015em;
  color: var(--cream);
  transition: color .3s ease;
}
.worklink__name--mono {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.01em;
}
.worklink__a:hover .worklink__name { color: var(--accent, var(--red)); }
.worklink__desc {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  color: var(--cream-60);
  max-width: 46ch;
}
.worklink__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream);
  padding: 5px 11px;
  border: 1px solid var(--cream-15);
  border-radius: 999px;
}
.worklink__dom {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cream-40);
}
.worklink__arrow {
  font-size: 22px;
  color: var(--cream-40);
  transition: transform .3s ease, color .3s ease;
  justify-self: end;
}
.worklink__a:hover .worklink__arrow {
  color: var(--accent, var(--red));
  transform: translate(4px, -4px);
}

/* ===================================================================
   STUDIO
   =================================================================== */
.studio__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}
.studio__facts {
  display: flex;
  flex-wrap: wrap;
  margin-top: 40px;
  border-top: 1px solid var(--ink-12);
}
.studio__facts > div {
  padding: 18px 32px 18px 0;
  margin-right: 32px;
  border-right: 1px solid var(--ink-12);
}
.studio__facts > div:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.studio__facts dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: 6px;
}
.studio__facts dd {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

/* ===================================================================
   CONTACT
   =================================================================== */
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}
.contact__hint { margin-top: 22px; color: var(--cream-60); font-size: 16px; }
.contact__hint a { color: var(--cream); border-bottom: 1px solid var(--red); }
.contact__form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-40);
}
.field input, .field textarea {
  font-family: var(--sans);
  font-size: 17px;
  color: var(--cream);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--cream-15);
  padding: 12px 2px;
  transition: border-color .3s ease;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--red);
}
.field input::placeholder, .field textarea::placeholder { color: var(--cream-40); }
.contact__form .btn { align-self: flex-start; margin-top: 6px; }
.form-status { font-size: 15px; color: var(--cream-60); min-height: 1.2em; }
.form-status.is-ok { color: #4fd08a; }
.form-status.is-err { color: var(--red-bright); }

/* ===================================================================
   FOOTER
   =================================================================== */
.footer { background: var(--ink-900); color: var(--cream); padding: 72px 0 40px; }
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 40px;
  align-items: start;
}
.footer__logo { height: 28px; width: auto; margin-bottom: 14px; }
.footer__tag { font-family: var(--serif); font-style: italic; color: var(--cream-40); font-size: 16px; }
.footer__nav { display: flex; flex-direction: column; gap: 12px; }
.footer__nav a { color: var(--cream-60); font-size: 15px; width: fit-content; transition: color .2s; }
.footer__nav a:hover { color: var(--cream); }
.footer__legal { text-align: right; }
.footer__legal p { margin-bottom: 14px; }
.footer__link {
  color: var(--cream-60);
  font-size: 14px;
  margin-left: 18px;
  transition: color .2s;
}
.footer__link:first-child { margin-left: 0; }
.footer__link:hover { color: var(--cream); }
.footer__copy { font-family: var(--mono); font-size: 11px; color: var(--cream-40); letter-spacing: 0.04em; }

/* ===================================================================
   POPUP
   =================================================================== */
.popup {
  display: none;
  position: fixed; inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.popup.is-open { display: flex; }
.popup__bg { position: absolute; inset: 0; background: rgba(1,13,21,0.75); backdrop-filter: blur(6px); }
.popup__body {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  max-width: 1000px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 14px;
}
.popup__title { font-family: var(--serif); font-weight: 600; font-size: 30px; margin-bottom: 24px; }
.popup__close {
  position: absolute; top: 18px; right: 20px;
  font-size: 30px; line-height: 1;
  background: none; border: none; cursor: pointer; color: var(--ink);
}
.popup__columns { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.popup__col p, .popup__col ul { margin-bottom: 16px; font-size: 16px; color: var(--ink-70); }
.popup__col ul { list-style: disc; padding-left: 20px; }
.popup__col strong { color: var(--ink); }

/* ===================================================================
   VIDEO OVERLAY
   =================================================================== */
.video-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.video-overlay.is-open { display: flex; }
.video-overlay__bg { position: absolute; inset: 0; background: rgba(1,13,21,0.92); cursor: pointer; }
.video-overlay__wrap { position: relative; width: 100%; max-width: 980px; }
.video-overlay__close {
  position: absolute; top: -42px; right: 0;
  font-size: 34px; line-height: 1;
  color: var(--cream); background: none; border: none; cursor: pointer;
}
.video-overlay__player { width: 100%; border-radius: 8px; background: #000; }

/* ===================================================================
   REVEAL ANIMATION
   =================================================================== */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll svg { animation: none; }
  .btn:hover { transform: none; }
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 900px) {
  /* Full-screen slide-in menu sheet */
  .nav {
    position: fixed;
    inset: 0;
    z-index: 105;                 /* above the header bar */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    background: var(--ink-800);
    padding: 96px var(--pad) 48px;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .42s cubic-bezier(.2,.7,.3,1), visibility .42s;
  }
  .nav.is-open { transform: translateX(0); visibility: visible; }

  .nav__link {
    color: var(--cream) !important;
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(30px, 8vw, 46px);
    letter-spacing: -0.015em;
    padding: 22px 4px;
    border: none;
    border-bottom: 1px solid var(--cream-15);
    display: flex;
    align-items: baseline;
    gap: 16px;
  }
  .nav__link::before {
    content: "0" counter(navitem);
    counter-increment: navitem;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 400;
    color: var(--red-bright);
    transform: translateY(-0.4em);
  }
  .nav { counter-reset: navitem; }
  /* neutralise the desktop underline pseudo-element */
  .nav__link:not(.nav__link--cta)::after { display: none; }
  .nav__link--cta {
    color: var(--cream) !important;
    border: none;
    border-bottom: 1px solid var(--cream-15);
    border-radius: 0;
    padding: 22px 4px;
  }
  .nav__link:active { color: var(--red-bright) !important; }

  .nav-toggle { display: flex; position: relative; z-index: 110; }
  /* header turns solid while the menu is open so the X is always legible.
     backdrop-filter must be removed: it makes the header a containing block
     for the fixed .nav, which would otherwise clip the menu to header height. */
  .site-header.menu-open {
    background: var(--ink-800);
    border-bottom-color: var(--cream-15);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .intro { grid-template-columns: 1fr; }
  .intro__logo { height: 74px; }
  .features { grid-template-columns: 1fr; }
  .speed__inner { grid-template-columns: 1fr; }
  .devices { grid-template-columns: 1fr; }
  .studio__inner { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; }

  .worklink__a {
    grid-template-columns: 30px 1fr;
    grid-template-areas:
      "num main"
      "num meta";
    row-gap: 14px;
    align-items: start;
  }
  .worklink__num { grid-area: num; padding-top: 6px; }
  .worklink__main { grid-area: main; }
  .worklink__meta { grid-area: meta; flex-direction: row; align-items: center; gap: 14px; }
  .worklink__arrow { display: none; }

  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .footer__legal { text-align: left; }
  .footer__link:first-child { margin-left: 0; }
  .popup__columns { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero { padding-top: 110px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
  .studio__facts { flex-direction: column; }
  .studio__facts > div {
    border-right: none;
    border-bottom: 1px solid var(--ink-12);
    margin-right: 0;
    padding: 14px 0;
  }
  .studio__facts > div:last-child { border-bottom: none; }
}
