/* Dukaan Co. website.
 *
 * One bold idea, used sparingly: the shop itself. The logo's striped awning
 * runs across the top of every page, the opening is a shop shutter rolling
 * up, and the page bodies borrow the shopkeeper's own paper — a ruled
 * ledger and a perforated slip. Everything else stays quiet: white like the
 * app, warm ink from the logo, one red.
 */

:root {
  --ink: #1f150f;          /* the logo's brown-black */
  --ink-2: #4a3f38;        /* body text, 10:1 on white */
  --muted: #74685f;        /* secondary text, 5.5:1 on white */
  --awning: #c6372a;       /* the awning and "CO." */
  --awning-ink: #a92d22;   /* red that reads as text, 6.9:1 on white */
  --khadi: #fbf2e4;        /* the shopfront's cream: illustrations only */
  --carton: #b07246;       /* the boxes in the logo: second data colour */
  --paper: #ffffff;
  --sand: #f5f2ef;         /* recessed surfaces */
  --line: #e8e2dc;
  --shutter: #2b2420;

  --display: 'Baloo 2', 'Plus Jakarta Sans', system-ui, sans-serif;
  --text: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* A perfect fourth on an 18px body. */
  --t-sm: 0.875rem;
  --t-base: 1.125rem;
  --t-md: 1.5rem;
  --t-lg: 2rem;
  --t-xl: clamp(2.25rem, 4.4vw, 3.55rem);
  --t-2xl: clamp(2.6rem, 6.4vw, 5.2rem);
  --t-hero: clamp(3rem, 8.2vw, 6.6rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header: 72px;              /* the sticky bar; sticky things sit below it */
  --max: 1200px;
  --radius: 22px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --awning-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='26' viewBox='0 0 56 26'%3E%3Crect width='28' height='13' fill='%23c6372a'/%3E%3Crect x='28' width='28' height='13' fill='%23fbf2e4'/%3E%3Cpath d='M0 13h28a14 11 0 0 1-28 0z' fill='%23c6372a'/%3E%3Cpath d='M28 13h28a14 11 0 0 1-28 0z' fill='%23fbf2e4'/%3E%3Cpath d='M0 13a14 11 0 0 0 28 0a14 11 0 0 0 28 0' fill='none' stroke='%231f150f' stroke-width='2'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- base */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  /* clip, not hidden: the tilted tablet may poke past the edge for a moment,
     and hidden would make body a scroll box and break every sticky element. */
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 var(--t-base) / 1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; max-width: 62ch; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 700; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--awning); color: #fff; }

:focus-visible {
  outline: 3px solid var(--awning);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 10px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.98;
  color: var(--ink);
}
.h2 { font: 800 var(--t-xl) / 1.02 var(--display); letter-spacing: -0.018em; color: var(--ink); }
.h3 { font: 700 var(--t-md) / 1.25 var(--text); letter-spacing: -0.01em; color: var(--ink); }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.32rem); line-height: 1.55; color: var(--ink-2); max-width: 54ch; }
.small { font-size: var(--t-sm); color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.red { color: var(--awning-ink); }

.section { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.section-tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section-head { display: grid; gap: 1.1rem; margin-bottom: clamp(2.2rem, 5vw, 3.6rem); }
.section-head .lede { margin: 0; }

/* -------------------------------------------------------------- awning */

/* The logo's awning, as the top edge of every page. */
.awning {
  height: 26px;
  background: var(--awning-svg) repeat-x 0 0 / 56px 26px;
  border-top: 3px solid var(--ink);
}

/* -------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  transition: box-shadow 200ms ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.nav { display: flex; align-items: center; gap: 1.5rem; height: var(--header); }
.brand { display: inline-flex; align-items: center; text-decoration: none; margin-right: auto; }
.brand img { height: 54px; width: auto; margin-left: -6px; }
.nav-links { display: flex; align-items: center; gap: 0.3rem; }
.nav-links a {
  text-decoration: none; font-weight: 600; font-size: 0.97rem; color: var(--ink-2);
  padding: 0.5rem 0.8rem; border-radius: 999px;
  transition: background-color 150ms ease, color 150ms ease;
}
.nav-links a[aria-current='page'] { color: var(--ink); background: var(--sand); }
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { background: var(--sand); color: var(--ink); }
}
.nav-links a.nav-cta { margin-left: 0.6rem; padding: 0 1.05rem; color: #fff; background: var(--ink); }
@media (hover: hover) and (pointer: fine) { .nav-links a.nav-cta:hover { background: #3a2a20; color: #fff; } }
.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 999px; border: 0;
  background: var(--sand); color: var(--ink); cursor: pointer; align-items: center; justify-content: center;
}
.menu-btn svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.2rem;
    padding: 0.6rem var(--gutter) 1.2rem; background: var(--paper);
    box-shadow: 0 18px 30px -18px rgba(31, 21, 15, 0.35);
    transform-origin: top center;
    opacity: 0; transform: translateY(-8px) scale(0.98); pointer-events: none; visibility: hidden;
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s linear 180ms;
  }
  .nav-links a { padding: 0.9rem 1rem; font-size: 1.05rem; }
  .nav.is-open .nav-links {
    opacity: 1; transform: none; pointer-events: auto; visibility: visible;
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
  }
  .nav-links a.nav-cta { margin: 0.4rem 0 0; min-height: 50px; }
}

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 52px; padding: 0 1.4rem; border-radius: 999px;
  font: 700 1rem / 1 var(--text); text-decoration: none; cursor: pointer; border: 0;
  transition: transform 120ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-soft { background: var(--sand); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-sm { min-height: 42px; padding: 0 1.05rem; font-size: 0.95rem; }
@media (hover: hover) and (pointer: fine) {
  .btn-ink:hover { background: #3a2a20; }
  .btn-soft:hover { background: #ece6e0; }
  .btn-light:hover { background: var(--khadi); }
}
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.link {
  color: var(--ink); font-weight: 700; text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--awning);
  transition: text-decoration-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: var(--ink); } }

/* ---------------------------------------------------------------- hero */

.hero { position: relative; padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3.5rem, 8vw, 7rem); overflow: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero h1 { font-size: var(--t-hero); }
.hero h1 .line { display: block; }
.hero .lede { margin: 1.6rem 0 2rem; }
.hero-note { margin-top: 1.1rem; display: flex; gap: 0.55rem; align-items: center; }
.hero-note svg { width: 18px; height: 18px; color: var(--awning-ink); flex: none; }
.hero-visual { position: relative; display: grid; justify-items: center; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 1rem; }
}

/* ---------------------------------------------------------- devices */

.phone {
  position: relative; width: min(330px, 78vw); aspect-ratio: 390 / 844;
  padding: 11px; border-radius: 52px; background: var(--ink);
  box-shadow: 0 50px 90px -40px rgba(31, 21, 15, 0.55), 0 0 0 1px rgba(31, 21, 15, 0.06);
}
.phone::before { /* the camera, in the status bar so it covers nothing */
  content: ''; position: absolute; top: 21px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px;
  border-radius: 50%; background: var(--ink); z-index: 2;
}
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: #fff; padding-top: 26px; }
.phone .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.tablet {
  position: relative; padding: 12px; border-radius: 30px; background: var(--ink);
  box-shadow: 0 60px 110px -50px rgba(31, 21, 15, 0.5), 0 0 0 1px rgba(31, 21, 15, 0.06);
}
.tablet img { border-radius: 19px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: #fff; }

/* -------------------------------------------------------------- ticket */

/* A slip, drawn the way the app draws it: a stub, a perforation, the rest. */
.ticket {
  --bg: #fff;
  display: flex; min-height: 92px; width: min(330px, 86vw);
  background: var(--bg); border-radius: 20px; color: var(--ink);
  box-shadow: 0 30px 60px -28px rgba(31, 21, 15, 0.45), 0 0 0 1px rgba(31, 21, 15, 0.08);
  font-size: 0.9rem;
}
.ticket-stub { width: 84px; display: grid; place-content: center; justify-items: center; gap: 4px; font-weight: 700; font-size: 0.8rem; text-align: center; }
.ticket-stub svg { width: 22px; height: 22px; }
.ticket-perf {
  position: relative; width: 14px;
  background: radial-gradient(circle at 50% 0, var(--page, #fff) 7px, transparent 7.5px) top / 14px 14px no-repeat,
              radial-gradient(circle at 50% 100%, var(--page, #fff) 7px, transparent 7.5px) bottom / 14px 14px no-repeat;
}
.ticket-perf::after { content: ''; position: absolute; top: 12px; bottom: 12px; left: 6px; border-left: 2px dashed #d5ccc4; }
.ticket-body { flex: 1; padding: 14px 16px 14px 12px; display: grid; gap: 2px; align-content: center; }
.ticket-row { display: flex; justify-content: space-between; gap: 0.6rem; font-weight: 700; }
.ticket-meta { color: var(--muted); font-size: 0.8rem; }
.ticket-tag { color: var(--ink); font-size: 0.8rem; font-weight: 600; }

.hero-ticket { position: absolute; left: max(-1.5rem, -6vw); bottom: 12%; transform: rotate(-4deg); }
@media (max-width: 900px) { .hero-ticket { left: 50%; bottom: -1.2rem; transform: translateX(-62%) rotate(-3deg); } }

/* --------------------------------------------------------- made for */

.madefor { border-block: 1px solid var(--line); }
.madefor .wrap { display: flex; flex-wrap: wrap; gap: 0.8rem 2.2rem; align-items: center; padding-block: 1.4rem; }
.madefor p { margin: 0; max-width: none; color: var(--ink); font-weight: 600; }
.madefor ul { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.madefor li { padding: 0.35rem 0.85rem; border-radius: 999px; background: var(--sand); font-size: 0.92rem; font-weight: 600; color: var(--ink-2); }

/* -------------------------------------------------------------- ledger */

/* A bahi-khata page: ruled lines, the red double margin, three columns. */
.ledger {
  position: relative; border-radius: var(--radius); background: #fffdf9;
  box-shadow: 0 0 0 1px var(--line), 0 40px 80px -60px rgba(31, 21, 15, 0.4);
  overflow: hidden;
}
.ledger table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.ledger caption { text-align: left; padding: 1.2rem 1.5rem 0.4rem; font-weight: 700; color: var(--ink); }
.ledger th, .ledger td { text-align: left; vertical-align: top; padding: 1.05rem 1.5rem; border-bottom: 1px solid #ebe3d9; }
.ledger thead th { font-size: 0.85rem; color: var(--muted); font-weight: 700; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.ledger tbody th { color: var(--ink); font-weight: 700; width: 36%; }
.ledger td.paper { color: var(--muted); width: 26%; }
.ledger td.app { color: var(--ink); font-weight: 600; }
.ledger td.app::before {
  content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.6rem;
  background: var(--awning); transform: translateY(-1px);
}
.ledger::before, .ledger::after { /* the red margin */
  content: ''; position: absolute; top: 0; bottom: 0; width: 1.5px; background: rgba(198, 55, 42, 0.45); pointer-events: none;
}
.ledger::before { left: calc(36% - 6px); }
.ledger::after { left: calc(36% - 2px); }
.ledger tr:last-child th, .ledger tr:last-child td { border-bottom: 0; }

@media (max-width: 720px) {
  .ledger::before, .ledger::after { display: none; }
  .ledger thead { display: none; }
  .ledger tbody tr { display: grid; padding: 1rem 1.2rem; border-bottom: 1px solid #ebe3d9; gap: 0.3rem; }
  .ledger tbody tr:last-child { border-bottom: 0; }
  .ledger th, .ledger td { padding: 0; border: 0; width: auto !important; }
  .ledger td.paper::before { content: 'On paper: '; font-weight: 600; }
}

/* ------------------------------------------------------- a day (story) */

.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(2rem, 6vw, 6rem); }
.story-steps { display: grid; }
.story-step { min-height: 78vh; display: grid; align-content: center; gap: 0.8rem; padding-block: 2rem; opacity: 0.32; transition: opacity 300ms ease; }
.story-step.is-active { opacity: 1; }
.story-time { font: 800 1.05rem / 1 var(--display); color: var(--awning-ink); letter-spacing: 0.01em; }
.story-step h3 { font: 800 clamp(1.9rem, 3.4vw, 2.7rem) / 1.05 var(--display); letter-spacing: -0.015em; }
.story-step p { margin: 0; font-size: 1.1rem; }
.story-step .story-shot { display: none; }
/* The phone is as tall as the space under the bar allows, and centred in it,
   so no screen height pushes it under the menu. */
.story-device {
  --ph: min(600px, calc(100vh - var(--header) - 48px));
  position: sticky; top: calc(var(--header) + (100vh - var(--header) - var(--ph)) / 2);
  height: var(--ph); display: grid; place-items: center;
}
.story-device .phone { width: auto; height: var(--ph); }
.story-device .screen img { position: absolute; top: 26px; left: 0; height: calc(100% - 26px); opacity: 0; transition: opacity 450ms var(--ease-out); }
.story-device .screen img.is-active { opacity: 1; }

@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; }
  .story-device { display: none; }
  .story-step { min-height: 0; opacity: 1; padding-block: 1.6rem; }
  .story-step .story-shot { display: block; margin-top: 1rem; }
  .story-step .story-shot .phone { width: min(280px, 74vw); }
}

/* ------------------------------------------------------- godown flow */

/* Nodes on top, a lane underneath where the crates travel. */
.flow-wrap { position: relative; padding-bottom: 76px; }
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); }
.flow-node { position: relative; z-index: 1; background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 0 0 1px var(--line); display: grid; gap: 0.6rem; align-content: start; }
.flow-node .icon { width: 52px; height: 52px; border-radius: 16px; background: var(--sand); display: grid; place-items: center; color: var(--ink); }
.flow-node .icon svg { width: 26px; height: 26px; }
.flow-node h3 { font-size: 1.25rem; }
.flow-node p { margin: 0; font-size: 0.98rem; }
.flow-node .flow-count { margin-top: 0.4rem; font: 800 clamp(2.2rem, 4vw, 3.2rem) / 1 var(--display); color: var(--ink); letter-spacing: -0.02em; }
.flow-node .flow-count small { font: 600 0.95rem / 1 var(--text); color: var(--muted); letter-spacing: 0; margin-left: 0.3rem; }
.flow-node.is-godown { background: var(--khadi); box-shadow: 0 0 0 1px #eadbc3; }
.flow-track { position: absolute; bottom: 30px; left: 16.6%; right: 16.6%; height: 2px; background: repeating-linear-gradient(90deg, #cfc4ba 0 8px, transparent 8px 16px); }
.flow-track::before, .flow-track::after { content: ''; position: absolute; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.flow-track::before { left: -6px; }
.flow-track::after { right: -6px; }
.flow-track i { position: absolute; left: 50%; top: -5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--carton); }
.crates { position: absolute; bottom: 16px; left: calc(16.6% - 69px); display: flex; gap: 6px; pointer-events: none; }
.crates.outbound { left: calc(16.6% - 15px); }
.crate { width: 30px; height: 30px; border-radius: 6px; background: var(--carton); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.12), inset 0 0 0 2px rgba(31, 21, 15, 0.25); }
.crate::after { content: ''; display: block; width: 9px; height: 30px; margin: 0 auto; background: rgba(251, 242, 228, 0.55); }

@media (max-width: 800px) {
  .flow-wrap { padding-bottom: 0; }
  .flow { grid-template-columns: 1fr; }
  .flow-track, .crates { display: none; }
}

/* ------------------------------------------------------- contents list */

.contents { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); }
.contents-head { position: sticky; top: calc(var(--header) + 48px); align-self: start; display: grid; gap: 1.2rem; }
.contents ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.contents li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 1.1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.contents .icon { width: 48px; height: 48px; border-radius: 15px; background: var(--sand); display: grid; place-items: center; color: var(--ink); }
.contents .icon svg { width: 24px; height: 24px; }
.contents h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.contents p { margin: 0; font-size: 1rem; }
@media (max-width: 860px) { .contents { grid-template-columns: 1fr; } .contents-head { position: static; } }

.showcase { margin-top: clamp(3rem, 7vw, 6rem); perspective: 1600px; overflow-x: clip; padding-bottom: 2rem; }
.showcase .tablet { transform-origin: 50% 0; }

/* --------------------------------------------------------------- chart */

.numbers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.chart { background: #fff; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); padding: 1.5rem 1.5rem 1.2rem; }
.chart-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.chart-total { font: 800 clamp(2rem, 3.6vw, 2.8rem) / 1 var(--display); color: var(--ink); letter-spacing: -0.02em; }
.chart-sub { font-size: 0.9rem; color: var(--muted); margin-top: 0.35rem; }
.chart-legend { display: flex; gap: 1rem; font-size: 0.85rem; color: var(--ink-2); align-items: center; }
.chart-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.chart-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--ink); display: inline-block; }
.chart-legend i.made { background: var(--awning); height: 3px; border-radius: 2px; }
.chart-plot { position: relative; height: 240px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; border-bottom: 1px solid var(--line); }
.bar { position: relative; height: var(--h); border-radius: 10px 10px 4px 4px; background: var(--ink); transform-origin: 50% 100%; }
.bar.is-today { background: var(--carton); }
.bar b { position: absolute; top: -1.6rem; left: 50%; transform: translateX(-50%); font-size: 0.75rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.chart-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.chart-line path { fill: none; stroke: var(--awning); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-top: 0.6rem; font-size: 0.8rem; color: var(--muted); text-align: center; font-weight: 600; }
.chart-note { margin-top: 1rem; font-size: 0.85rem; color: var(--muted); }
.numbers-list { display: grid; gap: 1.2rem; margin-top: 1.6rem; }
.numbers-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0.8rem; }
.numbers-list svg { width: 24px; height: 24px; color: var(--awning-ink); margin-top: 3px; }
.numbers-list b { color: var(--ink); }
@media (max-width: 900px) { .numbers { grid-template-columns: 1fr; } .bar b { font-size: 0.66rem; } }
@media (max-width: 480px) { .bar b { display: none; } .chart-plot, .chart-days { gap: 6px; } }

/* --------------------------------------------------------------- trust */

.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.trust li { display: grid; gap: 0.7rem; align-content: start; padding-top: 1.4rem; border-top: 3px solid var(--ink); }
.trust svg { width: 28px; height: 28px; color: var(--ink); }
.trust h3 { font-size: 1.2rem; }
.trust p { margin: 0; font-size: 1rem; }
@media (max-width: 800px) { .trust { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------- faq */

.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  padding: 1.35rem 0; font-weight: 700; font-size: 1.1rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; width: 34px; height: 34px; border-radius: 999px; background: var(--sand); display: grid; place-items: center; transition: transform 200ms var(--ease-out), background-color 150ms ease; }
.faq summary .plus svg { width: 16px; height: 16px; }
.faq details[open] summary .plus { transform: rotate(45deg); background: var(--khadi); }
.faq details p { margin: 0 0 1.4rem; padding-right: 3rem; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ cta band */

/* The shop, closing time: the awning over a shutter. */
.cta-band { position: relative; background: var(--shutter); color: #fff; overflow: hidden; }
.cta-band::before {
  content: ''; position: absolute; inset: 26px 0 0; opacity: 0.55;
  background: repeating-linear-gradient(180deg, transparent 0 14px, rgba(0, 0, 0, 0.32) 14px 16px, rgba(255, 255, 255, 0.05) 16px 17px);
}
.cta-band .awning { position: relative; }
.cta-band .wrap { position: relative; padding-block: clamp(4rem, 9vw, 7rem); display: grid; gap: 1.6rem; justify-items: start; }
.cta-band h2 { color: #fff; font: 800 var(--t-2xl) / 0.98 var(--display); letter-spacing: -0.02em; max-width: 14ch; }
.cta-band p { color: rgba(255, 255, 255, 0.78); font-size: 1.15rem; margin: 0; }
.cta-band .btn-soft { background: rgba(255, 255, 255, 0.12); color: #fff; }
@media (hover: hover) and (pointer: fine) { .cta-band .btn-soft:hover { background: rgba(255, 255, 255, 0.2); } }

/* -------------------------------------------------------------- footer */

.site-footer { padding-block: clamp(3.5rem, 7vw, 5rem) 2rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-grid img { height: 44px; width: auto; margin-bottom: 1rem; }
.footer-grid h2 { font: 700 0.95rem / 1 var(--text); color: var(--ink); margin-bottom: 1rem; }
.footer-grid ul { display: grid; gap: 0.65rem; }
.footer-grid a { text-decoration: none; color: var(--ink-2); font-size: 0.98rem; }
@media (hover: hover) and (pointer: fine) { .footer-grid a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; } }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.8rem 2rem; justify-content: space-between; font-size: 0.92rem; color: var(--muted); }
.footer-bottom p { margin: 0; max-width: none; }
.footer-bottom .made a { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--awning); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.heart { color: var(--awning); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------------------------------------------------------- inner pages */

.page-head { padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem); }
.page-head h1 { font-size: var(--t-2xl); max-width: 16ch; }
.page-head .lede { margin-top: 1.4rem; }

.feature { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: center; padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--line); }
.feature:nth-of-type(even) .feature-media { order: -1; }
.feature-text { display: grid; gap: 1rem; align-content: center; }
.feature-text h2 { font: 800 clamp(2rem, 3.6vw, 2.9rem) / 1.02 var(--display); letter-spacing: -0.015em; }
.feature-text p { margin: 0; }
.feature-media { display: grid; justify-items: center; }
.feature-media > .tablet, .pair > .tablet { width: 100%; }
.ticks { display: grid; gap: 0.65rem; margin-top: 0.4rem; }
.ticks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0.65rem; font-size: 1rem; }
.ticks svg { width: 20px; height: 20px; color: var(--awning-ink); margin-top: 3px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: end; }
.pair .phone { width: 210px; margin-bottom: -2rem; margin-left: -6rem; }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) .feature-media { order: 0; }
  .pair { grid-template-columns: 1fr; }
  .pair .phone { display: none; }
}

.steps { counter-reset: step; display: grid; gap: 0; border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(1rem, 4vw, 3rem); padding-block: clamp(2.2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); align-items: start; }
.step-n { font: 800 3.4rem / 0.9 var(--display); color: var(--awning); }
.step h2 { font: 800 clamp(1.7rem, 3vw, 2.3rem) / 1.05 var(--display); letter-spacing: -0.01em; margin-bottom: 0.7rem; }
.step p { margin: 0; }
.step-aside { background: var(--sand); border-radius: 18px; padding: 1.2rem 1.3rem; font-size: 0.97rem; }
.step-aside b { color: var(--ink); display: block; margin-bottom: 0.3rem; }
@media (max-width: 860px) { .step { grid-template-columns: 1fr; } .step-n { font-size: 2.6rem; } }

.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.role { border-radius: var(--radius); padding: 1.6rem; box-shadow: 0 0 0 1px var(--line); }
.role.is-owner { background: var(--khadi); box-shadow: 0 0 0 1px #eadbc3; }
.role h3 { font: 800 1.7rem / 1 var(--display); margin-bottom: 1rem; }
@media (max-width: 760px) { .roles { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.fact { padding: 2rem 2rem 2rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 1rem; }
.fact:nth-child(odd) { border-right: 1px solid var(--line); }
.fact:nth-child(even) { padding-left: 2rem; }
.fact svg { width: 28px; height: 28px; color: var(--ink); margin-top: 2px; }
.fact h2 { font: 700 1.25rem / 1.25 var(--text); margin-bottom: 0.5rem; }
.fact p { margin: 0; font-size: 1rem; }
@media (max-width: 800px) {
  .facts { grid-template-columns: 1fr; }
  .fact { padding: 1.6rem 0 !important; border-right: 0 !important; }
}

.prose { max-width: 68ch; }
.prose p { font-size: 1.15rem; line-height: 1.7; }
.prose h2 { font: 800 var(--t-lg) / 1.1 var(--display); margin: 2.6rem 0 1rem; }
.pull { font: 800 clamp(1.8rem, 3.6vw, 2.8rem) / 1.08 var(--display); color: var(--ink); letter-spacing: -0.015em; max-width: 22ch; margin: 2.4rem 0; padding-left: 1.2rem; border-left: 5px solid var(--awning); }

/* ------------------------------------------------------- the opening */

/* A shop shutter with the sign painted on it. The page loads behind it,
   then it rolls up. Shown once per visit; skipped for reduced motion. */
.shutter {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  background:
    repeating-linear-gradient(180deg, #2e2723 0 13px, #1d1814 13px 15px, #3d3530 15px 16px),
    #2e2723;
  /* Without JS it still gets out of the way. */
  animation: shutter-failsafe 0s linear 5s forwards;
}
.shutter::after { /* the bottom rail and its handle */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34px;
  background: linear-gradient(#4a403a, #2a231f); border-top: 2px solid #1a1512;
}
.shutter-sign {
  position: relative; display: grid; justify-items: center; gap: 1.1rem;
  padding: clamp(1.4rem, 4vw, 2.2rem) clamp(1.6rem, 5vw, 3rem); border-radius: 20px;
  background: var(--khadi); border: 4px solid var(--ink);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.shutter-sign img { width: 88px; height: auto; }
.shutter-word { display: flex; gap: 0.06em; font: 800 clamp(2.6rem, 9vw, 4.6rem) / 0.9 var(--display); letter-spacing: 0.01em; color: var(--ink); }
.shutter-word .co, .shutter-word .co2 { color: var(--awning); }
.shutter-word .co { margin-left: 0.22em; }
.shutter-word span { display: inline-block; }
.shutter-bar { width: 100%; height: 4px; border-radius: 4px; background: #eadbc3; overflow: hidden; }
.shutter-bar i { display: block; height: 100%; background: var(--awning); transform-origin: 0 50%; transform: scaleX(0.08); transition: transform 500ms var(--ease-out); }

/* JS adds .is-playing: the letters go up one by one. */
.shutter.is-playing .shutter-word span { animation: letter-in 520ms var(--ease-out) both; animation-delay: calc(var(--i) * 55ms + 120ms); }
.shutter.is-playing .shutter-sign img { animation: sign-in 600ms var(--ease-out) both; }
.shutter.is-up { transform: translateY(-100%); transition: transform 900ms var(--ease-in-out); }
.shutter.is-gone { display: none; }
html.no-opening .shutter { display: none; }

@keyframes letter-in { from { opacity: 0; transform: translateY(45%); } to { opacity: 1; transform: none; } }
@keyframes sign-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes shutter-failsafe { to { visibility: hidden; } }

/* The hero's single entrance, run as the shutter goes up. */
.js .hero [data-rise] { opacity: 0; transform: translateY(26px); }
.js .hero.is-in [data-rise] { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }

/* Reduced motion: the same states, without travel. */
@media (prefers-reduced-motion: reduce) {
  .shutter.is-up { transform: none; opacity: 0; transition: opacity 250ms ease; }
  .shutter.is-playing .shutter-word span, .shutter.is-playing .shutter-sign img { animation: none; }
  .js .hero [data-rise] { transform: none; }
  .js .hero.is-in [data-rise] { transition: opacity 300ms ease; }
  .story-device .screen img { transition: opacity 200ms ease; }
  .btn { transition: background-color 150ms ease, color 150ms ease; }
  .btn:active { transform: none; }
}

/* 404 */
.lost { min-height: 60vh; display: grid; align-content: center; gap: 1.2rem; }
