/* ============================================================
   SIMIBERIAN RACING TEAM — design system (azul SRT)
   ============================================================ */
:root {
  /* core */
  --bg:        #0a0d1a;
  --bg-1:      #11152a;
  --bg-2:      #181d36;
  --bg-3:      #232a4a;
  --line:      #232846;
  --line-hi:   #3a4170;
  --fg:        #f4f6ff;
  --fg-dim:    #9aa1c4;
  --fg-mute:   #5c6390;

  /* brand */
  --srt-blue:    #2A5BE3;   /* primary accent — matches logo */
  --srt-blue-d:  #1c3eb4;   /* deep / pressed */
  --srt-blue-l:  #6a8cff;   /* hover */
  --srt-white:   #ffffff;
  --srt-ink:     #0a0d1a;

  --accent:    var(--srt-blue);
  --accent-2:  var(--srt-blue-l);
  --danger:    #E10600;
  --iberia-r:  #c80815;
  --iberia-y:  #FFB800;

  --font-display: "Anton", "Oswald", "Impact", system-ui, sans-serif;
  --font-body:    "Space Grotesk", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1480px;
  --pad-x: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* -------- Reusable type ---------------------------------- */
.display, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 0.92;
  text-transform: uppercase;
  margin: 0;
}
h1 { font-size: clamp(56px, 9vw, 168px); }
h2 { font-size: clamp(40px, 6vw, 96px); }
h3 { font-size: clamp(24px, 2.4vw, 36px); }

.mono, .num {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
  letter-spacing: 0;
  text-transform: none;
}
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px; background: var(--accent);
}

/* -------- Container ------------------------------------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* -------- SRT signature diagonal band (livery motif) --- */
.srt-diagonal {
  position: relative;
  background: var(--srt-blue);
  overflow: hidden;
}
.srt-diagonal::before,
.srt-diagonal::after {
  content: "";
  position: absolute; inset: 0;
  background: #fff;
  /* a single white diagonal slash crossing the band */
  clip-path: polygon(40% 0, 56% 0, 28% 100%, 12% 100%);
}
.srt-diagonal::after { background: #0a0d1a; opacity: .08;
  clip-path: polygon(58% 0, 60% 0, 30% 100%, 28% 100%);
}

/* pit-lane separator — re-skinned in team colours (blue / white) */
.pit-stripe {
  height: 14px;
  background:
    repeating-linear-gradient(135deg,
      var(--srt-blue)  0 18px,
      #ffffff         18px 36px);
}
.pit-stripe.thin {
  height: 6px;
  background:
    repeating-linear-gradient(135deg,
      var(--srt-blue)  0 10px,
      #ffffff         10px 20px);
}
.pit-stripe.dark {
  background:
    repeating-linear-gradient(135deg,
      var(--srt-blue)  0 14px,
      var(--bg)        14px 28px);
}

/* Iberian micro-stripe (subtle nod) */
.iberia-stripe {
  display: inline-block;
  width: 28px; height: 3px;
  background: linear-gradient(90deg,
    var(--iberia-r) 0 14px,
    var(--iberia-y) 14px 28px);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,13,26,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  width: 56px; height: 56px;
  background: var(--srt-blue);
  display: grid; place-items: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.brand-logo img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* the supplied logo file is 1:1 with blue corners + white diagonal — perfect as-is */
}
.brand-wm { display: flex; flex-direction: column; line-height: 1; gap: 4px; }
.brand-wm .name {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}
.brand-wm .sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--accent-2);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  position: relative;
  transition: color .2s;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a.active { color: var(--fg); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--accent);
}
.nav-cta {
  margin-left: 10px;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  transition: transform .15s, background .15s;
}
.nav-cta:hover { transform: translateY(-1px); background: var(--accent-2); color: #0a0d1a; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all .2s;
  cursor: pointer;
  position: relative;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--srt-blue-l); transform: translateY(-1px); color: #0a0d1a; }
.btn-ghost {
  background: transparent;
  border-color: var(--line-hi);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }
.btn-white {
  background: #fff;
  color: var(--srt-blue);
}
.btn-white:hover { background: var(--srt-blue-l); color: #fff; }
.btn .arrow {
  display: inline-block;
  width: 18px; height: 1px; background: currentColor;
  position: relative;
  transition: width .2s;
}
.btn .arrow::after {
  content: "";
  position: absolute; right: 0; top: -3px;
  width: 7px; height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
.btn:hover .arrow { width: 28px; }

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .08s; }
.reveal.delay-2 { transition-delay: .16s; }
.reveal.delay-3 { transition-delay: .24s; }
.reveal.delay-4 { transition-delay: .32s; }

/* ============================================================
   SECTIONS
   ============================================================ */
section { position: relative; }
.section-pad {
  padding-top: clamp(80px, 10vw, 160px);
  padding-bottom: clamp(80px, 10vw, 160px);
}
.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 56px;
}
.section-head .label-stack { display: flex; flex-direction: column; gap: 18px; }
.section-head .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-mute);
  text-transform: uppercase;
  text-align: right;
  line-height: 1.7;
}

/* ============================================================
   PILOT CARD
   ============================================================ */
.pilot-card {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.pilot-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.pilot-card:hover .pilot-no { color: var(--accent-2); }
.pilot-card:hover .pilot-photo .slash-overlay { transform: translateX(8%); }

.pilot-photo {
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(140deg, var(--srt-blue-d) 0%, var(--srt-blue) 100%);
}
/* SRT diagonal slash motif inside each card photo */
.pilot-photo .slash-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg,
      transparent 0%,
      transparent 38%,
      rgba(255,255,255,0.85) 38%,
      rgba(255,255,255,0.85) 46%,
      transparent 46%,
      transparent 100%);
  mix-blend-mode: screen;
  opacity: 0.12;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.pilot-photo .greek {
  position: absolute; inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><g fill='none' stroke='%23ffffff' stroke-width='1'><path d='M0 4 H10 V14 H20 V4 H30 V14 H40'/><path d='M0 24 H10 V34 H20 V24 H30 V34 H40'/></g></svg>");
  background-size: 30px 30px;
  mix-blend-mode: overlay;
}
.pilot-no {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1;
  color: #fff;
  z-index: 2;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
  transition: color .2s;
}
.pilot-tags {
  position: absolute;
  top: 14px; right: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  z-index: 2;
}
.tag {
  display: inline-block;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  backdrop-filter: blur(6px);
}
.tag.accent {
  background: #fff;
  color: var(--srt-blue);
  border-color: #fff;
}
.tag.sim {
  background: rgba(255,255,255,0.92);
  color: var(--srt-blue);
  border-color: rgba(255,255,255,0.92);
  font-weight: 600;
}

.pilot-info {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-1);
  border-top: 1px solid var(--line);
}
.pilot-name {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.pilot-nick {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--accent-2);
}
.pilot-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

/* Initials inside the photo placeholder */
.pilot-photo .initials {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: clamp(120px, 16vw, 220px);
  color: rgba(255,255,255,0.16);
  letter-spacing: -0.05em;
  z-index: 1;
}
.pilot-photo::after {
  /* subtle bottom shade so name reads when overlaid */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.45));
  z-index: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding-top: 0;
  padding-bottom: 40px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 80px;
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--fg); font-size: 14px; transition: color .15s; }
.footer a:hover { color: var(--accent-2); }
.footer-mark {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-mark .accent { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

/* ============================================================
   FORM
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.field input,
.field textarea,
.field select {
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 14px 16px;
  font: inherit;
  font-size: 15px;
  transition: border-color .15s;
  border-radius: 0;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { min-height: 140px; resize: vertical; }

/* ============================================================
   TWEAKS PANEL
   ============================================================ */
.tw-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 280px;
  background: var(--bg-1);
  border: 1px solid var(--line-hi);
  z-index: 100;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  display: none;
}
.tw-panel.open { display: block; }
.tw-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
}
.tw-head .dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.tw-body { padding: 18px; }
.tw-row { display: flex; flex-direction: column; gap: 10px; }
.tw-row .lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.tw-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tw-opts button {
  padding: 12px 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  text-align: left;
  transition: all .15s;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
}
.tw-opts button:hover { border-color: var(--line-hi); }
.tw-opts button.active { border-color: var(--accent); background: rgba(42,91,227,0.10); }
.tw-opts button .name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}
.tw-opts button .sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

/* ============================================================
   GRID HELPERS
   ============================================================ */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section-head { grid-template-columns: 1fr; }
  .section-head .meta { text-align: left; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-burger { display: inline-flex !important; }
  .nav-cta { display: none; }
}
@media (max-width: 768px) {
  :root {
    --pad-x: 18px;
  }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-inner { height: 64px; gap: 14px; }
  .brand-logo { width: 44px; height: 44px; }
  .brand-wm .name { font-size: 17px; }
  .brand-wm .sub { font-size: 8.5px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; margin-bottom: 50px; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  .footer-mark { font-size: 44px; }
  .section-head { gap: 14px; margin-bottom: 36px; }
  .section-pad {
    padding-top: clamp(60px, 14vw, 100px);
    padding-bottom: clamp(60px, 14vw, 100px);
  }
  .pit-stripe { height: 10px; background-size: 28px 28px; }
  .pit-stripe.thin { height: 4px; }
  .nav-drawer { padding: 24px 18px; inset: 64px 0 0 0; }
  .nav-drawer a { font-size: 30px; padding: 16px 0; }
  .btn { padding: 13px 18px; font-size: 11px; letter-spacing: 0.14em; }
}
@media (max-width: 480px) {
  .brand-wm { display: none; }
  .footer-mark { font-size: 36px; }
}

/* page-head appears on equipos / piloto / contacto / galeria — shared mobile tweaks */
@media (max-width: 768px) {
  .page-head { padding-top: 40px; padding-bottom: 36px; }
  .page-head h1 { font-size: clamp(44px, 14vw, 90px) !important; }
  .page-head .crumbs { font-size: 10px; margin-bottom: 18px; }
  .page-head .lede { font-size: 15px; margin-top: 16px; }
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
.nav-burger {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 1px solid var(--line-hi);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: border-color .15s;
}
.nav-burger:hover { border-color: var(--accent); }
.nav-burger span {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  transition: transform .2s, opacity .2s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  position: fixed;
  inset: 72px 0 0 0;
  background: rgba(10,13,26,0.97);
  backdrop-filter: blur(14px);
  z-index: 49;
  display: none;
  flex-direction: column;
  padding: 40px var(--pad-x);
  gap: 8px;
}
.nav-drawer.open { display: flex; }
.nav-drawer a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 36px;
  text-transform: uppercase;
  color: var(--fg);
  transition: color .15s, padding-left .15s;
}
.nav-drawer a:hover,
.nav-drawer a.active { color: var(--accent-2); padding-left: 10px; }
.nav-drawer a .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg-mute);
}
.nav-drawer .nav-cta-mobile {
  margin-top: 30px;
  padding: 18px 24px;
  background: var(--accent);
  color: #fff;
  text-align: center;
  border: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}
.nav-drawer .nav-cta-mobile:hover { background: var(--accent-2); padding-left: 24px; }
body.menu-open { overflow: hidden; }

/* ============================================================
   UTILITY — blue panel (signature surface)
   ============================================================ */
.panel-blue {
  background: var(--srt-blue);
  color: #fff;
}
.panel-blue .eyebrow { color: #fff; opacity: 0.85; }
.panel-blue .eyebrow::before { background: #fff; }
.panel-blue h2, .panel-blue h3 { color: #fff; }

/* Big slashed band — used as decorative section divider */
.slash-band {
  height: 120px;
  background:
    linear-gradient(110deg,
      var(--srt-blue) 0% 35%,
      #fff 35% 50%,
      var(--srt-blue) 50% 65%,
      #fff 65% 80%,
      var(--srt-blue) 80% 100%);
  position: relative;
  overflow: hidden;
}
.slash-band-mini {
  height: 60px;
  background:
    linear-gradient(110deg,
      var(--srt-blue) 0% 42%,
      #fff 42% 52%,
      var(--srt-blue) 52% 100%);
}
