/* Earthen Pot, the restaurant sample. One file, not minified (APPROACH.md §7: a minifier folds
   animation longhands). Order: fonts, tokens, reset, type, grounds, buttons and chips, dish card
   and marks, tray, sticky bar, hero, sections, responsive, motion. */

/* 1. Fonts: Bricolage Grotesque variable (opsz 12 to 96, wght 400 to 700), Spectral 400 and
   400 italic, latin subsets; the rupee sign comes from its own file (the latin subset lacks it). */
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-rupee.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+20B9; }
@font-face { font-family: "Spectral"; src: url("../fonts/spectral-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../fonts/spectral-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* 2. Tokens: two grounds, one accent, two marks that appear nowhere else. */
:root {
  --clay: #3B1F14;
  --cream: #F4E9D8;
  --ink: #1F1611;
  --terra: #A3441F;
  --leaf: #3E5A34;
  --earth: #7A3E1D;
  --line: #E3D6C2;
  --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --serif: "Spectral", Georgia, serif;
  --radius: 2px;
  --top: 64px;
  --gutter: 16px;
  --gap: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* Fired-clay grain: one fractal noise, darker on clay than on cream. */
  --grain-cream: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
  --grain-clay: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .8 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.10'/%3E%3C/svg%3E");
}

/* 3. Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 64px); scroll-padding-bottom: 72px; }
body { margin: 0; font: 400 1.0625rem/1.5 var(--sans); color: var(--ink); background: var(--cream) var(--grain-cream); overflow-x: clip; }
h1, h2, h3, p, figure, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; }
.clay :focus-visible, .top :focus-visible, .foot :focus-visible, .bar :focus-visible, .tray :focus-visible { outline-color: var(--cream); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 60; background: var(--cream); color: var(--ink); padding: 12px 16px; }
.skip:focus { left: var(--gutter); }

/* 4. Type: Bricolage 700 at display size, 600 for names, headings and prices; Spectral for the
   lines a diner reads slowly. */
h1 { font-weight: 700; font-size: clamp(2.625rem, 8vw + 1rem, 5.75rem); line-height: .98; letter-spacing: -.025em; }
h2 { font-weight: 600; font-size: clamp(1.875rem, 4vw + 1rem, 3rem); line-height: 1.05; letter-spacing: -.02em; margin-bottom: 24px; }
.lede { font-size: 1.125rem; line-height: 1.45; max-width: 34ch; margin-top: 16px; }
.cap, .dish-line { font-family: var(--serif); font-size: 1rem; line-height: 1.45; }
.prose { font-family: var(--serif); font-size: clamp(1.25rem, 1vw + 1rem, 1.5rem); line-height: 1.5; max-width: 32ch; }
.prose + .prose { margin-top: 20px; }
.prose.first { font-style: italic; }
.small { font-size: .9375rem; }
.price, [data-price], [data-time] { font-variant-numeric: tabular-nums; }
.price { font-weight: 600; }
.mark { font-weight: 700; font-size: 1.5rem; letter-spacing: -.03em; text-decoration: none; }

/* 5. Grounds: cream for the day, clay for the night. Clay stays under 35 percent of a page. */
.clay, .top, .foot, .bar { background: var(--clay) var(--grain-clay); color: var(--cream); }
.ph { display: block; position: relative; overflow: hidden; background: var(--line); border-radius: var(--radius); }
.clay .ph { background: rgba(244, 233, 216, .14); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(31, 22, 17, .08); pointer-events: none; }
.ph-table { aspect-ratio: 4 / 5; border-radius: 0; }
.ph-dish, .ph-kunda, .ph-kitchen { aspect-ratio: 4 / 5; }
.ph-thali { aspect-ratio: 1; }
.ph-room { aspect-ratio: 3 / 2; }
.ph-door { aspect-ratio: 3 / 2; }
.ph-map { aspect-ratio: 4 / 3; }

/* 6. Buttons and chips: 48px tall, 2px square buttons, pill chips. */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 1.5px solid transparent; border-radius: var(--radius); font: 600 1rem/1.1 var(--sans); text-decoration: none; text-align: center; cursor: pointer; }
.btn-primary { background: var(--terra); color: var(--cream); border-color: var(--terra); }
.btn-line { border-color: currentColor; background: transparent; }
.btn-sm { padding: 0 16px; font-size: .9375rem; }
.btn-wide { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 8px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 48px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .9375rem; text-decoration: none; background: var(--cream); }
.chip.on, .chip[aria-pressed="true"] { background: var(--terra); border-color: var(--terra); color: var(--cream); }
.more { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; text-decoration-color: var(--terra); text-underline-offset: 5px; text-decoration-thickness: 2px; }

/* 7. The dish card and its marks. A card without a photograph is a type-only row, two columns wide. */
.dish-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
.dish { display: flex; flex-direction: column; gap: 10px; }
.dish-type { grid-column: span 2; border-top: 1px solid var(--line); padding-top: 16px; }
.dish-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.dish-name { font-weight: 600; font-size: 1.1875rem; line-height: 1.2; letter-spacing: -.01em; }
.dish-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: auto; padding-top: 6px; }
.dish-foot .price { font-size: 1.125rem; margin-right: auto; }
.marks { display: inline-flex; align-items: center; gap: 6px; }
.mk { flex: none; }
.mk-veg { color: var(--leaf); }
.mk-nv { color: var(--earth); }
.mk-heat { color: var(--terra); }
.key { display: flex; gap: 12px; margin-top: 12px; }
.chips-bar { position: sticky; top: var(--top); z-index: 20; background: var(--cream) var(--grain-cream); border-bottom: 1px solid var(--line); }

/* 8. The tray (js/tray.js, Phase 5): clay, 16px top corners, above the sticky bar on the phone. */
.tray { position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom)); z-index: 25; background: var(--clay) var(--grain-clay); color: var(--cream); border-radius: 16px 16px 0 0; padding: 16px var(--gutter); }
.tray[hidden] { display: none; }
.tray::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 40px; background: linear-gradient(to top, var(--cream), rgba(244, 233, 216, 0)); pointer-events: none; }
.tray.rise { animation: rise .32s ease-out both; }
.has-tray .foot { padding-bottom: 136px; }
.tray-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tray-sum { flex: 1 1 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0; border: 0; background: none; color: inherit; font: 600 1rem/1.1 var(--sans); font-variant-numeric: tabular-nums; cursor: pointer; }
.tray-n { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px; background: var(--terra); color: var(--cream); }
.tray-n.bump { animation: bump .24s var(--ease); }
.tray-caret { margin-left: 2px; transition: transform .24s var(--ease); }
.tray.open .tray-caret { transform: rotate(180deg); }
.tray-send { flex: 1 1 auto; padding: 0 16px; }
.tray-panel { max-height: calc(100svh - var(--top) - 200px); overflow-y: auto; margin: 0 calc(-1 * var(--gutter)) 8px; padding: 0 var(--gutter) 12px; border-bottom: 1px solid rgba(244, 233, 216, .18); }
.tray-panel[hidden] { display: none; }
.tray-head, .tray-tot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tray-h { font-size: 1.375rem; margin: 0; }
.tray-link { min-height: 48px; padding: 0 4px; border: 0; background: none; color: inherit; font: 600 1rem/1 var(--sans); text-decoration: underline; text-decoration-color: rgba(244, 233, 216, .45); text-underline-offset: 5px; cursor: pointer; }
.tray-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(244, 233, 216, .12); }
.tl-n { font-weight: 600; }
.qty { display: inline-flex; gap: 6px; }
.qb { width: 48px; height: 48px; border: 1.5px solid rgba(244, 233, 216, .4); border-radius: var(--radius); background: none; color: inherit; font: 600 1.25rem/1 var(--sans); cursor: pointer; }
.tray-pick { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.tray-pick .row-l { color: rgba(244, 233, 216, .8); }
.tray-pick .chips { flex: 1; min-width: 0; }
.tray .chip { background: transparent; border-color: rgba(244, 233, 216, .35); color: var(--cream); padding: 0 14px; }
.tray .chip[aria-pressed="true"] { background: var(--terra); border-color: var(--terra); }
.tray-tot { margin-top: 4px; font-weight: 600; font-size: 1.125rem; }
.dish-add.in { background: var(--terra); border-color: var(--terra); color: var(--cream); }

/* 9. The sticky bar: Call, WhatsApp, Book under 1024. */
.bar { position: sticky; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.bar a { display: flex; align-items: center; justify-content: center; min-height: 56px; font-weight: 600; text-decoration: none; }
.bar a + a { border-left: 1px solid rgba(244, 233, 216, .18); }
.bar a:last-child { background: var(--terra); }

/* 10. The top bar. */
.top { position: sticky; top: 0; z-index: 30; height: var(--top); }
.top-in { display: flex; align-items: center; gap: 16px; height: 100%; }
.top .mark { margin-right: auto; display: inline-flex; align-items: center; min-height: 48px; }
.nav { display: none; }
.nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; font-weight: 600; text-decoration: none; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--terra); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* 11. The hero, type on clay, the table rises: the type block is sticky, the photograph scrolls up
   over it. No type ever sits on the food. */
.hero { position: relative; }
.hero-type { position: sticky; top: var(--top); z-index: 0; min-height: calc(60svh - var(--top)); display: flex; flex-direction: column; justify-content: flex-end; padding: 28px var(--gutter) 32px; }
.hero h1 .ln { display: block; }
.hero .lede { color: rgba(244, 233, 216, .88); }
.hero-btns { margin-top: 20px; }
.hero-btns .btn { flex: 1 1 100%; }
.hero-table { position: relative; z-index: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 36px; margin-top: 18px; padding: 0 14px; border: 1px solid rgba(244, 233, 216, .35); border-radius: 999px; font-size: .9375rem; font-weight: 500; }
.pill .dot { width: 10px; height: 10px; fill: var(--terra); stroke: var(--cream); stroke-width: 1.5; }

/* 12. Sections */
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.sec { padding: 56px 0; }
.page-head { padding: 40px 0 24px; }
.feat-row, .frames-kunda { display: grid; grid-auto-flow: column; grid-auto-columns: 68%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding: 0 var(--gutter) 8px; scrollbar-width: thin; }
.feat, .frames-kunda li { scroll-snap-align: start; }
.feat-card { display: flex; flex-direction: column; gap: 8px; height: 100%; text-decoration: none; }
.feat-type { border-top: 1px solid var(--line); padding-top: 14px; }
.feat-name { font-weight: 600; font-size: 1.1875rem; line-height: 1.2; }
.feat-foot { display: flex; align-items: center; gap: 10px; }
#today .more { margin-top: 12px; }
figure { display: flex; flex-direction: column; gap: 10px; }
.frames-room, .frames-kitchen { display: grid; gap: 16px; padding: 0 var(--gutter); max-width: 1280px; margin: 0 auto; }
.frames-kitchen { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
.room-line { font-family: var(--serif); font-size: 1.25rem; line-height: 1.45; margin-top: 16px; max-width: 34ch; }
.lunch { display: grid; gap: 24px; }
#lunch h2 { margin-bottom: 12px; }
.thali-prices { margin-bottom: 12px; }
.thali-prices [data-price] { font-weight: 600; font-size: clamp(1.875rem, 3vw + 1rem, 2.75rem); letter-spacing: -.02em; }
.lunch-text .small { margin: 8px 0 20px; color: rgba(244, 233, 216, .88); }
.booker { max-width: 760px; }
/* The booker's chip rows scroll sideways edge to edge on the phone and wrap from 720. Hidden without
   JavaScript: the button alone then opens the plain booking message. */
.book-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin-bottom: 16px; }
.book-row { align-items: center; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.row-l { flex: none; min-width: 4.25rem; font-size: .9375rem; font-weight: 600; color: rgba(31, 22, 17, .72); }
button.chip { font-family: inherit; color: inherit; cursor: pointer; }
.booker [hidden] { display: none; }
.no-js .book-rows { display: none; }
.where-grid { display: grid; gap: 24px; }
.where-pics { display: grid; gap: 16px; }
.map { display: block; position: relative; text-decoration: none; }
.map-label { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; background: var(--cream); color: var(--ink); border-radius: var(--radius); font-weight: 600; }
.addr { font-size: 1.125rem; line-height: 1.45; }
.hours { display: grid; margin: 20px 0 12px; border-top: 1px solid var(--line); }
.hrow { display: grid; grid-template-columns: 6rem 1fr 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hrow dt { font-weight: 600; }
.hrow.shut dd { grid-column: 2 / -1; }
.where-text .small + .small { margin-top: 4px; }
.where-text .btn-row { margin-top: 20px; }
.where-text .btn { flex: 1; }
#words .prose { color: var(--cream); }
.sign { margin-top: 24px; font-weight: 600; font-size: 1.125rem; }
.foot { padding: 40px 0 32px; font-size: .9375rem; }
.foot-in { display: grid; gap: 8px; }
.foot-sample { font-weight: 600; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 48px; min-width: 48px; }

/* 13. Responsive */
@media (min-width: 720px) {
  :root { --gutter: 24px; }
  .dish-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feat-row { grid-auto-columns: 40%; }
  .frames-kunda { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; max-width: 1280px; margin: 0 auto; }
  .frames-room { grid-template-columns: 1fr 1fr; }
  .lunch { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
  .where-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .btn-wide { width: auto; }
  .book-row { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .hero-btns .btn { flex: 0 1 auto; }
}
@media (min-width: 1024px) {
  :root { --gutter: 40px; --top: 72px; }
  .nav { display: flex; }
  .bar { display: none; }
  .tray { bottom: 0; left: auto; right: var(--gutter); width: 440px; }
  .tray::before { display: none; }
  .sec { padding: 80px 0; }
  .page-head { padding: 72px 0 32px; }
  .page-head + .sec { padding-top: 24px; }
  .hero { display: grid; grid-template-columns: 45fr 55fr; align-items: start; }
  .hero-type { height: calc(100svh - var(--top)); min-height: 560px; justify-content: center; padding: 48px var(--gutter); }
  .hero-table { padding-top: 22svh; }
  .dish-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
  .feat-row { grid-auto-columns: calc((min(100vw, 1280px) - 2 * var(--gutter) - 3 * var(--gap)) / 4); gap: var(--gap); padding-inline: max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter))); scroll-padding-inline: max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter))); }
  .frames-kitchen { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
  .where-grid { grid-template-columns: 3fr 2fr; gap: 48px; }
  .where-pics { grid-template-columns: 1fr 1fr; }
  .ph-door { aspect-ratio: auto; height: 100%; }
}

/* 14. Motion. The hero's lines, the pill and the buttons settle once on load (CSS only, so it
   runs without JavaScript); cards and sections fade up once as they enter (js/motion.js). */
@keyframes settle { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero .ln, .hero .pill, .hero-btns { animation: settle .4s var(--ease) both; }
.hero .ln:nth-child(2) { animation-delay: 80ms; }
.hero .pill { animation-delay: 160ms; }
.hero-btns { animation-delay: 240ms; }
.motion .reveal { opacity: 0; transform: translateY(12px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.motion .reveal.in { opacity: 1; transform: none; }
/* The tray slides up the first time a dish is added; the count bumps on every Add. */
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
@keyframes bump { 50% { transform: scale(1.15); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion .reveal { opacity: 1; transform: none; transition: none; }
  .hero-type { position: relative; top: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
