:root {
  --ink: #111317;
  --muted: #68717c;
  --paper: #f6f4ef;
  --white: #ffffff;
  --red: #ea1d34;
  --green: #168f57;
  --yellow: #f2b441;
  --blue: #265bd8;
  --charcoal: #1f2329;
  --line: rgba(17, 19, 23, 0.14);
  --shadow: 0 22px 55px rgba(16, 18, 22, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input,
textarea {
  font: inherit;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(234, 29, 52, 0.15), transparent 32%),
    linear-gradient(315deg, rgba(22, 143, 87, 0.16), transparent 28%),
    #101217;
  color: var(--white);
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.loader.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loader-track {
  position: absolute;
  right: -10vw;
  bottom: 18vh;
  left: -10vw;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.86) 0 58px,
    transparent 58px 92px
  );
  transform: skewY(-2deg);
  animation: roadRush 0.55s linear infinite;
}

.loader-bike {
  width: min(82vw, 760px);
  transform-origin: center bottom;
  animation: bikeIdle 0.62s ease-in-out infinite alternate;
  filter: drop-shadow(0 26px 25px rgba(0, 0, 0, 0.42));
}

.loader svg {
  display: block;
  width: 100%;
}

.wheel circle,
.wheel path {
  fill: none;
  stroke: #f7f7f2;
  stroke-linecap: round;
  stroke-width: 10;
}

.wheel {
  animation: wheelSpin 0.55s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.swingarm,
.fork {
  fill: none;
  stroke: #d8dde5;
  stroke-linecap: round;
  stroke-width: 14;
}

.body-shadow {
  fill: #090a0d;
}

.fairing,
.tank,
.tail {
  fill: url("#redline");
  filter: url("#glow");
}

.seat {
  fill: #111317;
}

.visor {
  fill: #64c8ff;
  opacity: 0.8;
}

.stripe-one {
  fill: var(--ink);
  opacity: 0.9;
}

.stripe-two {
  fill: #f7f7f2;
}

.loader text {
  fill: #111317;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.loader-copy {
  position: absolute;
  bottom: clamp(28px, 8vh, 72px);
  display: grid;
  gap: 8px;
  text-align: center;
  text-transform: uppercase;
}

.loader-copy span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.loader-copy strong {
  font-size: clamp(1.5rem, 3vw, 2.65rem);
  line-height: 1;
}

.site-shell {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease 0.18s, transform 0.7s ease 0.18s;
}

body.loaded .site-shell {
  opacity: 1;
  transform: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 54px);
  background: rgba(246, 244, 239, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand,
.topbar nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-size: 1.04rem;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--ink);
  color: var(--white);
  border: 3px solid var(--red);
  font-size: 0.88rem;
}

.topbar nav {
  gap: clamp(10px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 800;
}

.topbar nav a:hover {
  color: var(--red);
}

.hero {
  position: relative;
  display: grid;
  min-height: clamp(620px, 91vh, 850px);
  align-items: end;
  overflow: hidden;
  padding: clamp(90px, 12vw, 150px) clamp(18px, 4vw, 54px) 56px;
  background:
    linear-gradient(90deg, rgba(246, 244, 239, 0.96) 0 41%, rgba(246, 244, 239, 0.4) 65%),
    linear-gradient(140deg, rgba(234, 29, 52, 0.16), transparent 35%),
    #e8e4dc;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 82px;
  content: "";
  background: repeating-linear-gradient(
    105deg,
    var(--ink) 0 22px,
    #f7f7f2 22px 44px,
    var(--red) 44px 66px,
    var(--green) 66px 88px
  );
}

.hero-art {
  position: absolute;
  right: max(-120px, -8vw);
  bottom: 62px;
  width: min(72vw, 900px);
  min-width: 520px;
}

.hero-art svg {
  position: relative;
  z-index: 1;
  width: 100%;
  filter: drop-shadow(0 35px 42px rgba(17, 19, 23, 0.28));
}

.speed-lines {
  position: absolute;
  inset: 10% 3% 23% -18%;
  background:
    linear-gradient(90deg, transparent, rgba(234, 29, 52, 0.42), transparent),
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(255, 255, 255, 0.72) 26px 31px);
  transform: skewX(-22deg);
  animation: speedSlide 1.4s linear infinite;
}

.hero-wheel circle {
  fill: none;
  stroke: var(--ink);
  stroke-width: 15;
}

.hero-line {
  fill: none;
  stroke: #2e343d;
  stroke-linecap: round;
  stroke-width: 17;
}

.hero-bike-shadow {
  fill: #08090c;
}

.hero-fairing,
.hero-tank,
.hero-tail {
  fill: url("#heroRedline");
}

.hero-seat {
  fill: var(--charcoal);
}

.hero-visor {
  fill: #74d5ff;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  max-width: 600px;
  margin-bottom: 86px;
}

.eyebrow,
.section-heading p {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(5.3rem, 16vw, 12rem);
  line-height: 0.8;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy {
  max-width: min(520px, 100%);
  color: #323842;
  font-size: clamp(1.02rem, 2vw, 1.35rem);
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.ghost-action,
button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 900;
}

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

.ghost-action {
  background: var(--white);
}

.ride-status {
  position: absolute;
  right: clamp(18px, 4vw, 54px);
  bottom: 104px;
  z-index: 3;
  display: grid;
  gap: 3px;
  width: min(310px, calc(100% - 36px));
  padding: 18px;
  background: var(--ink);
  color: var(--white);
  border-left: 8px solid var(--yellow);
  box-shadow: var(--shadow);
}

.ride-status span,
.ride-status small {
  color: rgba(255, 255, 255, 0.68);
  font-weight: 800;
}

.ride-status strong {
  font-size: 1.45rem;
}

.updates-band,
.rides-section,
.community-section {
  padding: clamp(58px, 8vw, 92px) clamp(18px, 4vw, 54px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.section-heading.compact h2 {
  font-size: clamp(1.75rem, 3vw, 2.45rem);
}

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

.update-grid article,
.ride-card,
.message-panel,
.request-panel,
.wall-item,
.request-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.update-grid article {
  min-height: 210px;
  padding: 22px;
  border-top: 7px solid var(--red);
}

.update-grid time,
.ride-date,
.tag {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  background: #edf0f3;
  color: #343b45;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.update-grid h3,
.ride-card h3 {
  margin: 18px 0 8px;
  font-size: 1.36rem;
}

.update-grid p,
.ride-card p,
.wall-item p,
.request-item p {
  color: var(--muted);
  line-height: 1.55;
}

.rides-section {
  background: #171a20;
  color: var(--white);
}

.rides-section .section-heading p {
  color: var(--yellow);
}

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

.ride-card {
  display: grid;
  min-height: 340px;
  padding: 22px;
  color: var(--ink);
}

.ride-meta {
  display: grid;
  gap: 8px;
  margin: 16px 0 22px;
}

.ride-meta span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 750;
}

.ride-meta b {
  color: var(--ink);
}

.join-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.join-count {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.join-count strong {
  color: var(--red);
  font-size: 1.7rem;
  line-height: 1;
}

.join-row button {
  min-height: 44px;
  box-shadow: none;
}

.join-row button.is-joined {
  background: var(--green);
}

.community-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.message-panel,
.request-panel {
  padding: clamp(20px, 3vw, 32px);
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #3d4450;
  font-size: 0.88rem;
  font-weight: 850;
}

input,
textarea {
  width: 100%;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #f0f2f4;
  color: var(--ink);
  outline: none;
  padding: 13px 14px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  background: var(--white);
}

form button {
  width: fit-content;
  margin-top: 4px;
}

.wall,
.requests {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.wall-item,
.request-item {
  padding: 15px;
  border-left: 6px solid var(--green);
}

.request-item {
  border-left-color: var(--blue);
}

.wall-item strong,
.request-item strong {
  display: block;
  margin-bottom: 5px;
}

.wall-item p,
.request-item p {
  margin-bottom: 0;
}

@keyframes roadRush {
  to {
    transform: translateX(-92px) skewY(-2deg);
  }
}

@keyframes bikeIdle {
  from {
    transform: translateY(0) rotate(-0.3deg);
  }
  to {
    transform: translateY(-8px) rotate(0.3deg);
  }
}

@keyframes wheelSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes speedSlide {
  to {
    transform: translateX(-80px) skewX(-22deg);
  }
}

@media (max-width: 980px) {
  .update-grid,
  .ride-list,
  .community-section {
    grid-template-columns: 1fr;
  }

  .hero-art {
    right: -170px;
    width: 820px;
    opacity: 0.72;
  }

  .ride-status {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 10px;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px 26px;
  }

  .hero {
    min-height: 760px;
    align-items: start;
    padding-top: 120px;
  }

  .hero-content {
    margin-bottom: 0;
  }

  h1 {
    font-size: clamp(4.6rem, 20vw, 5.3rem);
  }

  .hero-copy {
    font-size: 1rem;
  }

  .hero-art {
    right: -260px;
    bottom: 72px;
    min-width: 720px;
  }

  .hero-actions a,
  form button {
    width: calc(100% - 8px);
  }

  .loader-bike {
    width: 112vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
