/* =============================================================================
   COMMON — reveal states, header, film, buy bar and social

   Moved verbatim from the approved builds. Rules are unchanged and in their
   original order — a split, not a rewrite.
   ========================================================================== */

/* =============================================================================
   MAIN — animation initial states + per-section styles
   Sections get appended to the bottom of this file, one block each.
   ========================================================================== */

/* ---- Reveal initial states ----------------------------------------------
   Set in CSS, not JS, so nothing flashes before GSAP boots. Guarded by .js
   so the page still reads fine with JavaScript disabled.
   ------------------------------------------------------------------------- */

.js [data-anim] { opacity: 0; will-change: transform, opacity; }

.js [data-anim='fade-up']    { transform: translate3d(0, 2rem, 0); }
.js [data-anim='fade-down']  { transform: translate3d(0, -2rem, 0); }
.js [data-anim='fade-left']  { transform: translate3d(2rem, 0, 0); }
.js [data-anim='fade-right'] { transform: translate3d(-2rem, 0, 0); }
.js [data-anim='zoom']       { transform: scale(1.06); }

.js [data-anim='clip'] {
  opacity: 1;
  clip-path: inset(0 0 102% 0);
}

/* Once revealed, drop the compositor hint */
.js [data-anim].is-revealed { will-change: auto; }

/* --- 01 HEADER -----------------------------------------------------------
   A plain white bar carrying the two brand marks, centred at every width.
   The header stays solid rather than transparent so the logos never sit on
   moving video.
   ------------------------------------------------------------------------- */

.site-header {
  background: var(--white);
  /* border-bottom: 1px solid var(--line-soft); */
}

.site-header.is-scrolled {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  justify-content: center;
  gap: clamp(0.9rem, 8vw, 2rem);
  /* padding-block: 0.5rem; */
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 4vw, 2rem);
}

.brand-lockup__link { display: block; line-height: 0; }

.brand-lockup__logo {
  width: auto;
  height: clamp(2.2rem, 12vw, 3.4rem);
  transition: transform var(--dur-mid) var(--ease-out);
}

.brand-lockup__link:hover .brand-lockup__logo { transform: scale(1.04); }

.brand-lockup__logo--foodies { height: clamp(2.4rem,12.5vw, 3.8rem); }

/* Hairline between the two marks, hidden when they stack tight on tiny screens */
.brand-lockup__rule {
  width: 1px;
  height: clamp(1.6rem, 6vw, 2.6rem);
  background: var(--line);
  flex: none;
}




/* =============================================================================
   06 FILM — MP4 with a custom play button
   Standalone section stylesheet. Depends only on the tokens in base.css.

   The native controls are deliberately absent, so every visible affordance
   here is ours: the button before playback, and the whole frame as a
   click target during it.
   ========================================================================== */

.film {
  position: relative;
  background: var(--grad-page);
}
.film .container{
  padding: 0;
  max-width: 100%;
}
.film__frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  background: #1A0305;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

.film__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Brand lockup -------------------------------------------------------- */

.film__badge {
  position: absolute;
  top: 6%;
  right: 5%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: opacity var(--dur-mid) var(--ease-out),
              transform var(--dur-mid) var(--ease-out);
}

.film__badge-tops { width: clamp(3.5rem, 11vw, 6.5rem); height: auto; }
.film__badge-foodies { width: clamp(4.5rem, 14vw, 8.5rem); height: auto; }

/* Out of the way once the film is running */
.film__frame.is-playing .film__badge {
  opacity: 0;
  transform: translateY(-0.5rem);
  pointer-events: none;
}

/* ---- Play button --------------------------------------------------------- */

.film__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: clamp(3.75rem, 14vw, 5.5rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--grad-accent);
  color: var(--white);
  box-shadow: 0 14px 34px -10px rgba(74, 2, 6, 0.75);
  cursor: pointer;
  transition: transform var(--dur-mid) var(--ease-out),
              opacity var(--dur-mid) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}

.film__play:hover { transform: translate(-50%, -50%) scale(1.08); }
.film__play:active { transform: translate(-50%, -50%) scale(1); }

.film__play-icon {
    width: 48%;
    height: 48%;
    fill: currentColor;
    margin-left: 0;
}

/* Soft pulse outward, so the button reads as the thing to press */
.film__play-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--red-600);
  opacity: 0.45;
  animation: film-pulse 2.6s var(--ease-out) infinite;
}

@keyframes film-pulse {
  0%   { transform: scale(1);   opacity: 0.45; }
  70%  { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* Hidden during playback, restored when paused or ended */
.film__frame.is-playing .film__play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.8);
}

.film__frame.is-playing { cursor: default; }

@media (prefers-reduced-motion: reduce) {
  .film__play-ring { animation: none; opacity: 0.3; }
}

/* =============================================================================
   07 BUY NOW + SOCIAL
   Standalone section stylesheet. Depends only on the tokens in base.css.

   Each tile's background colour is the partner's own, held in a --tile-bg
   variable on the modifier class. Logos drop in as transparent images sized
   with object-fit: contain, so a wordmark and a square mark both sit
   correctly without per-tile adjustment.
   ========================================================================== */

.buy {
    position: relative;
    padding-top: 12px;
    padding-bottom: var(--sp-lg);
    background: var(--white);
}

/* ---- Heading ------------------------------------------------------------- */

.buy__head {
  margin-bottom: var(--sp-md);
  text-align: center;
}

.buy__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.05rem + 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-900);
}

.buy__eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: var(--sp-2xs);
    font-family: var(--font-display);
    font-size: clamp(1rem, 0.9rem + 1.2vw, 1.35rem);
    font-weight: 800;
    margin-bottom: 16px;
    color: #231208;
}
.buy__grid.buy__grid--stores{
  margin-bottom: 20px;
}
.buy__rule {
  display: block;
  width: clamp(1.75rem, 10vw, 3rem);
  height: 2px;
  border-radius: 2px;
  background: var(--red-600);
}

/* ---- Grid ---------------------------------------------------------------- */

.buy__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 3vw, 1.25rem);
  max-width: 46rem;
  margin-inline: auto;
}

.tile {
  display: grid;
  place-items: center;
  aspect-ratio: 5 / 2.6;
  border-radius: clamp(10px, 3vw, 16px);
  background: var(--tile-bg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-mid) var(--ease-out),
              box-shadow var(--dur-mid) var(--ease-out);
}

.tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    overflow: hidden;
    border-radius: 12px;
}

@media (hover: hover) {
  .tile:hover,
  .tile:focus-visible {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }
}

/* ---- Partner colours ----------------------------------------------------- */

.tile--blinkit   { --tile-bg: #F8CD46; }
.tile--zepto     { --tile-bg: #4B1A6B; }
.tile--instamart { --tile-bg: #FFFFFF; box-shadow: inset 0 0 0 1px var(--line-soft), var(--shadow-sm); }
.tile--amazon    { --tile-bg: #1FA2F1; }
.tile--bigbasket { --tile-bg: #84C225; }
.tile--flipkart  { --tile-bg: #E8474F; }

/* ---- Follow patch --------------------------------------------------------
   Full-bleed red bar closing the section.
   ------------------------------------------------------------------------- */

.buy__follow {
    display: block;
    margin-top: var(--sp-xl);
    padding: clamp(1.1rem, 3vw, 2.5rem) var(--gutter);
    background: var(--grad-accent);
    color: var(--white);
    font-family: var(--font-display);
    font-size: var(--fs-base);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    transition: filter var(--dur-fast) var(--ease-out);
    border-radius: 42px 42px 0 0;
}
.buy__follow:hover { filter: brightness(1.08); }

/* ---- Follow bar ----------------------------------------------------------
   Full-bleed red strip closing the section. Icons only, monochrome white,
   sitting directly on the red — no plates behind them.
   ------------------------------------------------------------------------- */
.buy__social {
    padding:8px 0 20px 0;
}
.buy__social-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 3vw, 1.5rem);
}
 
/* The link is a 44px tap target; the glyph inside stays small, matching the
   reference. Sizing the anchor to the icon would leave it under the minimum
   touch size on a phone. */
.social {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  transition: transform var(--dur-mid) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}
 
.social img {
  width: 26px;
  height: auto;
}
 
/* ---- 62em: the row opens to three across --------------------------------- */

@media (min-width: 62em) {
  .buy { padding-top: var(--sp-2xl); }
  .buy__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 62rem;
  }
}

/* The T&Cs link inside the form. Underlined rather than colour-only: the
   surrounding text is already the same red, so colour alone would not mark
   it as clickable. */
.entry__terms a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}




/* =============================================================================
   BUY + SOCIAL — additions

   Append to assets/css/common.css. Nothing existing is replaced: every rule
   below is either a new class or a new modifier, so .buy__grid, .tile,
   .buy__social and .social keep working exactly as they do now.
   ========================================================================== */

/* ---- Second eyebrow ---------------------------------------------------------
   The buy section now has two headings. The first keeps whatever spacing
   .buy__eyebrow already gives it; this only adds the gap above the second,
   so the two blocks do not run together.
   ------------------------------------------------------------------------- */

.buy__eyebrow--second {
  margin-top: clamp(1.5rem, 7vw, 3rem);
}

/* ---- Store tiles -------------------------------------------------------------
   These are <span>, not <a>. Physical retailers have no single product URL,
   so there is nothing to link to — and a link that goes nowhere is worse
   than no link, because it looks clickable.

   The rules below undo what .tile assumes about being interactive: no
   pointer, no hover lift, no focus ring. Everything else — the box, the
   radius, the image sizing — is inherited from .tile unchanged.
   ------------------------------------------------------------------------- */

.tile--store {
  cursor: default;
}

/* .tile's hover and active states assume a link. Neutralised rather than
   removed, so .tile itself is untouched for the six that ARE links. */
.tile--store:hover,
.tile--store:focus,
.tile--store:active {
  transform: none;
  box-shadow: inherit;
}

/* The first two marks are line drawings on white, so they need a visible
   edge that the brand-coloured logos do not. */
.buy__grid--stores li:nth-child(1) .tile--store,
.buy__grid--stores li:nth-child(2) .tile--store {
  background: #FFFFFF;
}



/* =============================================================================
   SOCIAL — additions

   Append to assets/css/common.css.

   Every selector below is a new modifier or a scoped override, so the
   existing .buy__social, .buy__social-list and .social rules keep working
   for anything else that uses them.

   The layout is a 3x2 grid rather than a wrapping flex row. A flex row with
   wrap gives three and three at most widths, but the moment the icons or the
   viewport change slightly it breaks four-and-two — and a row of four beside
   a row of two reads as a mistake. An explicit grid cannot do that.
   ========================================================================== */

/* ---- Heading -----------------------------------------------------------------
   The rules are flex children taking the leftover width, so they split it
   evenly and always reach the same distance either side of the words —
   whatever the heading measures, in any language.
   ------------------------------------------------------------------------- */

.buy__eyebrow--social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.6rem, 3vw, 1.1rem);
  width: 100%;
  max-width: 26rem;
  margin: 0 auto clamp(1.25rem, 6vw, 2.25rem);
  font-family: var(--font-display);
  font-size: clamp(1rem, 4.4vw, 1.45rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink-900, #231208);
  text-align: center;
}

/* Scoped to this heading, so the rules in the Buy section keep whatever
   width and colour they already have. */
.buy__eyebrow--social .buy__rule {
  flex: 1 1 auto;
  height: 1px;
  background: #9E1B1B;
}

/* ---- The grid ------------------------------------------------------------------
   Three across, two rows. max-width keeps the columns from stretching so far
   apart on a wide screen that the group stops reading as one block.
   ------------------------------------------------------------------------- */

.buy__social-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 7vw, 2.75rem) clamp(1rem, 6vw, 2.5rem);
  place-items: center;
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
  padding: 0;
  list-style: none;
}

.buy__social-list > li { display: grid; place-items: center; }

/* ---- One icon --------------------------------------------------------------------
   The <img> in the markup carries width="24" height="24" as an aspect-ratio
   hint for the browser's first layout pass. This overrides the rendered size
   without removing that hint — which is what stops the row jumping as the
   files arrive.
   ------------------------------------------------------------------------- */

.buy__social .social {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    transition: transform var(--dur-base, 320ms) var(--ease, ease);
    align-items: center;
    width: 48px;
    height: 48px;
}

.buy__social .social img {
  width: 100%;
  height: 100%;
  /* contain, so a logo that is not perfectly square is never cropped */
  object-fit: contain;
  display: block;
}

@media (hover: hover) {
  .buy__social .social:hover { transform: translateY(-3px); }
}

.buy__social .social:focus-visible {
  outline: 3px solid #9E1B1B;
  outline-offset: 4px;
  border-radius: 8px;
}

/* ---- Reduced motion ----------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .buy__social .social,
  .buy__social .social:hover { transition: none; transform: none; }
}

.tile.tile--store {
    aspect-ratio: auto;
}

/* ---- "and more…" ----------------------------------------------------------
   Append to assets/css/common.css.

   A new class, so nothing existing is touched.

   It sits under the whole grid rather than in it, so it reads as a note
   about the six above rather than a seventh entry. Centred, and in the
   same red as the headings so the two connect.
   ------------------------------------------------------------------------- */

.buy__more {
  margin: clamp(0.6rem, 3vw, 1rem) 0 0;
  font-family: var(--font-display);
  font-size:clamp(0.8rem, 5vw, 1.5rem);
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  color: var(--red-600, #E8202A);
}