/* ============================================
   Redline Motors — Global Styles
   Industrial / performance / garage character
   ============================================ */

/* ---- Self-hosted fonts ---- */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/barlow-condensed-v13-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/barlow-condensed-v13-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/barlow-condensed-v13-latin-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../assets/fonts/barlow-condensed-v13-latin-900.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/inter-v20-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/inter-v20-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-v24-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-v24-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-v24-latin-700.woff2') format('woff2');
}

:root {
  /* Brand — redline red, machined steel, asphalt */
  --red: #e10600;
  --red-bright: #ff1f15;
  --red-deep: #a30400;
  --red-glow: rgba(225, 6, 0, 0.35);

  /* Surfaces — dark by default */
  --asphalt: #0c0d10;
  --carbon: #14161b;
  --steel: #1c1f26;
  --steel-2: #262a33;
  --gunmetal: #353a45;
  --chrome: #b8bcc4;
  --silver: #d8dbe1;
  --paper: #f4f5f7;

  /* Ink */
  --ink: #f4f5f7;
  --ink-soft: #c2c6cf;
  --ink-mute: #8b919c;
  --line: #2a2e37;
  --line-soft: #1f222a;
  --on-light: #14161b;
  --on-light-soft: #4a505b;

  /* Type scale */
  --fs-display: clamp(2.8rem, 7vw, 6rem);
  --fs-h2: clamp(2rem, 4.4vw, 3.5rem);
  --fs-h3: clamp(1.4rem, 2.4vw, 1.85rem);
  --fs-lede: clamp(1.05rem, 1.45vw, 1.2rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.75rem;

  /* Rhythm */
  --section-pad: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 4vw, 3rem);
  --content-max: 82rem;
  --reading-max: 38rem;

  /* Fonts */
  --display: 'Barlow Condensed', 'Oswald', 'Impact', sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  background-color: var(--asphalt);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.1;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Selection ---- */
::selection {
  background: var(--red);
  color: var(--ink);
}

/* ============================================
   Utility Bar
   ============================================ */

#utility-bar {
  background: #000;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
}
.ub-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0.55rem clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.ub-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
}
.ub-dot {
  width: 7px;
  height: 7px;
  background: var(--red);
  display: inline-block;
  box-shadow: 0 0 8px var(--red-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.ub-divider {
  width: 1px;
  height: 12px;
  background: var(--gunmetal);
}
.ub-link {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.ub-link:hover {
  color: var(--red-bright);
}
@media (max-width: 720px) {
  .ub-hide-sm {
    display: none;
  }
}

/* ============================================
   Navigation
   ============================================ */

#cs-navigation {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--carbon);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, box-shadow 0.3s;
}
body.scroll #cs-navigation {
  background: rgba(12, 13, 16, 0.96);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 4px;
  overflow: hidden;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-words {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand-name .brand-red {
  color: var(--red);
}
.brand-sub {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.cs-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}
.cs-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}
.cs-box {
  position: relative;
  width: 26px;
  height: 18px;
}
.cs-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s, top 0.25s, opacity 0.25s;
}
.cs-line1 { top: 0; }
.cs-line2 { top: 8px; }
.cs-line3 { top: 16px; }
.cs-toggle.cs-active .cs-line1 { top: 8px; transform: rotate(45deg); }
.cs-toggle.cs-active .cs-line2 { opacity: 0; }
.cs-toggle.cs-active .cs-line3 { top: 8px; transform: rotate(-45deg); }

.cs-ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.cs-li-link {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.6rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  transition: color 0.2s;
}
.cs-li-link::after {
  content: '';
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.25rem;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.cs-li-link:hover {
  color: var(--ink);
}
.cs-li-link:hover::after,
.cs-li-link.cs-active::after {
  transform: scaleX(1);
}
.cs-li-link.cs-active {
  color: var(--ink);
}

.cs-dropdown {
  position: relative;
}
.cs-drop-icon {
  transition: transform 0.2s;
}
.cs-dropdown.cs-active .cs-drop-icon {
  transform: rotate(180deg);
}
.cs-drop-ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 14rem;
  background: var(--steel);
  border: 1px solid var(--line);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.cs-dropdown:hover .cs-drop-ul,
.cs-dropdown.cs-active .cs-drop-ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.cs-drop-link {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 0.55rem 0.85rem;
  display: block;
  width: 100%;
}
.cs-drop-link::after {
  display: none;
}
.cs-drop-link:hover {
  background: var(--steel-2);
  color: var(--red-bright);
}

.nav-cta {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--red);
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 2px;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 14px rgba(225, 6, 0, 0.25);
}
.nav-cta:hover {
  background: var(--red-bright);
  transform: translateY(-1px);
}

@media (max-width: 1023px) {
  .cs-toggle {
    display: inline-flex;
    order: 3;
  }
  .nav-cta {
    display: none;
  }
  .cs-nav {
    flex: 0;
  }
  .cs-ul-wrapper {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--asphalt);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 2rem 1.5rem;
  }
  #cs-navigation.cs-active .cs-ul-wrapper {
    transform: translateX(0);
  }
  .cs-ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .cs-li-link {
    padding: 0.9rem 0.5rem;
    font-size: 1.15rem;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }
  .cs-li-link::after { display: none; }
  .cs-drop-ul {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    border: none;
    padding: 0 0 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding-bottom 0.25s ease;
  }
  .cs-dropdown.cs-active .cs-drop-ul {
    max-height: 500px;
    padding-bottom: 0.5rem;
  }
}

/* ============================================
   Shared building blocks
   ============================================ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 1.15rem;
}
.eyebrow-line {
  width: 28px;
  height: 1px;
  background: var(--red);
}
.eyebrow-center {
  justify-content: center;
}

.section-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--fs-h2);
  text-transform: uppercase;
  letter-spacing: -0.005em;
  color: var(--ink);
  line-height: 0.95;
}
.section-title em {
  font-style: normal;
  color: var(--red);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--red);
  color: #fff;
  padding: 1rem 1.85rem;
  border-radius: 2px;
  box-shadow: 0 6px 20px rgba(225, 6, 0, 0.3);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--red-bright);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(225, 6, 0, 0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.95rem 1.75rem;
  border: 1px solid var(--gunmetal);
  border-radius: 2px;
  background: transparent;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.btn-outline:hover {
  border-color: var(--red);
  color: var(--red-bright);
  background: rgba(225, 6, 0, 0.06);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gunmetal);
  transition: color 0.2s, border-color 0.2s;
}
.btn-link:hover {
  color: var(--red-bright);
  border-color: var(--red);
}
