/* Black header and hero, plain shop details, and two food-label panels. Colours, font and sizes come from theme.json. */

:root { --ink: var(--wp--preset--color--ink); --band: var(--wp--preset--color--band); --sky: var(--wp--preset--color--sky); --m: clamp(20px, 3vw, 48px); }
img { max-width: 100%; }
.wp-block-image { margin: 0; }
p { margin: 0; }
a { text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.av-wrap { max-width: 1320px; margin-inline: auto; padding-inline: var(--m); box-sizing: content-box; }

/* Header */
header.wp-block-template-part { background: var(--ink); color: #fff; }
.av-warn { font-size: 14px; font-weight: 500; line-height: 1.4; padding: 10px 20px; text-align: center; border-bottom: 1px solid #333; }
.av-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 32px; padding-block: 18px; }
.av-nav img { height: 42px; width: auto; display: block; }
.av-links { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 24px; }
.av-links a { display: inline-block; padding-block: 10px; text-decoration: none; }
.av-links a:hover { text-decoration: underline; }

/* Hero */
.av-hero { background: var(--ink) url('../images/hero-disc.svg') no-repeat right -10vw center / auto 94%; color: #fff; overflow: hidden; }
.av-intro { padding-block: clamp(32px, 5vw, 72px) clamp(44px, 6vw, 88px); }
.av-intro h1 { margin: 0 0 20px; max-width: 10.5em; }
.av-lede { font-size: var(--wp--preset--font-size--large); line-height: 1.35; max-width: 27em; }

/* The open/closed sign reads the shop's own hours table. */
.av-sign { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 28px; font-size: 1.125rem; }
.av-sign:empty { display: none; }
.av-sign strong { border: 3px solid currentColor; padding: 5px 14px; color: #777; font-size: 1.5rem; font-weight: 700; letter-spacing: .1em; line-height: 1.2; text-transform: uppercase; }
.av-sign.is-open strong { color: var(--sky); text-shadow: 0 0 14px var(--sky); box-shadow: 0 0 18px rgb(124 203 247 / .55), inset 0 0 12px rgb(124 203 247 / .35); animation: av-flick 1.1s steps(1) both; }
@keyframes av-flick { 0%, 18%, 34% { opacity: .15; } 10%, 26%, 44% { opacity: 1; } }
.av-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.av-btn { display: inline-block; background: var(--sky); color: var(--ink); padding: 14px 22px; font-weight: 500; text-decoration: none; }
.av-btn:hover { background: #fff; color: var(--ink); }

/* The three shop windows */
.av-windows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-block: clamp(24px, 3vw, 44px) clamp(56px, 7vw, 96px); }
.av-window img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.av-window h2 { margin: 16px 0 4px; font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.av-window h2 a { text-decoration: none; }
.av-window h2 a:hover { text-decoration: underline; }
.av-window-sign .wp-block-image { background: var(--ink); aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; }
.av-window-sign img { aspect-ratio: auto; width: 66%; height: auto; object-fit: contain; }

/* Shop details */
.av-band { background: var(--band); padding-block: clamp(56px, 7vw, 96px); }
.av-shops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px clamp(32px, 6vw, 96px); }
/* Subgrid lines the two hours tables and maps up, however long each shop's text runs. */
.av-shop { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 40px; scroll-margin-top: 16px; }
.av-map a { display: block; }
.av-map img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; }
.av-map a:hover img { outline: 3px solid var(--ink); outline-offset: 3px; }
.av-copy h2 { margin: 0 0 20px; }
.av-copy p { max-width: 36em; margin-bottom: 16px; }
.av-copy .av-contact { margin: 24px 0 0; }
.av-hours-wrap h3 { margin: 6px 0 6px; font-size: var(--wp--preset--font-size--large); font-weight: 600; letter-spacing: -.01em; }
.av-status { min-height: 1.55em; margin-bottom: 12px; color: #1F6B3A; font-weight: 500; }
.av-status.is-closed { color: #5A5A5A; }
.av-hours { margin: 0; }
.av-hours table { width: 100%; border-collapse: collapse; }
.av-hours td { border: 0; border-top: 1px solid #CFCFCA; padding: 9px 0; }
.av-hours td:last-child { text-align: right; }
.av-hours tr.is-today td { font-weight: 600; }

/* The food-label panels. Real labels are set in a heavy grotesque, not the site's font. */
.av-facts { background: var(--sky); padding-block: clamp(48px, 7vw, 104px); scroll-margin-top: 16px; overflow: clip; }
.av-labels { display: grid; grid-template-columns: repeat(2, minmax(0, 580px)); gap: clamp(24px, 4vw, 56px); justify-content: center; }
.av-label { display: flex; flex-direction: column; background: #fff; color: #000; border: 3px solid #000; padding: 10px 14px 14px; font-family: Helvetica, Arial, sans-serif; font-size: 1rem; line-height: 1.4; }
/* Stuck on by hand, and straightened as the label scrolls into view where the browser can do that. */
.av-label:nth-child(1) { rotate: -2.5deg; }
.av-label:nth-child(2) { rotate: 2deg; }
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.av-label { animation: av-settle linear both; animation-timeline: view(); animation-range: entry 5% cover 42%; }
		@keyframes av-settle { to { rotate: 0deg; } }
	}
}
.av-label-code { margin-top: auto; padding-top: 16px; }
.av-label-code img { display: block; height: 64px; width: auto; max-width: 100%; }
.av-label .av-label-title { margin: 0; font-family: inherit; font-size: clamp(2.5rem, 5.2vw, 4rem); font-weight: 900; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.av-label-serve { padding-block: 6px 8px; border-bottom: 14px solid #000; font-weight: 700; }
.av-label-big { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 2px 4px; border-bottom: 7px solid #000; font-size: 1.5rem; font-weight: 900; }
.av-label-big strong { font-size: clamp(2.75rem, 5vw, 3.5rem); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; }
.av-label-rows { margin: 0; border-bottom: 14px solid #000; }
.av-label-rows table { width: 100%; border-collapse: collapse; }
.av-label-rows td { border: 0; border-top: 1px solid #000; padding: 6px 0; vertical-align: top; }
.av-label-rows tr:first-child td { border-top: 0; }
.av-label-rows td:first-child { font-weight: 700; padding-right: 16px; }
.av-label-rows td:last-child { text-align: right; }
.av-label-rows tr:nth-child(2) td:first-child, .av-label-rows tr:nth-child(4) td:first-child { font-weight: 400; padding-left: 20px; }
.av-label-ingr { padding-top: 10px; }
.av-label-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid #000; }

/* Footer */
.av-foot { background: var(--ink); color: #fff; padding-block: clamp(40px, 5vw, 64px) 24px; }
.av-foot a:hover { color: #fff; }
.av-foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.av-foot img { height: 40px; width: auto; display: block; margin-bottom: 14px; }
.av-foot h2 { margin: 0 0 8px; font-size: 1rem; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.av-foot-small { margin-top: 40px; font-size: 14px; color: #D2D2D2; }
.av-foot-small p { margin-bottom: 6px; max-width: 70em; }

/* Plain pages */
.av-page { padding-block: 40px 96px; max-width: 60rem; margin-inline: auto; padding-inline: var(--m); }
.av-page p { margin: 0 0 16px; }
.av-page h1 { margin: 0 0 28px; }

/* Age check */
.av-age-ok .av-gate { display: none; }
.av-gate { position: fixed; inset: 0; z-index: 100000; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: 16px; box-sizing: border-box; background: var(--ink); display: flex; align-items: center; justify-content: center; overflow-y: auto; color: var(--ink); }
.av-gate::backdrop { background: var(--ink); }
.av-gate-card { width: 100%; max-width: 440px; background: #fff; padding: 32px; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; }
.av-gate-card img { height: 34px; width: auto; align-self: flex-start; margin-bottom: 6px; }
.av-gate-card h2 { margin: 0; font-size: 1.625rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.av-gate-card fieldset { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 10px; }
.av-gate-card legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.av-gate-card label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.av-gate-card input { height: 46px; width: 100%; box-sizing: border-box; border: 1px solid #6E6E6E; border-radius: 0; padding: 0 10px; font: inherit; }
.av-gate-card button { min-height: 48px; border: 0; background: var(--ink); color: #fff; font: inherit; font-weight: 500; cursor: pointer; }
.av-gate-card button:hover { background: #3A3A3A; }
.av-gate-error { font-weight: 600; color: #A61B13; }
.av-gate-note { font-size: 14px; }

/* Too narrow for the disc beside the words: it moves to the hero's bottom corner. */
@media (max-width: 1180px) {
	.av-hero { background-position: right -16vw bottom -18vw; background-size: 72vw auto; }
	.av-intro { padding-bottom: 50vw; }
	.av-intro h1 { max-width: none; }
}
@media (max-width: 900px) {
	.av-shops, .av-foot-grid, .av-labels { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	.av-sign.is-open strong { animation: none; }
}
@media (max-width: 640px) {
	.av-windows { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.av-window-sign { order: -1; }
	.av-window img, .av-window-sign .wp-block-image { aspect-ratio: 4 / 3; }
	.av-window-sign img { aspect-ratio: auto; width: 60%; }
	/* A whole map would shrink its text past reading size: show the middle of it, where the shop and labels are. */
	.av-map img { aspect-ratio: 1 / 1; object-fit: cover; }
	.av-label .av-label-title { font-size: clamp(1.75rem, 9.5vw, 2.75rem); }
}
