:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --muted: #5c5c5c;
  --line: #e6e6e6;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }

.sr-only, .hp {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.top, .wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 16px;
}
@media (min-width: 720px) {
  .top, .wrap { padding-inline: 40px; }
}

em { font-style: italic; }

/* ---------- top ---------- */
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding-block: 14px;
  position: sticky; top: 0; z-index: 10;
  max-width: none;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
@media (min-width: 720px) {
  .top { padding-inline: max(40px, calc((100vw - 1120px) / 2 + 40px)); }
}
.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font: 400 26px/1 var(--serif);
  color: var(--ink); text-decoration: none;
}
.logo { position: relative; width: 26px; height: 26px; flex: none; }
.logo svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transform: scale(0.6) rotate(-40deg);
  transition: opacity 0.4s, transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.logo svg.on { opacity: 1; transform: none; }
.top-link {
  font-size: 15px; font-weight: 500; color: #fff; text-decoration: none;
  padding: 9px 18px; border-radius: 999px;
  background: var(--ink);
  transition: opacity 0.15s;
}
.top-link:hover { opacity: 0.8; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.ig {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow 0.15s;
}
.ig:hover { box-shadow: 0 0 0 1.5px var(--ink); }
.ig svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ig svg.fill { width: 17px; height: 17px; fill: currentColor; stroke: none; }
/* On phones the header is just logo + signup; socials live in the footer. */
@media (max-width: 640px) { .ig { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding-block: 40px 32px;
}
@media (min-width: 720px) { .hero { padding-block: 56px 28px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px;
  padding: 6px 14px 6px 11px;
  font-size: 13px; font-weight: 500; color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
  border-radius: 999px;
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #1fc95a; }
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: #1fc95a;
  animation: ping 2s ease-out infinite;
}
@keyframes ping { to { transform: scale(3); opacity: 0; } }

h1 {
  margin: 0 auto;
  max-width: 980px;
  font: 400 clamp(42px, 6.4vw, 76px)/1.02 var(--serif);
  letter-spacing: -0.02em;
}
.place-slot {
  position: relative; display: inline-block; min-height: 1em;
  margin-left: 0.12em; padding: 0 0.22em;
  border-radius: 999px;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
/* Long names (Puerto Escondido) shrink a touch on small phones so the emoji stays on the line. */
@media (max-width: 400px) { .place-slot.long { font-size: 0.86em; } }
@media (max-width: 340px) { .place-slot.long { font-size: 0.76em; } }
.fx-svg {
  position: absolute; display: none;
  overflow: visible;
  fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}
.fx-svg path { vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.2s ease-in; }
.drawn .fx-svg path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.7s cubic-bezier(0.6, 0, 0.3, 1) 0.1s; }
.drawn .fx-under path + path { transition-delay: 0.45s; }
.fx-circle { left: -2%; top: -12%; width: 104%; height: 130%; }
.fx-under, .fx-zigzag { left: 3%; bottom: -0.16em; width: 94%; height: 0.3em; }
[data-fx="circle"] .fx-circle, [data-fx="under"] .fx-under, [data-fx="zigzag"] .fx-zigzag { display: block; }

/* highlighter */
.place-slot::before {
  content: ""; position: absolute; z-index: -1;
  left: 0.05em; right: 0.05em; top: 0.52em; bottom: 0.02em;
  background: #ffe24a; border-radius: 4px;
  transform: rotate(-1.5deg) scaleX(0); transform-origin: left;
  transition: transform 0.2s;
}
[data-fx="marker"].drawn::before { transform: rotate(-1.5deg) scaleX(1); transition: transform 0.55s cubic-bezier(0.6, 0, 0.3, 1) 0.1s; }

/* sticker */
[data-fx="pill"] { transform: rotate(0) scale(0.92); }
[data-fx="pill"].drawn { background: var(--ink); transform: rotate(-3deg) scale(1); }
[data-fx="pill"].drawn em { color: #fff; }

/* passport stamp */
[data-fx="stamp"] { border-radius: 0.28em; }
[data-fx="stamp"].drawn { box-shadow: inset 0 0 0 2px var(--ink); transform: rotate(-2.5deg); }

/* gradient text */
[data-fx="color"] em {
  background: linear-gradient(100deg, #ff7a3d, #ff3d7f 50%, #7b5cff);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; padding-right: 0.06em;
}

#place {
  display: inline-block;
  transition: opacity 0.35s, transform 0.35s, filter 0.35s, color 0.3s;
}
#place.out { opacity: 0; transform: translateY(0.25em); filter: blur(6px); }

.place-emoji {
  display: inline-block;
  margin-left: 0.12em;
  font-size: 0.62em; vertical-align: 0.32em;
  transition: opacity 0.3s, transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.place-emoji.out { opacity: 0; transform: scale(0.3) rotate(-25deg); }

.lede {
  margin: 22px auto 0;
  max-width: 520px;
  font-size: 18px; color: var(--muted);
  text-wrap: pretty;
}

.signup { margin: 32px auto 0; max-width: 480px; }
.field {
  display: flex; flex-direction: column; gap: 8px;
  padding: 7px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 0 0 1.5px var(--ink);
  transition: box-shadow 0.2s;
}
.field:focus-within { box-shadow: 0 0 0 2.5px var(--ink); }
@media (min-width: 520px) { .field { flex-direction: row; border-radius: 999px; } }
.field input[type="email"] {
  flex: 1; min-width: 0;
  padding: 14px 18px;
  font: inherit; font-size: 17px; color: var(--ink);
  background: transparent; border: 0; outline: none;
}
.field input[type="email"]::placeholder { color: #9a9a9a; }
.field button {
  padding: 15px 26px;
  font: 600 16px/1 var(--sans); color: #fff;
  background: var(--ink);
  border: 0; border-radius: 999px; cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, opacity 0.15s;
}
.field button:hover:not(:disabled) { transform: translateY(-1px); opacity: 0.85; }
.field button:disabled { cursor: default; }
.form-note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.signup[data-state="error"] .form-note { color: #d6334f; }
.signup[data-state="done"] .form-note { color: var(--ink); font-weight: 500; }
.count { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--ink); }

/* ---------- whatsapp card (after signup) ---------- */
.wa-card {
  margin: 18px auto 0;
  max-width: 480px;
  padding: 20px 22px;
  text-align: left;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -24px rgba(0, 0, 0, 0.35);
  animation: wa-in 0.5s cubic-bezier(0.3, 1.3, 0.5, 1) both;
}
@keyframes wa-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.wa-title { margin: 0; font: 400 24px/1.15 var(--serif); color: var(--ink); }
.wa-text { margin: 6px 0 16px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.wa-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px;
  font-weight: 600; font-size: 15px; color: #fff; text-decoration: none;
  background: #1fa855; border-radius: 999px;
  transition: transform 0.15s, background 0.15s;
}
.wa-btn:hover { transform: translateY(-1px); background: #198f48; }
.wa-btn svg { width: 19px; height: 19px; }

/* ---------- photo loading ---------- */
/* Plain grey behind each photo slot while it downloads. */
/* Placeholders sit behind the photo (on its frame), so they stay visible while the photo fades in. */
.reel img { background: #efefef; max-width: none; }
.card-photo { aspect-ratio: 4 / 3; background: #e6e6e6; }
.city .card-photo { background: #24212e; }
.closing-photos { background: #1c1c1c; }

/* ---------- photo reel ---------- */
.reel {
  overflow: hidden;
  padding-block: 32px 56px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.reel-track {
  display: flex; gap: 22px; width: max-content;
  align-items: center;
  animation: drift 70s linear infinite;
}
.reel:hover .reel-track { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(calc(-50% - 11px)); } }
.reel figure {
  width: min-content; /* frame hugs the photo; long captions wrap instead of widening it */
  margin: 0;
  padding: 8px 8px 0;
  background-color: #fff;
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -22px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s;
}
.reel figure:hover { transform: rotate(0) scale(1.03); }
.reel .tilt-l { transform: rotate(-2deg); }
.reel .tilt-r { transform: rotate(1.6deg) translateY(10px); }
.reel img {
  height: 300px; width: 225px;
  object-fit: cover;
  border-radius: 9px;
}
.reel .wide img { width: 400px; }
@media (max-width: 600px) {
  .reel img { height: 220px; width: 165px; }
  .reel .wide img { width: 290px; }
}
.reel figcaption {
  padding: 8px 4px 10px;
  font: italic 400 17px/1.2 var(--serif);
  color: var(--ink);
}

/* ---------- section headers ---------- */
.section-title {
  margin: 0;
  text-align: center;
  font: 400 clamp(40px, 6vw, 64px)/1 var(--serif);
  letter-spacing: -0.015em;
}
.section-sub {
  margin: 14px auto 44px;
  max-width: 520px;
  text-align: center;
  color: var(--muted);
}

/* ---------- places ---------- */
.places { padding-block: 64px 48px; }
.place-grid {
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .place-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .place-grid { grid-template-columns: repeat(4, 1fr); } }
.place-card {
  display: flex; flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  color: inherit; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.place-card:hover { transform: translateY(-4px); }
.card-photo { position: relative; flex: none; width: 100%; overflow: hidden; }
.card-photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.place-body { padding: 20px 22px 26px; flex: 1; }
.place-card h3 { margin: 10px 0 6px; font: 400 36px/1 var(--serif); }
.place-card p { margin: 0; font-size: 15.5px; line-height: 1.55; }
.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px;
}

.mountains, .island, .city { background: #f4f4f4; }
.mountains .tag, .island .tag, .city .tag { background: var(--ink); color: #fff; }
.place-card p { color: var(--muted); }
.city { background: var(--ink); color: #fff; }
.city .tag { background: #fff; color: var(--ink); }
.city p { color: #b5b5b5; }

.next {
  background: transparent;
  border: 1.5px dashed var(--ink);
  justify-content: flex-end;
  min-height: 260px;
}
.next .tag { background: var(--ink); color: #fff; }
.next-cities {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.next-cities li {
  padding: 4px 11px;
  font-size: 13.5px; font-weight: 500;
  border: 1px solid currentColor; border-radius: 999px;
}
.next .arrow { display: inline-block; margin-top: 16px; font-size: 26px; transition: transform 0.2s; }
.next:hover { background: var(--ink); color: #fff; }
.next:hover p { color: #b5b5b5; }
.next:hover .tag { background: #fff; color: var(--ink); }
.next:hover .arrow { transform: translateX(6px); }

/* ---------- people ---------- */
.people { padding-block: 72px 40px; }
.chips {
  list-style: none; margin: 0 auto; padding: 0;
  max-width: 820px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
}
.chips li {
  padding: 12px 22px;
  font: 400 24px/1 var(--serif);
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  transition: transform 0.2s, background 0.15s, color 0.15s;
}
.chips li:nth-child(odd) { transform: rotate(-2deg); }
.chips li:nth-child(even) { transform: rotate(1.5deg); }
.chips li:hover { transform: rotate(0) scale(1.06); background: var(--ink); color: #fff; }
.chips li:nth-child(3n) { background: var(--ink); color: #fff; }

/* ---------- closing ---------- */
.closing { padding-block: 56px 72px; }
.closing-inner {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 88px 24px;
  text-align: center;
  border-radius: 32px;
  background: var(--ink);
  color: #fff;
}
.closing-photos {
  position: absolute; inset: -20px; z-index: -1;
  display: grid; gap: 6px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  transform: rotate(-4deg) scale(1.15);
  animation: pan 40s ease-in-out infinite alternate;
}
.closing-photos img { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center 40%; }
.closing-inner::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(10, 10, 10, 0.88), rgba(10, 10, 10, 0.55));
}
@keyframes pan { to { transform: rotate(-4deg) scale(1.15) translateX(-4%); } }
@media (max-width: 600px) { .closing-photos { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, 1fr); } }
.burst {
  position: fixed; z-index: 100;
  font-size: 28px; pointer-events: none;
}
.closing h2 {
  margin: 0;
  font: 400 clamp(36px, 5vw, 56px)/1.05 var(--serif);
  letter-spacing: -0.02em;
}
.closing h2 + p { margin: 12px 0 0; color: #d6d6d6; }
.signup-dark { margin-top: 28px; }
.signup-dark .field { background: #fff; box-shadow: none; }
.signup-dark .field:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35); }
.signup-dark .form-note { color: #b5b5b5; min-height: 1.4em; }
.signup-dark[data-state="done"] .form-note { color: #fff; }
.signup-dark[data-state="error"] .form-note { color: #ff8a8a; }
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-block: 0 40px;
  font-size: 14px; color: var(--muted);
}
.foot a { color: inherit; }
.foot-links { display: flex; gap: 18px; }

/* ---------- simple pages (unsubscribe, 404) ---------- */
.simple { max-width: 560px; margin: 0 auto; padding: 96px 16px; }
.simple p { font-size: 20px; }
.simple a:not(.wordmark) { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .pulse::after, .wa-card { animation: none; }
  .fx-svg path { stroke-dashoffset: 0; transition: none; }
  .reel { overflow-x: auto; }
  .reel-track, .closing-photos { animation: none; }
  html { scroll-behavior: auto; }
}

#join { scroll-margin-top: 120px; }
