/* Hallmark · genre: editorial · theme: custom (taste-skill direction: page-is-the-object) · posture: drenched · surface: the page is a fabric swatch card · hero: photo room with a pinked swatch card · nav: three links printed on the card · footer: back of the card with credits · signature: the swatch card shrinks to a stub as the story scrolls in · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S4 R4 V4 · weakest: P, a fabric store is easy to make pretty and forgettable; the page argues that this shop is a swap-meet family, so the card carries their facts, not a slogan */
/* Hallmark · dismissed 83 · six photos for a fabric shop is the product; they are cut pinked like swatches and sized below the type */
/* Hallmark · dismissed F20 · the title breaks as La Amiga / Fabrics by measure, not as a grid row */

:root {
  --orange: #ff7a1f;
  --ink: #050f16;
  --field: #fffdfa;
  --credit: #c9b8ab;
  --muted: #5a2306;
  --ink-soft: #3b4650;
  --on-ink: #ffe3cf;
  --display: "Young Serif", Georgia, serif;
  --text: "Source Serif 4", Georgia, serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  --step-3: clamp(2.25rem, 1.2rem + 4.4vw, 4.5rem);
  --step-4: clamp(3rem, 1.4rem + 7vw, 7rem);
  --gap: clamp(1rem, 0.6rem + 1.6vw, 2rem);
  --edge: clamp(1rem, 0.4rem + 3vw, 3.5rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-0);
  line-height: 1.55;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.visit :focus-visible, .back :focus-visible { outline-color: var(--orange); }

.skip {
  position: absolute; left: var(--edge); top: -4rem; z-index: 10;
  background: var(--ink); color: var(--orange); padding: 0.6rem 1rem;
}
.skip:focus-visible { top: 1rem; }

/* Opening: the room, the card, the story */
.opening { position: relative; height: 200svh; background: var(--field); }
.opening__pin {
  position: sticky; top: 0; height: 100svh;
  display: grid; place-items: center;
  overflow: clip;
}
.opening__room {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: brightness(0.62) saturate(1.05);
  will-change: opacity;
}
.card {
  position: relative; z-index: 2;
  width: 100%;
  max-width: 40rem;
  background: var(--orange);
  padding: 2.25rem clamp(1.25rem, 3vw, 2.5rem) 2rem;
  transform-origin: 0 100%;
  will-change: transform;
}
.card__nav { display: flex; gap: 1.25rem; font-size: var(--step--1); margin-bottom: 1.25rem; }
.card__nav a { color: var(--ink); }
.card__title {
  font-size: var(--step-4);
  display: flex; flex-wrap: wrap; column-gap: 0.25em;
  margin-bottom: 1.5rem;
}
.card__facts { font-size: var(--step-0); color: var(--muted); }
.card__lede { font-size: var(--step-1); line-height: 1.35; max-width: 30ch; }
.card__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
}
.card__credit { font-style: italic; color: var(--muted); margin-right: auto; }
.btn {
  display: inline-block; background: var(--ink); color: var(--orange);
  padding: 0.8rem 1.25rem; text-decoration: none; font-weight: 600;
  transition: transform 160ms var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.card__call { font-weight: 600; }

.story {
  position: absolute; top: 100svh; right: var(--edge); z-index: 3;
  width: min(34rem, 48vw);
  padding-top: 12svh;
}
.story h2 { font-size: var(--step-3); margin-bottom: 1.25rem; }
.story p { font-size: var(--step-1); line-height: 1.45; }

/* Fabrics: orange field */
.fabrics {
  background: var(--orange);
  padding: clamp(4rem, 9vw, 8rem) var(--edge);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: start;
}
.fabrics h2 { font-size: var(--step-3); margin-bottom: 2rem; max-width: 12ch; }
.tag { margin: 0; }
.tag div { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 1rem; padding: 0.9rem 0; }
.tag div + div { border-top: 2px dotted var(--ink); }
.tag dt { font-weight: 600; }
.tag dd { margin: 0; color: var(--muted); }
.swatches {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto; gap: var(--gap);
}
.swatch { width: 100%; object-fit: cover; }
.swatch--tall { grid-row: span 2; aspect-ratio: 3 / 4.6; height: 100%; }
.swatch--square { aspect-ratio: 1; }
.swatch--wide { aspect-ratio: 4 / 5; }

/* Occasions: white field */
.occasions {
  background: var(--field);
  padding: clamp(4rem, 9vw, 8rem) var(--edge) 0;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.occasions__photo { margin: 0 0 0 calc(var(--edge) * -1); }
.occasions__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 40% 30%; }
.occasions h2 { font-size: var(--step-3); margin-bottom: 0.5rem; }
.occasions__lede { font-size: var(--step-1); margin-bottom: 2rem; }
.occasions__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.occasions__list strong { font-family: var(--display); font-weight: 400; font-size: var(--step-1); display: block; }
.occasions__strip {
  grid-column: 1 / -1; width: calc(100% + 2 * var(--edge)); margin: clamp(3rem, 7vw, 6rem) calc(var(--edge) * -1) 0;
  aspect-ratio: 16 / 6; object-fit: cover; object-position: 50% 45%;
}

/* Visit: the back of the card */
.visit { background: var(--ink); color: var(--on-ink); padding: clamp(4rem, 9vw, 8rem) var(--edge); }
.visit h2 { font-size: var(--step-4); color: var(--orange); margin-bottom: clamp(2rem, 5vw, 4rem); max-width: 10ch; }
.visit__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.visit h3 { font-size: var(--step-2); color: var(--orange); margin-bottom: 0.75rem; }
.visit p { font-size: var(--step-1); line-height: 1.45; }

.back { background: var(--ink); color: var(--on-ink); padding: 0 var(--edge) 3rem; }
.back__name { font-family: var(--display); font-size: var(--step-1); color: var(--orange); padding-top: 2rem; border-top: 2px dotted var(--orange); }
.back__note { font-size: var(--step-0); }
.credits { font-size: var(--step--1); color: var(--credit); max-width: 70ch; }

@media (max-width: 900px) {
  .fabrics, .occasions { grid-template-columns: minmax(0, 1fr); }
  .occasions__photo { margin-right: calc(var(--edge) * -1); }
  .occasions__photo img { aspect-ratio: 4 / 3; }
  .visit__cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .story { left: var(--edge); right: var(--edge); width: auto; padding-top: 4svh; }
  .story h2 { font-size: var(--step-2); }
  .story p { font-size: var(--step-0); }
  .card { padding-top: 1.5rem; }
  .card__title { font-size: clamp(2.75rem, 14vw, 4rem); margin-bottom: 1rem; }
  .card__lede { font-size: var(--step-0); }
  .tag div { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .visit__cols { grid-template-columns: minmax(0, 1fr); }
  .occasions__strip { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .opening { height: auto; }
  .opening__pin { position: relative; min-height: 100svh; height: auto; padding: 4rem 0; }
  .story { position: relative; top: auto; right: auto; left: auto; width: auto; max-width: 40rem; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--edge); }
  .btn { transition: none; }
}

/* QA round 2 */
.card__nav { gap: 0.25rem 1rem; flex-wrap: wrap; }
.card__nav a, .card__call, .visit a, .back__note a { display: inline-flex; align-items: center; min-height: 44px; }
.card__nav a { padding-inline: 0.15rem; }
.btn { min-height: 44px; }
.credits p { margin-bottom: 0.5rem; }
.credits ul { list-style: none; margin: 0; padding: 0; }
.credits li { padding: 0.15rem 0; }
.credits a { display: inline-block; padding-block: 0.7rem; }
@media (max-width: 640px), (max-height: 560px) {
  .opening { height: auto; }
  .opening__pin { position: relative; height: auto; min-height: 100svh; padding: 3rem 0; }
  .story { position: relative; top: auto; left: auto; right: auto; width: auto; padding: 3rem var(--edge) 3.5rem; }
}

.card__nav a, .visit a, .credits a { min-width: 44px; justify-content: center; }
.credits a { text-align: center; }
/* QA round 3: survive 200% text zoom */
h1, h2, h3, p, a, li, dt, dd, span { overflow-wrap: anywhere; }
.opening__pin * { max-width: 100%; }
.card__nav { flex-wrap: wrap; }
