/* ── Variables ──────────────────────────────────────────── */
:root {
  --paper:         #f5ead0;
  --paper-dark:    #eaddb9;
  --paper-edge:    #d7c499;
  --paper-stain:   #c8a867;

  --ink:           #2f241a;
  --ink-soft:      #4a3a2a;
  --ink-faint:     #6c5744;
  --ink-muted:     #8a7460;
  --ink-ghost:     #a99578;

  --rose:          #8e2a3c;
  --rose-deep:     #6a1a2b;
  --rose-soft:     #b94b5a;
  --rose-pale:     #e8c9cd;

  --sage:          #6b7d57;
  --sage-soft:     #9aac86;
  --gold:          #a67c2a;
  --gold-deep:     #7a5818;

  --seal-red:      #8c1f2a;
  --seal-red-hi:   #ad2a36;
  --seal-red-lo:   #5c131b;

  --ff-display:    'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --ff-body:       'Cormorant Garamond', Georgia, serif;
  --ff-script:     'Italianno', 'Dancing Script', cursive;
  --ff-hand:       'Dancing Script', cursive;
  --ff-written:    'Caveat', 'Homemade Apple', 'Dancing Script', cursive;

  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
  --ease-ink:      cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  background:
    radial-gradient(ellipse at 30% 10%, #f8efd5 0%, #f2e3bf 35%, #e9d9ad 65%, #decb98 100%);
  color: var(--ink);
  font-size: 19px;
  line-height: 1.72;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  letter-spacing: 0.005em;
}

/* selection */
::selection { background: var(--rose-pale); color: var(--ink); }

/* ── Ambient: paper fiber, grain, vignette ──────────────── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  opacity: 0.09;
  mix-blend-mode: multiply;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%,
      transparent 0%,
      transparent 50%,
      rgba(90, 60, 20, 0.08) 80%,
      rgba(90, 60, 20, 0.18) 100%);
}

.paper-fiber {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(200, 168, 103, 0.22) 0%, transparent 40%),
    radial-gradient(circle at 82% 78%, rgba(200, 168, 103, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(120, 90, 45, 0.05) 0%, transparent 60%);
}

.petals-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

/* ── Layout ─────────────────────────────────────────────── */
main {
  position: relative;
  z-index: 5;
}

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 28px 60px;
  position: relative;
}

.hero-inner {
  max-width: 720px;
  animation: hero-rise 1.4s var(--ease) both;
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.hero-eyebrow {
  font-family: var(--ff-body);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: none;
  color: var(--ink-faint);
  margin-bottom: 36px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.hero-eyebrow sup { font-size: 0.7em; }

.orn {
  color: var(--rose);
  opacity: 0.65;
  font-size: 0.85em;
}

.hero-title {
  font-family: var(--ff-display);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 30px;
  color: var(--ink);
}

.hero-kicker {
  display: block;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-style: italic;
  color: var(--ink-soft);
  font-weight: 300;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.hero-main {
  display: block;
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero-main em {
  font-family: var(--ff-script);
  font-size: 1.15em;
  color: var(--rose);
  font-weight: 400;
  font-style: normal;
  padding-right: 0.15em;
  vertical-align: 0.02em;
}

.hero-sub {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 36px auto 48px;
  color: var(--rose);
  opacity: 0.7;
}

.orn-line {
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, currentColor, transparent);
}

.orn-rose {
  font-size: 1.2rem;
  animation: slowSpin 24s linear infinite;
}

@keyframes slowSpin {
  to { transform: rotate(360deg); }
}

/* ── Envelope ───────────────────────────────────────────── */
.envelope {
  position: relative;
  width: min(360px, 82%);
  margin: 0 auto 36px;
  aspect-ratio: 16/10;
  perspective: 800px;
  animation: envelopeFloat 7s ease-in-out infinite;
}

.envelope::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(255, 220, 150, 0.28) 0%,
    rgba(255, 200, 120, 0.1) 30%,
    transparent 60%
  );
  z-index: -1;
  pointer-events: none;
  animation: candleGlow 5s ease-in-out infinite;
}

@keyframes envelopeFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-5px) rotate(0.4deg); }
}

@keyframes candleGlow {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.05); }
}

.envelope-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ecd7a6 0%, #dcc38a 100%);
  border-radius: 3px;
  box-shadow:
    0 2px 0 rgba(0,0,0,0.04) inset,
    0 -1px 0 rgba(255,255,255,0.4) inset,
    0 14px 30px rgba(90, 60, 20, 0.22),
    0 2px 6px rgba(90, 60, 20, 0.15);
  overflow: hidden;
}

.envelope-body::before,
.envelope-body::after {
  content: "";
  position: absolute;
  background: rgba(110, 80, 30, 0.22);
  top: 50%;
  transform-origin: left center;
}

.envelope-body::before {
  left: 0; width: 52%; height: 1px;
  transform: translateY(-50%) rotate(32deg);
  top: 100%;
}

.envelope-body::after {
  right: 0; width: 52%; height: 1px;
  transform: translateY(-50%) rotate(-32deg);
  top: 100%;
  transform-origin: right center;
}

.envelope-flap {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(180deg, #d5b97c 0%, #c9ac6c 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 1s var(--ease);
  z-index: 2;
  box-shadow: 0 2px 4px rgba(80, 50, 15, 0.18);
}

.envelope.opened .envelope-flap {
  transform: rotateX(180deg) translateY(-4px);
}

.envelope-addressed {
  position: absolute;
  top: 32%;
  left: 14%;
  right: 30%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--ff-body);
  font-style: italic;
  color: var(--ink-faint);
  text-align: left;
}

.env-label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  opacity: 0.7;
}

.env-name {
  font-family: var(--ff-script);
  font-size: 1.7rem;
  color: var(--rose-deep);
  line-height: 1.1;
  font-style: normal;
}

.env-place {
  font-size: 0.7rem;
  opacity: 0.6;
  letter-spacing: 0.04em;
}

.envelope-seal {
  position: absolute;
  right: 6%;
  top: 50%;
  width: 58px;
  height: 58px;
  transform: translateY(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, var(--seal-red-hi), var(--seal-red) 55%, var(--seal-red-lo) 100%);
  box-shadow:
    0 2px 6px rgba(60, 10, 15, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    inset 0 -2px 2px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  animation: sealPulse 4s ease-in-out infinite;
}

.envelope-seal::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 230, 210, 0.25);
}

@keyframes sealPulse {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50%      { transform: translateY(-50%) scale(1.03); }
}

.seal-mono {
  font-family: var(--ff-display);
  font-style: italic;
  color: #f3d6c5;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* open letter button */
.open-letter {
  background: transparent;
  border: 1px solid rgba(142, 42, 60, 0.4);
  color: var(--rose);
  padding: 12px 26px;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  font-style: italic;
  letter-spacing: 0.12em;
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s var(--ease);
}

.open-letter:hover {
  background: rgba(142, 42, 60, 0.06);
  border-color: var(--rose);
  transform: translateY(-1px);
}

.open-letter svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease);
}

.open-letter.done svg {
  transform: rotate(180deg);
}

/* ── Section scaffolding ───────────────────────────────── */
.letter-section {
  padding: 100px 0;
  position: relative;
}

.section-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-family: var(--ff-body);
  font-style: italic;
  color: var(--rose);
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  margin-bottom: 28px;
  text-align: center;
  opacity: 0.78;
}

.section-tag.light { color: var(--gold-deep); }

.tag-dash {
  width: 48px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.section-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  text-align: center;
  color: var(--ink);
  margin-bottom: 14px;
  line-height: 1.15;
  letter-spacing: -0.005em;
  position: relative;
  display: inline-block;
  width: auto;
  padding-bottom: 14px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 90px;
  height: 1px;
  background: var(--rose);
  opacity: 0.5;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 1.1s var(--ease) 0.15s;
}

.section-title.drawn::after {
  transform: translateX(-50%) scaleX(1);
}

/* wrapper so the centered underline still looks centered in flow */
.letter-section .section-title,
.letter-section h2.section-title {
  display: block;
}

.section-title em {
  font-family: var(--ff-script);
  font-size: 1.2em;
  color: var(--rose);
  font-weight: 400;
  font-style: normal;
  padding: 0 0.1em;
}

.section-kicker {
  text-align: center;
  font-style: italic;
  color: var(--ink-faint);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto 48px;
}

/* ── Parchment card ────────────────────────────────────── */
.parchment {
  position: relative;
  background:
    linear-gradient(180deg,
      rgba(255, 250, 230, 0.6) 0%,
      rgba(245, 232, 200, 0.4) 100%);
  padding: 56px 10px 20px;
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 24px 40px -18px rgba(100, 70, 30, 0.3),
    0 2px 8px rgba(100, 70, 30, 0.14);
  transform: rotate(-0.3deg);
  animation: parchmentFloat 16s ease-in-out infinite;
}

.parchment.small { animation-delay: -7s; }

@keyframes parchmentFloat {
  0%, 100% { transform: rotate(-0.3deg) translateY(0); }
  50%      { transform: rotate(-0.15deg) translateY(-3px); }
}

.parchment.small { max-width: 640px; margin: 0 auto; }

.parchment::before,
.parchment::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.parchment::before {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(166, 124, 42, 0.25) 0%, transparent 30%),
    radial-gradient(ellipse at 100% 100%, rgba(166, 124, 42, 0.22) 0%, transparent 30%),
    radial-gradient(ellipse at 100% 0%, rgba(166, 124, 42, 0.18) 0%, transparent 35%),
    radial-gradient(ellipse at 0% 100%, rgba(166, 124, 42, 0.2) 0%, transparent 35%);
  mix-blend-mode: multiply;
}

.parchment::after {
  border: 1px solid rgba(140, 100, 40, 0.18);
  box-shadow: inset 0 0 60px rgba(166, 124, 42, 0.12);
}

.parchment-inner {
  position: relative;
  z-index: 1;
  padding: 0 44px 36px;
}

.salutation {
  font-family: var(--ff-script);
  font-size: 2.4rem;
  color: var(--rose-deep);
  margin-bottom: 28px;
  line-height: 1;
}

.body-text {
  font-size: 1.18rem;
  color: var(--ink-soft);
  margin-bottom: 22px;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  line-height: 1.75;
}

.body-text em {
  color: var(--rose-deep);
  font-weight: 500;
}

.body-text.center-italic {
  text-align: center;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--rose);
  margin: 28px 0 16px;
  line-height: 1.5;
}

.dropcap {
  float: left;
  font-family: var(--ff-display);
  font-size: 3.2rem;
  line-height: 0.95;
  padding: 0.05em 0.08em 0 0;
  color: var(--rose);
  font-style: normal;
}

/* ── Timeline ──────────────────────────────────────────── */
.timeline {
  list-style: none;
  position: relative;
  padding: 20px 0 10px;
  max-width: 680px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 20px;
  bottom: 20px;
  width: 1px;
  background:
    repeating-linear-gradient(
      to bottom,
      var(--ink-muted) 0,
      var(--ink-muted) 4px,
      transparent 4px,
      transparent 9px
    );
  opacity: 0.45;
}

.tl-day {
  position: relative;
  margin-bottom: 14px;
  transition: all 0.45s var(--ease);
}

.tl-toggle {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  padding: 14px 0 14px 56px;
  position: relative;
  display: block;
  font-family: inherit;
  color: inherit;
  border-radius: 6px;
  transition: background 0.3s;
}

.tl-toggle:hover {
  background: rgba(140, 95, 40, 0.06);
}

.tl-spine {
  position: absolute;
  left: 0;
  top: 14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--rose);
  box-shadow: 0 0 0 4px var(--paper);
  position: relative;
  z-index: 1;
  transition: all 0.3s var(--ease);
}

.tl-day.highlight .tl-dot::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--rose);
  opacity: 0;
  animation: heartbeat 2.4s ease-out infinite;
}

@keyframes heartbeat {
  0%   { transform: scale(1);   opacity: 0.7; }
  80%  { transform: scale(2.4); opacity: 0;   }
  100% { transform: scale(2.4); opacity: 0;   }
}

.tl-day.open .tl-dot,
.tl-day.highlight .tl-dot {
  background: var(--rose);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px rgba(142, 42, 60, 0.18);
}

.tl-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tl-date {
  font-family: var(--ff-body);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.today-pill {
  background: var(--rose);
  color: var(--paper);
  font-size: 0.68rem;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.1em;
  font-style: normal;
  font-weight: 500;
}

.tl-title {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.25;
}

.tl-day.highlight .tl-title {
  color: var(--rose-deep);
}

.tl-hint {
  font-family: var(--ff-hand);
  font-size: 1rem;
  color: var(--rose);
  opacity: 0.7;
  margin-top: 4px;
  transition: opacity 0.3s;
}

.tl-day.open .tl-hint {
  opacity: 0;
}

.tl-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s var(--ease);
  padding-left: 56px;
  padding-right: 12px;
}
/* .tl-day.open .tl-body max-height is set inline by JS (scrollHeight) */

.tl-body p {
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 12px;
  padding-top: 10px;
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.5s var(--ease) 0.1s;
}

.tl-day.open .tl-body p {
  opacity: 1;
  transform: translateY(0);
}

.tl-body em {
  color: var(--rose-deep);
  font-weight: 500;
}

.tl-body q {
  font-style: italic;
  font-family: var(--ff-script);
  font-size: 1.3em;
  color: var(--rose);
  quotes: "“" "”";
}

.tl-sub {
  font-family: var(--ff-hand);
  font-size: 1.05rem;
  color: var(--ink-muted);
  font-style: italic;
  text-align: center;
  margin-top: 8px !important;
  opacity: 0.82;
}

.timeline-footer {
  text-align: center;
  margin-top: 40px;
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-faint);
}

.timeline-footer em {
  color: var(--rose);
  font-weight: 500;
}

/* ── Journey (Map) ─────────────────────────────────────── */
.journey {
  background:
    linear-gradient(180deg,
      transparent 0%,
      rgba(240, 225, 190, 0.35) 15%,
      rgba(240, 225, 190, 0.35) 85%,
      transparent 100%);
}

.map-card {
  background: rgba(255, 250, 230, 0.55);
  border: 1px solid rgba(140, 100, 40, 0.18);
  border-radius: 4px;
  padding: 30px 24px 24px;
  margin: 10px auto 40px;
  box-shadow:
    0 14px 30px -18px rgba(100, 70, 30, 0.3),
    0 1px 3px rgba(100, 70, 30, 0.1);
  position: relative;
}

.map-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(140, 100, 40, 0.15);
  border-radius: 2px;
  pointer-events: none;
}

.route-map {
  width: 100%;
  height: auto;
  display: block;
  max-height: 340px;
}

.route-map .coast,
.route-map .coast-ghost {
  stroke: var(--ink-ghost);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0.4;
}

.route-map .hill {
  fill: rgba(166, 124, 42, 0.12);
}

.route-map .hill-far {
  fill: rgba(166, 124, 42, 0.07);
}

.route-map .route {
  stroke: var(--ink-ghost);
  stroke-width: 1.2;
  stroke-dasharray: 1 4;
  opacity: 0.45;
}

.route-map .route-dash {
  stroke: var(--rose);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: drawRoute 3.6s var(--ease-ink) 0.3s forwards;
}

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

.route-map .pin-ring {
  fill: rgba(142, 42, 60, 0.1);
  stroke: var(--rose);
  stroke-width: 1;
  animation: pinRing 2.4s ease-out infinite;
}

.route-map .pin-2 .pin-ring {
  animation-delay: 1.2s;
}

@keyframes pinRing {
  0%   { r: 6;  opacity: 1;   }
  100% { r: 26; opacity: 0;   }
}

.route-map .pin-dot {
  fill: var(--rose-deep);
}

.route-map .pin-label {
  font-family: var(--ff-display);
  font-size: 14px;
  fill: var(--ink);
  text-anchor: middle;
  font-weight: 500;
}

.route-map .pin-sub {
  font-family: var(--ff-body);
  font-size: 10px;
  fill: var(--ink-muted);
  font-style: italic;
  text-anchor: middle;
}

.route-map .car {
  fill: var(--ink);
  opacity: 0;
  animation: carDrive 6s var(--ease-ink) 0.5s forwards;
}

.route-map .car rect {
  fill: var(--rose-deep);
}

.route-map .car circle {
  fill: var(--ink);
}

@keyframes carDrive {
  0%   { opacity: 0; offset-distance: 0%;   }
  10%  { opacity: 1;                         }
  95%  { opacity: 1;                         }
  100% { opacity: 0.9; offset-distance: 100%; }
}

.journey-copy {
  margin-top: 24px;
  padding: 0 12px;
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.journey-copy p { margin-bottom: 14px; }

.journey-copy em {
  color: var(--rose-deep);
  font-weight: 500;
}

/* travellers */
.travellers {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 42px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.traveller {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.traveller-icon {
  width: 50px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.traveller-icon.dog {
  width: 72px;
}

.traveller-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.traveller-icon.dog svg {
  fill: rgba(166, 124, 42, 0.12);
}

.traveller-icon svg .eye {
  fill: var(--ink-soft);
  stroke: none;
}

.traveller-name {
  font-family: var(--ff-script);
  font-size: 1.4rem;
  color: var(--rose-deep);
  line-height: 1;
}

/* ── Ahead cards ───────────────────────────────────────── */
.ahead-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.ahead-card {
  background: rgba(255, 250, 230, 0.55);
  border: 1px solid rgba(140, 100, 40, 0.2);
  border-radius: 3px;
  padding: 30px 22px 24px;
  text-align: center;
  position: relative;
  transition: all 0.4s var(--ease);
}

.ahead-card:hover {
  transform: translateY(-3px) rotate(-0.3deg);
  box-shadow: 0 18px 32px -16px rgba(100, 70, 30, 0.25);
  border-color: var(--rose);
}

.ahead-ico {
  color: var(--rose);
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
}

.ahead-ico svg {
  width: 48px;
  height: 48px;
}

.ahead-card h3 {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.ahead-card h3 em {
  font-family: var(--ff-script);
  font-size: 1.2em;
  color: var(--rose);
  font-weight: 400;
  font-style: normal;
}

.ahead-card p {
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.ahead-card em {
  color: var(--rose-deep);
  font-style: italic;
}

/* ── Handwritten closing letter ───────────────────────── */
#closing .tegaki,
#closing-ps .tegaki {
  font-family: var(--ff-written);
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.45;
  color: var(--rose-deep);
  letter-spacing: 0.002em;
  text-align: left;
  text-justify: none;
  hyphens: none;
  /* subtle ink variation */
  text-shadow: 0 0 0.4px rgba(106, 26, 43, 0.15);
}

#closing .body-text.tegaki {
  margin-bottom: 18px;
}

/* faint ruled-paper feel behind handwritten lines */
#closing .parchment-inner {
  position: relative;
}

#closing .parchment-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 40px,
    rgba(140, 100, 40, 0.08) 40px,
    rgba(140, 100, 40, 0.08) 41px
  );
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.35;
  border-radius: inherit;
  z-index: 0;
}

#closing .parchment-inner > * {
  position: relative;
  z-index: 1;
}

/* handwritten center italic keeps the flourish */
#closing .body-text.center-italic.tegaki {
  font-size: 1.75rem;
  color: var(--rose);
  font-style: italic;
  text-align: center;
  margin: 22px 0 10px;
}

/* em in handwritten letter: underline, same colour */
#closing .tegaki em {
  font-style: italic;
  color: var(--rose);
  position: relative;
}

#closing .tegaki em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--rose);
  opacity: 0.35;
}

#closing-ps .tegaki {
  font-size: 1.25rem;
  color: var(--ink-faint);
}

/* ── Tegaki renderer host state ──────────────────────── */
.tegaki {
  position: relative;
}

/* hide the paragraph text until the engine has taken over.
   .ready = engine mounted, paused. .writing = drawing. .done = finished. */
.tegaki.ready tegaki-renderer,
.tegaki.writing tegaki-renderer,
.tegaki.done tegaki-renderer {
  display: block;
}

#closing tegaki-renderer {
  width: 100%;
  color: inherit;
}

/* signature & PS start hidden, revealed after writing completes */
#closing-signature {
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}

#closing-signature.visible {
  opacity: 1;
}

#closing-ps {
  opacity: 0;
  transition: opacity 0.8s var(--ease) 0.2s;
}

#closing-ps.visible {
  opacity: 1;
}

.tegaki-skip {
  display: block;
  margin: 24px auto 0;
  background: transparent;
  border: 1px solid rgba(74, 58, 42, 0.28);
  color: var(--ink-muted);
  padding: 6px 14px;
  font-family: var(--ff-body);
  font-size: 0.82rem;
  font-style: italic;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.25s;
  opacity: 0;
  pointer-events: none;
}

.tegaki-skip.visible {
  opacity: 1;
  pointer-events: auto;
}

.tegaki-skip:hover {
  color: var(--rose);
  border-color: rgba(142, 42, 60, 0.4);
}

.tegaki-skip.gone {
  display: none;
}

/* ── Closing ──────────────────────────────────────────── */
.signature {
  font-family: var(--ff-script);
  font-size: 3rem;
  color: var(--rose-deep);
  line-height: 0.9;
  margin-top: 28px;
  text-align: right;
  padding-right: 20px;
  position: relative;
}

.signature span {
  display: inline-block;
  transform: rotate(-2deg);
  padding-left: 20px;
  position: relative;
  background-image: linear-gradient(to right, var(--rose-deep) 0%, var(--rose-deep) 50%, transparent 50%);
  background-size: 200% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: background-position 1.6s var(--ease-ink);
}

.signature.drawn span {
  background-position: 0 0;
}

.signature::after {
  content: "";
  display: block;
  width: 0;
  height: 1.5px;
  margin-left: auto;
  margin-top: -8px;
  background: linear-gradient(to right, transparent, var(--rose), transparent);
  transition: width 1.2s var(--ease) 1s;
  opacity: 0.6;
}

.signature.drawn::after {
  width: 160px;
}

.ps {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px dashed rgba(140, 100, 40, 0.3);
  font-size: 0.98rem;
  color: var(--ink-faint);
  font-style: italic;
  line-height: 1.5;
}

.ps-label {
  font-family: var(--ff-written);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--rose);
  margin-right: 8px;
  letter-spacing: 0.01em;
}

/* footer */
.letter-footer {
  text-align: center;
  padding: 40px 20px 80px;
  font-family: var(--ff-body);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Reveal on scroll ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile ────────────────────────────────────────────── */
@media (max-width: 760px) {
  body { font-size: 17px; }

  .container { padding: 0 20px; }

  .letter-section { padding: 70px 0; }

  .hero { padding: 60px 20px 40px; min-height: 90vh; }

  .hero-title { margin-bottom: 22px; }

  .hero-sub { font-size: 1.02rem; margin-bottom: 32px; }

  .envelope { width: min(320px, 92%); margin-bottom: 30px; }

  .env-name { font-size: 1.5rem; }

  .envelope-seal { width: 50px; height: 50px; }

  .seal-mono { font-size: 0.9rem; }

  .parchment-inner { padding: 0 20px 28px; }

  .parchment { padding: 40px 8px 14px; }

  .salutation { font-size: 2rem; }

  .body-text { font-size: 1.06rem; }

  .section-title { font-size: 2rem; }

  .tl-toggle { padding-left: 44px; }

  .tl-spine { width: 28px; left: 0; }

  .timeline::before { left: 14px; }

  .tl-body { padding-left: 44px; }

  .tl-title { font-size: 1.2rem; }

  .signature { font-size: 2.4rem; }

  .travellers { gap: 28px; }

  .map-card { padding: 20px 14px 18px; }
}

/* handwritten closing — scale down on mobile */
@media (max-width: 760px) {
  #closing .tegaki,
  #closing-ps .tegaki {
    font-size: 1.4rem;
    line-height: 1.4;
  }

  #closing .body-text.center-italic.tegaki {
    font-size: 1.55rem;
  }

  #closing-ps .tegaki {
    font-size: 1.15rem;
  }

  #closing .parchment-inner::before {
    background-image: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 33px,
      rgba(140, 100, 40, 0.08) 33px,
      rgba(140, 100, 40, 0.08) 34px
    );
  }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
