/* Madder & Chalk: a tailor's paper pattern. Madder-red cloth, cream paper, stitched lines, tape-measure timeline. */
.site-header { background: var(--color-bg); border-bottom: 2px solid var(--color-text); }
.logo { gap: .6rem; color: var(--color-accent); }
.nav__list a { font-weight: 700; }
@media (max-width: 47.99rem) { .nav__list { gap: 0 .35rem; justify-content: space-between; } .nav__list a { padding: .6rem .35rem; font-size: .95rem; } }

.hero { padding-block: var(--space-2xl); position: relative; border-bottom: 2px solid var(--color-text); }
.hero::before { content: ''; position: absolute; inset: 10px; border: 2px dashed color-mix(in srgb, var(--color-accent-text) 55%, transparent); pointer-events: none; border-radius: var(--radius); }
.hero__grid { display: grid; gap: var(--space-xl); align-items: center; position: relative; }
@media (min-width: 56rem) { .hero__grid { grid-template-columns: 1.4fr 1fr; gap: var(--space-2xl); } }
.hero__eyebrow { color: var(--color-accent-text); }
.hero h1 { font-size: var(--step-6); line-height: 1; max-width: 12ch; }
.hero .lead { max-width: 34ch; }
.hero .button { box-shadow: 4px 4px 0 var(--color-text); }
.hero .button:hover { box-shadow: 6px 6px 0 var(--color-text); }
.hero .button--secondary { box-shadow: none; color: var(--color-accent-text); background: transparent; }
.piece { max-width: 24rem; width: 100%; justify-self: center; transform: rotate(3deg); filter: drop-shadow(8px 8px 0 rgb(43 26 23 / .85)); }
@media (max-width: 55.99rem) { .piece { max-width: 15rem; } }
.piece__svg { width: 100%; height: auto; }

.tag-section { padding-block: var(--space-2xl) var(--space-xl); }
.tag { position: relative; background: var(--color-pop); border: 2px solid var(--color-text); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-xl) var(--space-l) var(--space-l); color: var(--color-text); }
.tag .eyebrow { color: var(--color-text); }
.tag .muted { color: #4a2f17; }
.tag__hole { position: absolute; top: 14px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--color-bg); border: 2px solid var(--color-text); }
.tag .eyebrow { margin-top: var(--space-s); margin-bottom: var(--space-s); }
.tag .quote { font-size: var(--step-3); line-height: 1.2; margin-bottom: var(--space-s); text-wrap: balance; }

.section--surface { border-block: 2px solid var(--color-text); }
.section--surface h2 { margin-top: var(--space-2xs); font-size: var(--step-5); }
.tape { height: 3.25rem; margin: var(--space-l) 0; background: var(--color-pop); border: 2px solid var(--color-text); border-radius: 6px; position: relative;
  background-image: repeating-linear-gradient(90deg, var(--color-text) 0 2px, transparent 2px 12px), repeating-linear-gradient(90deg, var(--color-text) 0 2px, transparent 2px 60px);
  background-size: 100% 35%, 100% 60%; background-repeat: repeat-x; background-position: 0 0; }
.stops { list-style: none; padding: 0; display: grid; gap: var(--space-m); }
@media (min-width: 56rem) { .stops { grid-template-columns: repeat(3, 1fr); } }
.stop { position: relative; }
.stop__n { position: absolute; top: -1.2rem; left: var(--space-m); width: 2.4rem; height: 2.4rem; display: grid; place-items: center; background: var(--color-accent); color: var(--color-accent-text); border: 2px solid var(--color-text); border-radius: 50%; font-family: var(--font-heading); }
.stop { margin-top: var(--space-s); padding-top: var(--space-l); }
.stop h3 { margin-bottom: var(--space-2xs); color: var(--color-accent); }
.section--surface .stop { background: var(--color-bg); }

.eyebrow { color: var(--color-accent); }
.section h2 { max-width: 16ch; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs); align-content: start; }
.chips li { padding: .55rem 1rem; border: 2px dashed var(--color-text); border-radius: 999px; font-weight: 600; background: var(--color-bg); }
.chips li:nth-child(3n+1) { background: var(--color-surface); }

.links { list-style: none; padding: 0; }
.links__a { display: block; height: 100%; text-decoration: none; }
.links__n { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--color-accent); color: var(--color-accent-text); font-family: var(--font-heading); margin-bottom: var(--space-s); }
.links__a h3 { margin-bottom: var(--space-2xs); }

.site-footer { background: var(--color-text); color: var(--color-bg); border-top: 2px solid var(--color-text); }
.footer__grid { display: grid; gap: var(--space-m); align-items: center; }
@media (min-width: 48rem) { .footer__grid { grid-template-columns: 1fr auto; } }
.footer__name { font-family: var(--font-heading); font-size: var(--step-1); max-width: none; }
.lock { color: var(--color-bg); }
.lock:hover { background: var(--color-pop); color: var(--color-text); }

/* Password screen */
.gate { min-height: 100vh; min-height: 100dvh; display: grid; background: var(--color-accent); position: relative; }
.gate::before { content: ''; position: absolute; inset: 10px; border: 2px dashed color-mix(in srgb, var(--color-accent-text) 55%, transparent); border-radius: var(--radius); pointer-events: none; }
.gate__main { display: grid; place-items: center; padding: var(--space-xl) var(--space-m); }
.gate__card { position: relative; width: 100%; max-width: 26rem; background: var(--color-bg); color: var(--color-text); border: 2px solid var(--color-text); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-xl) var(--space-l) var(--space-l); display: grid; gap: var(--space-s); }
.gate__logo { margin-bottom: var(--space-2xs); }
.gate__card h1 { font-size: var(--step-4); line-height: 1.05; }
.gate__lead { color: var(--color-muted); margin: 0; }
.gate .field-error { margin: var(--space-2xs) 0 0; }

/* Inner page banners */
.page-hero { padding-block: var(--space-2xl) var(--space-xl); }
.page-hero h1 { font-size: var(--step-5); max-width: 16ch; }
.page-hero .lead { max-width: 40ch; }
@media (min-width: 48rem) { .page-hero h1 { font-size: var(--step-6); } }

/* Home: photo beside the name tag */
.home-intro { align-items: center; gap: var(--space-xl); }
.polaroid { background: var(--color-bg); border: 2px solid var(--color-text); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: var(--space-xs) var(--space-xs) var(--space-s); transform: rotate(-2deg); max-width: 26rem; justify-self: center; width: 100%; }
.polaroid img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--color-text); border-radius: 4px; display: block; background: var(--color-surface); }
.polaroid figcaption { margin-top: var(--space-xs); font-size: .9rem; color: var(--color-muted); text-align: center; }
.tag__link { display: inline-block; margin-top: var(--space-xs); color: var(--color-text); font-weight: 700; text-underline-offset: .25em; }
.tag__title { max-width: none; font-size: var(--step-4); margin-bottom: var(--space-s); }

/* Reading text */
.prose { max-width: 60ch; }
.prose a { font-weight: 700; }

/* Timeline as a stack on inner pages */
.stops--stack { max-width: 44rem; }
@media (min-width: 56rem) { .stops--stack { grid-template-columns: 1fr; } }
.stop--open { background: transparent; border-style: dashed; }
.stop--open .stop__n { background: var(--color-bg); color: var(--color-text); }
.stop--open h3 { color: var(--color-text); }
.section:not(.section--surface) .tape + .stops .stop { background: var(--color-surface); }

/* Structure cards */
.facts { list-style: none; padding: 0; margin-top: var(--space-l); }
.facts__icon { display: inline-grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: var(--color-accent); color: var(--color-accent-text); margin-bottom: var(--space-s); }
.facts h3 { margin-bottom: var(--space-2xs); }

/* Bottom band */
.next { justify-content: space-between; align-items: center; gap: var(--space-m); }
.next__text { font-family: var(--font-heading); font-size: var(--step-3); margin: 0; max-width: none; }

/* Gallery */
.gallery { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.gallery__btn { display: block; width: 100%; padding: var(--space-xs) var(--space-xs) 0; background: var(--color-surface); color: var(--color-text); border: 2px solid var(--color-text); border-radius: var(--radius); box-shadow: var(--shadow); cursor: zoom-in; font: inherit; text-align: left; transition: transform .15s, box-shadow .15s; }
.gallery__btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--color-text); }
.gallery__btn img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; border: 2px solid var(--color-text); border-radius: 4px; background: var(--color-bg); }
.gallery__cap { display: block; padding: var(--space-xs) var(--space-2xs); font-weight: 700; }
.gallery__n { display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.9rem; margin-right: .35rem; border-radius: 50%; background: var(--color-accent); color: var(--color-accent-text); font-family: var(--font-heading); font-size: .8rem; font-weight: 400; }
.gallery__note { margin-top: var(--space-l); }
.lightbox { border: 2px solid var(--color-text); border-radius: var(--radius-lg); background: var(--color-bg); color: var(--color-text); box-shadow: var(--shadow-lg); padding: var(--space-s); width: min(94vw, 44rem); max-height: 94vh; max-height: 94dvh; overflow: auto; margin: auto; }
.lightbox::backdrop { background: rgb(43 26 23 / .82); }
.lightbox__fig { margin: 0; display: grid; gap: var(--space-xs); }
.lightbox__fig img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; border: 2px solid var(--color-text); border-radius: 4px; background: var(--color-surface); }
.lightbox__fig figcaption { font-family: var(--font-heading); font-size: var(--step-1); }
.lightbox__close { margin-top: var(--space-s); }
.gallery__item { display: flex; }
.gallery__btn { height: 100%; }
#name .tag__title { font-size: var(--step-3); }
#name .quote { font-size: var(--step-2); }

/* The hidden attribute must win over the message layout. */
.field-error[hidden] { display: none; }
