/* ─────────────────────────────────────────────────────────────────────────────
   maillard.is
   Greyscale only. Rules, never shadows. Newsreader for headings, IBM Plex Sans
   for body, IBM Plex Mono for figures, labels and button text.
   ──────────────────────────────────────────────────────────────────────────── */

:root {
  --ink: #141414;
  --ink-2: #4a4a48;
  --label: #6d6d6a;
  --quiet: #8a8a86;
  --quieter: #a3a29e;
  --rule: #c9c8c4;
  --hair: #ebeae7;
  --fill: #f4f3f1;
  --fill-2: #f9f8f7;
  --desk: #e6e5e2;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --page: 1180px;
  --gap: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: light; }

body {
  background: var(--desk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--ink-2); }

img { display: block; max-width: 100%; height: auto; }

/* ── one size, every language ───────────────────────────────────────────────
   Every text slot holds one copy per language, stacked in a single grid cell.
   The cell measures the largest of them, so a box is already as wide and as
   tall as its longest version — at every breakpoint, with no fixed sizes to
   go stale. Toggling language changes which copy is visible, never the
   layout. `visibility` keeps the hidden copy's size while taking it out of
   the accessibility tree and out of reach of the pointer. */
.dual { display: inline-grid; grid-template-areas: "s"; }
.dual > .dual-slot { grid-area: s; }
.dual > .dual-slot:not(.is-on) { visibility: hidden; pointer-events: none; }

/* Block-level slots (headings, paragraphs, tile bodies) must fill their
   column, so the cell is a grid track rather than shrink-to-fit content. */
h1.dual, h2.dual, h3.dual, p.dual,
[data-covers-head].dual, [data-prints-eyebrow].dual, [data-descriptor].dual { display: grid; }

/* Nothing may push past the viewport. Every block is allowed to shrink, and
   the page itself clips any residue rather than growing a scrollbar. */
html, body { max-width: 100%; overflow-x: clip; }
.page, .sheet, .stack, .tiles, .tile, .plans, .plan, .prints, .thumbs { min-width: 0; }

.page {
  max-width: calc(var(--page) + 48px);
  margin: 0 auto;
  padding: 26px 24px 44px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.sheet {
  background: #fff;
  border: 1px solid var(--rule);
}

/* ── 1 · header ───────────────────────────────────────────────────────────── */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 17px 32px;
}

.lockup { display: flex; align-items: center; gap: 11px; }
.lockup img { width: 26px; height: 40px; }
.lockup-name { font-family: var(--serif); font-size: 19px; line-height: 1; }
.lockup-descriptor {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--label);
  line-height: 1;
  margin-top: 4px;
}

.header-right { display: flex; align-items: center; gap: 22px; }

.toggle {
  display: flex;
  align-items: center;
  border: 1px solid var(--rule);
  background: #fff;
}
.toggle button {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 6px 11px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--label);
}
.toggle button + button { border-left: 1px solid var(--rule); }
.toggle button:hover { color: var(--ink); }
.toggle button.is-on { background: var(--ink); color: #fff; }
/* The toggle's labels are fixed strings, so its width is stable by definition. */

.cta {
  display: inline-grid;
  grid-template-areas: "s";
  justify-items: center;
  padding: 12px 22px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cta:hover { background: #000; color: #fff; }

/* ── 2 · hero ─────────────────────────────────────────────────────────────── */

.hero { padding: 64px 52px 56px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 60px;
  line-height: 1.08;
  letter-spacing: -.012em;
  max-width: 940px;
  text-wrap: balance;
}
.hero .hero-b { color: var(--ink-2); }
.hero-sub {
  font-style: italic;
  font-size: 19px;
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 700px;
  margin-top: 26px;
  text-wrap: pretty;
}
.hero .cta { margin-top: 34px; padding: 15px 28px; }

/* ── 3 · the dashboard plate ──────────────────────────────────────────────── */

/* The plate fills its sheet and no more. The PNG's intrinsic width is larger
   than the column, so width:100% is what sizes it — max-width alone would
   leave it at natural size on any browser that ignores the width attribute. */
.plate img { display: block; width: 100%; max-width: 100%; height: auto; }
.plate { width: auto; min-width: 0; }
.plate-phone { display: none; }

/* ── 4 · what it covers ───────────────────────────────────────────────────── */

.covers { padding: 44px 52px 48px; }
/* The rule under the heading spans the full sheet — it separates the header
   from the tiles, so it must measure the tiles, not the text. The 700px
   measure stays on the text itself. */
.covers h2 {
  padding-bottom: 26px;
  border-bottom: 2px solid var(--ink);
}
.covers h2 > span {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.22;
  max-width: 700px;
  text-wrap: pretty;
}
/* Two rows, both full width: the daily surfaces (MEP, HACCP) over the three
   planning ones. Six columns divide by both 2 and 3, so no cell is ever empty. */
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); }
.tile:nth-child(1), .tile:nth-child(2) { grid-column: span 3; }
.tile:nth-child(3), .tile:nth-child(4), .tile:nth-child(5) { grid-column: span 2; }
.tile { padding: 24px 26px 26px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.tile:nth-child(1), .tile:nth-child(3) { padding-left: 0; }
.tile:nth-child(2), .tile:nth-child(5) { padding-right: 0; border-right: 0; }
.tile:nth-child(3), .tile:nth-child(4), .tile:nth-child(5) { border-bottom: 0; }
.tile h3 { font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.2; margin-bottom: 9px; }
.tile p { font-style: italic; font-size: 15px; line-height: 1.62; color: var(--ink-2); text-wrap: pretty; }

/* ── 5 · and it prints ────────────────────────────────────────────────────── */

.prints {
  padding: 44px 52px 48px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 56px;
  align-items: start;
}
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--label);
}
.prints h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 31px;
  line-height: 1.22;
  margin-top: 14px;
  max-width: 560px;
  text-wrap: pretty;
}
.thumbs { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.thumb-manual { width: 182px; max-width: 100%; flex: 0 1 182px; }
.thumb-sheet { width: 182px; max-width: 100%; flex: 0 1 182px; margin-top: 26px; }

/* ── 6 · pricing ──────────────────────────────────────────────────────────── */

.pricing { padding: 44px 52px 44px; }
.pricing h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 31px;
  line-height: 1.2;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--ink);
}
.plans { display: grid; grid-template-columns: 1fr 1fr; }
.plan { padding: 22px 34px 24px 0; border-right: 1px solid var(--hair); }
.plan + .plan { padding: 22px 0 24px 34px; border-right: 0; }
.plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.plan-name { font-family: var(--serif); font-size: 26px; }
.plan-price { font-family: var(--mono); font-size: 17px; font-weight: 500; }
.plan p { font-style: italic; font-size: 15px; line-height: 1.62; color: var(--ink-2); margin-top: 11px; max-width: 400px; text-wrap: pretty; }
.price-notes { border-top: 1px solid var(--rule); padding-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.price-notes p { font-style: italic; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }

/* ── 7 · start ────────────────────────────────────────────────────────────── */

.start { background: var(--ink); border: 0; padding: 52px; }
.start h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.2;
  color: #fff;
  max-width: 680px;
  text-wrap: pretty;
}
.start p {
  font-style: italic;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--rule);
  max-width: 600px;
  margin-top: 18px;
  text-wrap: pretty;
}
.start .cta { margin-top: 30px; padding: 15px 28px; background: #fff; color: var(--ink); }
.start .cta:hover { background: var(--fill); color: var(--ink); }

/* ── 8 · footer ───────────────────────────────────────────────────────────── */

.footer {
  background: var(--fill-2);
  padding: 26px 32px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.footer-brand {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--label);
}
.footer-company, .footer a { font-size: 13.5px; color: var(--ink-2); }
.footer a { text-decoration: underline; align-self: flex-start; }

/* ── the phone ────────────────────────────────────────────────────────────── */

@media (max-width: 820px) {
  :root { --gap: 16px; }
  .page { padding: 0 0 20px; gap: 0; }
  .sheet { border-left: 0; border-right: 0; }

  .header { padding: 13px 18px; flex-wrap: wrap; row-gap: 14px; gap: 12px; }
  .header .cta { display: none; }
  .header-right { gap: 12px; flex: 1; justify-content: flex-end; }
  .lockup img { width: 22px; height: 34px; }
  .lockup-name { font-size: 16px; }
  .lockup-descriptor { font-size: 7px; letter-spacing: .22em; }
  .toggle button { padding: 5px 8px; font-size: 9.5px; letter-spacing: .1em; }

  .header-cta { display: block; padding: 0 18px 14px; background: #fff; border-bottom: 1px solid var(--rule); }
  .header-cta .cta { display: grid; text-align: center; padding: 13px 0; font-size: 11.5px; }

  .stack { padding: 16px 14px 0; display: flex; flex-direction: column; gap: 16px; }

  .hero { padding: 28px 20px 26px; }
  .hero h1 { font-size: 31px; line-height: 1.14; letter-spacing: -.008em; }
  .hero-sub { font-size: 15px; margin-top: 16px; }
  .hero .cta { display: grid; text-align: center; margin-top: 22px; padding: 13px 0; font-size: 11.5px; }

  .plate-desktop { display: none; }
  .plate-phone { display: block; }

  .covers { padding: 24px 20px 22px; }
  .covers h2 { padding-bottom: 16px; }
  .covers h2 > span { font-size: 23px; line-height: 1.25; max-width: none; }
  .tiles { grid-template-columns: 1fr; }
  .tile:nth-child(n) { grid-column: auto; padding-left: 0; padding-right: 0; }
  .tile { padding: 15px 0; border-right: 0; border-bottom: 1px solid var(--hair); }
  .tile:nth-child(5) { border-bottom: 0; }
  .tile h3 { font-size: 19px; margin-bottom: 6px; }
  .tile p { font-size: 14px; line-height: 1.6; }

  .prints { padding: 24px 20px 22px; grid-template-columns: 1fr; gap: 20px; }
  .eyebrow { font-size: 10.5px; }
  .prints h2 { font-size: 22px; line-height: 1.25; margin-top: 11px; }
  .thumbs { gap: 12px; flex-wrap: nowrap; }
  .thumb-manual { width: 148px; flex: 0 0 auto; }
  .thumb-sheet { width: auto; flex: 1 1 0; min-width: 0; margin-top: 22px; }

  .pricing { padding: 24px 20px 22px; }
  .pricing h2 { font-size: 22px; padding-bottom: 14px; }
  .plans { grid-template-columns: 1fr; }
  .plan, .plan + .plan { padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--hair); }
  .plan-name { font-size: 20px; }
  .plan-price { font-size: 14px; }
  .plan p { font-size: 13.5px; margin-top: 8px; }
  .price-notes { border-top: 0; padding-top: 14px; gap: 5px; }
  .price-notes p { font-size: 13px; line-height: 1.55; }

  .start { padding: 26px 20px 24px; }
  .start h2 { font-size: 24px; line-height: 1.25; }
  .start p { font-size: 14px; margin-top: 13px; }
  .start .cta { display: grid; text-align: center; margin-top: 20px; padding: 13px 0; font-size: 11.5px; }

  .footer { padding: 20px; }
  .footer-brand { font-size: 9.5px; }
  .footer-company, .footer a { font-size: 13px; }
}

@media (min-width: 821px) {
  .header-cta { display: none; }
  .stack { display: contents; }
}
