/* Cafe So’outh brand page. The same frame as the other brand pages (bar, a landing you can play with, the story,
   interactive sections, a sideways packaging run, marks and colours, credits), told through the South: a mango-leaf
   thoranam over the door, a dosa tawa, a metre-high filter coffee, a doorstep kolam, a banana-leaf meal, and the
   brand's own line illustrations walking across the page. The figures are drawn as masks so each section can colour
   them. */
:root {
  --green: #535E2F;
  --rust: #C76C36;
  --cream: #F5EEDF;
  --ink: #1E1F17;
  --serif: 'Fraunces', Georgia, serif;
  --body: 'Outfit', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.2, .9, .3, 1.4);
  --gut: max(clamp(16px, 4vw, 56px), (100vw - 1840px) / 2); /* content stops at 1840px on 27" and ultrawide screens */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--cream); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, .sec { font-family: var(--serif); font-weight: 400; line-height: 1; letter-spacing: -.01em; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }
.sec { font-size: clamp(42px, 6.2vw, 100px); margin-bottom: 0; }
.label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }

/* Bar: dark on the cream landing, then a solid dark strip once you scroll past it. */
.bar { position: fixed; inset: 0 0 auto; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px var(--gut); color: var(--ink); transition: background-color .3s, color .3s; }
.bar.solid { background: rgba(30, 31, 23, .92); backdrop-filter: blur(8px); color: var(--cream); }
.bar-back { font-weight: 500; text-decoration: none; font-size: 14px; letter-spacing: .04em; }
.bar-mark img { width: 30px; animation: turn 14s linear infinite; }
.bar-nav { justify-self: end; display: flex; gap: 22px; font-size: 14px; }
.bar-nav a { text-decoration: none; opacity: .85; }
.bar-nav a:hover { opacity: 1; color: var(--rust); }
@media (max-width: 860px) { .bar-nav { display: none; } .bar { grid-template-columns: 1fr auto; } .bar-mark { justify-self: end; } }
@keyframes turn { to { transform: rotate(360deg); } }

/* Headings: each word rises out of its own mask. */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .2em; margin-bottom: -.2em; }
.split .w > span { display: inline-block; transform: translateY(110%) rotate(5deg); transition: transform .9s var(--spring) calc(var(--k) * 70ms); }
.split.in .w > span { transform: none; }

/* Illustrations as masks: --src is the figure, the section sets the colour. */
.ink { aspect-ratio: var(--ar); background: var(--ink-c, var(--rust)); -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
/* A road: the figure crosses it as the section scrolls past (main.js sets --x and --y). */
.road, .march { position: relative; height: clamp(150px, 19vw, 280px); overflow: hidden; }
.road .ink, .march .ink { position: absolute; left: 0; bottom: 0; height: 100%; will-change: transform; transform: translate(var(--x, 0px), var(--y, 0px)); }

/* A kolam rule: one rice-flour line looping along, drawn as the section comes up (main.js builds it). */
.krule { height: clamp(46px, 5vw, 70px); padding-inline: var(--gut); }
.krule svg { display: block; width: 100%; height: 100%; overflow: visible; }
.krule path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: var(--d, 1); }

/* 1. Landing */
.land { position: relative; min-height: 100vh; min-height: 100svh; background: var(--cream); color: var(--ink); overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: clamp(24px, 4vw, 70px);
  padding: clamp(160px, 22vh, 210px) var(--gut) clamp(40px, 7vh, 80px); }
/* faint kolam dots on the floor of the page */
.land::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle, rgba(199, 108, 54, .22) 1.6px, transparent 2.2px); background-size: 34px 34px;
  -webkit-mask: radial-gradient(ellipse 60% 70% at 72% 62%, #000, transparent 75%); mask: radial-gradient(ellipse 60% 70% at 72% 62%, #000, transparent 75%); }
.land-copy { display: grid; justify-items: start; gap: clamp(14px, 2.4vh, 26px); }
.hello { all: unset; cursor: pointer; display: inline-flex; align-items: baseline; gap: 10px; padding: 9px 18px; border: 1.5px solid var(--green); border-radius: 999px; color: var(--green);
  font: 600 13px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; transition: background-color .25s, color .25s; }
.hello:hover { background: var(--green); color: var(--cream); }
.hello:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
.hello span { font: 500 17px/1 var(--body); letter-spacing: 0; text-transform: none; }
.hello.swap b, .hello.swap span { animation: helloSwap .5s var(--ease); }
@keyframes helloSwap { from { opacity: 0; transform: translateY(10px); } }
.land-logo { width: min(100%, 760px); animation: logoIn 1.1s var(--spring) both; }
@keyframes logoIn { from { opacity: 0; transform: translateY(34px) scale(.96); } }
.land-line { font: italic 400 clamp(28px, 3.4vw, 54px)/1.05 var(--serif); color: var(--rust); animation: logoIn 1.1s var(--spring) .15s both; }

/* The thoranam: each leaf hangs from the string and swings from its stalk (main.js sets --a). */
.toran { position: absolute; left: 0; right: 0; top: 58px; height: clamp(110px, 15vh, 150px); pointer-events: none; z-index: 2; }
.toran .string { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.toran .string path { fill: none; stroke: #8A5A2B; stroke-width: 2; vector-effect: non-scaling-stroke; }
.tl { position: absolute; width: clamp(16px, 1.55vw, 26px); transform-origin: 50% 0; transform: translateX(-50%) rotate(var(--a, 0deg)); }
.tl svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 4px 3px rgba(30, 31, 23, .18)); }
.tm { position: absolute; width: clamp(16px, 1.45vw, 24px); aspect-ratio: 1; border-radius: 50%; transform-origin: 50% 0; transform: translate(-50%, -25%) rotate(var(--a, 0deg));
  background: radial-gradient(circle, #F7C66A 0 18%, transparent 19%), repeating-conic-gradient(#F2A33A 0 15deg, #E2841C 15deg 30deg);
  box-shadow: 0 3px 5px rgba(30, 31, 23, .22); }

/* The tawa: as the page scrolls the swirl O spreads like batter, steaming; once it is wide it flips, golden (a tap
   tosses it again). Touch scrolls the page as anywhere else. */
.tawa-wrap { position: relative; display: grid; justify-items: center; gap: 22px; }
.tawa { all: unset; position: relative; display: block; width: clamp(220px, 24vw, 340px); aspect-ratio: 1; border-radius: 50%; cursor: pointer; touch-action: manipulation; perspective: 900px; -webkit-tap-highlight-color: transparent; user-select: none; }
.tawa:focus-visible { outline: 3px solid var(--rust); outline-offset: 10px; }
.tawa::before { content: ""; position: absolute; z-index: -1; left: 86%; top: 45%; width: 30%; height: 10%; border-radius: 999px; background: linear-gradient(#7A5232, #4A2F1D); transform: rotate(-14deg); box-shadow: 0 6px 10px rgba(30, 31, 23, .25); }
.tawa:not(.used)::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid var(--rust); animation: ring 1.9s ease-out infinite; pointer-events: none; }
@keyframes ring { from { opacity: .8; transform: scale(.92); } to { opacity: 0; transform: scale(1.12); } }
.tawa-pan { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 38% 32%, #4A4B3E 0, #2A2B22 45%, #17180F 100%);
  box-shadow: inset 0 0 0 7px #2E2F26, inset 0 -10px 30px rgba(0, 0, 0, .55), 0 30px 40px -20px rgba(30, 31, 23, .55); transition: box-shadow .5s; }
.tawa.hot .tawa-pan { box-shadow: inset 0 0 0 7px #3B2C20, inset 0 -10px 30px rgba(0, 0, 0, .55), 0 0 70px -6px rgba(233, 120, 40, .6), 0 30px 40px -20px rgba(30, 31, 23, .55); }
.batter { position: absolute; left: 12%; top: 12%; width: 76%; height: 76%; object-fit: contain; pointer-events: none; user-select: none;
  transform: scale(var(--s, .32)) rotate(var(--r, 0deg)); filter: brightness(1.08); }
.batter.done { filter: sepia(.5) saturate(1.7) brightness(1.2) hue-rotate(-6deg); transition: filter .6s; }
.batter.flip { animation: dosaFlip .85s cubic-bezier(.3, .7, .3, 1) forwards; }
@keyframes dosaFlip { 0% { translate: 0 0; rotate: y 0deg; } 45% { translate: 0 -62%; rotate: y 100deg; } 100% { translate: 0 0; rotate: y 180deg; } }
.steam i { position: absolute; bottom: 48%; width: 9%; height: 36%; border-radius: 50%; background: linear-gradient(transparent, rgba(255, 255, 255, .6)); filter: blur(6px); opacity: 0; pointer-events: none; }
.steam i:nth-child(1) { left: 28%; }
.steam i:nth-child(2) { left: 46%; animation-delay: .45s !important; }
.steam i:nth-child(3) { left: 63%; animation-delay: .9s !important; }
.tawa.hot .steam i { animation: steam 1.4s ease-in infinite; }
@keyframes steam { 0% { opacity: 0; transform: translateY(30%) scaleX(.6); } 35% { opacity: .9; } 100% { opacity: 0; transform: translateY(-130%) scaleX(1.5); } }
.tawa-say { display: grid; justify-items: center; gap: 6px; text-align: center; max-width: 30ch; }
.dosa-n { font: 600 clamp(38px, 4vw, 58px)/1 var(--serif); color: var(--rust); }
.dosa-n.pop { animation: pop .55s var(--spring); }
@keyframes pop { 40% { transform: scale(1.4); } }
.dosa-line { font-size: 16px; color: #4A4B3E; }
@media (max-width: 860px) {
  .land { grid-template-columns: minmax(0, 1fr); text-align: center; padding-top: clamp(150px, 20vh, 180px); }
  .land-copy { justify-items: center; }
  .tawa { width: min(62vw, 260px); }
}

/* 2. Story */
.story { background: var(--green); color: var(--cream); padding-top: clamp(40px, 5vw, 70px); }
.story .krule { color: rgba(232, 201, 162, .7); }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 90px); align-items: center; padding: clamp(40px, 6vw, 90px) var(--gut) 0; }
.story-text { display: grid; gap: 22px; }
.story-text .label { color: #E8C9A2; }
.story-text h2 { font-size: clamp(38px, 4.8vw, 78px); }
.story-text p:not(.label) { max-width: 52ch; color: #E9E3D2; font-size: clamp(17px, 1.3vw, 20px); }
.story-pic { overflow: hidden; aspect-ratio: 4 / 3.1; }
.story-pic img { width: 100%; height: 100%; object-fit: cover; transform: translateY(var(--py, 0px)) scale(1.12); }
.story .road { --ink-c: #E8C9A2; margin-top: clamp(30px, 5vw, 70px); border-bottom: 2px solid rgba(232, 201, 162, .4); }
@media (max-width: 860px) { .story-grid { grid-template-columns: minmax(0, 1fr); } }

/* 3. Poster studio: the section and the poster trade colours as you pick (main.js sets the variables). */
.studio { --sbg: #F5EEDF; --sfg: #1E1F17; --pbg: #C76C36; --part: #F5EEDF; --pword: #F5EEDF;
  background: var(--sbg); color: var(--sfg); padding: clamp(80px, 10vw, 150px) var(--gut); overflow: hidden; transition: background-color .6s var(--ease), color .6s var(--ease); }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 90px); align-items: center; }
.studio-copy { display: grid; gap: 22px; justify-items: start; }
.studio .label { color: var(--rust); }
.studio-copy > p:not(.label) { max-width: 46ch; font-size: clamp(17px, 1.3vw, 20px); }
.pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pick-k { width: 100%; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; opacity: .7; }
.chip { all: unset; cursor: pointer; padding: 9px 16px; border-radius: 999px; border: 1.5px solid currentColor; font: 600 14px/1 var(--body); letter-spacing: .02em; transition: background-color .25s, color .25s, transform .3s var(--spring); }
.chip:hover { transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: var(--sfg); color: var(--sbg); border-color: var(--sfg); }
.chip:focus-visible, .swatch:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }
.swatch { all: unset; cursor: pointer; width: 38px; height: 38px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--sfg) 40%, transparent); transition: transform .3s var(--spring), box-shadow .25s; }
.swatch:hover { transform: scale(1.12); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--sfg) 40%, transparent), 0 0 0 4px var(--sbg), 0 0 0 6px var(--sfg); }
.studio .shuffle { margin-top: 6px; background: var(--sfg); border-color: var(--sfg); color: var(--sbg); }
.studio .shuffle:hover { background: var(--rust); border-color: var(--rust); color: #fff; }
.poster-wrap { justify-self: center; width: min(100%, 470px); perspective: 1100px; }
/* The poster tilts toward the pointer, with a soft sheen (main.js sets --rx, --ry, --gx, --gy). */
.poster { all: unset; position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; gap: 4%; width: 100%; aspect-ratio: 3 / 4;
  padding: 9% 8% 8%; box-sizing: border-box; cursor: pointer; overflow: hidden; background: var(--pbg); color: var(--pword);
  box-shadow: 0 30px 60px -26px rgba(30, 31, 23, .55), inset 0 0 0 1px rgba(30, 31, 23, .08);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease), background-color .6s var(--ease), color .6s var(--ease); }
.poster.tilting { transition: transform .08s linear, background-color .6s var(--ease), color .6s var(--ease); }
.poster::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255, 255, 255, .22), transparent 55%); opacity: 0; transition: opacity .3s; }
.poster.tilting::after { opacity: 1; }
.poster:focus-visible { outline: 3px solid var(--rust); outline-offset: 8px; }
.p-word { font: 600 clamp(38px, 5.2vw, 76px)/1 var(--body); letter-spacing: .06em; text-transform: uppercase; }
.p-word.flip { animation: wordFlip .6s var(--spring); }
@keyframes wordFlip { 0% { opacity: 0; transform: rotateX(90deg) translateY(-20%); } 100% { opacity: 1; transform: none; } }
.p-art { --ink-c: var(--part); align-self: center; width: 92%; max-height: 100%; transition: background-color .6s var(--ease); }
.p-art.in { animation: artIn .8s cubic-bezier(.2, .8, .2, 1); }
@keyframes artIn { from { clip-path: inset(0 0 0 100%); transform: translateX(14%); } to { clip-path: inset(0 0 0 0); transform: none; } }
.p-logo { width: 62%; }
.p-logo.in { animation: logoSwap .5s var(--ease); }
@keyframes logoSwap { from { opacity: 0; transform: translateY(10px); } }
.poster.shuffling { animation: shuffle .55s var(--spring); }
@keyframes shuffle { 30% { transform: rotate(-3deg) scale(.97); } 65% { transform: rotate(2deg) scale(1.02); } }
@media (max-width: 860px) { .studio-grid { grid-template-columns: minmax(0, 1fr); } .poster-wrap { width: min(100%, 380px); } }

/* 4. The name: the wordmark in its parts, cut from the logo and positioned as in it (logo pixels / 2400 x 945), drawn
   as masks so this section can colour them. main.js moves UTH and the tagline along and adds swirl Os in between. */
.name { background: var(--ink); color: var(--cream); padding: clamp(80px, 10vw, 150px) var(--gut); overflow: hidden; }
.name-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px clamp(30px, 5vw, 90px); align-items: end; }
.name-head .label { grid-column: 1 / -1; color: var(--rust); }
.name-head p:not(.label) { max-width: 46ch; font-size: clamp(17px, 1.3vw, 20px); color: #E9E3D2; }
.stretch { --wmw: min(52vw, 640px); position: relative; margin-top: clamp(50px, 7vw, 110px); height: calc(var(--wmw) * 945 / 2400); cursor: grab; touch-action: pan-y; user-select: none; -webkit-tap-highlight-color: transparent; outline: none; }
.stretch.on { cursor: grabbing; }
.stretch:focus-visible { outline: 3px dashed var(--rust); outline-offset: 16px; }
.wm { position: absolute; left: 0; top: 0; width: var(--wmw); aspect-ratio: 2400 / 945; transform-origin: 0 50%; will-change: transform; }
.part { position: absolute; display: block; }
.part, .part i { -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.p-cafe { left: calc(14 / 2400 * 100%); top: 0; width: calc(658 / 2400 * 100%); height: calc(193 / 945 * 100%); background: var(--rust); -webkit-mask-image: url(img/name/cafe.png); mask-image: url(img/name/cafe.png); }
.p-so { left: 0; top: calc(219 / 945 * 100%); width: calc(874 / 2400 * 100%); height: calc(520 / 945 * 100%); background: var(--cream); -webkit-mask-image: url(img/name/so.png); mask-image: url(img/name/so.png); }
.p-swirl { left: calc(817 / 2400 * 100%); top: calc(255 / 945 * 100%); width: calc(488 / 2400 * 100%); height: calc(489 / 945 * 100%); transition: scale .35s var(--spring), opacity .25s; }
.p-swirl i { position: absolute; inset: 0; background: var(--rust); -webkit-mask-image: url(img/name/swirl.png); mask-image: url(img/name/swirl.png); animation: turn 9s linear infinite; }
.p-swirl.whirl i { animation: whirl .9s cubic-bezier(.2, .8, .2, 1); }
@keyframes whirl { from { transform: rotate(0deg); } to { transform: rotate(720deg); } }
.p-swirl.x { scale: 0; opacity: 0; }
.p-swirl.x.show { scale: 1; opacity: 1; }
.p-swirl.x:nth-child(odd) i { animation-duration: 6s; animation-direction: reverse; }
.p-swirl.x:nth-child(even) i { animation-duration: 7.5s; }
.p-uth { left: calc(1345 / 2400 * 100%); top: calc(267 / 945 * 100%); width: calc(1055 / 2400 * 100%); height: calc(472 / 945 * 100%); background: var(--cream); transform-origin: 0 50%; -webkit-mask-image: url(img/name/uth.png); mask-image: url(img/name/uth.png); }
.p-tag { left: calc(402 / 2400 * 100%); top: calc(859 / 945 * 100%); width: calc(1595 / 2400 * 100%); height: calc(86 / 945 * 100%); background: var(--cream); opacity: .8; -webkit-mask-image: url(img/name/tag.png); mask-image: url(img/name/tag.png); }
.name-say { margin-top: clamp(30px, 4vw, 60px); font: italic 400 clamp(24px, 2.8vw, 44px)/1.15 var(--serif); min-height: 1.2em; text-align: center; }
.name-say b { font-style: normal; font-weight: 600; color: var(--rust); }
@media (max-width: 860px) { .name-head { grid-template-columns: minmax(0, 1fr); } .stretch { --wmw: min(84vw, 520px); } }

/* 5. The banana leaf. Two halves meet at the midrib so the top half can fold down over the meal.
   PLACEHOLDERS: the dishes are drawn here in CSS until the photo cut-outs arrive. */
.leaf { background: var(--cream); color: var(--ink); padding: clamp(80px, 10vw, 150px) var(--gut); overflow: hidden; }
.leaf-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px clamp(30px, 5vw, 90px); align-items: end; margin-bottom: clamp(30px, 5vw, 70px); }
.leaf-head .meal { --ink-c: var(--green); grid-column: 3; grid-row: 2; width: clamp(96px, 10vw, 170px); }
.leaf-head .label { grid-column: 1 / -1; color: var(--rust); }
.leaf-head h2 { color: var(--green); }
.leaf-head p:not(.label) { max-width: 46ch; font-size: clamp(17px, 1.3vw, 20px); }
.leaf-stage { display: grid; gap: clamp(18px, 3vw, 34px); justify-items: center; }
.leaf-box { width: min(100%, 1120px); }
.leaf-btn { all: unset; position: relative; display: block; width: 100%; aspect-ratio: 1000 / 380; cursor: pointer; perspective: 1600px; -webkit-tap-highlight-color: transparent; --dz: 1; }
.leaf-btn:focus-visible { outline: 3px dashed var(--rust); outline-offset: 12px; }
.banana { position: absolute; left: 0; width: 100%; height: 50%; display: block; overflow: hidden; } /* each half shows only its half of the leaf */
.banana-bottom { top: 50%; filter: drop-shadow(0 18px 16px rgba(30, 31, 23, .2)); }
.banana-top { top: 0; z-index: 3; transform-origin: 50% 100%; transition: transform 1.1s cubic-bezier(.6, 0, .2, 1); }
.leaf-btn.folded .banana-top { transform: rotateX(-178deg); }
.leaf-btn:not(.folded):hover .banana-top { transform: rotateX(-6deg); transition-duration: .5s; }
.dish { position: absolute; z-index: 4; left: var(--x); top: var(--y); translate: -50% -50%; opacity: 0; scale: .6; pointer-events: none; }
.dish.on { animation: plop .7s var(--spring) forwards; }
.dish.eaten { animation: eat .4s ease-in forwards; }
@keyframes plop { 0% { opacity: 0; translate: -50% -190%; scale: .7; } 60% { opacity: 1; translate: -50% -46%; scale: 1.06 .9; } 100% { opacity: 1; translate: -50% -50%; scale: 1; } }
@keyframes eat { from { opacity: 1; scale: 1; } to { opacity: 0; scale: .3; } }
.dish-tag { position: absolute; z-index: 5; left: var(--x); top: var(--y); translate: -50% -200%; padding: 6px 13px; border-radius: 999px; background: var(--ink); color: var(--cream);
  font: 600 13px/1.2 var(--body); white-space: nowrap; opacity: 0; pointer-events: none; }
.dish-tag.on { animation: tag 1.7s var(--ease) forwards; }
@keyframes tag { 0% { opacity: 0; translate: -50% -140%; } 15% { opacity: 1; translate: -50% -220%; } 75% { opacity: 1; } 100% { opacity: 0; translate: -50% -250%; } }
.d-idli { width: calc(15% * var(--dz)); aspect-ratio: 1.7; }
.d-idli i { position: absolute; width: 52%; aspect-ratio: 1.25; border-radius: 50%; background: radial-gradient(ellipse at 40% 30%, #fff 0 30%, #F1ECDF 62%, #DAD1BD 100%);
  box-shadow: 0 5px 8px rgba(30, 31, 23, .28), inset 0 -3px 5px rgba(0, 0, 0, .06); }
.d-idli i:nth-child(1) { left: 0; top: 24%; }
.d-idli i:nth-child(2) { left: 46%; top: 32%; }
.d-idli i:nth-child(3) { left: 23%; top: 0; }
.d-chutney { width: calc(8% * var(--dz)); aspect-ratio: 1.25; border-radius: 52% 48% 56% 44% / 48% 56% 44% 52%; box-shadow: 0 4px 6px rgba(30, 31, 23, .22);
  background: radial-gradient(circle at 30% 40%, #5F9233 0 4%, transparent 5%), radial-gradient(circle at 63% 58%, #5F9233 0 3%, transparent 4%),
    radial-gradient(circle at 46% 72%, #C76C36 0 3%, transparent 4%), radial-gradient(ellipse at 45% 40%, #FBF8EF, #E7DFC8 78%); }
.d-vada { width: calc(10% * var(--dz)); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 6px 9px rgba(30, 31, 23, .3);
  background: radial-gradient(circle, transparent 0 17%, #6E3B14 18% 22%, #B5702E 32%, #CB8838 46%, #9A5A22 62%, #6E3B14 70%); }
.d-sambar { width: calc(12% * var(--dz)); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 8px 10px rgba(30, 31, 23, .32);
  background: radial-gradient(circle at 40% 42%, #E9A04B 0 5%, transparent 6%), radial-gradient(circle at 58% 56%, #7DA03B 0 4%, transparent 5%),
    radial-gradient(circle at 50% 50%, #C2551E 0 46%, #A8441A 54%, #EDEAE2 56%, #BDB8AD 64%, #EFEDE6 70%, #9E998E 72%); }
.d-dosa { width: calc(34% * var(--dz)); aspect-ratio: 3.4; rotate: -8deg; border-radius: 48% 52% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 0 10px 12px rgba(30, 31, 23, .28), inset 0 -6px 10px rgba(120, 60, 10, .25);
  background: radial-gradient(ellipse at 20% 30%, rgba(120, 60, 10, .35) 0 3%, transparent 4%), radial-gradient(ellipse at 55% 45%, rgba(120, 60, 10, .3) 0 4%, transparent 5%),
    radial-gradient(ellipse at 80% 36%, rgba(120, 60, 10, .3) 0 3%, transparent 4%), linear-gradient(172deg, #F6C36B, #E1973A 50%, #B9691D); }
.d-kesari { width: calc(9% * var(--dz)); aspect-ratio: 1.15; border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%; box-shadow: 0 6px 8px rgba(30, 31, 23, .26);
  background: radial-gradient(circle at 36% 30%, #FFE3A6 0 6%, transparent 7%), radial-gradient(ellipse at 45% 35%, #FFB74D, #F2901F 60%, #D8701A); }
.leaf-ctrl { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 26px; text-align: center; }
.leaf-say { font: italic 400 clamp(22px, 2.2vw, 32px)/1.2 var(--serif); color: var(--green); }
@media (max-width: 860px) {
  .leaf-head { grid-template-columns: minmax(0, 1fr) auto; }
  .leaf-head h2 { grid-column: 1 / -1; }
  .leaf-head p:not(.label) { grid-column: 1; }
  .leaf-head .meal { grid-column: 2; grid-row: 3; width: 90px; }
  .leaf-btn { aspect-ratio: 1000 / 620; --dz: 1.35; }
}

/* 6. Packaging: pinned, the range runs sideways as you scroll down. */
.packs { position: relative; background: var(--green); color: var(--cream); }
.packs-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: clamp(18px, 3vh, 36px); }
.packs-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 30px; padding-inline: var(--gut); }
.packs-head p { max-width: 36ch; color: #E9E3D2; }
.packs-track { display: flex; gap: clamp(14px, 2vw, 28px); padding-inline: var(--gut); width: max-content; will-change: transform; }
.packs-track figure { position: relative; flex: none; width: clamp(280px, 36vw, 600px); aspect-ratio: 4 / 3; overflow: hidden; }
.packs-track img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.packs-track figure:hover img { transform: scale(1.05); }
.packs-track figcaption { position: absolute; left: 14px; bottom: 12px; padding: 6px 13px; border-radius: 999px; background: rgba(30, 31, 23, .72); font-size: 13px; font-weight: 600; letter-spacing: .06em; }

/* 7. Stories from the South */
.stories { background: var(--cream); color: var(--ink); padding-top: clamp(80px, 10vw, 150px); }
.stories-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(32px, 6vw, 110px); margin-bottom: clamp(40px, 6vw, 80px); align-items: end; padding-inline: var(--gut); }
.stories h2 { font-size: clamp(40px, 5.6vw, 92px); color: var(--rust); }
.stories-head p { max-width: 46ch; font-size: clamp(17px, 1.4vw, 20px); }
@media (max-width: 860px) { .stories-head { grid-template-columns: minmax(0, 1fr); } }
.elephant-road { height: clamp(190px, 24vw, 360px); margin: clamp(30px, 5vw, 70px) 0 clamp(20px, 3vw, 40px); }
/* the snake boat on its water, a scalloped line of ripples */
.boat-road { height: clamp(120px, 15vw, 230px); margin-top: clamp(40px, 6vw, 90px); }
.boat-road::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 10px; pointer-events: none;
  background: radial-gradient(circle at 10px -3px, transparent 8px, rgba(199, 108, 54, .45) 9px 10.5px, transparent 11.5px) 0 0 / 20px 10px repeat-x; }
.cart-road { --ink-c: #E8C9A2; height: clamp(120px, 14vw, 210px); margin: 0 0 clamp(24px, 4vw, 56px); border-bottom: 2px solid rgba(232, 201, 162, .3); }
.full { overflow: hidden; }
.full img, .duo img { width: 100%; transform: translateY(var(--py, 0px)) scale(1.1); }
.full.wipe { clip-path: inset(0 calc((1 - var(--w, 0)) * 50%) 0 calc((1 - var(--w, 0)) * 50%)); }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.duo figure { overflow: hidden; aspect-ratio: 4 / 3; }
.duo img { height: 100%; object-fit: cover; }
@media (max-width: 760px) { .duo { grid-template-columns: minmax(0, 1fr); } }

/* The working escalator: the whole panel, unrolled into a 1919x260 strip (clean panel plus figures), is laid back
   onto the photo in slices by main.js, one per bend of the curve plus the incline. The figures slide along the strip
   on a loop (--esc-x), so they ride round the curve and up the slope. */
.esc-inner { position: relative; transform: translateY(var(--py, 0px)) scale(1.1); }
.full.esc img { transform: none; }
.esc-slice { position: absolute; left: 0; top: 0; height: 260px; transform-origin: 0 0; overflow: hidden; }
.esc-slice i, .esc-slice em, .esc-slice b { position: absolute; top: 0; height: 260px; }
.esc-slice i { width: 1919px; background: url(img/esc-clean.jpg) 0 0 / 1919px 260px; }
/* The figures' window stays put on the strip and fades at both ends, so a figure melts away as it reaches the logo
   and appears gently at the top, never cut in half at the edge of the panel. */
.esc-slice em { width: 1919px; overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent 0 30px, #000 230px, #000 calc(100% - 200px), transparent 100%);
  mask: linear-gradient(90deg, transparent 0 30px, #000 230px, #000 calc(100% - 200px), transparent 100%); }
.esc-slice b { left: 0; width: 3838px; background: url(img/esc-figs.png) 0 0 / 1919px 260px repeat-x; transform: translateX(calc(var(--esc-x, 0px) - 1919px)); }

/* 8. Tagline */
.tagline { background: var(--ink); padding: clamp(90px, 14vw, 200px) 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 24px; align-items: center; overflow: hidden; }
.tagline > .label, .tag-line { padding-inline: var(--gut); }
.tagline .label { color: var(--rust); }
.tag-line { font: italic 400 clamp(48px, 9vw, 160px)/1 var(--serif); }
.tag-line span { display: inline-block; transition: color .3s; will-change: transform; }
.tag-line span:hover { color: var(--rust); }
.march { grid-column: 1 / -1; margin-top: clamp(40px, 6vw, 90px); }
@media (max-width: 760px) { .tagline { grid-template-columns: minmax(0, 1fr); } }

/* 9. City */
.city { background: var(--ink); padding-top: clamp(80px, 10vw, 150px); }
.city-head { padding: 0 var(--gut) clamp(28px, 4vw, 56px); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trio figure { overflow: hidden; aspect-ratio: 1; }
.trio .reveal { transition-delay: calc(var(--i, 0) * 120ms); }
.trio img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.trio figure:hover img { transform: scale(1.06); }
@media (max-width: 760px) { .trio { grid-template-columns: minmax(0, 1fr); } }

/* 10. Marks and colours */
.marks { background: var(--cream); color: var(--ink); padding-top: clamp(40px, 5vw, 70px); }
.marks .krule { color: rgba(199, 108, 54, .75); margin-bottom: clamp(40px, 6vw, 80px); }
.band { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.band-half { background: var(--bg); display: grid; place-items: center; gap: 18px; padding: clamp(60px, 9vw, 130px) 8%; }
.band-half img { width: min(90%, 460px); transition: transform .6s var(--ease); }
.band-half:hover img { transform: scale(1.05) rotate(-2deg); }
.band-half span { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: #8C8A78; }
.band-half:first-child span { color: #E8C9A2; }
@media (max-width: 760px) { .band { grid-template-columns: minmax(0, 1fr); } }
.colours { display: flex; height: clamp(300px, 52vh, 520px); overflow: hidden; }
.colours .sw { transform: translateY(70%); transition: transform 1s var(--ease), flex-grow .6s var(--ease); }
.colours.in .sw { transform: none; }
.colours .sw:nth-child(2) { transition-delay: .1s, 0s; }
.colours .sw:nth-child(3) { transition-delay: .2s, 0s; }
.colours .sw:nth-child(4) { transition-delay: .3s, 0s; }
.sw { flex: 1; background: var(--c); color: var(--t); display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(14px, 2vw, 28px); min-width: 0; }
.sw:hover { flex-grow: 2.4; }
.sw b { font: 400 clamp(22px, 2.4vw, 38px)/1 var(--serif); white-space: nowrap; }
.sw span { font-size: 13px; letter-spacing: .08em; }
@media (max-width: 760px) { .colours { flex-direction: column; height: auto; } .sw { min-height: 110px; } }

/* The temple town rises as a skyline above the credits (main.js sets --rise). */
.skyline { background: var(--cream); padding-top: clamp(60px, 8vw, 120px); overflow: hidden; }
.town { --ink-c: var(--green); width: min(100% - 2 * var(--gut), 1300px); margin: 0 auto; transform: translateY(var(--rise, 0%)); }

/* 11. Credits */
.credits { background: var(--cream); color: var(--ink); padding: clamp(64px, 8vw, 120px) var(--gut); }
.credits-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; border-bottom: 1px solid var(--ink); padding-bottom: clamp(40px, 6vw, 80px); }
.credits h3 { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--rust); margin-bottom: 12px; }
.outro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: clamp(40px, 6vw, 80px); }
.outro p { font: 400 clamp(34px, 4.6vw, 72px)/1 var(--serif); color: var(--green); max-width: 15ch; }
.outro-links { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { .credits-grid { grid-template-columns: minmax(0, 1fr); } }

/* Buttons */
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--green); color: #fff; text-decoration: none;
  font: 600 15px/1 var(--body); border: 2px solid var(--green); cursor: pointer; transition: background-color .25s, border-color .25s, color .25s; }
.btn:hover { background: var(--rust); border-color: var(--rust); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { color: #fff; }
.btn.ghost-cream { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn.ghost-cream:hover { background: var(--rust); border-color: var(--rust); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translate(-18px, 38px) rotate(2.5deg); transform-origin: 0 100%; transition: opacity .8s ease, transform .8s cubic-bezier(.65, 0, .35, 1); }
.reveal.in { opacity: 1; transform: none; }

/* Back to Grit Fox: the agency's own chip on every brand page. The fox blinks now and then, and tilts its head and
   glances back when you point at it. */
.bar-back.fox-back {
  justify-self: start; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px 0 12px;
  border-radius: 999px; background: #1A1A1A; color: #fff; border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  line-height: 1; text-decoration: none; white-space: nowrap; opacity: 1;
  transition: translate .3s cubic-bezier(.2, 1.4, .4, 1), box-shadow .3s;
}
.bar-back.fox-back:hover { color: #fff; text-decoration: none; opacity: 1; translate: -2px 0; box-shadow: 0 10px 24px rgba(0, 0, 0, .26); }
.bar-back.fox-back:focus-visible { outline: 3px solid #F0AC1D; outline-offset: 3px; }
.fox-back i { font-style: normal; font-weight: 400; font-size: 14px; color: #F0AC1D; transition: translate .3s cubic-bezier(.2, 1.4, .4, 1); }
.fox-back:hover i { translate: -3px 0; }
.fox-back .fx { width: 24px; height: 24px; flex: none; overflow: visible; }
.fox-back .fx-head { transform-box: view-box; transform-origin: 500px 430px; transition: rotate .5s cubic-bezier(.2, 1.6, .4, 1); }
.fox-back:hover .fx-head { rotate: -12deg; }
.fox-back .fx-iris { transition: translate .35s cubic-bezier(.2, .8, .2, 1); }
.fox-back:hover .fx-iris { translate: -24px 6px; }
.fox-back .fx-eye { transform-box: fill-box; transform-origin: center; animation: fxBlink 5.2s ease-in-out infinite; }
.fox-back:active .fx-eye { animation: none; scale: 1 .08; }
@keyframes fxBlink { 0%, 93%, 100% { scale: 1 1; } 96% { scale: 1 .08; } }
/* a wink when pointed at: it stays even with reduced motion, as it is tiny and only follows the pointer */
.fox-back:hover .fx-eye { animation: fxWink .34s ease-in-out; }
@keyframes fxWink { 0%, 100% { scale: 1 1; } 50% { scale: 1 .08; } }
@media (max-width: 760px) { .bar-back.fox-back { gap: 5px; padding: 0 11px 0 10px; } .fox-back span { display: none; } }
@media (prefers-reduced-motion: reduce) { .fox-back .fx-eye { animation: none; } }
