/* Oscar Best Construction Inc: sample site. The page is the free roof inspection report. */

@font-face { font-family: "Archivo"; src: url("fonts/archivo-var.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo-italic-var.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: italic; font-display: swap; }
@font-face { font-family: "Grace"; src: url("fonts/covered-by-your-grace-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --ground: #0d0c0c;
  --sheet: #151313;
  --paper: #f3efe8;
  --ink-soft: #d9d3c8;
  --muted: #b3aca1;
  --rule: rgba(243, 239, 232, .26);
  --red: #e2231a;
  --red-hot: #c91c14;
  --red-ink: #ff4f42;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --hand: "Grace", "Bradley Hand", cursive;
  --gut: clamp(16px, 4vw, 48px);
  --pad: clamp(18px, 2.4vw, 36px);
  --head-h: 64px;
  --out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 20px); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(243, 239, 232, .1); scrollbar-color: var(--red) var(--ground); scrollbar-width: thin; }
body { margin: 0; background: var(--ground); color: var(--paper); font: 400 1.0625rem/1.55 var(--sans); font-stretch: 100%; caret-color: var(--red-ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--red); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: var(--red); border: 2px solid var(--ground); }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
p, h1, h2, h3, dl, dd, ol, ul, figure, fieldset { margin: 0; }
p, td, dd { text-wrap: pretty; }
.defs { position: absolute; }
.wrap { width: min(1320px, 100% - 2 * var(--gut)); margin-inline: auto; }

.skip { position: absolute; left: var(--gut); top: -80px; z-index: 50; padding: 12px 18px; background: var(--paper); color: var(--ground); font-weight: 700; text-decoration: none; }
.skip:focus { top: 10px; }

/* Lettering */
h1, h2, .foot__name, .bigcall, .brand__name {
  font-family: var(--sans); font-style: italic; font-weight: 900; font-stretch: 125%;
  text-transform: uppercase; line-height: .94; letter-spacing: -.012em; text-wrap: balance;
}
h2 { font-size: clamp(1.85rem, 4.1vw, 3.5rem); max-width: 17ch; margin-bottom: clamp(28px, 4vw, 56px); }
dt, .found thead th, .field label, .field__label {
  font-size: .75rem; font-weight: 600; font-stretch: 80%; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); line-height: 1.3;
}

.w { display: inline-block; clip-path: inset(-.3em -.3em 0 -.3em); }
.w > span { display: inline-block; }

/* Buttons: slanted plates, like the lettering */
.btn {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 54px; padding: 0 30px; border: 0; background: none; color: var(--paper); cursor: pointer;
  font: italic 800 1rem/1 var(--sans); font-stretch: 125%; text-transform: uppercase; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: transform .18s var(--out);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: skewX(-11deg); border: 2px solid var(--paper); transition: background-color .18s, border-color .18s; }
.btn--go { color: #fff; }
.btn--go::before { background: var(--red); border-color: var(--red); }
.btn--go:hover::before { background: var(--red-hot); border-color: var(--red-hot); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--line:hover, .btn--call:hover { color: var(--ground); }
.btn--line:hover::before, .btn--call:hover::before { background: var(--paper); border-color: var(--paper); }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: var(--ground); border-bottom: 1px solid var(--rule); }
.top__in { display: flex; align-items: center; gap: 32px; height: var(--head-h); }
.brand { display: grid; grid-template-columns: auto auto; column-gap: 12px; align-content: center; align-items: center; min-height: 44px; text-decoration: none; margin-right: auto; }
.brand__roof { grid-row: span 2; width: 44px; max-width: none; height: 22px; fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.brand__name { font-size: 1.25rem; line-height: 1; white-space: nowrap; }
.brand__sub { white-space: nowrap; font-size: .6875rem; font-weight: 600; font-stretch: 80%; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); line-height: 1.2; }
.menu { display: flex; gap: 30px; }
.menu a { position: relative; display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; font-weight: 600; text-decoration: none; }
.menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--out); }
.menu a:hover::after, .menu a:focus-visible::after { transform: scaleX(1); }
.lang { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: .9375rem; font-weight: 700; text-decoration: underline 2px; text-underline-offset: .32em; }
.lang__short { display: none; }
.btn--call { min-height: 44px; padding: 0 20px; font-size: .9375rem; font-variant-numeric: tabular-nums; }

/* The report sheet */
.sheet { padding: clamp(14px, 2.2vw, 28px) 0 clamp(56px, 8vw, 112px); }
.form {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "title title" "head head" "left right";
  background: var(--sheet); border: 1px solid var(--rule);
}
.form__title { grid-area: title; padding: clamp(18px, 2.6vw, 34px) var(--pad) clamp(14px, 2vw, 26px); font-size: min(6rem, 5.55vw); white-space: nowrap; }
:lang(es) .form__title { font-size: min(4.75rem, 4.3vw); }
.form__title .w > span { animation: rise .9s var(--out) backwards; }
.form__title .w:nth-child(2) > span { animation-delay: .07s; }
.form__title .w:nth-child(3) > span { animation-delay: .14s; }
.form__title .w:nth-child(4) > span { animation-delay: .21s; }
.form__head > div { animation: settle .7s var(--out) backwards; }
.form__head > div:nth-child(1) { animation-delay: .3s; }
.form__head > div:nth-child(2) { animation-delay: .36s; }
.form__head > div:nth-child(3) { animation-delay: .42s; }
.form__head > div:nth-child(4) { animation-delay: .48s; }
@keyframes rise { from { translate: 0 110%; } }
@keyframes settle { from { opacity: 0; translate: 0 8px; } }
.form__head { grid-area: head; display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--rule); }
.form__head > div { padding: 11px var(--pad) 12px; }
.form__head > div + div { border-left: 1px solid var(--rule); }
.form__head dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.form__left { grid-area: left; display: flex; flex-direction: column; gap: clamp(22px, 2.4vw, 32px); padding: var(--pad); border-right: 1px solid var(--rule); }
.form__right {
  grid-area: right; position: relative; overflow: hidden; display: grid; align-items: center; padding: 6px 10px; background: var(--ground);
}
.form__right::after { content: ""; position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.lead { font-size: 1.125rem; line-height: 1.5; max-width: 44ch; }

.ticks { border: 0; padding: 0; min-width: 0; }
.ticks legend { padding: 0 0 12px; font-size: 1.1875rem; font-weight: 800; line-height: 1.25; }
.tick { position: relative; display: grid; grid-template-columns: 30px 1fr 28px; align-items: center; gap: 16px; min-height: 56px; padding: 10px 0; border-top: 1px solid var(--rule); cursor: pointer; }
.tick:last-child { border-bottom: 1px solid var(--rule); }
.tick input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.tick__box { width: 30px; height: 30px; border: 2px solid var(--paper); transition: border-color .2s; }
.tick__box svg { width: 100%; height: 100%; overflow: visible; }
.tick__box path { fill: none; stroke: var(--red-ink); stroke-width: 3.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset .22s var(--out), opacity .1s; }
.tick__box path + path { transition-delay: .12s; }
.tick input:checked ~ .tick__box path { stroke-dashoffset: 0; opacity: 1; }
.tick input:focus-visible ~ .tick__box { outline: 2px solid var(--paper); outline-offset: 4px; }
.tick__text { font-weight: 500; }
.tick__key { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--rule); font-size: .8125rem; font-weight: 800; color: var(--muted); transition: background-color .25s, border-color .25s, color .25s; }
.tick input:checked ~ .tick__key { background: var(--red); border-color: var(--red); color: #fff; }
@media (hover: hover) { .tick:hover .tick__box { border-color: var(--red-ink); } }

.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: auto; }
.call { display: inline-flex; align-items: center; gap: .35em; min-height: 44px; text-decoration: none; color: var(--ink-soft); }
.call__nojs, html:not(.js) .call__js, html:not(.js) [data-request] { display: none; }
html:not(.js) .call__nojs { display: inline; }
.call strong { font-style: italic; font-weight: 800; font-stretch: 125%; color: var(--paper); white-space: nowrap; font-variant-numeric: tabular-nums; text-decoration: underline 2px var(--red); text-underline-offset: .28em; }

/* The sketch */
.sketch { width: 100%; height: auto; }
.sketch .ln, .sketch .ln-thin, .sketch .ln-hair, .sketch .roof, .sketch .solid, .sketch .open { fill: none; stroke: var(--paper); stroke-linecap: round; stroke-linejoin: round; }
.sketch .ln { stroke-width: 2.2; }
.sketch .ln-thin { stroke-width: 1.1; opacity: .7; }
.sketch .ln-hair { stroke-width: .8; opacity: .45; }
.sketch .roof, .sketch .solid, .sketch .open, .sketch .wall { fill: var(--sheet); }
.sketch .roof { stroke-width: 2.2; }
.sketch .solid { stroke-width: 2; }
.sketch .open { stroke-width: 1.6; }
.sketch .dot { fill: var(--paper); }
.rain { opacity: .5; }
.rain path { fill: none; stroke: var(--paper); stroke-width: 1; opacity: .3; }
.rain__layer--2 path { opacity: .16; }
.bolt { fill: #fff; fill-opacity: .92; stroke: var(--paper); stroke-width: 1.4; stroke-linejoin: round; }

.mark { --show: max(var(--on, 0), var(--peek, 0)); }
.ink { fill: none; stroke: var(--red); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--show)); opacity: max(var(--on, 0), calc(var(--peek, 0) * .5)); transition: stroke-dashoffset .6s var(--out), opacity .15s, fill-opacity .3s .35s; }
.ink--thin { stroke-width: 1.8; }
.ink--heavy { stroke-width: 5; }
.ink--fill { fill: var(--red); fill-opacity: calc(var(--on, 0) * .38); }
.mark path:nth-of-type(3) { transition-delay: .14s, 0s, .4s; }
.mark path:nth-of-type(4) { transition-delay: .26s, 0s, .4s; }
.mark path:nth-of-type(5) { transition-delay: .34s, 0s, .4s; }
.mark path:nth-of-type(6) { transition-delay: .42s, 0s, .4s; }
.leader { fill: none; stroke: var(--red-ink); stroke-width: 1.3; stroke-dasharray: 2 6; stroke-linecap: round; opacity: calc(var(--on, 0) * .95); transition: opacity .35s .35s; }
.tag, .pin circle { fill: var(--red); transform-box: fill-box; transform-origin: center; transform: scale(var(--on, 0)); transition: transform .4s var(--out) .3s; }
.tag__t { fill: #fff; font: 800 15px var(--sans); opacity: var(--on, 0); transition: opacity .2s .4s; }
.note { fill: var(--red-ink); font: 400 32px var(--hand); opacity: var(--on, 0); transition: opacity .35s .5s; }
.pin { display: none; }
.form.is-struck [data-mark="a"] { --struck: 1; }
[data-mark="a"] .ink--ring { stroke-dashoffset: calc(1 - max(var(--show), var(--struck, 0))); opacity: max(var(--on, 0), var(--struck, 0), calc(var(--peek, 0) * .5)); }
[data-mark="a"] .leader { opacity: calc(max(var(--on, 0), var(--struck, 0)) * .95); }
.note--hit { opacity: calc(var(--struck, 0) * (1 - var(--on, 0))); }
.form:has([data-tick="a"]:checked) .note--hit { transition: opacity .15s; }

.form:has([data-tick="a"]:checked) [data-mark="a"],
.form:has([data-tick="b"]:checked) [data-mark="b"],
.form:has([data-tick="c"]:checked) [data-mark="c"],
.form:has([data-tick="d"]:checked) [data-mark="d"] { --on: 1; }
@media (hover: hover) {
  .form:has(.tick:hover > [data-tick="a"]) [data-mark="a"],
  .form:has(.tick:hover > [data-tick="b"]) [data-mark="b"],
  .form:has(.tick:hover > [data-tick="c"]) [data-mark="c"],
  .form:has(.tick:hover > [data-tick="d"]) [data-mark="d"] { --peek: 1; }
}

/* The storm: runs once when the sketch comes into view */
.js .rain, .js .bolt { opacity: 0; }
.js .is-live .rain { animation: rain-life 7s linear forwards; }
.js .is-live .rain__layer--1 { animation: rain-fall .95s linear 7; }
.js .is-live .rain__layer--2 { animation: rain-fall 1.5s linear 5; }
.js .is-live .bolt { animation: strike 1s .8s steps(1, end) forwards; }
.js .is-struck .bolt { opacity: 1; }
.js .is-live .form__right::after { animation: flash 1s .8s steps(1, end); }
@keyframes rain-fall { from { transform: translate(54px, -180px); } to { transform: translate(-126px, 420px); } }
@keyframes rain-life { 0% { opacity: 0; } 8% { opacity: 1; } 72% { opacity: 1; } 100% { opacity: .42; } }
@keyframes strike {
  0% { opacity: 1; fill-opacity: 1; }
  10% { opacity: 0; fill-opacity: 1; }
  18% { opacity: 1; fill-opacity: 1; }
  52% { opacity: .5; fill-opacity: 1; }
  64% { opacity: 1; fill-opacity: .5; }
  100% { opacity: 1; fill-opacity: .92; }
}
@keyframes flash { 0% { opacity: .14; } 10% { opacity: 0; } 18% { opacity: .08; } 34% { opacity: 0; } 100% { opacity: 0; } }

/* The service tape: the five lines printed on the flyer */
.tape { overflow: clip; border-top: 1px solid var(--rule); padding: clamp(16px, 2.2vw, 26px) 0 clamp(40px, 6vw, 84px); }
.tape__run { display: flex; align-items: center; width: max-content; animation: tape 70s linear infinite; }
.tape span { padding-inline: clamp(18px, 2.6vw, 40px); font: italic 900 clamp(1.5rem, 4.2vw, 3.25rem)/1 var(--sans); font-stretch: 125%; text-transform: uppercase; white-space: nowrap; color: var(--ground); -webkit-text-stroke: 1.5px var(--paper); }
.tape i { flex: none; width: clamp(8px, 1vw, 13px); height: clamp(1.5rem, 4.2vw, 3.25rem); background: var(--paper); transform: skewX(-11deg); }
@keyframes tape { to { translate: -50% 0; } }

/* Sections: each one opens under the red ridge line */
.part { padding: 0 0 clamp(64px, 9vw, 128px); }
[id] { scroll-margin-top: calc(var(--head-h) + 20px); }
.ridge { display: grid; grid-template-columns: minmax(var(--gut), 1fr) minmax(0, 1320px) minmax(var(--gut), 1fr); align-items: end; margin-bottom: clamp(40px, 6vw, 88px); }
.ridge i { display: block; height: 3px; background: var(--red); transform-origin: left; }
.ridge__mid { display: flex; align-items: flex-end; min-width: 0; }
.ridge__mid i { flex: 1; }
.ridge svg { flex: none; width: 104px; max-width: none; height: 26px; overflow: visible; }
.ridge path { fill: none; stroke: var(--red); stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .35s linear .2s; }
.ridge__a { transition: scale .2s linear; }
.ridge__mid i { transition: scale .6s var(--out) .55s; }
.ridge__c { transition: scale .3s var(--out) .95s; }
.js .ridge:not(.is-in) i { scale: 0 1; }
.js .ridge:not(.is-in) path { stroke-dashoffset: 1; }

.found { width: 100%; border-collapse: collapse; }
.found thead th { text-align: left; padding: 0 0 12px; border-bottom: 2px solid var(--paper); }
.found tbody th { text-align: left; vertical-align: top; white-space: nowrap; padding: 24px 48px 24px 0; font-size: 1.25rem; font-style: italic; font-weight: 800; font-stretch: 125%; text-transform: uppercase; line-height: 1.15; }
.found tbody td { vertical-align: top; padding: 24px 0; color: var(--ink-soft); }
.found tbody tr { border-bottom: 1px solid var(--rule); }
.found .found__key { width: 1%; padding-left: 32px; text-align: right; white-space: nowrap; }
.key { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 15px; background: var(--red); color: #fff; font-size: .8125rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.key--all { padding: 0 12px; }
.found tbody :is(th, td) { transition: opacity .5s var(--out) calc(var(--r, 0) * 70ms), translate .7s var(--out) calc(var(--r, 0) * 70ms); }
.found tbody tr:nth-child(2) { --r: 1; } .found tbody tr:nth-child(3) { --r: 2; } .found tbody tr:nth-child(4) { --r: 3; } .found tbody tr:nth-child(5) { --r: 4; }
.js .found:not(.is-in) tbody :is(th, td) { opacity: 0; translate: 0 14px; }

.strip { margin-top: clamp(36px, 5vw, 72px); border: 1px solid var(--rule); background: var(--sheet); }
.photos { list-style: none; padding: 0; display: grid; grid-template-columns: 5fr 4fr 5fr; }
.photos li { padding: 8px; }
.photos li + li { border-left: 1px solid var(--rule); }
.photos img { width: 100%; height: 100%; object-fit: cover; clip-path: inset(0); filter: grayscale(1) contrast(1.18) brightness(.96); transition: filter .5s var(--out), clip-path 1s var(--out) calc(var(--p, 0) * .14s); }
.photos li:nth-child(2) { --p: 1; } .photos li:nth-child(3) { --p: 2; }
.js .strip:not(.is-in) img { clip-path: inset(0 100% 0 0); }
@media (hover: hover) { .photos li:hover img { filter: none; } }
.strip figcaption { padding: 10px var(--pad) 11px; border-top: 1px solid var(--rule); font-size: .8125rem; color: var(--muted); }

.claim { overflow: clip; list-style: none; padding: 0; border-top: 2px solid var(--paper); }
.claim li { display: grid; grid-template-columns: minmax(0, 21rem) minmax(0, 1fr) auto; align-items: center; gap: 10px clamp(20px, 4vw, 56px); min-height: 104px; padding: 22px 18px 22px 0; border-bottom: 1px solid var(--rule); }
.claim h3 { font-size: 1.25rem; font-style: italic; font-weight: 800; font-stretch: 125%; text-transform: uppercase; line-height: 1.15; }
.claim p { color: var(--ink-soft); max-width: 50ch; }
.stamp {
  position: relative; justify-self: end; padding: 10px 17px 9px; color: var(--red-ink);
  font: italic 900 1rem/1 var(--sans); font-stretch: 125%; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
  rotate: var(--tilt, -5deg); transition: scale .22s var(--out), opacity .06s; transition-delay: calc(var(--n, 0) * .2s + .25s);
}
.stamp::before { content: ""; position: absolute; inset: 0; border: 3px solid var(--red-ink); filter: url(#ink-rough); }
.claim li:nth-child(2) { --n: 1; } .claim li:nth-child(3) { --n: 2; } .claim li:nth-child(4) { --n: 3; }
.claim li:nth-child(2) .stamp { --tilt: 3deg; }
.claim li:nth-child(3) .stamp { --tilt: -3deg; }
.claim li:nth-child(4) .stamp { --tilt: 5deg; }
.js .claim:not(.is-in) .stamp { opacity: 0; scale: 1.9; }

.record { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.mascot { position: relative; justify-self: center; width: min(100%, 370px); border-bottom: 2px solid var(--paper); }
.mascot__clip { display: block; width: 100%; height: auto; mix-blend-mode: lighten; transition: opacity .5s var(--out), translate .9s var(--out); }
.js .mascot:not(.is-in) .mascot__clip { opacity: 0; translate: 0 5%; }
.seal { position: absolute; right: -34%; bottom: 7%; width: 50%; rotate: -11deg; overflow: visible; transition: scale .25s var(--out) .6s, opacity .08s .6s; }
.js .mascot:not(.is-in) .seal { opacity: 0; scale: 1.7; }
.seal__rings { filter: url(#ink-rough); }
.seal circle { fill: none; stroke: var(--red-ink); stroke-width: 3; }
.seal circle:nth-of-type(2), .seal circle:nth-of-type(3) { stroke-width: 1.5; }
.seal text { fill: var(--red-ink); font-family: var(--sans); text-transform: uppercase; }
.seal__ring { font-size: 13px; font-weight: 700; }
.seal__big { font-size: 50px; font-weight: 900; font-style: italic; font-stretch: 125%; }
.seal__small { font-size: 15px; font-weight: 800; font-stretch: 125%; letter-spacing: .08em; }
.record h2 { margin-bottom: clamp(22px, 3vw, 40px); }
.facts { border-top: 2px solid var(--paper); }
.facts > div { display: grid; grid-template-columns: minmax(0, 15.5rem) 1fr; gap: 6px 20px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--rule); transition: opacity .5s var(--out) calc(var(--f, 0) * 50ms), translate .6s var(--out) calc(var(--f, 0) * 50ms); }
.facts > div:nth-child(2) { --f: 1; } .facts > div:nth-child(3) { --f: 2; } .facts > div:nth-child(4) { --f: 3; } .facts > div:nth-child(5) { --f: 4; } .facts > div:nth-child(6) { --f: 5; } .facts > div:nth-child(7) { --f: 6; } .facts > div:nth-child(8) { --f: 7; }
.js .facts:not(.is-in) > div { opacity: 0; translate: 0 12px; }
.facts dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.record__note { margin-top: 18px; color: var(--muted); font-size: .9375rem; max-width: 52ch; }

/* Clips are scenery: never show player controls (Chrome adds them when scripts are off) */
video::-webkit-media-controls { display: none !important; }

/* The close: last night's sky behind the number */
.part--close { position: relative; isolation: isolate; overflow: clip; }
.sky {
  position: absolute; inset: 0 0 auto 0; z-index: -1; width: 100%; height: min(100%, 620px); object-fit: cover; pointer-events: none;
  filter: brightness(1.45) contrast(1.06);
  -webkit-mask-image: linear-gradient(to bottom, #000 25%, transparent 96%); mask-image: linear-gradient(to bottom, #000 25%, transparent 96%);
}
.part--close h2 { margin-bottom: clamp(14px, 2vw, 24px); }
.bigcall { display: inline-block; font-size: clamp(1.75rem, 9.6vw, 6rem); line-height: 1; text-decoration: none; font-variant-numeric: tabular-nums; transition: transform .3s var(--out); }
.bigcall b { font-weight: inherit; color: var(--red-ink); }
.ring { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 28px; margin-bottom: clamp(32px, 5vw, 64px); }
.ring .w > span { transition: translate .9s var(--out) calc(var(--w, 0) * 90ms); }
.ring .w:nth-child(2) { --w: 1; } .ring .w:nth-child(3) { --w: 2; }
.js .ring:not(.is-in) .w > span { translate: 0 112%; }
.ring__note { display: flex; align-items: center; gap: 10px; font: 400 1.875rem/1 var(--hand); color: var(--red-ink); transform: rotate(-4deg); }
.ring__note svg { width: 76px; height: 40px; fill: none; stroke: var(--red-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ring__note path { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .45s var(--out) .8s; }
.ring__note path + path { transition-delay: 1.15s; }
.ring__note > span { transition: opacity .4s .7s; }
.js .ring:not(.is-in) .ring__note path { stroke-dashoffset: 1; }
.js .ring:not(.is-in) .ring__note > span { opacity: 0; }
@media (hover: hover) { .bigcall:hover { transform: translateX(8px); } }

.ask { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); border: 1px solid var(--rule); background: var(--sheet); }
.ask[hidden] { display: none; }
.field { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px var(--pad) 10px; border-bottom: 1px solid var(--rule); }
.field + .field:not(.field--seen) { border-left: 1px solid var(--rule); }
.field--seen, .ask__send { grid-column: 1 / -1; }
.field:focus-within { outline: 2px solid var(--paper); outline-offset: -2px; }
.field:has([aria-invalid="true"])::after { content: ""; position: absolute; inset: 5px; border: 2px solid var(--red-ink); pointer-events: none; }
.field input { width: 100%; min-height: 44px; padding: 4px 0; border: 0; border-radius: 0; background: transparent; color: var(--paper); font: 500 1.1875rem/1.3 var(--sans); outline: none; }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--paper); box-shadow: 0 0 0 100px var(--sheet) inset; caret-color: var(--red-ink); }
.field__err { color: var(--red-ink); font-size: .9375rem; padding-bottom: 4px; }
.seen { padding: 4px 0 2px; color: var(--muted); }
.seen.is-marked { font: 400 1.75rem/1.2 var(--hand); color: var(--red-ink); }
.ask__send { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: var(--pad); }
.ask__how, .ask__sent { flex: 1 1 280px; font-size: .9375rem; color: var(--muted); max-width: 48ch; }
.ask__sent { flex-basis: 100%; color: var(--paper); font-weight: 600; }
.ask__sent:empty { display: none; }

.foot { border-top: 1px solid var(--rule); padding: 40px 0 48px; color: var(--ink-soft); font-size: .9375rem; }
.foot a { display: inline-block; padding-block: 12px; }
.foot__in { display: grid; gap: 8px; }
.foot__in p:has(> a) + p:has(> a) { margin-top: -14px; }
.foot__name { font-size: 1.25rem; color: var(--paper); margin-bottom: 4px; }
.foot__note { color: var(--muted); margin-top: 14px; }

.dock { display: none; }

/* A laptop window: keep the whole report and its red button above the fold */
@media (min-width: 901px) and (max-height: 860px) {
  .form__title { font-size: min(6rem, 5.55vw, 11vh); padding-block: 14px 10px; }
  :lang(es) .form__title { font-size: min(4.75rem, 4.3vw, 8.6vh); }
  .form__left { gap: 16px; }
  .lead { font-size: 1.0625rem; }
  .tick { min-height: 46px; padding: 6px 0; }
  .sketch { max-height: calc(100svh - 292px); }
}

/* Narrower sheets */
/* The hand note drops under the number once it no longer fits beside it: its arrow turns up to keep pointing at it */
@media (max-width: 1279px) {
  .ring { flex-flow: column nowrap; align-items: flex-start; }
  .ring__note svg { transform: rotate(58deg); }
}
@media (max-width: 1399px) {
  :lang(es) .ring { flex-flow: column nowrap; align-items: flex-start; }
  :lang(es) .ring__note svg { transform: rotate(58deg); }
}
@media (max-width: 1100px) {
  .menu { display: none; }
  .claim li { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) auto; }
}
@media (max-width: 900px) {
  :root { --head-h: 56px; }
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  /* The sketch stays pinned under the header while the checklist scrolls, so every tick is seen landing on the house. */
  .form { display: flex; flex-direction: column; }
  .form__title { order: 1; font-size: clamp(2rem, 9.7vw, 5rem); white-space: normal; }
  :lang(es) .form__title { font-size: clamp(1.75rem, 8.4vw, 4.5rem); }
  .form__right { order: 2; position: sticky; top: var(--head-h); z-index: 2; border-block: 1px solid var(--rule); }
  .form__head { order: 3; grid-template-columns: 1fr 1fr; border-top: 0; }
  .form__left { order: 4; border-right: 0; }
  .form__head > div:nth-child(3) { border-left: 0; }
  .form__head > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .sketch { max-height: 42svh; }
  .acts .btn { flex: 1 1 100%; }
  .found thead { display: none; }
  .found { border-top: 2px solid var(--paper); }
  .found tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 14px; padding: 18px 0; }
  .found tbody th { grid-column: 1; padding: 0; white-space: normal; font-size: 1.125rem; }
  .found tbody td { grid-column: 1 / -1; grid-row: 2; padding: 0; }
  .found tbody .found__key { grid-column: 2; grid-row: 1; width: auto; padding: 0; }
  .record { grid-template-columns: 1fr; }
  .mascot { width: min(58%, 280px); justify-self: start; margin-left: 4%; }
  .claim li { grid-template-columns: minmax(0, 1fr) auto; }
  .claim p { grid-column: 1; grid-row: 2; }
  .claim .stamp { grid-column: 2; grid-row: 1 / span 2; }
  .dock {
    position: fixed; inset: auto 0 0 0; z-index: 30; display: flex; gap: 22px; padding: 10px calc(var(--gut) + 6px) calc(10px + env(safe-area-inset-bottom));
    background: var(--ground); border-top: 1px solid var(--rule); transition: transform .35s var(--out);
  }
  .dock.is-away { transform: translateY(110%); }
  .dock .btn { flex: 1 1 0; min-width: 0; min-height: 52px; padding: 0 8px; font-size: clamp(.75rem, 3.5vw, .9375rem); }
  .dock .btn--line { flex: 0 0 26%; }
  html:not(.js) .dock .btn--line { flex: 1 1 0; }
}
@media (max-width: 700px) {
  .top__in { gap: 8px; }
  .brand { column-gap: 6px; }
  .lang__long { display: none; }
  .lang__short { display: inline; }
  .btn--call { padding: 0 9px; font-size: clamp(.75rem, 3.3vw, .875rem); font-stretch: 100%; }
  .btn__pre { display: none; }
  .brand__roof { width: 28px; height: 16px; }
  .brand__name { font-size: clamp(.8125rem, 3.7vw, 1.0625rem); }
  .brand__sub { font-size: .6875rem; letter-spacing: .06em; }
  .form__right { display: block; padding: 0; aspect-ratio: 568 / 468; }
  .sketch { width: 140.8%; max-width: none; max-height: none; margin: -22.2% 0 0 -6.3%; }
  .mark > .tag, .mark > .tag__t, .mark:not([data-mark="a"]) > .note, .mark:not([data-mark="a"]) > .leader { display: none; }
  .pin { display: block; }
  .photos { grid-template-columns: 1fr 1fr; }
  .photos li:first-child { grid-column: 1 / -1; }
  .photos li:nth-child(2) { border-left: 0; }
  .photos li:nth-child(n + 2) { border-top: 1px solid var(--rule); }
  .photos li:nth-child(n + 2) img { aspect-ratio: 4 / 3; }
  .claim li { grid-template-columns: minmax(0, 1fr); padding-right: 0; }
  .claim .stamp { grid-column: 1; grid-row: auto; justify-self: start; max-width: calc(100% - 12px); margin: 8px 0 4px 4px; font-size: clamp(.8125rem, 3.9vw, 1rem); white-space: normal; line-height: 1.15; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .ask { grid-template-columns: minmax(0, 1fr); }
  .btn { white-space: normal; text-align: center; line-height: 1.15; padding: 12px 22px; font-size: .9375rem; }
  .dock .btn, .btn--call { white-space: nowrap; }
  .dock .btn { padding: 0 8px; font-size: clamp(.75rem, 3.5vw, .9375rem); }
  .bigcall { padding-block: 6px; }
  .ring__note { font-size: 1.625rem; margin-left: 4px; }
  .ring__note svg { width: 56px; transform: rotate(58deg); }
  .seen.is-marked { font-size: 1.5rem; }
  .field { grid-column: 1 / -1; }
  .field + .field:not(.field--seen) { border-left: 0; }
  .ask__send .btn { flex: 1 1 100%; }
}
/* Short phones: no room to pin the sketch and still read the checklist */
@media (max-width: 900px) and (max-height: 690px) {
  .form__right { position: static; }
}

@media (max-width: 400px) {
  h2 { font-size: 7.6vw; overflow-wrap: break-word; }
  .claim .stamp { font-size: .8125rem; letter-spacing: 0; padding-inline: 12px; }
}
@media (max-width: 380px) {
  .brand__roof { display: none; }
  .brand { grid-template-columns: auto; }
}
@media (max-width: 359px) {
  .dock { gap: 14px; }
  .dock .btn { font-stretch: 100%; white-space: normal; line-height: 1.1; text-align: center; }
  .top__in { gap: 6px; }
  .btn--call { padding: 0 6px; font-stretch: 88%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .rain { opacity: .42; }
  .js .bolt { opacity: 1; }
}
