/* Jean-Baptiste Hardy: white label paper, one black mark per cuvée, a typewriter cuvée name and the condensed line
   that names the grower. L'Aubier's charcoal label gives the dark ground, the grey-green wax of the whites a rule. */
@font-face {
  font-family: 'Open Sans Condensed';
  font-style: normal;
  font-weight: 300 700;
  font-stretch: 75%;
  font-display: swap;
  src: url('/theme/open-sans-condensed-latin-d4b69dded818cdba1e93f522.woff2') format('woff2');
}

@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/theme/courier-prime-bold-latin-06622415713b4150c18f4489.woff2') format('woff2');
}

.prospect-jean-baptiste-hardy {
  --prospect-paper: #f2f1ec;
  --prospect-ink: #161514;
  --prospect-accent: #8d9686;
  --prospect-line: #d9d7cf;
  --prospect-display: 'Courier Prime', 'Courier New', monospace;
  --prospect-body: 'Open Sans Condensed', 'Arial Narrow', sans-serif;
  --jbh-charcoal: #353332;
  --jbh-sheet: #f7f6f2;
  --jbh-wax: #9aa194;
  --jbh-gutter: clamp(1rem, 5vw, 5.5rem);
}

/* The header continues the charcoal hero and stays opaque over the paper below. */
.prospect-jean-baptiste-hardy > .header {
  border-bottom-color: #4a4846;
  background: var(--jbh-charcoal);
  color: var(--jbh-sheet);
}

.prospect-jean-baptiste-hardy .brand {
  font: 400 clamp(1.25rem, 2.2vw, 1.55rem) / 1 var(--prospect-body);
  font-stretch: 75%;
  letter-spacing: .01em;
}

.prospect-jean-baptiste-hardy .header .languages {
  font-family: var(--prospect-body);
  font-stretch: 75%;
  font-size: 1.05rem;
}

.prospect-jean-baptiste-hardy main {
  font-family: var(--prospect-body);
  font-stretch: 75%;
  font-size: 1.3rem;
  line-height: 1.45;
  overflow-x: clip;
}

/* A low-specificity reset, so each block sets its own spacing. */
:where(.prospect-jean-baptiste-hardy main) :where(h1, h2, h3, p, figure, blockquote, address) {
  margin: 0;
  font-style: normal;
}

.prospect-jean-baptiste-hardy main h2 {
  font-family: var(--prospect-display);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.prospect-jean-baptiste-hardy main img {
  display: block;
  width: 100%;
  height: auto;
}

.prospect-jean-baptiste-hardy main a {
  color: inherit;
  text-decoration-color: var(--prospect-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}

/* Hero: one label at full size on L'Aubier's charcoal. Fief de Chaintre's bowls settle on their arch. */
.jbh-hero {
  display: grid;
  /* The label stands in the middle of the screen; the introduction sits beside its foot. */
  --jbh-sheet-width: min(100%, calc((min(100svh, 60rem) - 12rem) * .84));
  grid-template-columns: minmax(0, 1fr) var(--jbh-sheet-width) minmax(0, 1fr);
  align-items: end;
  gap: clamp(2rem, 4vw, 4rem);
  min-height: min(calc(100svh - 4.1rem), 60rem);
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--jbh-gutter) clamp(2rem, 5vw, 4rem);
  background: var(--jbh-charcoal);
  color: var(--jbh-sheet);
}

.jbh-sheet {
  position: relative;
  container-type: inline-size;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  aspect-ratio: .84;
  /* Percentages of the label's own width: container units here would measure the page instead. */
  padding: 10% 8% 7%;
  background: var(--jbh-sheet);
  color: var(--prospect-ink);
  box-shadow: 0 1.6rem 3rem rgb(0 0 0 / .28), 0 .2rem .4rem rgb(0 0 0 / .18);
  /* The bowls drop in from above the label's top edge. */
  overflow: clip;
}

/* As on the label: the mark fills the upper part and the names sit at its foot. */
.jbh-stack {
  flex: none;
  width: auto;
  height: 92cqw;
  overflow: visible;
}

.jbh-sheet-text {
  margin-top: auto;
  text-align: center;
}

.jbh-sheet h1 {
  font-family: var(--prospect-body);
  font-size: clamp(2rem, 10.4cqw, 4.8rem);
  font-stretch: 75%;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.005em;
}

.jbh-place {
  margin-top: 2.4cqw !important;
  font-family: var(--prospect-display);
  font-size: clamp(.95rem, 3.6cqw, 1.5rem);
  font-weight: 700;
  line-height: 1.1;
}

.jbh-intro {
  grid-column: 3;
  max-width: 21rem;
  padding-bottom: .5rem;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1.35;
}

.jbh-intro p + p {
  margin-top: .8em;
}

/* Each bowl pivots on the point where its base meets the piece below. */
.jbh-rock {
  transform-box: view-box;
}

/* Falling, a bowl gathers speed; it lands at 380 ms and rocks until 1.48 s. */
.jbh-opening .jbh-fall-middle {
  animation: jbh-fall-middle 380ms cubic-bezier(.5, 0, .85, .4) both;
}

.jbh-opening .jbh-rock-middle {
  animation: jbh-rock-middle 1100ms 380ms ease-in-out both;
}

/* The top bowl starts falling as the middle one lands, and lands on it at 600 ms while it still rocks. */
.jbh-opening .jbh-fall-top {
  animation: jbh-fall-top 300ms 300ms cubic-bezier(.5, 0, .85, .4) both;
}

.jbh-opening .jbh-rock-top {
  animation: jbh-rock-top 900ms 600ms ease-in-out both;
}

/* In the mark's units: each bowl starts just clear of the label's top edge, so it enters at once. */
@keyframes jbh-fall-middle {
  from { translate: 0 -215px; }
  to { translate: 0 0; }
}

@keyframes jbh-fall-top {
  from { translate: 0 -120px; }
  to { translate: 0 0; }
}

/* The middle bowl rocks from its landing, and takes a smaller nudge when the top bowl lands on it at 20%. */
@keyframes jbh-rock-middle {
  0% { rotate: 0deg; }
  9% { rotate: -3deg; }
  20% { rotate: 1.4deg; }
  31% { rotate: -1.6deg; }
  45% { rotate: .9deg; }
  61% { rotate: -.4deg; }
  79% { rotate: .14deg; }
  100% { rotate: 0deg; }
}

/* A smaller bowl rocks further. */
@keyframes jbh-rock-top {
  0% { rotate: 0deg; }
  14% { rotate: 5.5deg; }
  32% { rotate: -3.2deg; }
  50% { rotate: 1.6deg; }
  68% { rotate: -.6deg; }
  84% { rotate: .2deg; }
  100% { rotate: 0deg; }
}

/* Below the hero the charcoal runs on, and each part of the page is one of the labels set on it: the range on label
   paper, the estate on Éclats, the grower printed straight on L'Aubier's charcoal, the quotation on Clos de Lozangère
   and the contact on Ponceau. Each keeps its mark large, and the section's heading takes the cuvée name's place. */
.jbh-ground {
  --jbh-edge: clamp(1rem, 3vw, 3rem);
  display: grid;
  gap: var(--jbh-edge);
  padding: 0 var(--jbh-edge) var(--jbh-edge);
  background: var(--jbh-charcoal);
  color: var(--jbh-sheet);
}

.jbh-wines,
.jbh-label {
  position: relative;
  justify-self: center;
  width: min(100%, 92rem);
  overflow: clip;
  color: var(--prospect-ink);
  box-shadow: 0 1.2rem 2.6rem rgb(0 0 0 / .24), 0 .15rem .35rem rgb(0 0 0 / .16);
}

.jbh-text {
  display: grid;
  gap: 1.1rem;
  max-width: 36rem;
}

/* The range: each cuvée on the same bottle, at one height, on a soft contact shadow. */
.jbh-wines {
  padding: clamp(2.75rem, 6vw, 5.5rem) clamp(1rem, 3.5vw, 3.5rem) clamp(2.5rem, 5vw, 4.5rem);
  background: var(--jbh-sheet);
}

.jbh-heading {
  display: grid;
  gap: .9rem;
  width: min(100%, 82rem);
  margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
}

.jbh-range {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3rem clamp(.75rem, 1.4vw, 1.5rem);
  width: min(100%, 82rem);
  margin-inline: auto;
}

.jbh-stand {
  position: relative;
  display: grid;
  place-items: end center;
}

.jbh-stand::before {
  position: absolute;
  bottom: -.35rem;
  left: 50%;
  width: min(78%, 7.5rem);
  height: .9rem;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(22 21 20 / .3), rgb(22 21 20 / .08) 70%, transparent);
  transform: translateX(-50%);
  content: '';
}

.jbh-stand img {
  position: relative;
  width: min(100%, 10rem);
  aspect-ratio: 300 / 920;
}

.jbh-bottle {
  display: grid;
  align-content: start;
  justify-items: center;
  text-align: center;
}

.jbh-bottle h3 {
  margin-top: 1.4rem;
  font-family: var(--prospect-display);
  font-size: clamp(.98rem, 1.15vw, 1.12rem);
  font-weight: 700;
  line-height: 1.15;
}

.jbh-bottle p {
  margin-top: .3rem;
  font-size: 1.05rem;
  line-height: 1.25;
  opacity: .78;
}

.jbh-bottle-text-only {
  align-self: end;
}

.jbh-credit {
  width: min(100%, 82rem);
  margin: clamp(2.5rem, 4vw, 3.5rem) auto 0;
  font-size: .92rem;
  opacity: .7;
}

/* The estate, on Éclats' grey paper: the broken block stands for the gabbro the vines grow on. */
.jbh-estate {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  padding: clamp(3rem, 7vw, 6.5rem) clamp(1.5rem, 7vw, 7rem);
  background: #e6e9e5;
}

.jbh-shards {
  justify-self: center;
  width: min(100%, 31rem);
  height: auto;
  overflow: visible;
  color: var(--prospect-ink);
}

/* Each shard turns about its own centre. */
.jbh-shards path {
  transform-box: fill-box;
  transform-origin: center;
}

/* Packed whole until it comes into view, then the block bursts: the shards fly apart a little past their places,
   turning, and settle into the label's pattern. */
.jbh-whole .jbh-shards path {
  translate: var(--jbh-x) var(--jbh-y);
}

.jbh-crack .jbh-shards path {
  animation: jbh-crack 760ms var(--jbh-delay) both;
}

@keyframes jbh-crack {
  0% {
    translate: var(--jbh-x) var(--jbh-y);
    rotate: 0deg;
    animation-timing-function: cubic-bezier(.2, .9, .3, 1);
  }

  30% {
    translate: calc(var(--jbh-x) * -.22) calc(var(--jbh-y) * -.22);
    rotate: var(--jbh-turn);
    animation-timing-function: cubic-bezier(.45, 0, .25, 1);
  }

  100% {
    translate: 0 0;
    rotate: 0deg;
  }
}

/* The grower, printed straight on L'Aubier's charcoal: his black-and-white portrait under Fief de Chaintre's arch,
   with the pale figure the label carries standing beside it. */
.jbh-grower {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  justify-self: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  width: min(100%, 86rem);
  padding: clamp(2.5rem, 6vw, 5.5rem) clamp(.5rem, 3vw, 3rem);
}

.jbh-pair {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1.55fr);
  align-items: end;
  gap: .9rem clamp(1.25rem, 3.5vw, 3rem);
}

.jbh-portrait img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 0;
  border-radius: 50% 50% 0 0 / 40% 40% 0 0;
}

.jbh-figure {
  width: 100%;
  height: auto;
  color: var(--jbh-sheet);
}

.jbh-pair figcaption {
  grid-column: 1 / -1;
  font-size: .92rem;
  opacity: .72;
}

/* The quotation on Clos de Lozangère's green-white paper. The knot is cut square on the label, so it fills its panel
   to the paper's edges. */
.jbh-press {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  min-height: clamp(20rem, 30vw, 28rem);
  background: #ebeee6;
}

.jbh-knot {
  position: relative;
  min-height: 12rem;
}

.jbh-knot-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--prospect-ink);
}

.jbh-press figure {
  align-self: center;
  max-width: 44rem;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 6vw, 6rem);
}

.jbh-press blockquote {
  font-family: var(--prospect-display);
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
}

.jbh-press figcaption {
  margin-top: 1.2rem;
  font-size: .95rem;
  opacity: .72;
}

/* Contact, on Ponceau's white: the branch grows in from the paper's edge, where the label cuts it. */
.jbh-contact {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  min-height: clamp(22rem, 34vw, 32rem);
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 7vw, 6rem) clamp(1.5rem, 7vw, 7rem);
  background: #f4f6f2;
}

.jbh-branch {
  justify-self: end;
  width: min(100%, 38rem);
  height: auto;
  overflow: visible;
  color: var(--prospect-ink);
}

/* When the branch comes into view it takes one breath of wind: it dips from its cut, swings back and settles. It
   starts and ends at rest, so nothing waits on it. */
.jbh-sway {
  transform-box: view-box;
}

.jbh-swaying .jbh-sway {
  animation: jbh-sway 2200ms ease-in-out both;
}

@keyframes jbh-sway {
  0% { rotate: 0deg; }
  17% { rotate: -1.4deg; }
  38% { rotate: .8deg; }
  58% { rotate: -.4deg; }
  78% { rotate: .14deg; }
  100% { rotate: 0deg; }
}

.jbh-contact-inner {
  display: grid;
  justify-items: start;
  gap: 1rem;
  max-width: 34rem;
}

.prospect-jean-baptiste-hardy .jbh-contact-inner p {
  opacity: .86;
}

.jbh-contact-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-family: var(--prospect-display);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.jbh-contact-link + .jbh-contact-link {
  margin-top: -.6rem;
}

.jbh-contact address {
  margin-top: .4rem;
  opacity: .8;
}

@media (max-width: 1100px) {
  .jbh-range {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 40rem);
  }
}

@media (max-width: 860px) {
  .jbh-hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    min-height: 0;
  }

  .jbh-sheet {
    grid-column: 1;
    justify-self: center;
    width: min(100%, 28rem);
  }

  .jbh-intro {
    grid-column: 1;
    max-width: 28rem;
    margin-inline: auto;
    padding-bottom: 0;
    text-align: center;
  }

  /* On a phone each label reads as on the bottle: the mark first, then the words. */
  .jbh-estate,
  .jbh-grower,
  .jbh-press,
  .jbh-contact {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .jbh-shards {
    width: min(74%, 20rem);
  }

  .jbh-pair {
    width: min(100%, 30rem);
  }

  .jbh-knot {
    min-height: clamp(9rem, 38vw, 14rem);
  }

  .jbh-contact {
    padding: 0 0 clamp(2.5rem, 8vw, 4rem);
  }

  .jbh-branch {
    order: -1;
    width: min(82%, 24rem);
  }

  .jbh-contact-inner {
    padding-inline: clamp(1.5rem, 7vw, 3rem);
  }
}

/* Three to a row on a phone, so the range stays two rows tall. */
@media (max-width: 560px) {
  .jbh-range {
    gap: 2.25rem .6rem;
  }

  .jbh-bottle h3 {
    margin-top: 1rem;
    font-size: .92rem;
  }

  .jbh-bottle p {
    font-size: .95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jbh-fall,
  .jbh-rock,
  .jbh-sway,
  .jbh-shards path {
    animation: none !important;
    translate: none !important;
  }
}

@media print {
  .jbh-hero,
  .jbh-ground {
    background: none;
    color: var(--prospect-ink);
  }

  .jbh-sheet,
  .jbh-wines,
  .jbh-label {
    box-shadow: none;
    outline: 1px solid var(--prospect-line);
  }

  .jbh-figure {
    color: var(--prospect-ink);
  }

  .jbh-shards path {
    animation: none !important;
    translate: none !important;
  }
}
