/* Boutros Tours F1 - Cinematic Clean Prototype (v2) */
:root{
  --bg:#0B0B0B;
  --bg2:#151515;
  --text:#FFFFFF;
  --muted:#9A9A9A;
  --red:#E10600;
  --border:rgba(255,255,255,.08);
  --shadow: 0 20px 60px rgba(0,0,0,.45);
  --radius2: 26px;
  --container: 1120px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.55;
}
a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}
.container{max-width:var(--container); margin:0 auto; padding:0 20px}
.mono{font-family:"Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace}
.muted{color:var(--muted)}
.small{font-size:.9rem}

/* Header */
.header{
  position:fixed;
  top:0; left:0; right:0;
  height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:0 20px;
  z-index:50;
  border-bottom:1px solid transparent;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}
.header[data-state="scrolled"]{
  background:rgba(11,11,11,.62);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.brand{display:flex; align-items:baseline; gap:10px; letter-spacing:.08em; flex:0 0 auto}
.brand__title,.brand__sub{
  font-family:Orbitron, Inter, sans-serif;
  font-weight:700;
  font-size:1.02rem;
}
.brand__sub{color:var(--red)}

.nav{
  display:flex;
  gap:14px;
  align-items:center;
  flex:1 1 auto;
  justify-content:flex-end;
  min-width:0;
}
.nav a{
  color:rgba(255,255,255,.86);
  font-weight:500;
  font-size:.92rem;
  padding:8px 6px;
  position:relative;
  white-space:nowrap;
}
.nav a::after{
  content:"";
  position:absolute;
  left:6px; right:6px; bottom:4px;
  height:2px;
  background:var(--red);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .22s ease;
}
.nav a:hover::after{transform:scaleX(1)}
.nav a:hover{color:#fff}

.cta{
  flex:0 0 auto;
  border:1px solid var(--border);
  padding:10px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.04);
  transition: transform .15s ease, border-color .2s ease, background .2s ease;
}
.cta:hover{transform:translateY(-1px); border-color:rgba(225,6,0,.55); background:rgba(225,6,0,.10)}

.burger{
  display:none;
  flex:0 0 auto;
  width:42px; height:42px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  align-items:center;
  justify-content:center;
  gap:5px;
}
.burger span{display:block; width:18px; height:2px; background:#fff; opacity:.9}

/* Hero */
.hero{
  position:relative;
  min-height:100vh;
  display:grid;
  place-items:end center;
  padding:120px 0 56px;
  overflow:hidden;
}
.hero__media{position:absolute; inset:0; z-index:0}
.hero__video{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  filter:saturate(1.05) contrast(1.05);
  background:#000;
}
.hero__overlay{
  position:absolute; inset:0;
  background:
    radial-gradient(900px 400px at 50% 70%, rgba(225,6,0,.14), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.65) 55%, rgba(0,0,0,.92) 100%);
}

.hero__content{
  position:relative;
  z-index:1;
  width:min(var(--container), 92vw);
  padding:0 20px;
  text-align:center;
  transform:translateY(-18px);
  animation: heroIn .9s ease forwards;
  opacity:0;
}
@keyframes heroIn{
  from{opacity:0; transform:translateY(10px)}
  to{opacity:1; transform:translateY(-18px)}
}
.hero__kicker{
  margin:0 0 10px;
  color:rgba(255,255,255,.78);
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:.88rem;
}
.hero__title{
  margin:0;
  font-family:Orbitron, Inter, sans-serif;
  font-weight:700;
  font-size: clamp(2.5rem, 6vw, 4.3rem);
  letter-spacing:.02em;
}
.hero__subtitle{
  margin:10px 0 18px;
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
  color:rgba(255,255,255,.90);
}
.hero__actions{display:flex; gap:12px; justify-content:center; flex-wrap:wrap}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 18px; border-radius:999px;
  border:1px solid rgba(225,6,0,.45);
  background:linear-gradient(180deg, rgba(225,6,0,.90), rgba(225,6,0,.65));
  box-shadow: 0 18px 45px rgba(225,6,0,.12);
  font-weight:600;
  transition: transform .15s ease, filter .2s ease;
}
.btn:hover{transform:translateY(-1px); filter:saturate(1.05)}
.btn--outline{
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
  box-shadow:none;
}
.btn--outline:hover{border-color:rgba(225,6,0,.55); background:rgba(225,6,0,.10)}

.hero__meta{
  margin-top:18px;
  display:flex; gap:10px;
  justify-content:center; flex-wrap:wrap;
}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px; border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.82);
  font-size:.88rem;
}
.pill--hint{border-color:rgba(255,255,255,.16); color:rgba(255,255,255,.72)}
.dot{width:8px;height:8px;border-radius:50%; background:var(--red); box-shadow:0 0 0 4px rgba(225,6,0,.12)}
.scroll{margin-top:26px; display:inline-flex; align-items:center; gap:10px; opacity:.85}
.scroll__line{width:28px;height:1px;background:rgba(255,255,255,.55)}
.scroll__text{font-size:.9rem; letter-spacing:.08em; text-transform:uppercase}

/* Sections */
.section{padding:84px 0}
.section--alt{background:linear-gradient(180deg, var(--bg2), var(--bg))}
.section__head{margin-bottom:24px}
.section__head h2{margin:0 0 6px; font-family:Orbitron, Inter, sans-serif; letter-spacing:.02em}
.section__head p{margin:0; max-width:78ch}

.cards{display:grid; grid-template-columns:repeat(12,1fr); gap:16px}
.card{
  grid-column:span 6;
  border:1px solid var(--border);
  border-radius:var(--radius2);
  overflow:hidden;
  background:linear-gradient(...);
  box-shadow:var(--shadow);
  transition:transform .18s ease, border-color .2s ease;
}
.card:hover{transform:translateY(-4px); border-color:rgba(225,6,0,.35)}
.card__img{height:170px; background-size:cover; background-position:center; filter:saturate(1.05) contrast(1.02)}
.card__body{padding:16px}
.card__top{display:flex; align-items:baseline; justify-content:space-between; gap:10px}
.card h3{margin:0; font-family:Orbitron, Inter, sans-serif; letter-spacing:.06em}
.tag{padding:6px 10px; border-radius:999px; border:1px solid var(--border); background:rgba(255,255,255,.04); color:rgba(255,255,255,.78); font-size:.85rem; white-space:nowrap}
.card__actions{margin-top:12px; display:flex; gap:12px; flex-wrap:wrap}
.link{color:#fff; font-weight:600; border-bottom:1px solid rgba(225,6,0,.55); padding-bottom:2px}
.link.muted{border-bottom-color:rgba(255,255,255,.15); font-weight:500}

/* News */
.news{display:grid; grid-template-columns:repeat(12,1fr); gap:16px}
.news__item{
  grid-column:span 4;
  padding:18px;
  border-radius:var(--radius2);
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  box-shadow:var(--shadow);
}
.news__item h3{margin:6px 0 8px; font-family:Orbitron, Inter, sans-serif; letter-spacing:.02em}
.news__item p{margin:0 0 10px}

/* Gallery */
.grid{display:grid; grid-template-columns:repeat(12,1fr); gap:16px}
.tile{
  grid-column:span 6;
  min-height:250px;
  border-radius:var(--radius2);
  overflow:hidden;
  border:1px solid var(--border);
  background-size:cover; background-position:center;
  box-shadow:var(--shadow);
  position:relative;
  transition:transform .18s ease, border-color .2s ease;
}
.tile:hover{transform:translateY(-4px); border-color:rgba(225,6,0,.35)}
.tile__overlay{position:absolute; inset:auto 0 0 0; padding:18px; background:linear-gradient(180deg, transparent, rgba(0,0,0,.82))}
.tile__title{font-family:Orbitron, Inter, sans-serif; letter-spacing:.03em; font-size:1.15rem}
.tile__meta{color:rgba(255,255,255,.72); margin-top:4px}

/* Form */
.form{
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  border-radius:var(--radius2);
  padding:18px;
  box-shadow:var(--shadow);
}
.form label{display:block; font-weight:600; font-size:.95rem}
.form input,.form textarea{
  width:100%;
  margin-top:8px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.38);
  color:#fff;
  outline:none;
}
.form input:focus,.form textarea:focus{border-color:rgba(225,6,0,.55)}
.form__row{display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px}
.form__actions{display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-top:12px}

/* Footer */
.footer{border-top:1px solid var(--border); padding:28px 0; background:rgba(0,0,0,.55)}
.footer__inner{display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap}
.powered{color:rgba(255,255,255,.70); font-size:.9rem}
.footer__logo{width:150px; opacity:.95}

/* Floating CTA */
.fab{position:fixed; right:18px; bottom:18px; z-index:60}
.fab__btn{
  display:inline-flex;
  padding:12px 16px;
  border-radius:999px;
  background:rgba(225,6,0,.92);
  border:1px solid rgba(225,6,0,.65);
  box-shadow:0 20px 60px rgba(0,0,0,.45);
  font-weight:700;
}
.fab__btn:hover{filter:saturate(1.05)}

/* Responsive - fix overlap by switching to burger earlier */
@media (max-width: 1120px){
  .nav, .cta{display:none}
  .burger{display:inline-flex}
}
@media (max-width: 980px){
  .news__item{grid-column:span 6}
}
@media (max-width: 760px){
  .card{grid-column:span 12}
  .news__item{grid-column:span 12}
  .tile{grid-column:span 12}
  .form__row{grid-template-columns:1fr}
  .hero{padding:104px 0 44px}
}
/* =====================
   NEWS SECTION
===================== */

.news{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
  margin-top:32px;
}

@media(max-width:1000px){
  .news{grid-template-columns:repeat(2,1fr);}
}

@media(max-width:700px){
  .news{grid-template-columns:1fr;}
}

.news__item{
  border-radius:20px;
  padding:22px;
  border:1px solid rgba(255,255,255,0.06);
  background:linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01));
  transition:.3s;
}

.news__item:hover{
  transform:translateY(-5px);
  border-color:rgba(255,0,0,0.4);
  box-shadow:0 20px 40px rgba(0,0,0,0.6);
}

.news__item h3{
  font-family:"Orbitron";
  margin:10px 0;
}

.news__item .link{
  margin-top:10px;
  display:inline-block;
}
.form__status{ margin-top:10px; }

/* HERO — RACING TYPOGRAPHY */

.hero__title {
  font-family: 'Teko', 'Arial Narrow', sans-serif;
  font-size: clamp(48px, 6vw, 100px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero__subtitle {
  font-family: 'Teko', 'Arial Narrow', sans-serif;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 400;
  letter-spacing: 1px;
}

.hero__kicker {
  font-family: 'Teko', 'Arial Narrow', sans-serif;
  font-size: 22px;
  letter-spacing: 3px;
}

/* Next trip: background video and scroll-triggered staggered reveal */
.next-trip { position:relative; isolation:isolate; min-height:clamp(480px,74vh,760px); display:grid; place-items:center; overflow:hidden; text-align:center; background:#080808 url('assets/bahrain.jpg') center/cover no-repeat; scroll-margin-top:72px; }
.next-trip__video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-2; }
.next-trip__shade { position:absolute; inset:0; z-index:-1; background:linear-gradient(180deg,rgba(0,0,0,.24),rgba(0,0,0,.58) 50%,rgba(0,0,0,.82)),radial-gradient(ellipse at center,transparent 10%,rgba(0,0,0,.3)); }
.next-trip__content { position:relative; z-index:1; width:min(94%,1000px); padding:80px 16px; color:#fff; }
.next-trip__eyebrow { font-family:Inter,sans-serif; font-size:clamp(12px,1.2vw,15px); letter-spacing:.25em; font-weight:700; margin:0 0 10px; }
.next-trip__title { font-family:'Teko',Inter,Arial,sans-serif; font-weight:700; font-size:clamp(52px,9vw,125px); line-height:1.06; margin:0; text-shadow:0 4px 24px rgba(0,0,0,.5); }
.next-trip__title span { color:#e10600; }
.next-trip__line { width:110px; height:3px; background:#e10600; margin:18px auto; }
.next-trip__tagline { font-size:clamp(12px,1.65vw,19px); letter-spacing:.1em; font-weight:600; margin:0 0 28px; }
.next-trip__button { display:inline-flex; align-items:center; gap:14px; padding:14px 23px; background:#c40a06; border:1px solid #e10600; border-radius:4px; font-size:clamp(12px,1.25vw,15px); font-weight:700; transition:background .2s ease,transform .2s ease; }
.next-trip__button:hover { background:#e10600; transform:translateY(-2px); }
/* No JS = all content visible. JS adds the class only when observer is available. */
.next-trip.next-trip--animated .next-trip__reveal { opacity:0; transform:translateY(42px); filter:blur(7px); transition:opacity 1.05s cubic-bezier(.2,.7,.2,1),transform 1.05s cubic-bezier(.2,.7,.2,1),filter 1.05s ease; }
.next-trip.next-trip--animated.next-trip--visible .next-trip__reveal { opacity:1; transform:translateY(0); filter:blur(0); }
.next-trip__reveal:nth-child(2) { transition-delay:130ms!important; }
.next-trip__reveal:nth-child(3) { transition-delay:270ms!important; }
.next-trip__reveal:nth-child(4) { transition-delay:400ms!important; }
.next-trip__reveal:nth-child(5) { transition-delay:540ms!important; }
@media(max-width:600px) { .next-trip { min-height:540px; } .next-trip__title { font-size:clamp(45px,12vw,75px); } .next-trip__eyebrow { letter-spacing:.16em; } .next-trip__tagline { letter-spacing:.04em; } }
@media(prefers-reduced-motion:reduce) { .next-trip.next-trip--animated .next-trip__reveal { opacity:1; transform:none; filter:none; transition:none!important; } }

/* Scroll-driven cartoon F1 circuit separators */
.race-transition { position:relative; height:clamp(150px,22vw,260px); overflow:hidden; background:#0b0b0b; isolation:isolate; }
.race-transition__scene { width:100%; height:100%; display:block; overflow:visible; }
.race-transition__asphalt, .race-transition__curb, .race-transition__lane, .race-transition__guide { fill:none; stroke-linecap:round; stroke-linejoin:round; }
.race-transition__asphalt { stroke:#2b2d30; stroke-width:76; }
.race-transition__curb { stroke:#d22b26; stroke-width:81; stroke-dasharray:25 24; opacity:.85; }
.race-transition__lane { stroke:#414348; stroke-width:68; }
.race-transition__guide { stroke:#a2a2a2; stroke-width:2; stroke-dasharray:12 17; opacity:.55; }
.race-transition__car { filter:drop-shadow(0 5px 5px rgba(0,0,0,.65)); }
@media (max-width:650px) { .race-transition { height:160px; } .race-transition__scene { width:900px; max-width:none; position:relative; left:50%; transform:translateX(-50%); } }
@media (prefers-reduced-motion:reduce) { .race-transition__car { transition:none!important; } }

/* Safe separators: no overlay on text, buttons, or images. */
.race-transition { position:relative; z-index:0; overflow:hidden; contain:paint; }
.race-transition__scene { pointer-events:none; }
.race-transition__car { opacity:0; transition:opacity .16s ease; }
@media(prefers-reduced-motion:reduce) { .race-transition__car { opacity:0!important; } }

/* V3: vertical, different scroll journeys. All racing elements live in dedicated separators. */
.race-transition { height:clamp(280px,34vw,420px); background:#0a0b0e; overflow:hidden; position:relative; contain:paint; }
.race-transition__scene { width:100%; height:100%; display:block; pointer-events:none; }
.race-transition__kerbs { fill:none; stroke:#ececec; stroke-width:94; stroke-dasharray:24 24; stroke-linejoin:round; }
.race-transition__asphalt { fill:none; stroke:#30333a; stroke-width:78; stroke-linejoin:round; stroke-linecap:round; }
.race-transition__center { fill:none; stroke:#555b62; stroke-width:2; stroke-dasharray:13 17; }
.race-transition__guide { fill:none; stroke:transparent; stroke-width:1; }
.race-transition__label { fill:#a0a5ae; font:700 17px Inter,Arial,sans-serif; letter-spacing:4px; }
.race-transition__number { fill:rgba(255,255,255,.045); font:900 180px Inter,Arial,sans-serif; }
.race-transition__car { opacity:0; filter:drop-shadow(0 5px 5px rgba(0,0,0,.7)); }
.race-transition--2 .race-transition__kerbs { stroke:#e10600; stroke-dasharray:20 20; }
.race-transition--3 .race-transition__kerbs { stroke:#d6d6d6; stroke-dasharray:18 18; }
.race-transition--4 .race-transition__kerbs { stroke:#e10600; stroke-dasharray:26 20; }
@media(max-width:650px){.race-transition{height:280px}.race-transition__scene{width:800px;max-width:none;position:relative;left:50%;transform:translateX(-50%)}.race-transition__label{font-size:15px}}

/* Unified editorial photo gallery */
.photo-gallery-section{background:radial-gradient(ellipse at 80% 15%,rgba(225,6,0,.06),transparent 50%),#0b0b0b}
.photo-gallery__heading{display:flex;justify-content:space-between;align-items:end;gap:20px;flex-wrap:wrap;margin-bottom:27px}
.photo-gallery__heading h2{font-family:Orbitron,Inter,sans-serif;letter-spacing:-.045em;font-size:clamp(30px,5vw,58px);line-height:1.12;margin:8px 0 0}
.photo-gallery__heading p{max-width:370px}
.photo-gallery__eyebrow{font:700 11px 'Space Mono',monospace;letter-spacing:.19em;color:#e10600!important}
.photo-gallery__dot{color:#e10600}
.photo-gallery{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-auto-flow:dense;gap:12px}
.photo-gallery__item{position:relative;grid-column:span 5;aspect-ratio:4/3;display:block;min-width:0;padding:0;border:0;border-radius:4px;overflow:hidden;cursor:zoom-in;background:#202126;color:white;text-align:left}
.photo-gallery__item--1{grid-column:span 7;grid-row:span 2;aspect-ratio:auto;min-height:500px}
.photo-gallery__item--2,.photo-gallery__item--3{grid-column:span 5;aspect-ratio:16/9;min-height:240px}
.photo-gallery__item--4{grid-column:span 12;aspect-ratio:2.8/1;max-height:450px}
.photo-gallery__item img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .65s cubic-bezier(.2,.7,.2,1),filter .4s ease}
.photo-gallery__item:hover img,.photo-gallery__item:focus-visible img{transform:scale(1.045);filter:brightness(.8)}
.photo-gallery__item-shade{position:absolute;inset:0;background:linear-gradient(180deg,transparent 65%,rgba(0,0,0,.5));display:flex;align-items:end;padding:22px;font:700 11px 'Space Mono',monospace;letter-spacing:.14em;opacity:.9}
.photo-gallery__plus{font-size:20px;margin-left:8px}
.photo-gallery__item:focus-visible{outline:3px solid #e10600;outline-offset:3px}
.gallery-lightbox[hidden]{display:none!important}
.gallery-lightbox{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.96);padding:65px 75px 50px;overscroll-behavior:contain}
.gallery-lightbox__figure{margin:0;display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:100%;max-height:100%;gap:14px}
.gallery-lightbox__figure img{display:block;max-width:100%;max-height:calc(100dvh - 155px);width:auto;height:auto;object-fit:contain}
.gallery-lightbox__figure figcaption{font:600 12px 'Space Mono',monospace;letter-spacing:.12em;color:#d1d1d1;text-align:center}
.gallery-lightbox__close,.gallery-lightbox__arrow{position:absolute;border:0;background:transparent;color:white;cursor:pointer;line-height:1}
.gallery-lightbox__close{top:18px;right:26px;font-size:44px}
.gallery-lightbox__arrow{top:50%;transform:translateY(-50%);font-size:58px;padding:15px}
.gallery-lightbox__arrow--prev{left:12px}.gallery-lightbox__arrow--next{right:12px}
.gallery-lightbox__counter{position:absolute;bottom:15px;left:50%;transform:translateX(-50%);color:#aaa;font:12px 'Space Mono',monospace}
@media(max-width:700px){.photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.photo-gallery__item,.photo-gallery__item--1,.photo-gallery__item--2,.photo-gallery__item--3,.photo-gallery__item--4{grid-column:span 1;grid-row:auto;min-height:0;max-height:none;aspect-ratio:3/4}.photo-gallery__item--1{grid-column:span 2;aspect-ratio:1.45/1}.photo-gallery__item--4{grid-column:span 2;aspect-ratio:1.7/1}.photo-gallery__item-shade{padding:12px;font-size:9px}.gallery-lightbox{padding:70px 15px 65px}.gallery-lightbox__arrow{font-size:40px;top:auto;bottom:12px;transform:none}.gallery-lightbox__figure img{max-height:calc(100dvh - 190px)}}
@media(prefers-reduced-motion:reduce){.photo-gallery__item img{transition:none}}

/* Progressive gallery reveal */
.photo-gallery__item[hidden],.photo-gallery__actions[hidden]{display:none!important}
.photo-gallery__actions{display:flex;justify-content:center;margin-top:34px}
.photo-gallery__more{appearance:none;background:transparent;border:1px solid rgba(255,255,255,.35);color:#fff;border-radius:3px;padding:17px 25px;font:700 12px 'Space Mono',monospace;letter-spacing:.09em;cursor:pointer;transition:background .2s,border-color .2s}
.photo-gallery__more:hover,.photo-gallery__more:focus-visible{background:#e10600;border-color:#e10600}
.photo-gallery__more span{margin-left:12px;font-size:17px}
