/* =========================================================
   STREETGLIDE.RU
   Main stylesheet
   ========================================================= */

:root {
  --black: #111111;
  --black-soft: #1a1a1a;
  --cream: #f2eadc;
  --cream-dark: #d8cdbb;
  --orange: #f15a24;
  --orange-dark: #bf3d12;
  --white: #fffdf8;
  --gray: #8d8a84;

  --font-display: "Oswald", "Arial Narrow", Arial, sans-serif;
  --font-mono: "Roboto Mono", Consolas, monospace;

  --page-padding: clamp(18px, 4vw, 64px);
  --border: 2px solid var(--black);
  --shadow: 8px 8px 0 var(--black);
  --header-height: 88px;
}

/* =========================================================
   Reset
   ========================================================= */

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;

  color: var(--black);
  background:
    linear-gradient(rgba(17, 17, 17, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.035) 1px, transparent 1px),
    var(--cream);

  background-size: 32px 32px;

  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
}

body::before {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  content: "";

  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

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

::selection {
  color: var(--cream);
  background: var(--orange);
}

:focus-visible {
  outline: 4px solid var(--orange);
  outline-offset: 4px;
}

/* =========================================================
   Animated canvas
   ========================================================= */

#road {
  position: fixed;
  z-index: -1;
  inset: 0;

  width: 100%;
  height: 100%;

  pointer-events: none;
}

/* =========================================================
   Header
   ========================================================= */

.topbar {
  position: relative;
  z-index: 10;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;

  min-height: var(--header-height);
  padding: 16px var(--page-padding);

  color: var(--cream);
  background: var(--black);
  border-bottom: 4px solid var(--orange);
}

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

  color: inherit;
  text-decoration: none;
}

.brand__wing {
  display: grid;
  place-items: center;

  width: 52px;
  height: 52px;

  color: var(--black);
  background: var(--orange);
  border: 2px solid var(--cream);

  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-4deg);
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.brand:hover .brand__wing {
  background: var(--cream);
  transform: rotate(0deg) scale(1.04);
}

.brand__text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: 0.08em;
}

.topbar__note {
  overflow: hidden;
  color: var(--cream-dark);

  font-size: 12px;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.motion-toggle {
  appearance: none;

  padding: 10px 14px;

  color: var(--cream);
  background: transparent;
  border: 1px solid var(--cream-dark);
  cursor: pointer;

  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;

  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.motion-toggle:hover {
  color: var(--black);
  background: var(--cream);
  border-color: var(--cream);
  transform: translateY(-2px);
}

.motion-toggle[aria-pressed="false"] {
  color: var(--gray);
  border-color: #555;
}

/* Backward compatibility with the original HTML */
.sound {
  appearance: none;

  padding: 10px 14px;

  color: var(--cream);
  background: transparent;
  border: 1px solid var(--cream-dark);
  cursor: pointer;

  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =========================================================
   Main layout
   ========================================================= */

main {
  position: relative;
  z-index: 1;
}

.hero,
.manifesto,
.cards,
.gate,
footer {
  padding-right: var(--page-padding);
  padding-left: var(--page-padding);
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;

  display: flex;
  flex-direction: column;
  justify-content: center;

  min-height: calc(100svh - var(--header-height));
  padding-top: clamp(70px, 9vw, 140px);
  padding-bottom: clamp(70px, 9vw, 140px);

  overflow: hidden;
}

.hero::before {
  position: absolute;
  z-index: -1;
  right: -14vw;
  bottom: -22vw;

  width: min(62vw, 800px);
  aspect-ratio: 1;

  content: "";
  background: var(--orange);
  border-radius: 50%;
  opacity: 0.92;
}

.hero::after {
  position: absolute;
  z-index: -1;
  top: 9%;
  right: 8%;

  width: clamp(100px, 13vw, 220px);
  height: clamp(100px, 13vw, 220px);

  content: "";
  border: clamp(15px, 2vw, 28px) solid var(--black);
  border-radius: 50%;
  opacity: 0.08;
}

.hero__sticker {
  position: absolute;
  top: clamp(22px, 4vw, 58px);
  right: var(--page-padding);

  padding: 10px 14px;

  color: var(--cream);
  background: var(--black);
  border: 2px solid var(--black);
  box-shadow: 5px 5px 0 var(--orange);

  font-size: clamp(10px, 1vw, 13px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;

  transform: rotate(3deg);
}

.kicker {
  max-width: 700px;
  margin: 0 0 22px;

  font-size: clamp(12px, 1.2vw, 17px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  max-width: 1000px;
  margin: 0;

  font-family: var(--font-display);
  font-size: clamp(84px, 15vw, 230px);
  font-weight: 700;
  line-height: 0.72;
  text-transform: uppercase;
  letter-spacing: -0.055em;
}

.hero h1 span {
  display: block;
}

.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: clamp(2px, 0.25vw, 4px) var(--black);
  text-shadow: 5px 5px 0 rgba(241, 90, 36, 0.28);
}

.lead {
  max-width: 780px;
  margin: clamp(35px, 5vw, 64px) 0 0;

  font-size: clamp(16px, 1.45vw, 22px);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;

  margin-top: 38px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 54px;
  padding: 14px 22px;

  border: 2px solid var(--black);
  text-decoration: none;

  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;

  transition:
    color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.btn:hover {
  box-shadow: 6px 6px 0 var(--black);
  transform: translate(-3px, -3px);
}

.btn:active {
  box-shadow: 2px 2px 0 var(--black);
  transform: translate(0);
}

.btn--primary {
  color: var(--cream);
  background: var(--orange);
}

.btn--primary:hover {
  background: var(--orange-dark);
}

.btn--ghost {
  color: var(--black);
  background: var(--cream);
}

.btn--ghost:hover {
  color: var(--cream);
  background: var(--black);
}

.hero__rule {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;

  margin-top: 52px;
  padding-top: 18px;
  border-top: 2px solid var(--black);

  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hero__rule span:not(:last-child)::after {
  margin-left: 30px;
  color: var(--orange);
  content: "×";
}

/* =========================================================
   Manifesto
   ========================================================= */

.manifesto {
  display: grid;
  grid-template-columns: minmax(190px, 0.45fr) 1.55fr;
  gap: clamp(30px, 6vw, 100px);

  padding-top: clamp(80px, 10vw, 150px);
  padding-bottom: clamp(80px, 10vw, 150px);

  color: var(--cream);
  background: var(--black);
}

.manifesto__index {
  padding-top: 12px;
  color: var(--orange);

  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.manifesto__text p {
  margin: 0;

  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 96px);
  font-weight: 600;
  line-height: 1.04;
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.manifesto__text p + p {
  margin-top: 8px;
}

mark {
  display: inline-block;
  padding: 0 0.12em;

  color: var(--black);
  background: var(--orange);

  transform: rotate(-1deg);
}

/* =========================================================
   Cards
   ========================================================= */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));

  padding-top: clamp(70px, 9vw, 130px);
  padding-bottom: clamp(70px, 9vw, 130px);
}

.card {
  position: relative;

  min-height: 420px;
  padding: clamp(28px, 4vw, 52px);

  border: var(--border);
  overflow: hidden;
}

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

.card::after {
  position: absolute;
  right: -55px;
  bottom: -55px;

  width: 150px;
  height: 150px;

  content: "";
  border: 24px solid currentColor;
  border-radius: 50%;
  opacity: 0.08;
}

.card--orange {
  color: var(--black);
  background: var(--orange);
}

.card--black {
  color: var(--cream);
  background: var(--black);
}

.card--cream {
  color: var(--black);
  background: var(--cream);
}

.card__num {
  display: inline-block;
  margin-bottom: 100px;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.card h2 {
  margin: 0 0 20px;

  font-family: var(--font-display);
  font-size: clamp(38px, 4vw, 62px);
  font-weight: 600;
  line-height: 0.95;
  text-transform: uppercase;
}

.card p {
  max-width: 440px;
  margin: 0;

  font-size: 15px;
  line-height: 1.7;
}

/* =========================================================
   Gate section
   ========================================================= */

.gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr);
  gap: clamp(50px, 10vw, 160px);
  align-items: end;

  padding-top: clamp(90px, 11vw, 170px);
  padding-bottom: clamp(90px, 11vw, 170px);

  border-top: 4px solid var(--black);
}

.gate__eyebrow {
  margin: 0 0 16px;

  color: var(--orange);

  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.gate h2 {
  margin: 0;

  font-family: var(--font-display);
  font-size: clamp(68px, 9vw, 145px);
  font-weight: 700;
  line-height: 0.82;
  text-transform: uppercase;
  letter-spacing: -0.045em;
}

.gate__copy {
  padding: clamp(24px, 3vw, 42px);

  color: var(--cream);
  background: var(--black);
  box-shadow: var(--shadow);
}

.gate__copy p {
  margin: 0 0 30px;
  font-size: 16px;
}

.gate__copy a {
  display: inline-block;

  color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;

  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gate__copy a:hover {
  color: var(--cream);
}

/* =========================================================
   Footer
   ========================================================= */

footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;

  padding-top: 26px;
  padding-bottom: 26px;

  color: var(--cream-dark);
  background: var(--black);
  border-top: 4px solid var(--orange);

  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 960px) {
  .topbar {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .topbar__note {
    display: none;
  }

  .hero {
    min-height: auto;
  }

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

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

  .card + .card {
    border-left: var(--border);
  }

  .card {
    min-height: 350px;
  }

  .card__num {
    margin-bottom: 70px;
  }

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

  .gate__copy {
    max-width: 650px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 76px;
    --shadow: 5px 5px 0 var(--black);
  }

  body {
    background-size: 24px 24px;
  }

  .topbar {
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .brand {
    gap: 9px;
  }

  .brand__wing {
    width: 42px;
    height: 42px;
    font-size: 19px;
  }

  .brand__text {
    font-size: 18px;
  }

  .motion-toggle,
  .sound {
    padding: 9px 10px;
    font-size: 9px;
  }

  .hero {
    padding-top: 110px;
  }

  .hero__sticker {
    top: 24px;
    right: auto;
    left: var(--page-padding);
  }

  .hero h1 {
    font-size: clamp(70px, 25vw, 122px);
    line-height: 0.78;
  }

  .lead {
    line-height: 1.55;
  }

  .hero__actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero__rule {
    gap: 10px 16px;
  }

  .hero__rule span:not(:last-child)::after {
    margin-left: 16px;
  }

  .manifesto__text p {
    font-size: clamp(38px, 12vw, 64px);
  }

  .card {
    min-height: 320px;
  }

  .card__num {
    margin-bottom: 50px;
  }

  .gate h2 {
    font-size: clamp(62px, 20vw, 100px);
  }

  footer {
    flex-direction: column;
    gap: 10px;
  }
}

/* =========================================================
   Reduced motion
   ========================================================= */

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  #road {
    display: none;
  }
}
