/* hero.css — THE ROTI RESTAURANT live hero
   A rotating "live plate" (auto-cycles through the real food photos), three orbiting dish
   chips that float and follow the pointer, steam, rising spice specks, a typed
   "now serving" line and a progress ring. All motion is CSS transform/opacity only,
   and everything stops under prefers-reduced-motion. */

.rt-hero { min-height: clamp(600px, 90vh, 820px); }

/* ---- background: warm gradient + two slow drifting lights (no stock photo) ---- */
.rt-hero-bg { background:
    radial-gradient(ellipse at 74% 46%, #6a3c14 0%, #2c1709 52%, #150a04 100%); overflow: hidden; }
.rt-hero-bg::before, .rt-hero-bg::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none;
}
.rt-hero-bg::before { width: 46vmax; height: 46vmax; right: -8vmax; top: -12vmax;
  background: radial-gradient(circle, rgba(240,146,43,.38), transparent 68%); animation: rtDriftA 16s ease-in-out infinite; }
.rt-hero-bg::after  { width: 34vmax; height: 34vmax; right: 18vmax; bottom: -14vmax;
  background: radial-gradient(circle, rgba(169,67,28,.32), transparent 68%); animation: rtDriftB 20s ease-in-out infinite; }
@keyframes rtDriftA { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-4vmax,5vmax) scale(1.12); } }
@keyframes rtDriftB { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(5vmax,-4vmax) scale(1.1); } }
.rt-hero-shade { background:
    linear-gradient(90deg, rgba(20,10,4,.9) 0%, rgba(20,10,4,.62) 38%, rgba(20,10,4,.08) 74%),
    linear-gradient(to top, rgba(20,10,4,.55), transparent 34%); }

/* ---- layout ---- */
.rt-hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: var(--sp-4); }
.rt-hero-inner > * { min-width: 0; }
.rt-hero-copy > :nth-child(7) { animation-delay: .6s; }

/* ---- typed "now serving" line ---- */
.rt-typed { margin: 0 0 .9rem; font-size: 1rem; font-weight: 500; color: #E9DDC9; min-height: 1.6em; }
.rt-typed .rt-typed-word { color: var(--turmeric-2); font-weight: 700; }
.rt-typed .rt-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -.15em;
  background: var(--turmeric); animation: rtBlink 1s steps(1) infinite; }
@keyframes rtBlink { 50% { opacity: 0; } }

/* ---- the stage ---- */
.rt-stage { --px: 0; --py: 0; position: relative; width: 100%; max-width: 470px; aspect-ratio: 1 / 1;
  margin-inline: auto; animation: riseIn 1s var(--ease) both; animation-delay: .2s; }

.rt-glow { position: absolute; inset: 4%; border-radius: 50%; filter: blur(30px);
  background: radial-gradient(circle, rgba(240,146,43,.55), rgba(240,146,43,.07) 62%, transparent 72%);
  animation: rtGlow 6s ease-in-out infinite; }
@keyframes rtGlow { 0%,100% { opacity: .72; transform: scale(1); } 50% { opacity: 1; transform: scale(1.07); } }

.rt-ring { position: absolute; border-radius: 50%; pointer-events: none; }
.rt-ring--out { inset: -3%; border: 1.5px dashed rgba(240,146,43,.38); animation: rtSpin 56s linear infinite; }
.rt-ring--in  { inset: 8%;  border: 1px solid rgba(251,243,228,.16);  animation: rtSpin 40s linear infinite reverse; }
@keyframes rtSpin { to { transform: rotate(360deg); } }

/* progress ring that fills while the current dish is on the plate */
.rt-progress { position: absolute; inset: 10.5%; width: 79%; height: 79%; transform: rotate(-90deg); pointer-events: none; z-index: 3; }
.rt-progress circle { fill: none; stroke-width: 1.6; }
.rt-progress .trk { stroke: rgba(251,243,228,.1); }
.rt-progress .bar { stroke: var(--turmeric-2); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.rt-stage.is-ticking .rt-progress .bar { animation: rtFill var(--rt-dwell, 4.6s) linear forwards; }
@keyframes rtFill { to { stroke-dashoffset: 0; } }

/* the plate */
.rt-plate { position: absolute; inset: 15%; border-radius: 50%; z-index: 2;
  background: radial-gradient(circle, #4a2d12, #1e1006);
  border: 1px solid rgba(240,146,43,.4);
  box-shadow: 0 28px 64px rgba(0,0,0,.6), inset 0 0 44px rgba(0,0,0,.35);
  animation: rtBob 7s ease-in-out infinite; }
.rt-plate::after { content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: 3; pointer-events: none;
  background: radial-gradient(circle at 30% 22%, rgba(255,255,255,.2), transparent 46%);
  box-shadow: inset 0 0 0 7px rgba(240,146,43,.12); }
.rt-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  opacity: 0; transform: scale(.9) rotate(-8deg); filter: saturate(1.1) contrast(1.05);
  transition: opacity .8s var(--ease), transform 1.1s var(--ease); }
.rt-face.is-on { opacity: 1; transform: scale(1) rotate(0); }
.rt-plate.has-faces { font-size: 0; }
@keyframes rtBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* steam */
.rt-steam { position: absolute; left: 50%; top: -1%; width: 110px; height: 140px; transform: translateX(-50%); pointer-events: none; z-index: 5; }
.rt-steam path { stroke: rgba(255,232,180,.7); stroke-width: 3; fill: none; stroke-linecap: round; filter: blur(.5px);
  animation: rtSteam 4.2s ease-in-out infinite; transform-origin: bottom center; }
.rt-steam path:nth-child(2) { animation-delay: 1.1s; } .rt-steam path:nth-child(3) { animation-delay: 2.2s; }
@keyframes rtSteam { 0% { opacity: 0; transform: translateY(16px) scaleY(.7); } 35% { opacity: .75; } 100% { opacity: 0; transform: translateY(-28px) scaleY(1.15); } }

/* orbiting dish chips */
.rt-chip { position: absolute; width: 27%; aspect-ratio: 1 / 1; padding: 0; border: 0; background: none;
  cursor: pointer; z-index: 6; font: inherit; color: var(--on-dark); animation: rtBob 6s ease-in-out infinite; }
.rt-chip--1 { top: -2%; left: -4%; animation-duration: 5.4s; }
.rt-chip--2 { bottom: 14%; left: -9%; animation-duration: 7.2s; animation-delay: .6s; }
.rt-chip--3 { top: 17%; right: -8%; animation-duration: 6.3s; animation-delay: 1.2s; }
.rt-chip-in { position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(240,146,43,.6); background: #33260F; box-shadow: 0 14px 30px rgba(0,0,0,.5);
  transition: scale 260ms var(--ease), box-shadow 260ms var(--ease); }
.rt-chip-in img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s var(--ease); }
.rt-chip:hover .rt-chip-in, .rt-chip:focus-visible .rt-chip-in { scale: 1.14; box-shadow: 0 18px 38px rgba(0,0,0,.6), 0 0 0 4px rgba(240,146,43,.28); }
.rt-chip:focus-visible { outline: 2px solid var(--turmeric-2); outline-offset: 5px; border-radius: 50%; }
.rt-chip-name { position: absolute; left: 50%; bottom: -13px; translate: -50% 0; white-space: nowrap; pointer-events: none;
  background: rgba(22,57,45,.94); color: var(--on-dark); font-size: .6rem; font-weight: 600; padding: .22rem .65rem;
  border-radius: var(--radius-pill); border: 1px solid rgba(240,146,43,.42); }

/* label card under the plate (name, blurb, "from ₹") */
.rt-label { position: absolute; left: 38%; bottom: -5%; translate: -50% 0; z-index: 7; min-width: 56%; max-width: 66%;
  display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; text-decoration: none;
  background: rgba(22,57,45,.94); border: 1px solid rgba(240,146,43,.48); border-radius: var(--radius-l);
  padding: .55rem 1.2rem .6rem; box-shadow: 0 14px 30px rgba(0,0,0,.45); color: var(--on-dark);
  backdrop-filter: blur(6px); transition: background var(--dur-fast) var(--ease); }
.rt-label:hover { background: rgba(28,72,58,.98); }
.rt-label-name { font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--turmeric); transition: opacity .3s; }
.rt-label-sub { font-size: .68rem; color: var(--on-dark-mu); transition: opacity .3s; }
.rt-label-go { font-size: .64rem; font-weight: 700; letter-spacing: .08em; color: var(--turmeric-2); margin-top: 2px; }
.rt-label.is-swapping .rt-label-name, .rt-label.is-swapping .rt-label-sub { opacity: 0; }

/* pause / play (auto-moving content must be pausable) */
.rt-pause { position: absolute; right: 2%; bottom: 3%; z-index: 8; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: var(--on-dark);
  background: rgba(22,57,45,.9); border: 1px solid rgba(240,146,43,.5); transition: background var(--dur-fast); }
.rt-pause:hover { background: rgba(240,146,43,.9); color: var(--ink); }
.rt-pause:focus-visible { outline: 2px solid var(--turmeric-2); outline-offset: 3px; }
.rt-pause svg { width: 14px; height: 14px; fill: currentColor; }
.rt-pause .i-play { display: none; } .rt-stage.is-paused .rt-pause .i-play { display: block; } .rt-stage.is-paused .rt-pause .i-pause { display: none; }

/* hand-lettered accent now rides on the stage */
.rt-stage .rt-scribble { position: absolute; right: -3%; top: -6%; bottom: auto; margin: 0; z-index: 7; text-align: center;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem); max-width: 9ch; }
.rt-stage .rt-scribble::after { text-align: center; }

/* spice specks drifting up */
.rt-speck { position: absolute; left: var(--x); bottom: 8%; width: var(--s); height: var(--s); border-radius: 50%; z-index: 1;
  background: var(--turmeric-2); opacity: 0; pointer-events: none; box-shadow: 0 0 8px rgba(255,211,92,.8);
  animation: rtSpeck var(--d) linear infinite; animation-delay: var(--w); }
@keyframes rtSpeck { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: .9; }
  100% { opacity: 0; transform: translateY(-320px) translateX(14px) scale(1.1); } }

/* pointer parallax — standalone `translate` composes with the float loops above */
.rt-chip, .rt-label, .rt-plate, .rt-stage .rt-scribble { transition: translate 500ms var(--ease); }
.rt-plate  { translate: calc(var(--px) * 9px)   calc(var(--py) * 9px); }
.rt-chip--1 { translate: calc(var(--px) * 20px)  calc(var(--py) * 18px); }
.rt-chip--2 { translate: calc(var(--px) * -16px) calc(var(--py) * 16px); }
.rt-chip--3 { translate: calc(var(--px) * 24px)  calc(var(--py) * -16px); }
.rt-label  { translate: calc(-50% + var(--px) * -6px) calc(var(--py) * -4px); }
.rt-stage .rt-scribble { translate: calc(var(--px) * 14px) calc(var(--py) * 10px); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .rt-hero { min-height: 0; padding-block: var(--sp-5) var(--sp-7); }
  .rt-hero-inner { grid-template-columns: 1fr; gap: var(--sp-5); }
  .rt-hero-shade { background: linear-gradient(to bottom, rgba(20,10,4,.75), rgba(20,10,4,.35) 60%, rgba(20,10,4,.6)); }
  .rt-stage { max-width: 340px; margin-bottom: var(--sp-4); }
  .rt-chip { width: 26%; }
  .rt-chip-name { font-size: .5rem; padding: .18rem .45rem; bottom: -11px; }
  .rt-label { bottom: -11%; min-width: 58%; max-width: 70%; padding: .4rem .8rem; }
  .rt-label-sub { display: none; }
  .rt-speck { display: none; }
  .rt-stage .rt-scribble { right: 0; top: -9%; }
}

/* ---- reduced motion: static, fully readable ---- */
@media (prefers-reduced-motion: reduce) {
  .rt-hero-bg::before, .rt-hero-bg::after, .rt-glow, .rt-ring, .rt-plate, .rt-steam path, .rt-chip, .rt-caret { animation: none !important; }
  .rt-speck, .rt-pause, .rt-progress { display: none; }
  .rt-plate, .rt-chip, .rt-stage .rt-scribble { translate: none !important; }
  .rt-label { translate: -50% 0 !important; }
  .rt-face { transition: none; }
}
