/* Boutique Car & Concierge — "the dark room": one blue-black field, the cars are the lit things. */
:root {
  --bg: #0a0d14;
  --surface: #131824;
  --surface-2: #1b2130;
  --ink: #e9edf3;
  --muted: #a3acbb;
  --accent: #5a9bfc;
  --accent-ink: #0a0d14;

  --display: "Imbue", "Heebo", Georgia, serif;
  --text: "Heebo", system-ui, sans-serif;

  --step-small: 1rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --step-sub: clamp(1.75rem, 1.2rem + 1.2vw, 2.5rem);
  --step-head: clamp(2.25rem, 1.3rem + 3.4vw, 4.25rem);

  --margin: clamp(16px, 2.2vw, 32px);
  --gap-section: clamp(120px, 14vw, 200px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.skip { position: absolute; inset-inline-start: var(--margin); top: -60px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 50; }
.skip:focus { top: 12px; }

h2 { font-family: var(--display); font-weight: 400; font-size: var(--step-head); line-height: 1; letter-spacing: -0.01em; }
:lang(he) h2 { font-weight: 300; letter-spacing: -0.02em; }
.car-name { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.95; }
.count { font-family: var(--display); color: var(--muted); }

/* Buttons: one shape (square), one fill. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 500; font-size: var(--step-body); text-decoration: none;
  border: 0; border-radius: 0; cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 180ms ease;
}
.btn:hover { background: #7cb0ff; }
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: var(--step-small); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; overflow: hidden; }
.hero-photo {
  position: absolute; inset-block: 20px; inset-inline-start: 20px;
  width: 47vw; overflow: hidden; background: var(--surface);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; animation: drift 24s var(--ease-in-out) infinite alternate; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.1) translateY(-1.5%); } }

.nav {
  position: absolute; top: 24px; inset-inline-end: var(--margin);
  display: flex; align-items: center; gap: clamp(16px, 2vw, 32px);
  font-size: var(--step-small); font-weight: 400; z-index: 3;
}
.nav a:not(.btn), .lang { text-decoration: none; background: none; border: 0; padding: 6px 0; cursor: pointer; position: relative; }
.nav a:not(.btn)::after, .lang::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: var(--origin, right); transition: transform 200ms var(--ease-out);
}
[dir="ltr"] .nav a:not(.btn)::after, [dir="ltr"] .lang::after { --origin: left; }
.nav a:not(.btn):hover::after, .lang:hover::after { transform: scaleX(1); }

.hero-copy {
  position: absolute; top: 34%; inset-inline-start: calc(47vw + 20px + (53vw - 20px - 34ch) / 2);
  max-width: 34ch; display: flex; flex-direction: column; gap: 20px;
}
.hero-line { font-size: var(--step-lead); line-height: 1.5; font-weight: 300; }
.hero-facts { font-size: var(--step-lead); font-weight: 400; text-wrap: balance; }
.hero-where { font-family: var(--display); font-size: var(--step-lead); color: var(--muted); text-align: end; }
html[dir="ltr"] .hero-where { text-align: start; }
.wordmark {
  position: absolute; bottom: 40px;
  font-family: var(--display); font-weight: 400; font-size: clamp(88px, 11.5vw, 220px);
  line-height: 0.82; letter-spacing: -0.03em; white-space: nowrap; z-index: 2; margin: 0;
}
html[dir="rtl"] .wordmark { right: calc(47vw + 20px - 14vw); }
html[dir="ltr"] .wordmark { left: calc(47vw + 20px - 14vw); }
.wordmark span { display: block; transform-origin: 50% 100%; }
@supports (animation-timeline: scroll()) {
  .wordmark span { animation: shrink linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
  @keyframes shrink { to { transform: scale(0.93); } }
}

/* ---------- Fleet chapters ---------- */
.fleet { margin-top: var(--gap-section); }
.cat-nav {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  display: flex; gap: clamp(20px, 3vw, 48px); padding: 18px var(--margin);
  overflow-x: auto; scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a {
  display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap;
  text-decoration: none; color: var(--muted); font-size: var(--step-lead); font-weight: 400;
  padding-bottom: 6px; position: relative; transition: color 200ms ease;
}
.cat-nav a small { font-family: var(--display); font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.cat-nav a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--ink);
  transform: scaleX(0); transform-origin: var(--origin, right); transition: transform 300ms var(--ease-out);
}
[dir="ltr"] .cat-nav a::after { --origin: left; }
.cat-nav a:hover, .cat-nav a[aria-current] { color: var(--ink); }
.cat-nav a[aria-current]::after { transform: scaleX(1); }

.chapter { padding-top: clamp(140px, 12vw, 200px); scroll-margin-top: 40px; }
.chapter + .chapter { margin-top: clamp(40px, 6vw, 100px); }
.chapter-head { padding-inline: var(--margin); margin-bottom: clamp(32px, 4vw, 56px); overflow: hidden; }
.chapter-word {
  font-family: var(--display); font-weight: 400; font-size: clamp(76px, 17vw, 300px);
  line-height: 0.8; letter-spacing: -0.03em; white-space: nowrap; text-align: left;
}
.chapter-word span { display: inline-block; }
html[dir="rtl"] .chapter-word { text-align: right; }
@supports (animation-timeline: view()) {
  .chapter-word span { animation: drift-x linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  @keyframes drift-x { from { transform: translateX(6vw); } to { transform: translateX(-6vw); } }
}
.chapter-sub { margin-top: 22px; font-size: var(--step-body); color: var(--muted); max-width: 60ch; }
.chapter-sub strong { color: var(--ink); font-weight: 500; }

.frame { position: relative; height: 100svh; min-height: 640px; overflow: hidden; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; }
.frame-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.8) contrast(1.06); transform: scale(1.06); transition: transform 1600ms var(--ease-out); }
.frame.in .frame-bg { transform: scale(1); }
.frame-card {
  position: relative; grid-column: 2; margin-inline: var(--margin);
  background: var(--surface); padding: 28px 24px;
  display: flex; flex-direction: column; gap: 14px; text-align: center;
}
.chapter:nth-child(2) .frame-card { grid-column: 3; }
.chapter:nth-child(3) .frame-card { grid-column: 4; }
.chapter:nth-child(4) .frame-card { grid-column: 3; }
.frame-card .car-name { font-size: var(--step-sub); }
.card-meta { color: var(--muted); font-size: var(--step-small); }
.card-photo { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.grid {
  list-style: none; margin: clamp(24px, 3vw, 40px) 0 0; padding: 0 var(--margin);
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(32px, 3.4vw, 56px) clamp(12px, 1.4vw, 20px);
}
.tile { min-width: 0; }
.t-wide { grid-column: span 8; } .t-wide .tile-img { aspect-ratio: 3 / 2; }
.t-tall { grid-column: span 4; } .t-tall .tile-img { aspect-ratio: 3 / 4; }
.t-mid  { grid-column: span 4; } .t-mid .tile-img { aspect-ratio: 4 / 5; }
.t-half { grid-column: span 6; } .t-half .tile-img { aspect-ratio: 4 / 3; }
.t-full { grid-column: span 12; } .t-full .tile-img { aspect-ratio: 21 / 9; }
.tile-img { display: block; width: 100%; padding: 0; border: 0; background: var(--surface); cursor: pointer; overflow: hidden; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out), filter 400ms ease; filter: brightness(0.94); }
.tile-img:hover img, .tile-img:focus-visible img { transform: scale(1.045); filter: brightness(1.04); }
.tile-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-top: 14px; }
.tile-meta .car-name { font-size: var(--step-lead); }
.t-wide .tile-meta .car-name, .t-full .tile-meta .car-name { font-size: var(--step-sub); }
.tile-facts { font-size: var(--step-small); color: var(--muted); margin-top: 6px; }
.tile-wa {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  background: var(--surface); color: var(--ink); text-decoration: none; font-size: var(--step-small); font-weight: 500;
  transition: background-color 180ms ease, color 180ms ease, transform 140ms var(--ease-out);
}
.tile-wa:hover { background: var(--accent); color: var(--accent-ink); }
.tile-wa:active { transform: scale(0.96); }
.noscript { color: var(--ink); padding: 0 var(--margin); }

/* ---------- How ---------- */
.how { margin-top: var(--gap-section); }
.how-top { display: flex; justify-content: space-between; align-items: end; padding-inline: var(--margin); margin-bottom: 20px; }
.how-top h2 { font-size: var(--step-sub); }
.how-btns { display: flex; gap: 8px; }
.sq { width: 48px; height: 48px; border: 0; border-radius: 0; background: var(--surface); cursor: pointer; font-size: 20px; transition: background-color 180ms ease, transform 140ms var(--ease-out); }
.sq:hover { background: var(--surface-2); }
.sq:active { transform: scale(0.94); }
.how-bar { height: 6px; background: var(--surface); margin-inline: var(--margin); margin-bottom: 40px; }
.how-bar span { display: block; height: 100%; width: 25%; background: var(--ink); transform-origin: right; transition: width 200ms linear; }
[dir="ltr"] .how-bar span { transform-origin: left; }
.how-row {
  list-style: none; margin: 0; padding: 0 var(--margin);
  display: flex; gap: 32px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.how-row::-webkit-scrollbar { display: none; }
.moment { flex: 0 0 300px; scroll-snap-align: start; display: flex; flex-direction: column; }
.moment h3 { font-size: var(--step-lead); font-weight: 500; margin-bottom: 8px; }
.moment p { font-size: var(--step-small); color: var(--muted); min-height: 5em; }
.moment img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.moment:nth-child(1) img { margin-top: 90px; }
.moment:nth-child(2) img { margin-top: 30px; }
.moment:nth-child(3) img { margin-top: 140px; }
.moment:nth-child(4) img { margin-top: 60px; }

/* ---------- CTA ---------- */
.cta { position: relative; min-height: 90svh; overflow: hidden; display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; margin-top: var(--gap-section); }
.cta-car { grid-column: 1 / span 8; grid-row: 1; width: 130%; max-width: none; align-self: end; margin-bottom: -14%; margin-inline-start: -18%; }
.cta-text { grid-column: 9 / span 4; grid-row: 1; padding-inline: var(--margin); display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.cta-text h2 { font-size: var(--step-sub); line-height: 1.05; }
.cta-fact { font-size: var(--step-lead); font-family: var(--display); }

/* ---------- Footer ---------- */
.foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 24px; padding: 30svh var(--margin) 30px; font-size: var(--step-small); color: var(--muted); }
.foot-links { display: flex; gap: 24px; }
.foot-links a { color: var(--ink); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot p:last-child { text-align: end; }

/* ---------- Car dialog ---------- */
.car {
  width: min(1200px, 100vw - 2 * var(--margin)); max-height: calc(100svh - 48px); padding: 0; border: 0; border-radius: 0;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); /* taste-skill-ignore: dialog floats */
}
.car[open] { display: grid; grid-template-columns: 1.4fr 1fr; animation: rise 350ms var(--ease-out); }
.car::backdrop { background: rgba(5, 7, 11, 0.82); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.car-photos { background: var(--bg); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.car-info, .car-thumbs { min-width: 0; }
#car-main { width: 100%; flex: 1; min-height: 0; object-fit: contain; max-height: 70svh; transition: opacity 200ms ease; }
.car-thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
.car-thumbs button { flex: 0 0 76px; height: 56px; padding: 0; border: 0; cursor: pointer; opacity: 0.55; background: none; transition: opacity 160ms ease; }
.car-thumbs button[aria-current="true"], .car-thumbs button:hover { opacity: 1; }
.car-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.car-info { position: relative; padding: 76px 28px 32px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.car-info .car-name { font-size: var(--step-sub); }
.car-sub { color: var(--muted); font-size: var(--step-small); }
.close { position: absolute; top: 16px; inset-inline-end: 16px; width: 44px; height: 44px; border: 0; background: var(--surface-2); cursor: pointer; font-size: 18px; }
.book { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.book label { display: flex; flex-direction: column; gap: 6px; font-size: var(--step-small); color: var(--muted); }
.book input {
  min-height: 48px; padding: 0 12px; border: 1px solid #39425a; border-radius: 0;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; color-scheme: dark;
}
.preview-label { font-size: var(--step-small); color: var(--muted); margin-top: 6px; }
.preview { background: var(--bg); padding: 14px 16px; font-size: var(--step-small); white-space: pre-line; line-height: 1.55; }
.note { font-size: var(--step-small); color: var(--muted); }

/* ---------- Entrances (content stays visible without script) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Phone ---------- */
@media (max-width: 860px) {
  .hero { min-height: 0; display: flex; flex-direction: column; }
  .hero-photo { position: relative; inset: auto; margin: 12px 12px 0; width: auto; height: 58svh; }
  .nav { top: 24px; inset-inline-end: 24px; gap: 14px; }
  .nav a:not(.btn):not(.wa-link) { display: none; }
  .nav .lang { background: rgba(10, 13, 20, 0.7); padding: 8px 12px; }
  html[dir] .wordmark { position: relative; bottom: auto; inset: auto; font-size: 25vw; margin: -9vw 16px 0; text-align: left; order: 2; }
  .hero-copy { position: static; max-width: none; margin: 16px 20px 8px; order: 3; gap: 12px; }
  .hero-line, .hero-facts, .hero-where { font-size: 18px; }

  .cat-nav { gap: 22px; padding: 14px var(--margin); }
  .cat-nav a { font-size: 18px; }
  .chapter-word { font-size: 24vw; }
  .chapter-sub { font-size: 18px; }
  .frame { display: flex; align-items: flex-end; min-height: 0; height: 88svh; }
  .frame-card, .chapter:nth-child(n) .frame-card {
    margin: 0; width: 100%; text-align: start; padding: 20px;
    display: grid; grid-template-columns: 1fr 112px; column-gap: 16px; row-gap: 8px; align-items: start;
  }
  .frame-card > :not(.card-photo) { grid-column: 1; }
  .card-photo { grid-column: 2; grid-row: 1 / span 2; width: 112px; }
  .frame-card .btn { grid-column: 1 / -1; margin-top: 8px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; grid-auto-flow: dense; }
  .t-wide, .t-full, .t-half:nth-of-type(4n) { grid-column: span 2; }
  .t-wide .tile-img, .t-full .tile-img { aspect-ratio: 4 / 3; }
  .t-tall, .t-mid, .t-half { grid-column: span 1; }
  .t-tall .tile-img, .t-mid .tile-img, .t-half .tile-img { aspect-ratio: 4 / 5; }
  .tile-meta { flex-direction: column; gap: 10px; padding-top: 10px; }
  .tile-meta .car-name, .t-wide .tile-meta .car-name { font-size: 20px; }
  .t-wide .tile-meta, .t-full .tile-meta { flex-direction: row; }
  .tile-wa { min-height: 40px; padding: 0 14px; }

  .how-btns { display: none; }
  .moment { flex-basis: 72vw; }
  .how-row { gap: 16px; }
  .moment:nth-child(1) img { margin-top: 48px; }
  .moment:nth-child(2) img { margin-top: 32px; }
  .moment:nth-child(3) img { margin-top: 64px; }
  .moment:nth-child(4) img { margin-top: 40px; }


  .cta { display: flex; flex-direction: column; min-height: 0; }
  .cta-text { order: -1; padding: 0 var(--margin); }
  .cta-text h2 { font-size: 30px; }
  .cta-text .btn { width: 100%; }
  .cta-car { width: 130vw; max-width: none; height: 55svh; object-fit: cover; margin: 32px 0 0; margin-inline-start: -15vw; }

  .foot { display: flex; flex-direction: column; gap: 8px; padding: 20svh var(--margin) 24px; font-size: 14px; }
  .foot p:last-child { text-align: start; }

  .car { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; inset: 0; overflow-x: hidden; }
  .car[open] { display: flex; flex-direction: column; overflow-y: auto; }
  .car-photos, .car-info { flex-shrink: 0; }
  #car-main { height: 42svh; max-height: none; flex: none; object-fit: contain; }
  .car-info { overflow: visible; padding: 24px 20px 32px; }
  .car-info .close { position: fixed; top: 12px; inset-inline-end: 12px; z-index: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
