/* Delivery page (/delivery, /ml/delivery). Plain CSS, no build step: nginx serves it as-is.
   Same Multipad tokens and type as /restaurant/page.css. Story: the route map first (the rider),
   then the evening cash count (the owner), then the counter's order list. */
:root {
  --ink: #17143a;
  --ink-raised: #221d4e;
  --indigo: #4b3fd9;
  --indigo-hover: #3f34c4;
  --saffron: #f2a93b;
  --paper: #faf7f1;
  --card: #ffffff;
  --muted: #626376;
  --on-ink-muted: #b3b3ca;
  --border: #e1e1e8;
  --wash: #f2f2f8;
  --land: #e9e4d8;
  --block: #dcd5c5;
  --water: #c9dce6;
  --good: #007a60;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans Malayalam", "Nirmala UI", sans-serif;
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font);
  font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip;
}
:lang(ml) body, body:lang(ml) { line-height: 1.7; }
/* Malayalam letters stack marks above and below: looser lines, a smaller display size. */
.hero h1:lang(ml) { font-size: clamp(28px, 5.4vw, 40px); line-height: 1.35; letter-spacing: 0; }
h2:lang(ml) { font-size: clamp(24px, 4.4vw, 32px); line-height: 1.35; letter-spacing: 0; }
::selection { background: var(--saffron); color: var(--ink); }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 6px; }
img, svg { display: block; max-width: 100%; }
a { color: var(--indigo); text-underline-offset: 3px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top { background: var(--ink); color: #fff; position: relative; z-index: 2; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 20px; }
.brand img { width: 34px; height: 34px; }
.lang {
  color: #fff; text-decoration: none; font-size: 15px; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px; padding: 8px 16px;
}
.lang:hover { background: var(--ink-raised); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.wa-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px;
  border-radius: 12px; font-weight: 700; font-size: 17px; text-decoration: none;
  background: var(--indigo); color: #fff;
}
.wa-btn:hover { background: var(--indigo-hover); }
.wa-btn[hidden] { display: none; }
.wa-btn svg { width: 22px; height: 22px; flex: none; }
.text-link { font-weight: 600; color: #fff; }

.sample { font-size: 13px; color: var(--muted); margin: 0; }

/* Hero: the route map. Phone: the words, then the map. Wide: the words sit on the map. */
.hero { background: var(--water); display: grid; padding: 0; }
.hero-layer { order: -1; position: relative; z-index: 1; }
.hero-layer .wrap { padding: 0; }
.hero-card {
  background: var(--ink); color: #fff; padding: 32px 20px 30px;
}
.hero h1 { font-size: clamp(32px, 7vw, 50px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 14px; text-wrap: balance; }
.hero .lead { color: var(--on-ink-muted); font-size: 18px; margin: 0 0 24px; max-width: 34em; }
.map { position: relative; overflow: hidden; }
.map svg { width: 100%; height: 300px; }
.route { stroke-dasharray: 1; stroke-dashoffset: 0; }
.trip { background: var(--card); border-top: 1px solid var(--border); }
.trip-head { background: var(--ink); color: #fff; padding: 10px 14px; display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 15px; }
.trip-head span { white-space: nowrap; }
.trip-head span:last-child { color: var(--saffron); }
.trip-body { padding: 12px 14px; font-size: 15px; }
.trip-body strong { display: block; }
.trip-body span { color: var(--muted); }
.map .sample { position: absolute; left: 16px; top: 10px; }

/* Sections */
section { padding: 64px 0; }
h2 { font-size: clamp(26px, 5vw, 38px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 12px; text-wrap: balance; max-width: 22em; }
.section-lead { color: var(--muted); margin: 0 0 36px; max-width: 38em; }

/* Rider: three things, drawn icons, no cards */
.points { display: grid; gap: 32px; }
.point svg { width: 44px; height: 44px; color: var(--indigo); }
.point h3 { font-size: 21px; margin: 12px 0 6px; }
.point p { color: var(--muted); margin: 0; }

/* Cash: the evening count */
.cash { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cash-grid { display: grid; gap: 40px; align-items: start; }
.book { background: var(--ink); color: #fff; border-radius: 20px; padding: 20px; box-shadow: 0 18px 40px rgba(23, 20, 58, 0.22); }
.book-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.book-head strong { font-size: 20px; }
.book .sample { color: var(--on-ink-muted); }
.book ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.book li { background: var(--ink-raised); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 999px; background: var(--saffron); color: var(--ink); display: grid; place-items: center; font-weight: 800; }
.who { flex: 1 1 0; }
.who strong { display: block; }
.who span, .owed span { color: var(--on-ink-muted); font-size: 14px; }
.owed { text-align: right; white-space: nowrap; }
.owed strong { display: block; font-size: 21px; }
.owed .pending { color: var(--saffron); }
.owed .done { color: #7fd6b8; }
.book-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.15); display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.book-foot .num { color: var(--saffron); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 4px 14px; }
.steps li::before {
  counter-increment: step; content: counter(step); grid-row: span 2;
  width: 32px; height: 32px; border-radius: 999px; background: var(--ink); color: var(--saffron);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.steps strong { font-size: 19px; }
.steps span { color: var(--muted); }

/* Desk: the counter's order list */
.desk { background: var(--ink); color: #fff; }
.desk h2 { color: #fff; }
.desk .section-lead { color: var(--on-ink-muted); }
.desk-grid { display: grid; gap: 32px; align-items: center; }
.list { background: var(--card); color: var(--ink); border-radius: 16px; padding: 6px 0 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 12px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.tabs span { padding: 6px 12px; border-radius: 999px; background: var(--wash); }
.tabs span:first-child { background: var(--ink); color: #fff; }
.row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.row .state { grid-column: 2; grid-row: 2; justify-self: start; }

.row .who-line span { color: var(--muted); }
.state { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.s-new { background: #ecebff; color: var(--indigo-hover); }
.s-rider { background: #fff1d9; color: #7a560a; }
.s-way { background: #e8e7f0; color: var(--ink); }
.s-done { background: #e3f2ec; color: #005c48; }
.row .num { text-align: right; }
.list .sample { padding: 10px 16px 0; }

/* More */
.more { display: grid; gap: 0 48px; }
.more div { padding: 20px 0; border-top: 1px solid var(--border); }
.more h3 { font-size: 19px; margin: 0 0 4px; }
.more p { color: var(--muted); margin: 0; }

/* Contact */
.contact { background: var(--indigo); color: #fff; text-align: center; }
.contact h2 { color: #fff; margin-left: auto; margin-right: auto; }
.contact .section-lead { color: #e4e1ff; margin-left: auto; margin-right: auto; }
.contact .wa-btn { background: #fff; color: var(--ink); }
.contact .wa-btn:hover { background: var(--wash); }
.contact .actions { justify-content: center; margin-bottom: 18px; }
.contact .email { color: #e4e1ff; margin: 0; }
.contact .email a { color: #fff; }

footer { padding: 26px 0 34px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--muted); }

@media (max-width: 480px) { .map svg { height: 340px; } }

@media (min-width: 640px) {
  .points { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  section { padding: 88px 0; }
  .hero { grid-template-areas: "stack"; }
  .hero > * { grid-area: stack; }
  .hero-layer { order: 0; }
  .hero-layer .wrap { padding: 0 20px; }
  .map { height: 620px; display: block; }
  .map svg { height: 100%; }
  .map .sample { top: auto; bottom: 10px; left: auto; right: 16px; }
  .trip {
    position: absolute; width: 320px; border: 0; border-radius: 14px; overflow: hidden;
    box-shadow: 0 10px 28px rgba(23, 20, 58, 0.2);
  }
  .row { grid-template-columns: 48px minmax(0, 1fr) auto 64px; }
  .row .state { grid-column: auto; grid-row: auto; }
  .hero-layer { align-self: start; padding-top: 44px; pointer-events: none; }
  .hero-card { pointer-events: auto; max-width: 540px; border-radius: 20px; padding: 34px; box-shadow: 0 18px 40px rgba(23, 20, 58, 0.28); }
  .trip { right: max(20px, calc((100% - 1100px) / 2)); top: 52px; }
  .cash-grid { grid-template-columns: 6fr 5fr; gap: 64px; }
  .desk-grid { grid-template-columns: 5fr 7fr; gap: 56px; }
}

/* The one moment: the rider's road draws itself across the map, once. */
@media (prefers-reduced-motion: no-preference) {
  .route { animation: draw 2.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both; }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
