/* Babbis tools hub, v2: Babbis's own grill photo, the front skewers are the tools.
   Tokens from the Babbis design system (social.babbis.co.il app.css). */
@font-face { font-family: 'Suez One'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/suez-hebrew.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Suez One'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/suez-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(fonts/rubik-hebrew.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(fonts/rubik-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

:root {
  --ink: #042118; --ink-2: #0A2E22; --ink-3: #0E3A2B;
  --cream: #E4E3DD; --terra: #B5574A; --terra-hot: #D06A57;
  --gold: #9A7B2F; --gold-hi: #D2B266; --gold-text: #E8D49C;
  --font-head: 'Suez One', 'Rubik', Arial, sans-serif; --font-body: 'Rubik', Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; color: var(--cream); font-family: var(--font-body); overflow-x: hidden;
  background: radial-gradient(ellipse 90% 60% at 50% 0%, var(--ink-2), var(--ink) 70%) var(--ink);
}
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 4px; }

/* ---------- header ---------- */
.top { text-align: center; padding: 36px 16px 0; }
.top img { display: block; width: min(220px, 56vw); height: auto; margin: 0 auto 14px; }
.top h1 { margin: 0; font: 400 clamp(26px, 4vw, 38px)/1.15 var(--font-head); letter-spacing: .3px; }
.top p { margin: 8px 0 0; font-size: 15px; opacity: .7; }

/* ---------- the grill ---------- */
/* the grill and its plates fit on one screen: width follows the screen's height */
.stage { max-width: clamp(560px, calc((100vh - 300px) * 1.5 + 32px), 1120px); margin: 24px auto 0; padding: 0 16px; }
.scene {
  position: relative; aspect-ratio: 1067 / 712; border-radius: 18px; overflow: hidden; isolation: isolate;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(210,178,102,.18);
  animation: rise-in .9s var(--ease) both;
}
.scene svg { display: block; width: 100%; height: 100%; }
.scene .base { filter: brightness(.86) saturate(1.05); transition: filter .45s ease; }

/* coals breathe under the meat */
.coals { mix-blend-mode: screen; animation: breathe 2.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.coals.two { animation-duration: 3.4s; animation-delay: -1.2s; }
@keyframes breathe {
  0% { opacity: .35; transform: scale(.96); }
  45% { opacity: .75; }
  100% { opacity: .55; transform: scale(1.04); }
}

/* embers drift up from the coals */
.embers circle { fill: #FFB15C; transform-box: fill-box; opacity: 0; animation: ember 4.2s linear infinite; }
.embers circle:nth-child(2n) { animation-duration: 5.1s; fill: #FF8A3D; }
.embers circle:nth-child(3n) { animation-duration: 3.6s; }
.embers circle:nth-child(1) { animation-delay: -.4s; } .embers circle:nth-child(2) { animation-delay: -1.9s; }
.embers circle:nth-child(3) { animation-delay: -3.1s; } .embers circle:nth-child(4) { animation-delay: -.9s; }
.embers circle:nth-child(5) { animation-delay: -2.6s; } .embers circle:nth-child(6) { animation-delay: -3.8s; }
.embers circle:nth-child(7) { animation-delay: -1.3s; } .embers circle:nth-child(8) { animation-delay: -2.2s; }
.embers circle:nth-child(9) { animation-delay: -4.4s; } .embers circle:nth-child(10) { animation-delay: -.2s; }
.embers circle:nth-child(11) { animation-delay: -3.3s; } .embers circle:nth-child(12) { animation-delay: -1.6s; }
@keyframes ember {
  0% { opacity: 0; transform: translate(0, 0); }
  10% { opacity: .95; }
  70% { opacity: .5; }
  100% { opacity: 0; transform: translate(-60px, -300px); }
}

/* smoke drifting over the photo's own smoke */
.smoke { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.smoke i {
  position: absolute; bottom: 10%; width: 34%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(220,222,226,.14), transparent 62%);
  filter: blur(14px); opacity: 0; animation: drift 11s linear infinite;
}
.smoke i:nth-child(1) { inset-inline-start: 8%; animation-delay: 0s; }
.smoke i:nth-child(2) { inset-inline-start: 30%; animation-delay: -2.2s; width: 42%; }
.smoke i:nth-child(3) { inset-inline-start: 52%; animation-delay: -4.4s; }
.smoke i:nth-child(4) { inset-inline-start: 18%; animation-delay: -6.6s; width: 28%; }
.smoke i:nth-child(5) { inset-inline-start: 44%; animation-delay: -8.8s; width: 38%; }
@keyframes drift {
  0% { opacity: 0; transform: translate(0, 0) scale(.8); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(8%, -70%) scale(1.5); }
}

/* the photo melts into the page at the bottom, where the plates sit */
.shade { position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(180deg, rgba(4,33,24,.25) 0%, transparent 22%, transparent 62%, rgba(4,33,24,.92) 100%); }

/* ---------- a skewer: a copy of its part of the photo, on top ---------- */
.skewer { cursor: pointer; transition: transform .45s var(--ease), filter .35s ease, opacity .35s ease; }
.scene.focus .base { filter: brightness(.55) saturate(.85); }
.scene.focus .skewer { filter: brightness(.62) saturate(.85); }
.scene.focus .skewer.on { filter: brightness(1.22) saturate(1.12) drop-shadow(0 14px 12px rgba(0,0,0,.65)); transform: translate(0, -4px); }

/* pulled out by the handle (toward the lower left), then the page changes */
.skewer[data-tool="sol"] { --px: -219px; --py: 70px; }
.skewer[data-tool="social"] { --px: -220px; --py: 66px; }
.skewer[data-tool="calls"] { --px: -221px; --py: 64px; }
.skewer[data-tool="lp"] { --px: -223px; --py: 54px; }
.scene.focus .skewer.pull { transform: translate(var(--px), var(--py)); opacity: 0;
  transition: transform .55s cubic-bezier(.55, 0, .8, .2), opacity .5s ease .1s; }

/* ---------- engraved metal plates ---------- */
.plates {
  position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin: -64px 20px 0; padding: 0;
}
.plate {
  position: relative; display: block; text-decoration: none; color: var(--cream); border-radius: 10px;
  padding: 18px 18px 16px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px),
    linear-gradient(170deg, var(--ink-3), var(--ink) 75%);
  border: 1px solid rgba(210,178,102,.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -10px 18px rgba(0,0,0,.35), 0 14px 28px rgba(0,0,0,.45);
  transition: transform .3s var(--ease), border-color .3s ease, box-shadow .3s ease;
  animation: rise-in .8s var(--ease) both;
}
.plate:nth-child(1) { animation-delay: .25s; } .plate:nth-child(2) { animation-delay: .35s; }
.plate:nth-child(3) { animation-delay: .45s; } .plate:nth-child(4) { animation-delay: .55s; }
/* rivets */
.plate::before, .plate::after {
  content: ""; position: absolute; top: 9px; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #F1DDA4, #8A6A24 70%);
  box-shadow: 0 1px 1px rgba(0,0,0,.6);
}
.plate::before { inset-inline-start: 9px; } .plate::after { inset-inline-end: 9px; }
.plate b {
  display: block; font: 400 clamp(19px, 2vw, 23px)/1.2 var(--font-head); color: var(--gold-text);
  text-shadow: 0 -1px 0 rgba(0,0,0,.85), 0 1px 0 rgba(255,255,255,.06); /* engraved */
}
.plate span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.4; color: rgba(228,227,221,.74); }
.plate:hover, .plate:focus-visible, .plate.on {
  transform: translateY(-4px); border-color: var(--terra-hot);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 -10px 18px rgba(0,0,0,.3),
              0 0 0 1px rgba(208,106,87,.55), 0 18px 34px rgba(181,87,74,.32);
}
.plate.go { border-color: var(--gold-hi); }

footer { text-align: center; font-size: 12px; opacity: .5; padding: 30px 16px 36px; }

/* leaving: the page goes dark as the skewer comes off */
.curtain { position: fixed; inset: 0; background: var(--ink); opacity: 0; pointer-events: none; transition: opacity .35s ease .25s; z-index: 10; }
body.leaving .curtain { opacity: 1; }

@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .top { padding-top: 26px; }
  .stage { margin-top: 18px; }
  .scene { border-radius: 14px; }
  .plates { grid-template-columns: 1fr 1fr; gap: 10px; margin: -34px 8px 0; }
  .plate { padding: 15px 13px 13px; }
  .plate span { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .smoke, .embers { display: none; }
}
.nw { white-space: nowrap; }
