/* ==========================================================
   Polished overlay — six high-leverage moves
   Layers ON TOP of original-styles.css. Original tokens kept;
   new motion + typographic refinements added below.
   ========================================================== */

:root {
  --hand: 'Caveat', 'Homemade Apple', 'Brush Script MT', cursive;
  --pause: cubic-bezier(.2, .7, .2, 1);
  --ease-soft: cubic-bezier(.25, .1, .25, 1);
}

/* ==========================================================
   GLOBAL polish
   ========================================================== */

/* Better wrapping on display copy */
.section__title,
.hero__tagline,
.credibility__line,
.value h3,
.cta-card h3,
.faq__item summary {
  text-wrap: balance;
}
.prose p { text-wrap: pretty; hyphens: auto; }

/* Animated link underline (only inline prose links, not nav) */
.prose a, .footer__line a, .credibility__line a {
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .4s var(--pause);
  padding-bottom: 2px;
}
.prose a:hover, .footer__line a:hover, .credibility__line a:hover {
  background-size: 100% 2px;
  color: var(--ink);
}
.section--value .prose a, .footer .footer__line a {
  background-image: linear-gradient(var(--accent), var(--accent));
}

/* Subtle film grain — only over imagery */
.image-slot::after {
  border: 0 !important;
}
.image-slot:has(img)::after,
.image-slot:has(video)::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(0,0,0,0.025) 1px, transparent 1.4px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  opacity: 0.6;
  z-index: 2;
}

/* Section title scroll-reveal — clip mask wipe */
.section__title.reveal {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.08em;
  position: relative;
}
.section__title.reveal > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--pause);
}
.section__title--centered.reveal {
  display: block;
  text-align: center;
}
.section__title--centered.reveal > span { display: inline-block; }
.section__title.reveal.in > span { transform: translateY(0); }

/* Generic fade-up for prose blocks */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s var(--pause), transform .9s var(--pause);
  transition-delay: var(--d, 0s);
}
.fade-up.in { opacity: 1; transform: translateY(0); }

/* ==========================================================
   MOVE 1 — HERO
   Dateline, ken-burns, scroll cue, italic accent in tagline
   ========================================================== */

/* Slow ken-burns on hero video */
.hero__image video {
  object-position: center 60%;
  transform-origin: 55% 60%;
  animation: kenBurns 26s ease-in-out infinite alternate;
}
@keyframes kenBurns {
  0%   { transform: scale(1.0) translate3d(0,0,0); }
  100% { transform: scale(1.06) translate3d(-1%, -0.6%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__image video { animation: none; transform: scale(1.0); }
}

/* Tagline — italic emphasis on a phrase */
.hero__tagline em {
  font-style: italic;
  color: rgba(250,247,242,0.94);
  position: relative;
}
.hero__tagline em::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -0.06em;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  animation: drawIn 1.4s var(--pause) 1.2s forwards;
}
@keyframes drawIn { to { transform: scaleX(1); } }

/* Hero entry — line-by-line reveal */
.hero__overlay > * {
  opacity: 0;
  transform: translateY(24px);
  animation: heroIn 1s var(--pause) forwards;
}
.hero__tagline { animation-delay: .65s; }
.hero__cta { animation-delay: 1.05s; }
.hero__scroll-cue { animation-delay: 1.4s; }
@keyframes heroIn { to { opacity: 1; transform: translateY(0); } }
@keyframes heroFadeDown { to { opacity: 1; transform: translateY(0); } }

/* Scroll cue — bottom right */
.hero__scroll-cue {
  position: absolute;
  right: 8%;
  bottom: 8%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: rgba(250,247,242,0.85);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
}
.hero__scroll-cue .line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, rgba(250,247,242,0.6), rgba(250,247,242,0));
  position: relative;
  overflow: hidden;
}
.hero__scroll-cue .line::before {
  content: "";
  position: absolute;
  top: -56px;
  left: 0;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, rgba(250,247,242,0), var(--accent));
  animation: scrollDot 2.4s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0); }
  100% { transform: translateY(112px); }
}
.hero__scroll-cue:hover { color: var(--paper); }

/* ==========================================================
   MOVE 2 — ABOUT, scroll-pinned
   Sticky media column. Trip photos crossfade as bio reveals.
   Handwritten margin notes anchored to each photo.
   ========================================================== */

.section--about.scroll-pin {
  padding: 0;
  background: var(--paper);
}
.scroll-pin__wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 120px 28px;
  align-items: start;
}
.scroll-pin__media {
  position: sticky;
  top: 12vh;
  height: 76vh;
  min-height: 520px;
}
.scroll-pin__stack {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  overflow: hidden;
  background: var(--ink);
}
.scroll-pin__stack figure {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.1s var(--ease-soft), transform 6s var(--ease-soft);
}
.scroll-pin__stack figure.active {
  opacity: 1;
  transform: scale(1);
}
.scroll-pin__stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scroll-pin__stack figcaption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 2;
  font-family: var(--hand);
  font-size: 26px;
  color: var(--paper);
  letter-spacing: 0.005em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(8px) rotate(-2deg);
  transition: opacity .9s .25s var(--ease-soft), transform .9s .25s var(--ease-soft);
  max-width: 70%;
  line-height: 1.15;
}
.scroll-pin__stack figure.active figcaption {
  opacity: 1;
  transform: translateY(0) rotate(-2deg);
}

/* Progress dots — small, right side of sticky media */
.scroll-pin__progress {
  position: absolute;
  right: -22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.scroll-pin__progress span {
  width: 1px;
  height: 18px;
  background: var(--rule);
  transition: background .4s ease, height .4s ease;
}
.scroll-pin__progress span.on { background: var(--accent); height: 28px; }

/* Right column — bio chapters */
.scroll-pin__text {
  padding: 6vh 0 24vh;
}
.scroll-pin__text .section__title {
  margin-top: 0;
}
.bio-chapter {
  min-height: 38vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0;
  opacity: 0.35;
  transition: opacity .6s var(--ease-soft);
}
.bio-chapter.active { opacity: 1; }
.bio-chapter p {
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.65;
  margin: 0 0 16px;
  color: var(--ink);
}
.bio-chapter .chapter-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}
.bio-chapter .chapter-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 20px;
  letter-spacing: -0.005em;
}

/* Drop cap on first chapter */
.bio-chapter:first-of-type p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 5em;
  float: left;
  line-height: 0.85;
  padding: 6px 12px 0 0;
  color: var(--accent);
  font-weight: 500;
}

/* Footnote */
.bio-chapter--footnote {
  min-height: 0;
  padding-top: 28px;
  margin-top: 12px;
  border-top: 1px solid var(--rule);
}
.bio-chapter--footnote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
  opacity: 0.85;
}

@media (max-width: 900px) {
  .scroll-pin__wrap { grid-template-columns: 1fr; gap: 32px; padding: 60px 22px; }
  .scroll-pin__media { position: relative; height: 60vh; min-height: 380px; top: auto; }
  .scroll-pin__progress { display: none; }
  .bio-chapter { min-height: 0; padding: 16px 0; opacity: 1; }
}

/* ==========================================================
   MOVE 3 — GALLERY route line + handwritten captions
   ========================================================== */

.gallery {
  position: relative;
  isolation: isolate;
}
.gallery__route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
.gallery__route path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 6 8;
  stroke-dashoffset: 2000;
  opacity: 0;
  transition: stroke-dashoffset 2.4s var(--ease-soft), opacity .6s ease;
}
.gallery__route.in path {
  stroke-dashoffset: 0;
  opacity: 0.85;
}
.gallery__route circle {
  fill: var(--accent);
  opacity: 0;
  transition: opacity .4s ease;
  transition-delay: var(--d, 0s);
}
.gallery__route.in circle { opacity: 1; }

.gallery__item {
  position: relative;
  z-index: 2;
}
.gallery__item .image-slot {
  overflow: hidden;
  cursor: default;
}
.gallery__item .image-slot img {
  transition: transform 1.4s var(--ease-soft), filter .4s ease;
  will-change: transform;
}
.gallery__item:hover .image-slot img {
  transform: scale(1.06);
}

/* Hover caption overlay */
.gallery__quote {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  background: linear-gradient(180deg, transparent 35%, rgba(26,26,26,0.65) 100%);
  color: var(--paper);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity .5s var(--ease-soft);
  pointer-events: none;
  z-index: 3;
}
.gallery__item:hover .gallery__quote { opacity: 1; }

/* Handwritten caption replaces typed figcaption */
.gallery figcaption {
  font-family: var(--hand) !important;
  font-style: normal !important;
  font-size: 22px !important;
  color: var(--ink) !important;
  margin-top: 16px !important;
  letter-spacing: 0 !important;
  line-height: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.gallery figcaption::before,
.gallery figcaption::after {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--rule);
}

/* Pin marker on each gallery item */
.gallery__pin {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--accent);
  z-index: 4;
  opacity: 0;
  transition: opacity .4s ease;
  transition-delay: var(--d, 0s);
}
.gallery__pin.in { opacity: 1; }

/* ==========================================================
   MOVE 4 — TRIPS I LOVE cards (hover personality)
   ========================================================== */

.card {
  position: relative;
  overflow: hidden;
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 42px -28px rgba(26,26,26,0.4);
}
.card .image-slot { overflow: hidden; }
.card .image-slot img,
.card .image-slot video {
  transition: transform 1.6s var(--ease-soft);
}
.card:hover .image-slot img,
.card:hover .image-slot video {
  transform: scale(1.05);
}

/* First-person hover note */
.card__note {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  font-family: var(--hand);
  font-size: 22px;
  color: var(--paper);
  background: rgba(26,26,26,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 8px 14px;
  border-radius: 2px;
  transform: rotate(-2deg) translateY(-8px);
  opacity: 0;
  transition: opacity .5s var(--ease-soft), transform .5s var(--ease-soft);
  pointer-events: none;
  max-width: 70%;
  line-height: 1.1;
}
.card:hover .card__note {
  opacity: 1;
  transform: rotate(-2deg) translateY(0);
}

/* Tiny corner mark (asterisk) */
.card__mark {
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 3;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--paper);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  opacity: 0.85;
}

/* ==========================================================
   MOVE 5 — FORM polish
   Conversational legends, focus draws, completed checkmark.
   ========================================================== */

.intake__group legend {
  font-style: italic;
  position: relative;
  padding-right: 28px;
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
}
.intake__group legend::before {
  content: attr(data-num);
  font-family: var(--hand);
  font-style: normal;
  font-size: 22px;
  color: var(--accent);
  margin-right: 4px;
  letter-spacing: 0;
}
.intake__group legend::after {
  content: "—";
  color: var(--rule);
  font-style: normal;
  font-weight: 400;
}

/* Field underline draw */
.field {
  position: relative;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  border-bottom-color: var(--rule);
  transition: border-color .3s ease;
}
.field input:focus,
.field textarea:focus {
  border-bottom-color: transparent !important;
  border-bottom-width: 1px !important;
}
.field--input::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .5s var(--pause);
}
.field--input:focus-within::after {
  transform: scaleX(1);
}

/* Completed field check */
.field--input::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 14px;
  width: 18px;
  height: 18px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 45%, var(--accent) 45%, var(--accent) 55%, transparent 55%) no-repeat,
    linear-gradient(45deg, transparent 45%, var(--accent) 45%, var(--accent) 55%, transparent 55%) no-repeat;
  /* simpler: a check svg via mask */
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23b85c38' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/12px no-repeat;
  border: 0;
  opacity: 0;
  transform: scale(.6) rotate(-12deg);
  transition: opacity .35s var(--pause), transform .35s var(--pause);
}
.field--input.has-value::before {
  opacity: 1;
  transform: scale(1) rotate(0);
}

/* Encouraging legend hover */
.intake__group:focus-within legend::before { color: var(--accent); }

/* Submit hover detail */
.submit {
  position: relative;
  overflow: hidden;
  transition: background .35s ease, letter-spacing .35s ease;
}
.submit::after {
  content: "→ to billy";
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translate(40px, -50%);
  font-family: var(--hand);
  font-size: 22px;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0;
  transition: opacity .35s ease, transform .45s var(--pause);
  color: var(--paper);
}
.submit:hover {
  letter-spacing: 0.22em;
}
.submit:hover::after {
  opacity: 0.9;
  transform: translate(0, -50%);
}

/* Form intro replacement — handwritten line */
.section--form .form__intro {
  position: relative;
  padding-bottom: 12px;
}
.section--form .form__intro::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 64px;
  height: 1px;
  background: var(--accent);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 1s var(--pause) .3s;
}
.section--form.in .form__intro::after { transform: translateX(-50%) scaleX(1); }

/* ==========================================================
   MOVE 6 — FOOTER signature
   ========================================================== */

.footer {
  padding: 120px 0 80px;
}
.footer .container { max-width: 720px; }

.footer__signature {
  display: block;
  margin: 0 auto 20px;
  width: min(420px, 80%);
  height: auto;
}
.footer__signature text {
  font-family: 'Caveat', 'Homemade Apple', cursive;
  font-size: 130px;
  font-weight: 600;
  fill: none;
  stroke: var(--paper);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer__signature .sig-stroke {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  transition: stroke-dashoffset 2.6s var(--ease-soft), fill 1.2s ease 2.4s;
}
.footer__signature.in .sig-stroke {
  stroke-dashoffset: 0;
  fill: var(--paper);
}
.footer__name { display: none; }
.footer__role {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: rgba(250,247,242,0.75);
  margin: 8px 0 24px;
  letter-spacing: 0.005em;
}
.footer__seal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(250,247,242,0.5);
  margin-top: 32px;
}
.footer__seal::before, .footer__seal::after {
  content: "";
  width: 24px;
  height: 1px;
  background: rgba(250,247,242,0.3);
}

/* ==========================================================
   Topbar refinement — subtle border on scroll
   ========================================================== */
.topbar {
  transition: background .4s ease, backdrop-filter .4s ease;
}
.topbar.scrolled {
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}
.topbar.scrolled .topbar__mark { color: var(--ink); mix-blend-mode: normal; }
.topbar.scrolled .topbar__cta {
  color: var(--ink);
  background: transparent;
  border-color: var(--ink);
}
.topbar.scrolled .topbar__cta:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Right-align nav links next to the CTA */
.topbar__nav {
  margin-left: auto;
  margin-right: 24px;
  display: flex;
  gap: 28px;
  align-items: center;
}
.topbar__nav a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  mix-blend-mode: difference;
  padding: 6px 0;
  position: relative;
  transition: color .2s ease;
}
.topbar__nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s var(--pause, ease);
}
.topbar__nav a:hover::after { transform: scaleX(1); }
.topbar.scrolled .topbar__nav a {
  color: var(--ink);
  mix-blend-mode: normal;
}
@media (max-width: 720px) {
  .topbar__nav { display: none; }
}
