/* famfood.cz, direction „Ceník", blue revision 3 (2026-09-17): photo hero, editorial grid, CSS-only motion.
   Plain CSS, no framework, no JS. Tokens per spec §4.7; motion and layout per §4.8. */
:root {
  --bg: #EFF1F3; --bg2: #E1E6EB; --ink: #172226; --ink2: #4E5B60;
  --accent: #25478F; --accent-dark: #1A356E; --navy: #14305E; --on-navy: #C9DAF8; --on-navy-2: #9FB3D1;
  --overlay: rgb(20 48 94 / 0.8);
  --rule: rgb(23 34 38 / 0.12); --rule-light: rgb(255 255 255 / 0.14);
  --font-head: "Archivo Variable", "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Literata Variable", "Literata", Georgia, "Times New Roman", serif;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px; --s6: 104px;
  --measure: 38rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  -webkit-text-size-adjust: 100%; hyphens: auto; overflow-x: clip; /* clip: the full-bleed hero uses 50vw, which includes any classic scrollbar */
}
@media (min-width: 720px) { html { font-size: 17px; } }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; height: auto; }
figure { margin: 0; }

/* cross-document view transitions: a short cross-fade between pages, header held in place */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 240ms; animation-timing-function: var(--ease); }
.site-header { view-transition-name: site-header; }

/* type */
h1, h2, h3 {
  font-family: var(--font-head); font-stretch: 80%; font-weight: 600;
  line-height: 1.1; margin: 0 0 var(--s2); text-wrap: balance; letter-spacing: -0.008em;
  hyphens: manual;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.25rem; }
@media (min-width: 720px) { h1 { font-size: 2.8rem; } h2 { font-size: 2.15rem; } }
.display { font-size: clamp(2.4rem, 1.4rem + 3.8vw, 4.75rem); max-width: 20ch; line-height: 1.02; letter-spacing: -0.015em; }
p { margin: 0 0 var(--s2); text-wrap: pretty; max-width: var(--measure); }
.lede { font-size: 1.2rem; font-weight: 350; line-height: 1.45; max-width: 34rem; }
@media (min-width: 720px) { .lede { font-size: 1.3rem; } }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: rgb(37 71 143 / 0.4); transition: color 150ms, text-decoration-color 150ms; }
a:hover { color: var(--accent-dark); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.num { font-family: var(--font-head); font-stretch: 100%; font-weight: 500; font-variant-numeric: tabular-nums lining-nums; }
.copy { user-select: all; }
a[href^="mailto:"], a[href^="tel:"] { hyphens: manual; white-space: nowrap; } /* never break an address or number across lines */
.note { color: var(--ink2); font-size: 0.95rem; }
.label, .ledger dt, thead th, .cat-index ul { font-family: var(--font-head); font-stretch: 100%; font-weight: 600; font-size: 0.76rem; letter-spacing: 0.07em; text-transform: uppercase; }
mark.draft { background: var(--accent); color: #fff; padding: 0 0.3em; font-family: var(--font-head); font-stretch: 80%; font-weight: 600; text-transform: none; letter-spacing: 0; }
.skip { position: absolute; left: -999px; top: var(--s1); background: var(--ink); color: #fff; padding: var(--s1) var(--s2); z-index: 20; text-decoration: none; }
.skip:focus { left: var(--s2); }

/* layout: 12-col grid, text in 2–9, side in 9–13, wide 2–12, numerals live in column 1 */
.container {
  width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--s2);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s3);
}
.container > * { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .container > .col-text { grid-column: 2 / 9; }
  .container > .col-side { grid-column: 9 / 13; }
  .container > .col-wide { grid-column: 2 / 12; }
}
main.container { row-gap: var(--s5); padding-block: var(--s4) var(--s6); align-content: start; }
@media (min-width: 900px) { main.container { row-gap: var(--s6); } }
@media (min-width: 720px) { main { scroll-margin-top: 112px; } } /* skip link: keep the sticky header off the first heading */
.section-lg { margin-top: var(--s4); }

/* header: emblem on paper under a navy top line (the shop sign's blue).
   Sticky with a negative top so the first 36 px scroll off; the inner row then re-centres and the emblem
   scales down over the first 140 px of scroll (scroll-driven, no script, no layout shift). */
.site-header { position: sticky; top: -36px; z-index: 10; background: var(--bg); border-top: 4px solid var(--navy); border-bottom: 1px solid var(--rule); }
.site-header-inner { display: flex; align-items: center; gap: var(--s3); min-height: 104px; }
.brand { display: inline-flex; line-height: 0; }
.brand img { height: 84px; width: auto; transform-origin: 0 50%; }
.site-nav { margin-inline-start: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); font-family: var(--font-head); font-stretch: 80%; font-weight: 600; font-size: 1.05rem; }
.site-nav a, .cat-index a { position: relative; color: var(--ink); text-decoration: none; padding-block: 6px; transition: color 150ms; }
.site-nav a::after, .cat-index a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; transition: transform 280ms var(--ease); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after, .cat-index a:hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--accent); }
.button { position: relative; isolation: isolate; overflow: clip; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3); background: var(--navy); color: #fff; text-decoration: none; border-radius: 2px; font-family: var(--font-head); font-stretch: 90%; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.button::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); transform: translateX(-101%); transition: transform 320ms var(--ease); }
.button:hover { color: #fff; }
.button:hover::before { transform: translateX(0); }
.site-header .button { min-height: 40px; }
@supports (animation-timeline: scroll()) {
  @media (min-width: 720px) {
    .site-header-inner { animation: condense linear both; animation-timeline: scroll(root); animation-range: 0 140px; }
    .brand img { animation: brand-shrink linear both; animation-timeline: scroll(root); animation-range: 0 140px; }
  }
}
@keyframes condense { to { transform: translateY(16px); } }
@keyframes brand-shrink { to { transform: scale(0.75); } }
@media (max-width: 719px) {
  .site-header { position: static; }
  .site-header-inner { flex-wrap: wrap; padding-block: 12px 0; row-gap: 0; min-height: 0; }
  .site-nav { order: 3; flex-basis: 100%; margin-inline-start: 0; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-header .button { margin-inline-start: auto; padding-inline: 14px; font-size: 0.95rem; }
  .brand img { height: 64px; }
  /* one row, never wraps: 44 px tap targets, active page underlined */
  .site-nav ul { flex-wrap: nowrap; gap: 0 18px; font-size: 0.95rem; }
  .site-nav a { display: inline-block; line-height: 1.2; padding: 14px 0; white-space: nowrap; }
}

/* home: full-bleed hero, photo under a flat navy overlay (the visual language of the sign), headline lower-left */
.page-index main.container { padding-top: 0; }
.hero { position: relative; isolation: isolate; overflow: clip; grid-column: 1 / -1; margin-inline: calc(50% - 50vw); background: var(--navy); color: #fff; padding-block: var(--s5) var(--s5); display: grid; align-content: end; }
.hero-img { position: absolute; left: 0; top: -14%; width: 100%; height: 128%; object-fit: cover; object-position: 38% 50%; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--overlay); z-index: -1; }
.hero-inner { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--s2); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s3); }
.hero-inner > *, .hero-inner::before { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .hero-inner > *, .hero-inner::before { grid-column: 2 / 12; }
  .hero { padding-block: var(--s6) var(--s5); min-height: min(76vh, 760px); }
}
.hero-inner::before { content: ""; display: block; width: 56px; height: 3px; background: var(--on-navy); margin-bottom: var(--s4); transform-origin: 0 50%; }
.hero .display { color: #fff; margin-bottom: var(--s3); }
.hero .lede { color: var(--bg2); margin-bottom: var(--s4); }
.hero-facts { font-family: var(--font-head); font-stretch: 90%; font-weight: 500; font-size: 1.05rem; max-width: none; font-variant-numeric: tabular-nums; color: var(--bg2); margin: 0; }
.hero a { color: var(--on-navy); text-decoration-color: rgb(201 218 248 / 0.45); }
.hero a:hover { color: #fff; text-decoration-color: currentColor; }
.hero mark.draft { background: var(--on-navy); color: var(--navy); }

/* motion, all CSS: the headline rises word by word from behind a clipped line, the rule draws in, the lede and
   facts follow; the photo drifts slower than the page (scroll-driven); sections and rows reveal as they enter.
   Transform and opacity only, so CLS stays 0; everything is off under prefers-reduced-motion and in print. */
.w { display: inline-block; overflow: hidden; padding: 0.18em 0.06em 0.24em; margin: -0.18em -0.06em -0.24em; }
.w > span { display: inline-block; animation: word-up 820ms var(--ease) both; }
@keyframes word-up { from { transform: translateY(145%); } to { transform: none; } }
.w:nth-child(2) > span { animation-delay: 60ms; }
.w:nth-child(3) > span { animation-delay: 120ms; }
.w:nth-child(4) > span { animation-delay: 180ms; }
.w:nth-child(5) > span { animation-delay: 240ms; }
.w:nth-child(6) > span { animation-delay: 300ms; }
.w:nth-child(7) > span { animation-delay: 360ms; }
.w:nth-child(8) > span { animation-delay: 420ms; }
.w:nth-child(9) > span { animation-delay: 480ms; }
.w:nth-child(10) > span { animation-delay: 540ms; }
.w:nth-child(11) > span { animation-delay: 600ms; }
.w:nth-child(12) > span { animation-delay: 660ms; }
@keyframes draw { from { transform: scaleX(0); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-inner::before { animation: draw 700ms var(--ease) both; }
.hero .lede { animation: rise 700ms var(--ease) 520ms both; }
.hero-facts { animation: rise 700ms var(--ease) 680ms both; }
@keyframes parallax { from { transform: none; } to { transform: translateY(10%); } }
@keyframes reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes reveal-row { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes reveal-fade { from { opacity: 0; } to { opacity: 1; } }
@supports (animation-timeline: view()) {
  .hero-img { animation: parallax linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  main.container > :not(.hero, .duo), .duo > * { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 160px; }
  .cat-list li, .ledger > div, ul.plain li { animation: reveal-row linear both; animation-timeline: view(); animation-range: entry 0% entry 90px; }
  tbody tr { animation: reveal-fade linear both; animation-timeline: view(); animation-range: entry 0% entry 60px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* home: section numerals in the gutter column, category band, facts panel, map strip */
.page-index main.container { counter-reset: sec; }
.page-index main.container > section.col-text, .page-index .duo > section.col-text, .page-index .cats { position: relative; }
.page-index main.container > section.col-text > h2::before, .page-index .duo > section.col-text > h2::before, .page-index .cats > h2::before { counter-increment: sec; content: counter(sec, decimal-leading-zero); display: block; font-family: var(--font-head); font-stretch: 100%; font-weight: 500; font-size: 0.9rem; color: var(--accent); font-variant-numeric: tabular-nums; margin-bottom: 6px; letter-spacing: 0.04em; }
@media (min-width: 900px) {
  .page-index main.container > section.col-text > h2::before, .page-index .duo > section.col-text > h2::before, .page-index .cats > h2::before { position: absolute; right: 100%; top: 0; margin: 0 var(--s3) 0 0; font-size: 2.4rem; font-weight: 300; line-height: 1; opacity: 0.6; }
}
.cats { counter-reset: cat; }
.cat-list { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 var(--s4); border-top: 1px solid var(--ink); }
.cat-list li { counter-increment: cat; border-bottom: 1px solid var(--rule); }
.cat-list a { position: relative; display: flex; align-items: baseline; gap: var(--s2); padding: 18px 0; color: var(--ink); text-decoration: none; font-family: var(--font-head); font-stretch: 80%; font-weight: 600; font-size: 1.5rem; line-height: 1.1; transition: color 200ms, padding-left 320ms var(--ease); }
.cat-list a::before { content: counter(cat, decimal-leading-zero); flex: none; min-width: 2ch; font-size: 0.78rem; font-weight: 500; font-stretch: 100%; color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.cat-list a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 320ms var(--ease); }
.cat-list a:hover { color: var(--accent); padding-left: 6px; }
.cat-list a:hover::after { transform: scaleX(1); }
.cats-more { margin: 0; }
.facts .ledger { border-top: 2px solid var(--ink); }
.facts .ledger > div { grid-template-columns: 6.5rem 1fr; padding-block: 12px; }
.facts dd.num { font-size: 1.35rem; line-height: 1.2; }
/* .duo: sections 02 + 03 with the facts panel beside them. Its own 12-col grid on the container's lines, so the sticky
   panel's containing block ends with section 03 and it never rides over the map strip below. */
.duo { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s3); row-gap: var(--s5); }
.duo > * { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .duo { row-gap: var(--s6); }
  .duo > .col-text { grid-column: 2 / 9; }
  .duo > .col-side { grid-column: 9 / 13; grid-row: span 2; align-self: start; position: sticky; top: 104px; }
}
.locate { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); align-items: center; border-top: 1px solid var(--rule); padding-top: var(--s5); }
.locate-text h2 { font-size: 1.5rem; }
.locate-text p { margin-bottom: var(--s2); }
.locate-map { display: block; overflow: clip; border: 1px solid var(--rule); }
.locate-map img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 800ms var(--ease); }
.locate-map:hover img { transform: scale(1.03); }
ul.plain { list-style: none; padding: 0; margin: 0 0 var(--s2); max-width: var(--measure); }
ul.plain li { padding-block: 8px; border-bottom: 1px solid var(--rule); }
ul.plain b { font-family: var(--font-head); font-stretch: 90%; font-weight: 600; }
.prose p { max-width: var(--measure); }

/* ledger (dl of div>dt+dd) */
.ledger { margin: 0; border-top: 1px solid var(--rule); }
.ledger > div { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: var(--s2); padding-block: 12px; border-bottom: 1px solid var(--rule); }
.ledger dt { color: var(--ink2); padding-top: 0.25em; }
.ledger dd { margin: 0; max-width: var(--measure); }
.ledger dd.num { font-size: 1.05rem; }
@media (max-width: 639px) { .ledger > div { grid-template-columns: 1fr; gap: 2px; } .ledger dt { padding-top: 0; } }
.terms dt { font-family: var(--font-head); font-stretch: 80%; font-weight: 600; font-size: 1.1rem; letter-spacing: -0.005em; text-transform: none; color: var(--ink); padding-top: 0; }

/* sortiment: sticky category index, light table heads, accent bar on row hover */
.cat-index ul { list-style: none; margin: 0; padding: 12px 0; display: flex; flex-wrap: wrap; gap: 4px 22px; border-block: 1px solid var(--rule); background: var(--bg); }
.cat-index a { padding-block: 8px; }
@media (min-width: 720px) { .cat-index { position: sticky; top: 72px; z-index: 5; background: var(--bg); } }
.sortiment-cat { scroll-margin-top: 150px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { color: var(--ink2); padding-block: 6px 8px; border-bottom: 1px solid var(--ink); }
tbody th { font-weight: 500; position: relative; }
tbody th::before { content: ""; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 2px; background: var(--accent); transform: scaleY(0); transform-origin: 50% 100%; transition: transform 240ms var(--ease); }
tbody tr { transition: background-color 150ms; }
tbody tr:hover { background: var(--bg2); }
tbody tr:hover th::before { transform: scaleY(1); }
td[data-label="Balení"] { font-family: var(--font-head); font-stretch: 100%; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 639px) {
  thead { position: absolute; left: -9999px; }
  tbody tr { display: grid; grid-template-columns: 1fr; padding-block: 8px; border-bottom: 1px solid var(--rule); }
  tbody th, tbody td { border: 0; padding: 0; }
  tbody th::before { display: none; }
  tbody td::before { content: attr(data-label) ": "; color: var(--ink2); }
}
.sortiment { display: grid; gap: var(--s4) var(--s3); }
@media (min-width: 900px) { .sortiment { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sortiment-wide { grid-column: 1 / -1; } }
/* catalog pending: eight numbered category blocks, no tables */
.sortiment-pending { counter-reset: scat; gap: 0 var(--s4); border-top: 1px solid var(--ink); }
.sortiment-pending .sortiment-cat { counter-increment: scat; padding-block: var(--s3); border-bottom: 1px solid var(--rule); }
.sortiment-pending .sortiment-cat h2 { font-size: 1.6rem; margin-bottom: 6px; }
.sortiment-pending .sortiment-cat h2::before { content: counter(scat, decimal-leading-zero); display: block; font-stretch: 100%; font-weight: 500; font-size: 0.78rem; color: var(--accent); letter-spacing: 0.04em; margin-bottom: 8px; }
.sortiment-pending .sortiment-cat p { margin: 0; color: var(--ink2); }
@media (min-width: 720px) { .sortiment-pending { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* kontakt */
.contact-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.map img { width: 100%; display: block; border: 1px solid var(--rule); }
.map figcaption { font-size: 0.8rem; color: var(--ink2); margin-top: 4px; }
.photo img { width: 100%; display: block; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.gallery .photo img { aspect-ratio: 4 / 5; object-fit: cover; }
@media (min-width: 720px) { .gallery { gap: var(--s3); } }

/* footer: navy band, bookends the hero */
.site-footer { background: var(--navy); color: var(--bg2); padding-block: var(--s5); font-size: 0.95rem; }
.site-footer .container { display: block; }
.site-footer a { color: var(--on-navy); text-decoration-color: rgb(201 218 248 / 0.45); }
.site-footer a:hover { color: #fff; text-decoration-color: currentColor; }
.site-footer .ledger { border-top-color: var(--rule-light); }
.legal > div { padding-block: 8px; border-bottom-color: var(--rule-light); }
.legal dt { color: var(--on-navy-2); }
@media (min-width: 640px) { .legal > div { grid-template-columns: minmax(8rem, 11rem) 1fr; } }
.footer-meta { margin: var(--s3) 0 0; color: var(--on-navy-2); max-width: none; }

/* print: Kontakt as a one-page sheet */
@media print {
  @page { margin: 18mm; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .skip, .map, .photo, .footer-meta, .site-nav, .hero-img, .locate-map, .cat-index { display: none !important; }
  main.container, .container { display: block; padding: 0; max-width: none; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  .hero { margin: 0; padding: 0; background: none; color: #000; min-height: 0; }
  .hero::before { display: none; }
  .hero .display, .hero .lede, .hero-facts { color: #000; }
  .hero-inner::before { display: none; }
  .w, .w > span { display: inline; padding: 0; margin: 0; }
  .invoice-block, .contact-block { break-inside: avoid; }
  .ledger > div { grid-template-columns: 10rem 1fr; padding-block: 6px; }
  .site-footer { background: none; color: #000; border-top: 1px solid #000; }
  .site-footer a, .legal dt { color: #000; }
  .page-kontakt .site-footer, .row-map { display: none !important; }
}
