/* Lou's Diner: shared design system. Emerald ground everywhere, white ink, orange only in solid blocks. */

/* TOKENS: palette, type scale, lane width, rule weights, motion. Use the variables, never raw values. */
:root {
  --ground: #006944;
  --ink: #ffffff;
  --accent: #ff7a18;
  --on-accent: #161611;
  --hand: 'Kalam', 'Segoe Print', 'Bradley Hand', cursive;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --t-small: .9375rem;
  --t-body: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  --t-lead: clamp(1.1875rem, 1.05rem + .7vw, 1.5rem);
  --t-prompt: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  --t-note: clamp(1.375rem, 1.2rem + 1vw, 2rem);
  --t-hand: clamp(2.75rem, 2rem + 3.2vw, 4.25rem);
  --t-slogan: clamp(3rem, .9rem + 10vw, 9rem);
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --lane: 5.25rem;
  --pad: clamp(1.5rem, 5vh, 3.5rem);
  --rule: .1875rem;
  --dash: .125rem;
  --ease: cubic-bezier(.3, .7, .2, 1);
  --draw: .7s;
  --grow: .26s;
}
@media (min-width: 48rem) {
  :root { --lane: clamp(11rem, 24vw, 19rem); }
}

/* BASE: reset and running text in Source Serif 4. Only weight 400 exists; nothing is ever bolded. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--t-body)/1.55 var(--serif);
  font-synthesis: none;
  overflow-x: clip;
}
h1, h2, h3, p, figure, dl, dd, blockquote { margin: 0; }
h1, h2, h3 { font-weight: 400; }
ul, ol { margin: 0; padding-left: 1.2em; }
img, video { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: var(--rule) solid var(--ink); outline-offset: .25rem; }
.band :focus-visible, .plate :focus-visible, .strip :focus-visible, #promo :focus-visible {
  outline-color: var(--on-accent); outline-offset: .1rem;
}

/* TEXT LINK: every <a> has a thin underline, and a thicker one grows from the left on hover and focus. Add .plain to switch it off (links around pictures). */
a {
  color: inherit;
  text-decoration: none;
  padding-bottom: .12em;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 100% .0625rem no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 0% .1875rem no-repeat;
  transition: background-size var(--grow) var(--ease);
}
a:hover, a:focus-visible { background-size: 100% .0625rem, 100% .1875rem; }
a.plain { background: none; padding-bottom: 0; }

/* HELPERS: .vh hides text visually but keeps it for screen readers; .measure and .lead cap line length. */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.measure { max-width: 40rem; }
.lead { font-size: var(--t-lead); line-height: 1.4; max-width: 36rem; }

/* SKIP LINK: .skip, an orange slip that drops in on keyboard focus. */
.skip {
  position: absolute; left: var(--gutter); top: 0; z-index: 100;
  padding: .7rem 1rem;
  background: var(--accent); color: var(--on-accent);
  transform: translateY(-130%);
}
.skip:focus { transform: none; }

/* HANDWRITING: .hand is Kalam for display lines; add .hand--slogan (home only), .hand--lead (44 to 68px lead question) or .hand--note (short notes and prices). */
.hand { font-family: var(--hand); font-weight: 400; line-height: 1.14; letter-spacing: 0; text-wrap: balance; }
.hand--slogan { font-size: var(--t-slogan); line-height: 1.06; }
.hand--lead { font-size: var(--t-hand); }
.hand--note { font-size: var(--t-note); line-height: 1.25; }

/* SECTION PROMPT: .prompt sets h2/h3 questions in Source Serif 4, never in Kalam. */
.prompt { font-size: var(--t-prompt); line-height: 1.3; }

/* HEADER: .top holds the small linked name (.top__name with the mug mark) in the upper-left corner. */
.top__name {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 2.75rem;
  margin: .25rem var(--gutter);
  padding: 0;
  background: none;
  font-size: 1rem; line-height: 1.2;
}
.top__name svg { width: 1.5rem; height: 1.5rem; flex: none; }
.top__name span {
  padding-bottom: .1em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0% .125rem no-repeat;
  transition: background-size var(--grow) var(--ease);
}
.top__name:hover span, .top__name:focus-visible span { background-size: 100% .125rem; }

/* NAVIGATION BAND: .band is the solid orange sentence under the name; its links are the whole menu, on phones too. The sentence sits flush left on the same edge as the ledger, never centred. */
.band {
  background: var(--accent); color: var(--on-accent);
  padding: .1rem var(--gutter);
  font-size: var(--t-body); line-height: 1.3;
  text-align: left;
}
header .band > p { text-align: left; text-indent: 0; margin-inline: 0; }
.band a, .foot a {
  display: inline-block;
  white-space: nowrap;
  padding-block: .7rem;
  background-position: 0 calc(100% - .55rem), 0 calc(100% - .55rem);
}
.band a[aria-current="page"] { background-size: 100% .1875rem, 0% .1875rem; }

/* LINK-LIKE BUTTON: .linkbtn is a button that reads as an underlined text link (consent choices, cookie settings). */
.linkbtn {
  min-height: 2.75rem;
  padding: 0;
  border: 0; background: none; color: inherit;
  font: inherit;
  text-decoration: underline; text-decoration-thickness: .0625rem; text-underline-offset: .22em;
  cursor: pointer;
}
.linkbtn:hover, .linkbtn:focus-visible { text-decoration-thickness: .1875rem; }

/* CONSENT: #consent is an emerald band in the page flow right under the navigation; it never overlays anything. On phones it is a slim band: the sentence, then both choices side by side on one line. */
#consent {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.75rem;
  padding: .45rem var(--gutter);
  border-bottom: var(--dash) dashed var(--ink);
  font-size: 1rem; line-height: 1.4;
  scroll-margin-top: 0;
}
#consent:focus { outline: none; }
#consent p { flex: 0 1 auto; padding-block: .3rem; }
.consent__choices { display: flex; flex-wrap: wrap; gap: 0 1.75rem; }
@media (max-width: 47.99rem) {
  #consent { padding-block: .3rem 0; line-height: 1.3; }
  #consent p { flex: 1 1 100%; padding-block: .1rem 0; }
  .consent__choices { flex: 1 1 100%; flex-wrap: nowrap; gap: 0 1rem; }
  .consent__choices .linkbtn { font-size: var(--t-small); white-space: nowrap; }
}

/* THE LEDGER: wrap rows in .ledger; each .row has a .row__q (question lane) and a .row__a (answer lane carrying the strong vertical rule). Rows stack flush so the rule never breaks. */
.ledger { padding-inline: var(--gutter); }
.row { display: grid; grid-template-columns: var(--lane) minmax(0, 1fr); }
.row__q {
  padding: var(--pad) .75rem var(--pad) 0;
  font-size: var(--t-small); line-height: 1.3;
  overflow-wrap: anywhere;
}
.row__a {
  min-width: 0;
  padding: var(--pad) 0 var(--pad) clamp(.9rem, 3vw, 3rem);
  border-left: var(--rule) solid var(--ink);
}
.row__a > * + * { margin-top: 1rem; }
@media (min-width: 48rem) {
  .row__q { padding-right: clamp(1rem, 2.5vw, 2.5rem); font-size: var(--t-prompt); }
}

/* LANE LABELS: inside .row__q put the full question in .q-long (desk) and a one or two word label in .q-short (phone). */
.q-long { display: none; }
@media (min-width: 48rem) {
  .q-long { display: inline; }
  .q-short { display: none; }
}

/* CROSSING: .cross sits between two rows inside .ledger and spans both lanes, so the rule stops at it and resumes below. Home's mug-wall photo only. */
.cross { padding-block: clamp(.75rem, 2.5vh, 1.5rem); }

/* SPLIT ANSWER: .split inside .row__a puts text beside a picture or a large figure on desk screens; .split--pic gives the picture the wider share. */
.split { display: grid; gap: clamp(1.25rem, 3vw, 3rem); align-items: start; }
.split > * { min-width: 0; }
.split > * > * + * { margin-top: 1rem; }
@media (min-width: 62rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--pic { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}

/* PAGE OPENING: a .row.opening is the first row of an inside page: .plate.plate--h1 in the question lane, a .hand--lead question and a .lead in the answer lane. */
.opening .row__q, .opening .row__a { padding-top: clamp(1.5rem, 6vh, 4rem); }
.opening .row__q { font-size: inherit; }

/* PLATE: .plate is a solid orange block with near-black ink; .plate--h1 is the small trade plate that carries the real h1. */
.plate { background: var(--accent); color: var(--on-accent); padding: 1.15rem 1.15rem .9rem; }
.plate--h1 {
  display: block;
  max-width: 22rem;
  font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); line-height: 1.3;
  overflow-wrap: break-word;
}
@media (max-width: 47.99rem) {
  .row__q .plate--h1 { padding: 1.1rem .5rem .6rem; font-size: 1rem; }
}

/* STRIP: .strip is a full-width orange band holding one Kalam line (the soup line); pair it with .wipe and data-reveal to have it wipe in once. */
.strip {
  background: var(--accent); color: var(--on-accent);
  padding: .55rem var(--gutter) .4rem;
  font: 400 var(--t-note)/1.25 var(--hand);
}

/* NOTCHES: add .notched to a .mount or .plate for two shallow tear notches on its top edge; add .notched--ends to put one at each end instead. */
.notched { position: relative; }
.notched::before, .notched::after {
  content: ""; position: absolute; z-index: 1; top: -.0625rem;
  width: 1.3rem; height: .6rem;
  background: var(--ground);
  border-radius: 0 0 1rem 1rem;
  pointer-events: none;
}
.notched::before { left: 1.25rem; }
.notched::after { left: 3.3rem; }
.notched--ends::before, .notched--ends::after { top: 50%; width: .6rem; height: 1.3rem; margin-top: -.65rem; }
.notched--ends::before { left: -.0625rem; border-radius: 0 1rem 1rem 0; }
.notched--ends::after { left: auto; right: -.0625rem; border-radius: 1rem 0 0 1rem; }
.plate.notched--ends { padding-inline: clamp(1.25rem, 4vw, 3rem); }

/* FIGURE AND CAPTION: figure.mount holds one photograph cropped 4:3 (.mount--wide 16:9, .mount--tall 4:5) with its figcaption straight underneath. */
.mount img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mount--wide img { aspect-ratio: 16 / 9; }
.mount--tall img { aspect-ratio: 4 / 5; }
.mount figcaption { padding-top: .6rem; font-size: var(--t-small); line-height: 1.4; max-width: 40rem; }

/* STAMP: .stamp is the dashed-border link or price tag; on a link its underline grows from the left. .stamp--price sets the figure in Kalam. Group several in .stamps. */
.stamp {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center;
  min-height: 2.75rem;
  padding: .5rem 1rem;
  border: var(--dash) dashed currentColor;
  font-size: var(--t-body); line-height: 1.25;
}
a.stamp {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0% .1875rem no-repeat content-box;
}
a.stamp:hover, a.stamp:focus-visible { background-size: 100% .1875rem; }
.stamp--price { font-family: var(--hand); font-size: var(--t-note); padding-block: .35rem .2rem; }
.stamps { display: flex; flex-wrap: wrap; gap: .75rem; }

/* TEAR LINE: hr.tear is a dashed rule; with data-reveal it draws across once when it scrolls into view (data-reveal="mid" waits for the middle of the window). */
.tear {
  display: block;
  height: var(--dash);
  margin: 1.25rem 0 0;
  border: 0; color: inherit;
  background: repeating-linear-gradient(90deg, currentColor 0 .6rem, transparent .6rem 1rem);
}

/* PERFORATION: hr.perf is the dotted separator between menu groups. */
.perf {
  display: block;
  height: .5rem;
  margin: var(--pad) 0 0;
  border: 0; color: inherit;
  background: radial-gradient(circle, currentColor .14rem, transparent .16rem) 0 50% / .9rem .5rem repeat-x;
}

/* REVEAL ON SCROLL: [data-reveal] gets .is-in from site.js once seen. It only draws marks: use it on .tear and on .wipe (a band that wipes in from the left). Photos and prices never move. */
.js .tear[data-reveal], .js .wipe[data-reveal] {
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--draw) var(--ease);
}
.js .tear[data-reveal].is-in, .js .wipe[data-reveal].is-in { clip-path: inset(0); }

/* FACTS LEDGER: dl.facts with one <div> per dt/dd pair gives name-left, value-right rows closed by dashed lines (specs, price lists). */
.facts > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.25rem;
  padding: .7rem 0;
  border-bottom: var(--dash) dashed var(--ink);
  font-size: var(--t-body); line-height: 1.35;
}
.facts dd { text-align: right; }
.plate .facts > div { border-bottom-color: var(--on-accent); }

/* HAND-OFF: finish every page with a .row.handoff whose answer holds one .hand--note line and a .stamps group pointing to the next pages. */
.handoff .row__a { padding-bottom: clamp(2rem, 7vh, 4.5rem); }
.handoff .stamps { margin-top: 1.25rem; }

/* OFFER BAR: #promo is the orange soup line in the page flow, between the ledger and the footer; it overlays nothing and has no close control. It slides in from the left when the build adds .is-in. On a phone each special keeps its own short padded line so both fit whole. */
#promo {
  padding: .15rem var(--gutter) 0;
  background: var(--accent); color: var(--on-accent);
  font: 400 clamp(1rem, .9rem + .6vw, 1.375rem)/1.3 var(--hand);
  transform: translateX(-101%);
  opacity: 0;
  transition: transform .55s var(--ease), opacity .2s linear;
}
#promo.is-in { transform: none; opacity: 1; }
#promo p { text-wrap: balance; }
#promo a {
  display: inline-block;
  white-space: normal;
  overflow-wrap: break-word;
  padding-block: .5rem .4rem;
  background: none;
  text-decoration: underline; text-decoration-thickness: .0625rem; text-underline-offset: .2em;
}
#promo a:hover, #promo a:focus-visible { text-decoration-thickness: .1875rem; }
.promo__part { display: inline; }
.promo__dot { display: inline; }
@media (max-width: 47.99rem) {
  #promo { padding: .4rem var(--gutter) .35rem; }
  #promo a { display: block; padding-block: 0; }
  .promo__part { display: block; padding-block: .15rem; }
  .promo__dot { display: none; }
}

/* FOOTER: .foot is one plain line (.foot__line: name, phone, Menu, Directions, Privacy) closed off by a strong rule; even gaps, and it simply wraps on phones. The cookie settings control rides above it and only shows itself when a keyboard reaches it. */
.foot {
  position: relative;
  padding: .4rem var(--gutter) .6rem;
  border-top: var(--rule) solid var(--ink);
  font-size: 1rem; line-height: 1.3;
}
.foot__line { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.75rem; }
.foot__cookie {
  position: absolute; z-index: 3;
  left: var(--gutter); bottom: 100%;
  margin-bottom: .25rem;
  padding: .5rem .9rem;
  background: var(--ground); color: var(--ink);
  border: var(--dash) dashed var(--ink);
  opacity: 0;
  transform: translateY(-.5rem);
  pointer-events: none;
  transition: opacity var(--grow) linear, transform var(--grow) var(--ease);
}
.foot__cookie:focus-visible { opacity: 1; transform: none; pointer-events: auto; }

/* REDUCED MOTION: every mark and band is already drawn; nothing transitions. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .tear[data-reveal], .js .wipe[data-reveal] { clip-path: none; }
  .foot__cookie { transform: none; }
}

/* A page never scrolls sideways. */
html, body { overflow-x: clip; }
/* Past a full-HD window the whole page grows with the window - type, gaps and pictures
   together - so a very wide screen (or a page zoomed far out) shows the same composition,
   not a small column of text lost in an enormous picture. */
@media (min-width: 1921px) { html { font-size: calc(100vw / 120); } }
/* What can be pressed in the chrome lies above the page: a huge headline's line box reaching
   into the navigation must not swallow the clicks meant for the links. */
header a, header button, nav a, nav button { position: relative; z-index: 2; }
/* A visitor who asked the system for less motion gets none, whatever a page forgot. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
