/* Tacos Rodriguez: shared design system. Page stylesheets build on these pieces; nothing here is page-specific. */

/* TOKENS: palette, type scale, spacing and timing; use the custom properties, never raw values */
:root {
  --sky: #D4ECFA;
  --ink: #14182B;
  --hot: #BE005F;
  --paper: var(--sky);      /* fill of the ticket you are inside */
  --behind: var(--sky);     /* colour that shows through a notch (the ground behind the ticket) */
  --perf: var(--ink);       /* perforation colour; hover, focus and .is-on turn it magenta */
  --link-hover: var(--hot);
  --display: 'Instrument Serif', 'Iowan Old Style', 'Times New Roman', serif;
  --text: 'Zilla Slab', Rockwell, 'Roboto Slab', Georgia, serif;
  --fs-h1: clamp(2.375rem, 1.6rem + 3.2vw, 3.375rem);   /* 38 to 54 */
  --fs-h2: clamp(1.8125rem, 1.45rem + 1.6vw, 2.625rem); /* 29 to 42 */
  --fs-h3: 1.375rem;
  --fs-body: 1.125rem;
  --fs-small: .9375rem;
  --line: .125rem;
  --notch: 1.25rem;
  --seam: .75rem;           /* the 12px grid-seam break of the stop ticket */
  --gap: clamp(1rem, 2.2vw, 1.75rem);
  --pad: clamp(1rem, 2.4vw, 1.5rem);
  --fast: 180ms;
  --slow: 220ms;
  --ease: cubic-bezier(.3, .7, .2, 1);
  --nav-space: 4.75rem;     /* room reserved under the floating capsule */
  --promo-h: 0rem;          /* height of the offer band; set by site.js while it shows */
}
@media (min-width: 48rem) { :root { --nav-space: 5.5rem; } }

/* BASE: sky ground, ink Zilla Slab text. Zilla ships at 400 only, so weight 600 is synthesised. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--nav-space) + .75rem); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sky); color: var(--ink); font: 400 var(--fs-body)/1.5 var(--text); overflow-wrap: break-word; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
main { display: block; padding-top: var(--nav-space); min-height: 60vh; }
p { margin: 0 0 1em; }
:focus-visible { outline: .1875rem solid var(--ink); outline-offset: .1875rem; }
.on-hot :focus-visible { outline-color: var(--sky); }

/* HEADLINES: h1, h2 or .hl are Instrument Serif, sentence case; wrap exactly ONE word in .hot (single-word labels: the whole label) */
h1, h2, .hl { font: 400 var(--fs-h2)/1.1 var(--display); letter-spacing: normal; margin: 0 0 .5em; text-wrap: balance; }
h1, .hl--1 { font-size: var(--fs-h1); }
.hot { color: var(--hot); }
/* on magenta, ink fails contrast: headline stays sky and the one word is marked by a dotted underline */
.on-hot .hot { color: inherit; text-decoration: underline dotted; text-decoration-thickness: var(--line); text-underline-offset: .16em; }

/* PRODUCT NAMES and utility labels: h3 or .name in Zilla Slab semibold; .small for notes */
h3, .name { font: 600 var(--fs-h3)/1.2 var(--text); margin: 0 0 .4em; }
.small { font-size: var(--fs-small); }
.lede { font-size: 1.25rem; line-height: 1.4; max-width: 34rem; }

/* LINKS: text links carry a magenta underline; .linkbtn makes a <button> read as a link */
a { color: inherit; text-decoration: underline; text-decoration-color: var(--hot); text-decoration-thickness: var(--line); text-underline-offset: .18em; transition: color var(--fast); }
a:hover { color: var(--link-hover); }
.on-hot { --link-hover: var(--sky); color: var(--sky); }
.on-hot a { text-decoration-color: currentColor; }
.on-hot a:hover { text-decoration-thickness: .1875rem; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--hot); text-decoration-thickness: var(--line); text-underline-offset: .18em; }
.linkbtn:hover { color: var(--hot); }

/* ARROW: <span class="arrow" aria-hidden="true">&rarr;</span> inside any link or button; advances 4px on hover or focus */
.arrow { display: inline-block; transition: transform var(--fast) var(--ease); }
a:hover .arrow, a:focus-visible .arrow, button:hover .arrow, button:focus-visible .arrow { transform: translateX(.25rem); }

/* BUTTONS: .btn square-cornered; .btn--hot magenta; .btn--block full width; inside .on-hot it turns sky automatically */
.btn { display: inline-flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 2.75rem; padding: .5rem 1rem; border: var(--line) solid var(--ink); border-radius: 0; background: var(--sky); color: var(--ink); font: 600 1.0625rem/1.2 var(--text); text-align: left; text-decoration: none; cursor: pointer; transition: border-color var(--fast), color var(--fast); }
.btn:hover, .btn:focus-visible { color: var(--ink); border-color: var(--hot); }
.btn--hot { background: var(--hot); border-color: var(--hot); color: var(--sky); }
.btn--hot:hover, .btn--hot:focus-visible { color: var(--sky); border-color: var(--ink); }
.btn--block { display: flex; width: 100%; }
.on-hot .btn { background: var(--sky); border-color: var(--sky); color: var(--ink); }
.on-hot .btn:hover, .on-hot .btn:focus-visible { border-color: var(--ink); color: var(--ink); }

/* BOARD: .wrap centres the page; .board is the eight-column grid; children take .span-2 … .span-8 (one column on phones) */
.wrap { width: min(100% - 2rem, 76rem); margin-inline: auto; }
.board { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
@media (min-width: 56rem) {
  .board { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; }
}

/* PAGE OPENING: .opening holds the h1 (one .hot word) and a .lede sentence; it already clears the capsule */
.opening { padding-block: clamp(.5rem, 2vw, 1.5rem) var(--gap); }
.opening h1 { max-width: 18ch; }
.opening .lede { margin-bottom: 0; }

/* TICKET (the device): .ticket is a dashed, square-cornered stub; .ticket--link for an <a>; add .is-on to light its perforation */
.ticket { position: relative; display: block; background: var(--paper); border: var(--line) dashed var(--perf); padding: var(--pad); transition: border-color var(--fast); }
.ticket--link { color: inherit; text-decoration: none; }
.ticket--link:hover, .ticket--link:focus-visible { color: inherit; }
.ticket--link:hover, .ticket--link:focus-visible, .ticket.is-on, .is-on > .ticket { --perf: var(--hot); }

/* TICKET ROW: .ticket--row sets .ticket__body, a .tear.tear--v and a .stub side by side; stays horizontal on phones */
.ticket--row { display: flex; align-items: stretch; padding: 0; }
.ticket__body { flex: 1 1 0; min-width: 0; padding: var(--pad); }
.ticket--row > .stub { flex: 0 0 36%; aspect-ratio: auto; min-height: 6.5rem; }

/* STOP TICKET: .ticket--stop.on-hot is the magenta location ticket; put a .stamp inside for its solid inner border */
.ticket--stop { --paper: var(--hot); --perf: var(--ink); color: var(--sky); }
.ticket--stop.ticket--link:hover, .ticket--stop.ticket--link:focus-visible { --perf: var(--sky); color: var(--sky); }
.stamp { border: var(--line) solid currentColor; padding: var(--pad); }

/* TEAR LINE: <div class="tear" role="presentation"> inside a padded .ticket or .slip draws the perforation with paired notches */
.tear { position: relative; height: 0; overflow: visible; border: 0; border-top: var(--line) dashed var(--perf); margin: var(--pad) calc(var(--pad) * -1); transition: border-color var(--fast); }
.tear--dotted { border-top-style: dotted; }
.tear::before, .tear::after { content: ""; position: absolute; top: calc(var(--line) / 2 - var(--notch) / 2); width: var(--notch); height: var(--notch); border-radius: 50%; background: var(--behind); border: var(--line) solid transparent; border-top-color: var(--perf); border-right-color: var(--perf); transition: border-color var(--fast); }
.tear::before { left: calc(var(--notch) / -2 - var(--line) / 2); transform: rotate(45deg); }
.tear::after { right: calc(var(--notch) / -2 - var(--line) / 2); transform: rotate(225deg); }

/* VERTICAL TEAR: .tear.tear--v between the columns of a .ticket--row; notches bite the top and bottom edges */
.tear--v { flex: none; align-self: stretch; width: 0; height: auto; margin: 0; border-top: 0; border-left: var(--line) dashed var(--perf); }
.tear--v::before, .tear--v::after { left: calc(var(--notch) / -2 - var(--line) / 2); right: auto; }
.tear--v::before { top: calc(var(--notch) / -2 - var(--line) / 2); transform: rotate(135deg); }
.tear--v::after { top: auto; bottom: calc(var(--notch) / -2 - var(--line) / 2); transform: rotate(-45deg); }

/* PHOTO STUB: <figure class="stub"><img></figure> crops a photo with one semicircular bite on its left edge; .stub--bite-right, --bite-top, --bite-bottom move it; set --ratio */
.stub { position: relative; margin: 0; overflow: hidden; aspect-ratio: var(--ratio, 4 / 3); background: var(--ink); }
.stub img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stub::after { content: ""; position: absolute; left: calc(var(--notch) / -2); top: calc(50% - var(--notch) / 2); width: var(--notch); height: var(--notch); border-radius: 50%; background: var(--paper); }
.stub--bite-right::after { left: auto; right: calc(var(--notch) / -2); }
.stub--bite-top::after { left: calc(50% - var(--notch) / 2); top: calc(var(--notch) / -2); }
.stub--bite-bottom::after { left: calc(50% - var(--notch) / 2); top: auto; bottom: calc(var(--notch) / -2); }

/* PRICE LEADER: <p class="leader"><span>Name</span><span class="leader__dots" aria-hidden="true"></span><span class="price">$0.00</span></p> */
.leader { display: flex; align-items: baseline; gap: .5rem; margin: 0; }
.leader__dots { flex: 1 1 1.5rem; min-width: 1.5rem; border-bottom: var(--line) dotted currentColor; transform: translateY(-.25em); }
.price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* SPEC LIST: <dl class="specs"> with <div><dt><dd></div> rows divided by dotted lines */
.specs { margin: 0; }
.specs > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .6rem; border-bottom: var(--line) dotted var(--ink); }
.specs dt { font-weight: 600; flex: 0 0 38%; }
.specs dd { margin: 0; text-align: right; }

/* RECEIPT SLIP: .slip is a narrow dashed slip ending in a notched paper edge (about and footer); .tear works inside it */
.slip { position: relative; width: min(100%, 22rem); background: var(--paper); border: var(--line) dashed var(--perf); border-bottom: 0; padding: var(--pad) var(--pad) 0; }
.slip::after { content: ""; display: block; height: .625rem; margin: var(--pad) calc(var(--pad) * -1 - var(--line)) 0;
  background: radial-gradient(circle at 50% 100%, var(--behind) 0 .32rem, var(--perf) .34rem .44rem, transparent .46rem) 50% 100% / 1.25rem .625rem repeat-x,
              linear-gradient(var(--perf), var(--perf)) 0 100% / 100% var(--line) no-repeat; }

/* MAGENTA BAND: .band.on-hot is a solid full-width band with one .band__line in Instrument Serif */
.band { background: var(--hot); color: var(--sky); padding: .9rem var(--pad); }
.band__line { font: 400 clamp(1.25rem, 1rem + 1vw, 1.75rem)/1.2 var(--display); margin: 0; }

/* FIGURE AND CAPTION: .figure with img (set --ratio) and a figcaption on a dotted line */
.figure { margin: 0; }
.figure img { width: 100%; aspect-ratio: var(--ratio, 4 / 3); object-fit: cover; }
.figure figcaption { font-size: var(--fs-small); margin-top: .5rem; padding-top: .5rem; border-top: var(--line) dotted var(--ink); }

/* RULE: <hr class="rule"> is a dotted ink division; .rule--dash makes it a perforation */
.rule { border: 0; border-top: var(--line) dotted var(--ink); margin: var(--gap) 0; }
.rule--dash { border-top-style: dashed; }

/* PROSE: .prose for long reading (legal pages, notes): narrow measure, quiet headings */
.prose { max-width: 40rem; }
.prose h2 { font-size: clamp(1.8125rem, 1.5rem + 1vw, 2.125rem); margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }

/* REVEAL: .reveal wipes in left to right once, 220ms, when scrolled to; for bands and decoration, never the first screen's text */
.js .reveal { clip-path: inset(-1rem 100% -1rem -1rem); }
.js .reveal.is-seen { clip-path: inset(-1rem); transition: clip-path var(--slow) linear; }

/* VISUALLY HIDDEN: .vh keeps text for screen readers only */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* SKIP LINK: .skip appears on focus above the capsule */
.skip { position: fixed; z-index: 60; left: .75rem; top: .75rem; padding: .75rem 1rem; background: var(--ink); color: var(--sky); text-decoration: none; transform: translateY(-300%); }
.skip:focus { transform: none; color: var(--sky); outline-color: var(--hot); }

/* NAVIGATION CAPSULE: .cap floats on its own sky ground (the only pill on the site); .cap__name wordmark, then the links */
.cap { position: fixed; z-index: 50; top: .75rem; left: .75rem; right: .75rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 .4rem; padding: .125rem .375rem .125rem .625rem; background: var(--sky); border: var(--line) solid var(--ink); border-radius: 2rem; }
.cap__name { display: flex; align-items: center; gap: .35rem; min-height: 2.75rem; color: var(--ink); font: 600 .8125rem/1 var(--text); text-decoration: none; }
.cap__name svg { flex: none; width: 1.05rem; height: 1.4rem; }
.cap__word span { display: block; }
.cap nav { min-width: 0; }
.cap ul { display: flex; list-style: none; margin: 0; padding: 0; }
.cap li a { display: flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding-inline: .3rem; color: var(--ink); font: 600 .875rem/1 var(--text); text-decoration: none; white-space: nowrap; }
.cap li a:hover { color: var(--hot); }
.cap li a[aria-current="page"] { color: var(--hot); text-decoration: underline dotted; text-decoration-thickness: var(--line); text-underline-offset: .3em; }
@media (min-width: 48rem) {
  .cap { left: auto; top: 1.25rem; right: 1.25rem; gap: .75rem; padding: .125rem .5rem .125rem 1rem; }
  .cap__name { font-size: 1.0625rem; }
  .cap__word span { display: inline; }
  .cap li a { font-size: 1rem; padding-inline: .65rem; }
}

/* FOOTER: .foot centres one .slip.slip--foot receipt in open sky; .foot__list stacks its links */
.foot { display: flex; justify-content: center; padding: clamp(3rem, 8vw, 6rem) 1rem calc(3rem + var(--promo-h)); }
.slip--foot { --pad: 1.25rem; width: min(100%, 18.75rem); text-align: center; font-size: var(--fs-small); }
.foot__name { font: 600 1.125rem/1.25 var(--text); margin: 0 0 .5rem; }
.foot__addr { font-style: normal; margin-bottom: .75rem; }
.foot__addr span { display: block; }
.foot__note { margin: 0 0 .5rem; }
.foot__list { list-style: none; margin: 0; padding: 0; }
.foot__list a, .foot__list button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.75rem; padding-inline: .5rem; font-weight: 600; }

/* CONSENT TICKET: #consent is a small sky ticket in the lower-left corner, above the offer band; two equal stacked .btn choices */
#consent { --pad: 1rem; position: fixed; z-index: 45; left: .75rem; bottom: calc(.75rem + var(--promo-h)); width: min(19rem, calc(100% - 1.5rem)); padding: var(--pad); background: var(--sky); border: var(--line) dashed var(--ink); font-size: var(--fs-small); line-height: 1.4; }
#consent p { margin: 0; }
.consent__choices { display: grid; gap: .5rem; }

/* OFFER BAND: #promo is a solid magenta band across the foot of the window; it wipes in from the left when the build adds .is-in */
#promo { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: .75rem; padding: .375rem .5rem .375rem 1rem; background: var(--hot); color: var(--sky); transform: translateX(-100%); opacity: 0; visibility: hidden; transition: transform var(--slow) linear, opacity var(--slow) linear, visibility 0s linear var(--slow); }
#promo.is-in { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
@starting-style { #promo.is-in { transform: translateX(-100%); opacity: 0; } }
.promo__line { flex: 1 1 0; min-width: 0; margin: 0; font: 400 clamp(1.125rem, 1rem + .7vw, 1.5rem)/1.2 var(--display); }
.promo__line a { display: inline-block; padding-block: .5rem; font: 600 var(--fs-small)/1.2 var(--text); white-space: nowrap; }
.promo__close { flex: none; width: 2.75rem; height: 2.75rem; border: var(--line) solid var(--sky); border-radius: 0; background: var(--hot); color: var(--sky); font: 400 1.5rem/1 var(--text); cursor: pointer; }
.promo__close:hover { border-style: dashed; }

/* REDUCED MOTION: every state shows immediately */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
  .js .reveal, .js .reveal.is-seen { clip-path: none; }
  #promo { transform: none; }
  a:hover .arrow, a:focus-visible .arrow, button:hover .arrow, button:focus-visible .arrow { transform: translateX(.25rem); }
}

/* 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; }
}
