:root {
  --paper: #f3f0e7;
  --ink: #1c1c1e;
  --soft: #5f5e58;
  --night: #16181d;
  --beanie: #e9a820;
  --water: #3d8fd6;
  --alarm: #c8453a;
  --rule: #d9d4c5;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  /* The story cards are set in DejaVu Sans Bold; Verdana is its closest system relative. */
  font-family: "DejaVu Sans", Verdana, Geneva, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

a { color: inherit; text-underline-offset: 0.2em; }
a:focus-visible { outline: 3px solid var(--water); outline-offset: 3px; }

h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0; }

/* Hero: the day card's title set on the night sky of a story still. */
.hero { position: relative; background: var(--night); color: #fff; }
.hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100vh;
  min-height: 30rem;
  object-fit: cover;
  object-position: 50% 78%;
}
.hero img { transition: opacity 1.4s ease; }
.hero .title {
  position: absolute;
  z-index: 2;
  /* No padding of its own: the block is exactly the lettering, so it travels without a jump. */
  top: clamp(1.5rem, 6vh, 4rem);
  left: 0;
  right: 0;
  padding: 0 1.25rem;
  text-align: center;
  transition: top 1.1s cubic-bezier(0.6, 0, 0.2, 1), transform 1.1s cubic-bezier(0.6, 0, 0.2, 1);
}
/* The dark wash behind the title stays fixed at the top and only fades in. z-index keeps it
   above the picture while the picture is still fading. */
.hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 0 auto 0;
  height: min(22rem, 55%);
  background: linear-gradient(#0b1730e6, #0b173000);
  transition: opacity 1.4s ease;
  pointer-events: none;
}
.hero p { transition: opacity 0.9s ease 0.5s; }

/* Opening: the black day card from the videos. Script adds .intro, counts, then removes it. */
.hero.intro img { opacity: 0; }
.hero.intro::before { opacity: 0; }
.hero.intro .title { top: 50%; transform: translateY(-50%); }
.hero.intro p { opacity: 0; transition: none; }

@media (prefers-reduced-motion: reduce) {
  .hero img, .hero::before, .hero .title, .hero p { transition: none; }
}
.hero h1 {
  font-size: clamp(3.2rem, 13vw, 8.5rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0.06em 0 #0008;
}
.hero p {
  /* Hangs under the lettering without adding to the block's height. */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0.8rem auto 0;
  padding: 0 1.25rem;
  max-width: 32ch;
  font-weight: 700;
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  text-shadow: 0 2px 6px #000a;
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* A story: its still on one side, its supply row on the other. */
.story { display: grid; grid-template-columns: 3fr 2fr; align-items: stretch; }
.story img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.story .text { padding: clamp(1.5rem, 5vw, 4rem); align-self: center; }
.story.flip img { order: 2; }
.story .top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.story h3 { font-size: clamp(1.4rem, 2.6vw, 2.2rem); text-transform: uppercase; }
.story .count { font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.5rem); white-space: nowrap; }
.story p { margin: 0.8rem 0 0; max-width: 48ch; }
.story .bar { margin-top: 1.2rem; }
.story .links { display: flex; flex-wrap: wrap; gap: 0.6rem 0.8rem; align-items: center; margin-top: 1.2rem; }
.story .links a {
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: 0.4rem;
}
.story .links a:hover { background: var(--water); }
.story .links span { color: var(--soft); font-weight: 700; font-size: 0.9rem; }

.fact {
  text-align: center;
  color: var(--soft);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0;
  padding: 2.5rem 1.25rem 0;
}

.frame { margin: 0; }
.frame img { display: block; width: 100%; height: auto; }

/* Supply card: bold title, counted rows, one grey line underneath. */
.card {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 6rem) 1.25rem;
}
.card > h2 {
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(1.4rem, 4.2vw, 2.1rem);
  margin-bottom: 2.2rem;
}
.card > .line {
  text-align: center;
  color: var(--soft);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 2.2rem 0 0;
}

.row { padding: 1.1rem 0; border-top: 2px solid var(--rule); }
.row:last-of-type { border-bottom: 2px solid var(--rule); }
.row .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.row .label { color: var(--soft); font-weight: 700; font-size: 0.9rem; }
.row .count { font-weight: 700; font-size: clamp(1.15rem, 3.4vw, 1.6rem); white-space: nowrap; }
.row h3 { font-size: clamp(1.15rem, 3.4vw, 1.6rem); }
.row p { margin: 0.5rem 0 0; max-width: 60ch; }

.bar {
  height: 0.6rem;
  margin-top: 0.8rem;
  background: var(--rule);
  border-radius: 0.3rem;
  overflow: hidden;
}
.bar i { display: block; height: 100%; background: var(--water); border-radius: 0.3rem; }
.bar.alarm i { background: var(--alarm); }

.row a.go {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  text-decoration: none;
}
/* Platform marks: one ink colour, sized to the word beside them. */
.logo { width: 1.1em; height: 1.1em; fill: currentColor; vertical-align: -0.18em; margin-right: 0.45em; }
.row a.go .count { text-decoration: underline; text-decoration-thickness: 2px; }
.row a.go:hover .count { color: var(--water); }

.pair { display: grid; grid-template-columns: 1fr 1fr; }
.pair img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }

footer {
  background: var(--night);
  color: #c9c7bf;
  text-align: center;
  padding: 2.5rem 1.25rem;
  font-size: 0.9rem;
}
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.6rem; }
footer p { margin: 1rem 0 0; }

/* Policy pages */
.doc { max-width: 40rem; margin: 0 auto; padding: 3rem 1.25rem 5rem; }
.doc .home { font-weight: 700; }
.doc h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); margin: 2rem 0 0.4rem; }
.doc h2 { font-size: 1.15rem; margin: 2.2rem 0 0.4rem; }
.doc p, .doc li { max-width: 68ch; }
.doc .date { color: var(--soft); font-weight: 700; font-size: 0.9rem; }

@media (max-width: 48rem) {
  .story { grid-template-columns: 1fr; }
  .story.flip img { order: 0; }
}

/* Shop: one card per garment, designs as swatches. */
.shop { max-width: 76rem; margin: 0 auto; padding: clamp(3rem, 8vw, 5.5rem) 1.25rem 0; }
.shop > h2 { text-align: center; text-transform: uppercase; font-size: clamp(1.4rem, 4.2vw, 2.1rem); margin-bottom: 2.2rem; }
.shop > .line { text-align: center; color: var(--soft); font-weight: 700; font-size: 0.95rem; margin: 2rem 0 0; }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; }
.product { background: #fff; border-radius: 0.9rem; padding: 1rem 1rem 1.2rem; display: flex; flex-direction: column; gap: 0.9rem; }
.product .shot { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.product .top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem; }
.product h3 { font-size: 1.1rem; }
.product .count { font-weight: 700; white-space: nowrap; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.swatches button {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--paper);
  background: var(--night);
  border: 3px solid var(--night);
  border-radius: 0.6rem;
  padding: 0.35rem 0.5rem 0.4rem;
  width: 4.4rem;
  cursor: pointer;
}
.swatches button img { display: block; width: 100%; height: auto; margin-bottom: 0.2rem; }
.swatches button[aria-pressed="true"] { border-color: var(--beanie); }
.swatches button:focus-visible, .buy:focus-visible { outline: 3px solid var(--water); outline-offset: 2px; }
.buy {
  margin-top: auto;
  text-align: center;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 0.4rem;
}
.buy:hover { background: var(--water); }
