:root {
  --ink: #090c0a;
  --ink-2: #0f1411;
  --ink-3: #161d18;
  --ivory: #ece7dc;
  --ivory-dim: rgba(236, 231, 220, 0.66);
  --ivory-faint: rgba(236, 231, 220, 0.38);
  --line: rgba(236, 231, 220, 0.14);
  --line-strong: rgba(236, 231, 220, 0.3);
  --frond: #8fa58a;
  --gold: #cdb98d;
  --glass: rgba(22, 28, 24, 0.58);
  --radius: 22px;
  --script: "Pinyon Script", cursive;
  --display: "Italiana", serif;
  --sans: "Jost", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.eyebrow {
  font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--frond);
  margin: 0 0 10px; font-weight: 400;
}

/* ================= HERO ================= */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__bg img {
  width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); filter: brightness(1.15) contrast(1.05);
  animation: drift 40s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; will-change: transform;
  backface-visibility: hidden;
}
@keyframes drift {
  from { transform: scale3d(1.1, 1.1, 1) translate3d(0, 0, 0); }
  to { transform: scale3d(1.18, 1.18, 1) translate3d(-1.5%, -1.5%, 0); }
}
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(110% 90% at 25% 45%, rgba(9, 12, 10, 0.05), rgba(9, 12, 10, 0.7) 75%),
    linear-gradient(180deg, rgba(9, 12, 10, 0.1), rgba(9, 12, 10, 0.35) 65%, var(--ink));
}
.hero__inner {
  width: min(1240px, 100%); margin: 0 auto; padding: 56px 16px 72px;
  display: grid; gap: 48px; align-items: center;
}
@media (min-width: 980px) {
  .hero__inner { grid-template-columns: 1.05fr 0.95fr; padding: 64px 40px; gap: 64px; }
}

.invite { text-align: center; }
@media (min-width: 980px) { .invite { text-align: left; } }
.invite__script {
  font-family: var(--script); font-size: clamp(30px, 4.4vw, 46px); color: var(--ivory-dim);
  margin: 0 0 6px; line-height: 1.1; opacity: 0; animation: rise 1.6s var(--ease) 0.15s forwards;
}
.invite__title {
  font-family: var(--display); font-weight: 400; margin: 0; line-height: 0.92;
  font-size: clamp(56px, 10.5vw, 132px); letter-spacing: 0.02em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
}
.invite__title > span { display: inline-block; white-space: nowrap; }
.invite__title .ch {
  display: inline-block; opacity: 0; transform: translate3d(0, 0.35em, 0) scale(0.96);
  animation: letter 1.4s var(--ease) forwards; animation-delay: calc(0.35s + var(--i) * 45ms);
}
.invite__title--sm { font-size: clamp(48px, 8vw, 104px); }
@keyframes letter { to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }
.invite__meta {
  margin: 22px 0 0; font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ivory-dim);
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  opacity: 0; animation: rise 1.4s var(--ease) 1.1s forwards;
}
@media (min-width: 980px) { .invite__meta { align-items: flex-start; } }
.invite__meta i { width: 28px; height: 1px; background: var(--line-strong); }
.invite__lede {
  max-width: 460px; margin: 26px auto 0; color: var(--ivory-dim); font-size: 17px;
  opacity: 0; animation: rise 1.4s var(--ease) 1.25s forwards;
}
@media (min-width: 980px) { .invite__lede { margin-left: 0; } }
.invite__scroll {
  display: none; margin-top: 44px; text-decoration: none; font-size: 11px; letter-spacing: 0.36em;
  text-transform: uppercase; color: var(--ivory-faint); align-items: center; gap: 14px;
}
.invite__scroll b { width: 1px; height: 46px; background: linear-gradient(var(--ivory-faint), transparent); position: relative; overflow: hidden; }
.invite__scroll b::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ivory); animation: drip 2.6s var(--ease-io) infinite; will-change: transform; }
@keyframes drip { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 380%, 0); } }
@media (min-width: 980px) { .invite__scroll { display: inline-flex; } }

/* ================= FORM CARD (iMessage glass) ================= */
.card {
  position: relative; width: 100%; max-width: 540px; margin: 0 auto;
  background: linear-gradient(165deg, rgba(24, 31, 26, 0.9), rgba(12, 16, 13, 0.92)); border: 1px solid var(--line);
  border-radius: 28px; padding: 26px 20px 22px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0; animation: rise 1.6s var(--ease) 0.6s forwards;
}
@media (min-width: 560px) { .card { padding: 32px 30px 26px; } }
.card__head h2 { font-family: var(--display); font-weight: 400; font-size: 34px; margin: 0 0 6px; letter-spacing: 0.02em; }

.block { border: 0; margin: 0; padding: 16px 0 0; min-width: 0; }
.block legend {
  float: left; padding: 0; margin-bottom: 10px; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ivory-dim);
  display: flex; gap: 10px; align-items: baseline; width: 100%;
}
.block legend em { font-style: normal; letter-spacing: 0.1em; text-transform: none; color: var(--gold); font-size: 13px; margin-left: auto; }
.block legend + * { clear: both; }
.grid2 { display: grid; gap: 10px; }
@media (min-width: 480px) { .grid2 { grid-template-columns: 1fr 1fr; } }

.field { position: relative; display: block; margin-bottom: 10px; }
.field > span:not(.sr) {
  position: absolute; left: 16px; top: 9px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ivory-faint); pointer-events: none;
}
.field input {
  width: 100%; height: 54px; padding: 22px 16px 8px; border-radius: 16px;
  background: rgba(9, 12, 10, 0.45); border: 1px solid var(--line); outline: none;
  font-size: 16px; font-weight: 400; transition: border-color 0.25s, background 0.25s;
}
.field input::placeholder { color: var(--ivory-faint); }
.field input:focus { border-color: var(--line-strong); background: rgba(9, 12, 10, 0.65); }
.field input[aria-invalid="true"] { border-color: #c98a7a; }
.block:has(.sr) .field input, .field--gift input { padding: 8px 16px; }
.field--gift { display: flex; align-items: center; margin-top: 10px; }
.field--gift[hidden] { display: none; }
.field--gift > span:not(.sr) { position: static; font-size: 18px; color: var(--ivory-dim); margin-right: -34px; padding-left: 18px; z-index: 1; }
.field--gift input { padding-left: 34px; }

.days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.day-tile {
  position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 12px 6px 10px;
  background: rgba(9, 12, 10, 0.35); cursor: pointer; text-align: center; transition: background-color 0.45s var(--ease), color 0.45s var(--ease), border-color 0.45s var(--ease), transform 0.45s var(--ease);
  user-select: none;
}
.day-tile input { position: absolute; opacity: 0; pointer-events: none; }
.day-tile b { display: block; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; }
.day-tile small { display: block; margin-top: 4px; font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ivory-faint); }
.day-tile:hover { border-color: var(--line-strong); }
.day-tile:has(input:checked) { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.day-tile:has(input:checked) small { color: rgba(9, 12, 10, 0.6); }
.day-tile:has(input:focus-visible) { outline: 2px solid var(--frond); outline-offset: 2px; }

.add-guest {
  margin-top: 18px; width: 100%; padding: 14px; border-radius: 16px; cursor: pointer;
  border: 1px dashed var(--line-strong); background: transparent; color: var(--ivory-dim);
  font-size: 14px; letter-spacing: 0.04em; transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}
.add-guest span { font-size: 18px; margin-right: 6px; }
.add-guest:hover { color: var(--ivory); border-color: var(--ivory-dim); background: rgba(236, 231, 220, 0.04); }

.guest {
  margin-top: 18px; padding: 16px 16px 6px; border-radius: 20px; border: 1px solid var(--line);
  background: rgba(9, 12, 10, 0.3); animation: rise 0.8s var(--ease);
}
.guest__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.guest__head p { margin: 0; font-family: var(--display); font-size: 22px; }
.guest__head p em { font-family: var(--sans); font-style: normal; font-size: 13px; color: var(--gold); margin-left: 10px; }
.guest__remove { background: none; border: 0; color: var(--ivory-faint); cursor: pointer; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.guest__remove:hover { color: var(--ivory); }
.guest .days { margin-bottom: 10px; }

.gifts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.gift {
  min-width: 0; padding: 11px 4px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(9, 12, 10, 0.35); cursor: pointer; font-size: 14px; transition: background-color 0.45s var(--ease), color 0.45s var(--ease), border-color 0.45s var(--ease), transform 0.45s var(--ease);
}
.gift[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.gift:hover { border-color: var(--line-strong); }
.hint { margin: 8px 2px 0; font-size: 13px; color: var(--ivory-faint); }

.summary { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; color: var(--ivory-dim); padding: 3px 0; }
.summary .row--total { color: var(--ivory); padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); align-items: baseline; }
.summary .row--total span:first-child { font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; }
.summary .row--total span:last-child { font-family: var(--display); font-size: 34px; line-height: 1; }

.error { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(201, 138, 122, 0.14); color: #f0c3b8; font-size: 14px; }
.pay {
  display: inline-flex; justify-content: center; align-items: center; gap: 10px;
  width: 100%; margin-top: 16px; height: 58px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--ivory); color: var(--ink); font-size: 14px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  text-decoration: none; position: relative; overflow: hidden; transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.pay::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transition: transform 1.1s var(--ease);
}
.pay:hover { transform: translateY(-1px); box-shadow: 0 16px 40px -12px rgba(236, 231, 220, 0.35); }
.pay:hover::after { transform: translateX(120%); }
.pay[disabled] { opacity: 0.6; cursor: progress; }
.pay--ghost { width: auto; padding: 0 44px; margin-top: 34px; }
.secure { text-align: center; margin: 12px 0 0; font-size: 12px; color: var(--ivory-faint); }

/* ================= MESSAGE ================= */
.message { max-width: 860px; margin: 0 auto; padding: 110px 16px 60px; text-align: center; }
.message__script { font-family: var(--script); font-size: clamp(34px, 5vw, 54px); color: var(--frond); margin: 0; }
.message blockquote { margin: 8px 0 0; font-family: var(--display); font-size: clamp(26px, 3.6vw, 42px); line-height: 1.25; }
.message__by { margin-top: 26px; font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--ivory-faint); }

/* ================= SECTIONS ================= */
.section { width: min(1240px, 100%); margin: 0 auto; padding: 90px 16px; }
@media (min-width: 760px) { .section { padding: 120px 40px; } }
.section--dark { width: 100%; background: var(--ink-2); border-block: 1px solid var(--line); }
.section--dark > * { width: min(1160px, 100%); margin-left: auto; margin-right: auto; }
.section__head { max-width: 640px; margin-bottom: 44px; }
.display { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 7vw, 92px); line-height: 0.95; margin: 0; letter-spacing: 0.02em; }
.section__lede { color: var(--ivory-dim); font-size: 17px; margin: 18px 0 0; }
.chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ivory-dim); }
.address { display: inline-flex; margin-top: 20px; font-size: 13px; letter-spacing: 0.08em; color: var(--frond); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* mosaic gallery */
.mosaic { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
@media (min-width: 760px) { .mosaic { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 14px; } }
.mosaic > :nth-child(1) { grid-column: span 2; grid-row: span 2; }
.mosaic > :last-child:nth-child(even) { grid-column: span 2; }
@media (min-width: 760px) {
  .mosaic > :nth-child(4) { grid-column: span 2; }
  .mosaic > :last-child:nth-child(even) { grid-column: auto; }
}
.tile { position: relative; overflow: hidden; border-radius: 18px; background: var(--ink-3); cursor: zoom-in; border: 0; padding: 0; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease); will-change: transform; }
.tile:hover img { transform: scale(1.05); }
.tile--ph { cursor: default; border: 1px dashed var(--line-strong); display: grid; place-items: center; overflow: hidden; }
.tile--ph::before { content: ""; position: absolute; inset: 0; background: url("/images/palms.jpg") center / cover; opacity: 0.16; filter: grayscale(0.4); }
.tile--ph span { position: relative; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ivory-faint); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(9, 12, 10, 0.6); }

/* rail */
.rail {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; cursor: grab;
}
.rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.rail .tile { flex: 0 0 auto; width: min(78vw, 420px); aspect-ratio: 4 / 5; scroll-snap-align: start; }
.rail .tile:nth-child(even) { aspect-ratio: 4 / 4.4; align-self: flex-end; }

/* weekend */
.days-row { display: grid; gap: 14px; }
@media (min-width: 860px) { .days-row { grid-template-columns: repeat(3, 1fr); } }
.day { position: relative; padding: 34px 28px 30px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, var(--ink-3), var(--ink)); overflow: hidden; }
.day__n { position: absolute; right: 18px; top: -8px; font-family: var(--display); font-size: 140px; line-height: 1; color: rgba(236, 231, 220, 0.05); }
.day__w { margin: 0; font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--frond); }
.day h3 { font-family: var(--display); font-weight: 400; font-size: 34px; margin: 10px 0 10px; }
.day p:last-child { margin: 0; color: var(--ivory-dim); }

/* pricing */
.prices { display: grid; gap: 14px; }
@media (min-width: 760px) { .prices { grid-template-columns: repeat(3, 1fr); } }
.price { padding: 30px 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink); text-align: center; }
.price--feat { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.price p { margin: 0; font-size: 11px; letter-spacing: 0.36em; text-transform: uppercase; color: var(--ivory-dim); }
.price b { display: block; font-family: var(--display); font-weight: 400; font-size: 72px; line-height: 1.1; margin: 10px 0 2px; }
.price small { color: var(--ivory-faint); font-size: 13px; }
.price--feat p { color: var(--gold); }
.prices__note { text-align: center; color: var(--ivory-faint); margin-top: 26px; font-size: 14px; }

/* faq */
.faq__list { max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 40px 24px 0; position: relative; font-family: var(--display); font-size: 26px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-weight: 300; font-size: 26px; color: var(--ivory-faint); transition: transform 0.6s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: -6px 0 24px; color: var(--ivory-dim); max-width: 640px; }
.faq a { color: var(--frond); }

/* close */
.close { position: relative; isolation: isolate; min-height: 78svh; display: grid; place-items: center; text-align: center; padding: 100px 16px; overflow: hidden; }
.close .invite__title .ch, .close .invite__script { opacity: 1; transform: none; animation: none; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 28px 16px; width: min(1240px, 100%); margin: 0 auto; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ivory-faint); }
@media (min-width: 760px) { .foot { padding: 28px 40px; } }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(5, 7, 6, 0.94); display: grid; place-items: center; padding: 16px; animation: fade 0.5s var(--ease); }
.lightbox img { transition: opacity 0.35s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 88svh; border-radius: 14px; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--ivory); cursor: pointer; }
.lb-close { top: 14px; right: 18px; font-size: 40px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 54px; width: 56px; height: 80px; opacity: 0.7; }
.lb-nav:hover { opacity: 1; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-cap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; margin: 0; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-dim); }
.lightbox img { max-height: 82svh; }

/* reveal */
.reveal, .stagger > * {
  opacity: 0; transform: translate3d(0, 36px, 0);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.in, .stagger.in > * { opacity: 1; transform: none; }
.stagger > .tile { transform: translate3d(0, 36px, 0) scale(0.97); }
.stagger.in > .tile { transform: none; }
.reveal.in, .stagger.in > * { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-delay: 0s !important; transition-duration: 0.001s !important; }
  .reveal, .stagger > *, .invite__title .ch { opacity: 1 !important; transform: none !important; }
}

/* lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
