:root {
  --ink: #05070b;
  --paper: #f6f1e8;
  --white: #ffffff;
  --muted: #5d626d;
  --blue: #0a3b86;
  --sky: #149ce7;
  --red: #ed1c24;
  --line: rgba(5, 7, 11, 0.14);
  --shadow: 0 24px 70px rgba(5, 7, 11, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 8%, rgba(20, 156, 231, 0.18), transparent 28rem),
    radial-gradient(circle at 12% 18%, rgba(237, 28, 36, 0.13), transparent 24rem),
    var(--paper);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(90deg, rgba(5, 7, 11, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(5, 7, 11, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a {
  color: inherit;
}

.track-grid {
  position: fixed;
  inset: auto -10vw 0 -10vw;
  z-index: -2;
  height: 32vh;
  background:
    repeating-linear-gradient(45deg, rgba(5, 7, 11, 0.85) 0 18px, transparent 18px 36px),
    linear-gradient(90deg, var(--red), var(--blue), var(--sky));
  opacity: 0.08;
  transform: skewY(-6deg);
  transform-origin: bottom left;
}

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(5, 7, 11, 0.08);
  backdrop-filter: blur(14px);
}

.brand img {
  width: clamp(190px, 22vw, 300px);
  display: block;
}

.nav-links {
  display: flex;
  gap: 8px;
  padding: 7px;
  background: rgba(5, 7, 11, 0.88);
  border-radius: 999px;
  box-shadow: 0 16px 38px rgba(5, 7, 11, 0.18);
}

.nav-links a {
  padding: 10px 16px;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--red);
  outline: none;
}

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 40px;
  align-items: center;
  min-height: calc(100vh - 120px);
  padding: 42px 0 84px;
}

.hero-copy {
  position: relative;
}

.hero-copy::before {
  position: absolute;
  top: -28px;
  left: -18px;
  width: 190px;
  height: 14px;
  content: "";
  background: linear-gradient(90deg, var(--red) 0 33%, var(--blue) 33% 66%, var(--sky) 66%);
  transform: skewX(-28deg);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

h1,
h2 {
  font-family: "Archivo Black", Inter, sans-serif;
  text-transform: uppercase;
}

h1 {
  max-width: 720px;
  font-size: clamp(2.8rem, 6.8vw, 5.8rem);
}

h2 {
  font-size: clamp(2.4rem, 6vw, 5rem);
}

h3 {
  font-size: 1.85rem;
}

.hero-text,
.section-heading p,
.contact-panel p,
.portfolio-card p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-text {
  max-width: 650px;
  margin: 24px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  clip-path: polygon(13px 0, 100% 0, calc(100% - 13px) 100%, 0 100%);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button-primary {
  color: var(--white);
  background: var(--red);
  box-shadow: 8px 8px 0 var(--ink);
}

.button-secondary {
  color: var(--ink);
  background: var(--white);
  box-shadow: 8px 8px 0 var(--sky);
}

.hero-card {
  position: relative;
  min-height: 470px;
  padding: 30px;
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 24%),
    var(--ink);
  border: 10px solid var(--white);
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 52px), calc(100% - 52px) 100%, 0 100%);
}

.hero-card::before {
  position: absolute;
  inset: 22px;
  content: "";
  border: 2px solid rgba(255, 255, 255, 0.18);
}

.hero-card::after {
  position: absolute;
  right: -100px;
  bottom: 42px;
  width: 360px;
  height: 126px;
  content: "";
  background:
    linear-gradient(110deg, transparent 0 16%, var(--blue) 16% 37%, transparent 37% 45%, var(--sky) 45% 66%, transparent 66% 74%, var(--red) 74% 100%);
  transform: skewX(-20deg);
}

.racing-number {
  position: relative;
  z-index: 1;
  display: block;
  font-family: "Archivo Black", Inter, sans-serif;
  font-size: clamp(8rem, 18vw, 14rem);
  line-height: 0.8;
  letter-spacing: -0.08em;
}

.hero-card p {
  position: relative;
  z-index: 1;
  max-width: 280px;
  margin: 34px 0 0;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.speed-lines {
  position: absolute;
  right: 28px;
  top: 34px;
  display: grid;
  gap: 12px;
}

.speed-lines span {
  display: block;
  width: 110px;
  height: 16px;
  background: var(--white);
  transform: skewX(-28deg);
}

.speed-lines span:nth-child(2) {
  width: 86px;
  background: var(--sky);
}

.speed-lines span:nth-child(3) {
  width: 62px;
  background: var(--red);
}

.section {
  padding: 84px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.45fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 34px;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -10px;
}

.section-heading p {
  margin: 0;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.portfolio-card {
  min-height: 330px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(5, 7, 11, 0.08);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
}

.portfolio-card.featured {
  color: var(--white);
  background: var(--ink);
  transform: translateY(-18px);
}

.portfolio-card.featured p,
.portfolio-card.featured .card-topline {
  color: rgba(255, 255, 255, 0.72);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 64px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.card-topline strong {
  color: var(--red);
  font-size: 2rem;
  letter-spacing: -0.08em;
}

.portfolio-card p {
  margin: 18px 0 30px;
}

.portfolio-card a {
  font-weight: 900;
  color: var(--red);
  text-transform: uppercase;
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.65fr);
  gap: 34px;
  padding: clamp(26px, 5vw, 54px);
  color: var(--white);
  background:
    linear-gradient(115deg, rgba(237, 28, 36, 0.95) 0 3%, transparent 3% 7%, rgba(10, 59, 134, 0.95) 7% 10%, transparent 10%),
    var(--ink);
  box-shadow: var(--shadow);
  clip-path: polygon(34px 0, 100% 0, 100% calc(100% - 34px), calc(100% - 34px) 100%, 0 100%, 0 34px);
}

.contact-panel .eyebrow {
  color: var(--sky);
}

.contact-panel p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.75);
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  color: var(--ink);
  background: var(--white);
  border: 3px solid transparent;
  border-radius: 0;
  font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--sky);
  outline: none;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form .button {
  width: fit-content;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0 38px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.site-footer a {
  color: var(--red);
  text-decoration: none;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    gap: 18px;
    flex-direction: column;
  }

  .hero,
  .section-heading,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

  .portfolio-card.featured {
    transform: none;
  }
}

@media (max-width: 560px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 28px, 1120px);
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    flex: 1;
    text-align: center;
  }

  .hero-card {
    min-height: 360px;
    padding: 22px;
    border-width: 7px;
  }

  .site-footer {
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
  }
}
