:root {
  --burnt: #B85C2E;
  --saffron: #D9823B;
  --brass: #A76F3D;
  --vellum: #E8CFA9;
  --plum: #2E1B24;
  --espresso: #241611;
  --parchment: #F4E2C7;
  --blush: #F0A66B;
  --display-hand: "Caveat", "Segoe Print", cursive;
  --display-serif: "Fraunces", Georgia, serif;
  --body-serif: "Cormorant Garamond", Georgia, serif;
  --micro-hand: "Kalam", "Comic Sans MS", cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--espresso);
  background:
    radial-gradient(circle at 12% 8%, rgba(240, 166, 107, 0.34), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(184, 92, 46, 0.2), transparent 24rem),
    linear-gradient(135deg, #F4E2C7 0%, #E8CFA9 52%, #F4E2C7 100%);
  font-family: var(--body-serif);
  overflow-x: hidden;
}

.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.34;
  background-image:
    repeating-linear-gradient(23deg, rgba(36, 22, 17, 0.035) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(96deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 9px);
  mix-blend-mode: multiply;
}

.pour-cursor {
  position: fixed;
  width: 9rem;
  height: 9rem;
  margin: -4.5rem 0 0 -4.5rem;
  border-radius: 50% 44% 54% 48%;
  pointer-events: none;
  z-index: 19;
  opacity: 0;
  transform: translate3d(-20rem, -20rem, 0) scale(0.6);
  background: radial-gradient(circle, rgba(217, 130, 59, 0.24), rgba(240, 166, 107, 0.14) 42%, transparent 70%);
  filter: blur(9px);
  transition: opacity 600ms ease, transform 300ms ease;
}

.salon {
  position: relative;
}

.scene {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 5vw, 5rem);
}

.scene::before {
  content: "";
  position: absolute;
  inset: 5vw;
  border: 1px solid rgba(167, 111, 61, 0.28);
  clip-path: polygon(0 7%, 7% 0, 100% 0, 100% 92%, 92% 100%, 0 100%);
  pointer-events: none;
}

.bar-surface {
  width: min(78rem, 94vw);
  min-height: 42rem;
  position: relative;
  display: grid;
  place-items: center;
  transform: rotate(-1.5deg);
}

.bar-surface::before {
  content: "";
  position: absolute;
  inset: 8% 0 0 4%;
  background: linear-gradient(115deg, rgba(46, 27, 36, 0.18), rgba(184, 92, 46, 0.08), transparent 64%);
  clip-path: polygon(9% 0, 100% 16%, 88% 100%, 0 82%);
  filter: blur(10px);
}

.irregular-card,
.flight-card,
.crest-card {
  background:
    radial-gradient(circle at 25% 18%, rgba(255, 255, 255, 0.45), transparent 16rem),
    linear-gradient(145deg, rgba(244, 226, 199, 0.96), rgba(232, 207, 169, 0.9));
  border: 1px solid rgba(167, 111, 61, 0.42);
  box-shadow: 0 2.2rem 4.4rem rgba(36, 22, 17, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  clip-path: polygon(2% 3%, 93% 0, 100% 12%, 97% 96%, 10% 100%, 0 88%);
}

.hero-card {
  width: min(55rem, 88vw);
  min-height: 33rem;
  padding: clamp(2.1rem, 5vw, 5rem);
  position: relative;
  isolation: isolate;
  transform: rotate(1.2deg);
  overflow: hidden;
}

.watercolor-bloom {
  position: absolute;
  left: 12%;
  top: 10%;
  width: 54%;
  aspect-ratio: 1.35;
  z-index: -1;
  border-radius: 53% 47% 44% 56%;
  background:
    radial-gradient(circle at 38% 42%, rgba(184, 92, 46, 0.68), rgba(217, 130, 59, 0.43) 34%, rgba(240, 166, 107, 0.22) 56%, transparent 74%);
  filter: blur(2px) saturate(0.95);
  transform: scale(0.2) rotate(-10deg);
  opacity: 0.2;
}

body.ready .watercolor-bloom {
  animation: bloomSpread 4.8s cubic-bezier(.17, .84, .29, 1) forwards;
}

.vellum-triangle {
  position: absolute;
  right: -4rem;
  top: 2rem;
  width: 22rem;
  height: 24rem;
  background: rgba(232, 207, 169, 0.5);
  clip-path: polygon(64% 0, 100% 100%, 0 76%);
  border: 1px solid rgba(167, 111, 61, 0.25);
}

.micro-label,
.card-number,
.paper-tab,
.specimen-slip {
  font-family: var(--micro-hand);
  color: var(--brass);
  letter-spacing: 0.045em;
}

.micro-label {
  display: block;
  margin: 0 0 1.1rem;
  font-size: clamp(0.95rem, 1.4vw, 1.18rem);
}

h1,
h3,
.crest-ink,
.drawn-word {
  font-family: var(--display-hand);
}

h1 {
  margin: 0;
  color: var(--espresso);
  font-size: clamp(5.8rem, 16vw, 14rem);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.055em;
  text-shadow: 0.07em 0.08em 0 rgba(184, 92, 46, 0.08);
}

h2 {
  margin: 0;
  font-family: var(--display-serif);
  font-size: clamp(2.2rem, 5.7vw, 6.5rem);
  line-height: 0.92;
  color: var(--plum);
  letter-spacing: -0.05em;
}

h3 {
  margin: 0.5rem 0 0.75rem;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 0.82;
  color: var(--burnt);
}

p {
  font-size: clamp(1.2rem, 1.65vw, 1.6rem);
  line-height: 1.42;
  margin: 0;
}

.lead-note {
  width: min(35rem, 92%);
  margin-top: 1.4rem;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  color: rgba(36, 22, 17, 0.86);
}

.ink-underline,
.final-underline,
.mini-line {
  display: block;
  overflow: visible;
}

.ink-underline {
  width: min(35rem, 76vw);
  height: 4.2rem;
  margin: -0.35rem 0 0 0.8rem;
}

.ink-underline path,
.final-underline path,
.mini-line path {
  fill: none;
  stroke: var(--espresso);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
}

body.ready .ink-underline path,
.closing.in-view .final-underline path,
.flight-card.in-view .mini-line path {
  animation: drawInk 2.5s 900ms cubic-bezier(.55, 0, .12, 1) forwards;
}

.specimen-slip {
  position: absolute;
  right: clamp(1rem, 4vw, 3.5rem);
  bottom: clamp(1rem, 3vw, 2.5rem);
  max-width: 16rem;
  padding: 0.65rem 1rem;
  background: rgba(232, 207, 169, 0.72);
  transform: rotate(-3deg);
  border-left: 3px solid var(--burnt);
  font-size: 0.96rem;
}

.brass-marker {
  position: absolute;
  width: 4rem;
  height: 4rem;
  border-color: var(--brass);
  border-style: solid;
  opacity: 0;
  z-index: 4;
  transition: opacity 1s ease, transform 1.3s cubic-bezier(.16, .82, .26, 1);
}

.marker-a { left: 5%; top: 10%; border-width: 3px 0 0 3px; transform: translate(-2rem, -2rem); }
.marker-b { right: 6%; top: 6%; border-width: 3px 3px 0 0; transform: translate(2rem, -2rem); }
.marker-c { left: 12%; bottom: 8%; border-width: 0 0 3px 3px; transform: translate(-2rem, 2rem); }
.marker-d { right: 8%; bottom: 12%; border-width: 0 3px 3px 0; transform: translate(2rem, 2rem); }
body.ready .brass-marker { opacity: 0.78; transform: translate(0, 0); }

.tasting {
  align-items: start;
  gap: 2rem;
  padding-top: clamp(4rem, 8vw, 8rem);
}

.scene-heading {
  width: min(76rem, 92vw);
  display: grid;
  grid-template-columns: 1.1fr 0.7fr;
  gap: clamp(1.6rem, 5vw, 5rem);
  align-items: end;
}

.scene-heading .micro-label {
  grid-column: 1 / -1;
  margin: 0;
}

.scene-heading p,
.closing-copy p {
  color: rgba(36, 22, 17, 0.78);
}

.card-table {
  width: min(82rem, 94vw);
  min-height: 51rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(9, 4.9rem);
  position: relative;
  margin-top: clamp(1rem, 3vw, 3rem);
}

.flight-card {
  position: relative;
  padding: clamp(1.25rem, 2vw, 2rem);
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  transform: translateY(3rem) rotate(var(--rot, 0deg));
  transition: transform 1.2s cubic-bezier(.16, .84, .24, 1), opacity 1s ease, box-shadow 500ms ease, filter 500ms ease;
}

.flight-card.in-view {
  opacity: 1;
  transform: translateY(0) rotate(var(--rot, 0deg));
}

.flight-card:hover {
  transform: translateY(-0.55rem) rotate(var(--rot, 0deg));
  box-shadow: 0 3.2rem 5.2rem rgba(36, 22, 17, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.36);
  filter: saturate(1.05);
}

.flight-card::before {
  content: attr(data-note);
  position: absolute;
  right: 1.1rem;
  bottom: 0.9rem;
  font-family: var(--micro-hand);
  color: var(--burnt);
  opacity: 0;
  transform: translateY(0.5rem) rotate(-2deg);
  transition: opacity 450ms ease, transform 450ms ease;
}

.flight-card:hover::before {
  opacity: 0.82;
  transform: translateY(0) rotate(-2deg);
}

.flight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(127deg, transparent 68%, rgba(167, 111, 61, 0.34) 68% 72%, transparent 72%);
  pointer-events: none;
}

.card-observation { grid-column: 1 / 6; grid-row: 1 / 5; --rot: -2deg; z-index: 3; }
.card-doubt { grid-column: 6 / 9; grid-row: 2 / 8; --rot: 1.8deg; z-index: 4; }
.card-proof { grid-column: 8 / 13; grid-row: 1 / 4; --rot: -1deg; z-index: 2; }
.card-memory { grid-column: 2 / 6; grid-row: 5 / 9; --rot: 2.5deg; z-index: 5; }
.card-signal { grid-column: 9 / 12; grid-row: 4 / 7; --rot: -2.4deg; z-index: 5; }
.card-aftertaste { grid-column: 6 / 11; grid-row: 6 / 10; --rot: 1deg; z-index: 3; }

.card-number {
  font-size: 1rem;
  color: var(--plum);
}

.wash {
  position: absolute;
  z-index: -1;
  background: radial-gradient(circle, rgba(217, 130, 59, 0.45), rgba(240, 166, 107, 0.2) 45%, transparent 72%);
}

.wash-round {
  width: 18rem;
  height: 15rem;
  left: -2rem;
  top: 1rem;
  border-radius: 52% 48% 42% 58%;
}

.wash-splatter {
  width: 22rem;
  height: 18rem;
  right: -4rem;
  bottom: -5rem;
  border-radius: 45% 55% 63% 37%;
}

.drawn-word {
  display: inline-block;
  margin-top: 1rem;
  color: var(--plum);
  font-size: 2.25rem;
  position: relative;
}

.drawn-word::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.1rem;
  width: 100%;
  height: 0.19rem;
  background: var(--burnt);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 800ms cubic-bezier(.35, 0, .12, 1);
}

.flight-card.in-view .drawn-word::after,
.flight-card:hover .drawn-word::after {
  transform: scaleX(1);
}

.paper-tab,
.torn-layer {
  background: rgba(244, 226, 199, 0.68);
  border: 1px solid rgba(167, 111, 61, 0.26);
  box-shadow: 0 1rem 2rem rgba(36, 22, 17, 0.08);
}

.paper-tab {
  position: absolute;
  top: 1rem;
  right: -0.9rem;
  padding: 0.45rem 1rem;
  transform: rotate(90deg);
  transform-origin: center;
}

.torn-layer {
  width: 72%;
  margin: 0.6rem 0 1rem;
  padding: 0.65rem 1rem;
  font-family: var(--micro-hand);
  color: var(--brass);
  clip-path: polygon(0 14%, 8% 0, 22% 9%, 36% 0, 55% 12%, 73% 3%, 100% 16%, 97% 100%, 0 88%);
}

.angle-diagram {
  position: absolute;
  right: 1.3rem;
  top: 1.1rem;
  width: 8rem;
  height: 6rem;
}

.angle-diagram i {
  position: absolute;
  display: block;
  background: var(--brass);
  transform-origin: left center;
  height: 2px;
  width: 7rem;
  opacity: 0.78;
}

.angle-diagram i:nth-child(1) { transform: rotate(22deg); top: 1rem; left: 0; }
.angle-diagram i:nth-child(2) { transform: rotate(-38deg); top: 3.2rem; left: 0.8rem; }
.angle-diagram i:nth-child(3) { transform: rotate(82deg); top: 0.5rem; left: 3rem; width: 4.5rem; }

.signal-shard {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 5rem;
  height: 8rem;
  background: linear-gradient(150deg, rgba(240, 166, 107, 0.9), rgba(184, 92, 46, 0.3));
  clip-path: polygon(52% 0, 100% 44%, 58% 100%, 0 63%);
}

.mini-line {
  width: 14rem;
  height: 2.6rem;
  margin-top: 0.5rem;
}

.mini-line path {
  stroke: var(--burnt);
  stroke-width: 4;
}

.closing {
  grid-template-columns: minmax(16rem, 34rem) minmax(18rem, 39rem);
  gap: clamp(2rem, 7vw, 8rem);
}

.folded-crest {
  position: relative;
  width: min(34rem, 86vw);
  height: min(34rem, 86vw);
  transform: rotate(-8deg);
}

.crest-card {
  position: absolute;
  width: 62%;
  height: 44%;
  opacity: 0;
  transition: transform 1.5s cubic-bezier(.16, .84, .21, 1), opacity 1s ease;
}

.crest-one { left: 3%; top: 9%; background-color: var(--parchment); transform: translate(-6rem, 3rem) rotate(-24deg); }
.crest-two { right: 4%; top: 22%; background-color: var(--vellum); transform: translate(6rem, -2rem) rotate(28deg); }
.crest-three { left: 18%; bottom: 13%; background-color: var(--blush); transform: translate(-4rem, 5rem) rotate(19deg); }
.crest-four { right: 14%; bottom: 22%; background-color: var(--saffron); transform: translate(4rem, 5rem) rotate(-34deg); }

.closing.in-view .crest-card {
  opacity: 0.88;
}

.closing.in-view .crest-one { transform: translate(0, 0) rotate(-24deg); }
.closing.in-view .crest-two { transform: translate(0, 0) rotate(28deg); }
.closing.in-view .crest-three { transform: translate(0, 0) rotate(19deg); }
.closing.in-view .crest-four { transform: translate(0, 0) rotate(-34deg); }

.crest-ink {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(8deg);
  font-size: clamp(5rem, 13vw, 9rem);
  color: var(--espresso);
  text-shadow: 0 0.12em 0 rgba(244, 226, 199, 0.4);
}

.closing-copy {
  max-width: 43rem;
}

.final-underline {
  width: min(26rem, 72vw);
  height: 4rem;
  margin: 0.4rem 0 1.2rem;
}

.final-underline path {
  stroke: var(--burnt);
}

@keyframes bloomSpread {
  0% { transform: scale(0.18) rotate(-10deg); opacity: 0.18; filter: blur(13px); }
  55% { opacity: 0.84; filter: blur(4px); }
  100% { transform: scale(1.12) rotate(4deg); opacity: 0.78; filter: blur(2px); }
}

@keyframes drawInk {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 850px) {
  .scene {
    padding: 2rem 1rem;
  }

  .bar-surface {
    min-height: 37rem;
  }

  .scene-heading,
  .closing {
    grid-template-columns: 1fr;
  }

  .card-table {
    display: block;
    min-height: 0;
  }

  .flight-card {
    min-height: 16rem;
    margin: 1.2rem 0;
  }

  .card-doubt,
  .card-proof,
  .card-memory,
  .card-signal,
  .card-aftertaste,
  .card-observation {
    transform: translateY(3rem) rotate(var(--rot, 0deg));
  }

  .closing {
    text-align: left;
  }
}
