/* ===== Fonts (self-hosted) ===== */
@font-face { font-family: 'Bodoni Moda'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/bodoni-moda-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Bodoni Moda'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/bodoni-moda-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/jost-latin-300-normal.woff2) format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/jost-latin-400-normal.woff2) format('woff2'); }

/* ===== Laura & Dan · pearl theme ===== */
:root {
  --ink: #3f3a3d;
  --ink-soft: #655e62;
  --gold: #a68652;
  --line: rgba(166,134,82,.45);
  --glass: rgba(255,255,255,.52);
  --display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --body: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
html.intro-on { overflow: hidden; }
body {
  min-height: 100vh; color: var(--ink); background: #f6f1ec;
  font-family: var(--body); font-weight: 300; font-size: 1.0625rem; line-height: 1.75; letter-spacing: .025em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; letter-spacing: -.005em; }
p + p { margin-top: 1.1em; }

/* ===== Pearl background (whole site) ===== */
.pearl-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 12% 18%, #f6dfe3 0%, transparent 60%),
    radial-gradient(ellipse 55% 55% at 88% 25%, #cfe6ea 0%, transparent 62%),
    radial-gradient(ellipse 60% 50% at 70% 92%, #ddd0ee 0%, transparent 60%),
    radial-gradient(ellipse 50% 45% at 20% 85%, #f4e8d2 0%, transparent 60%),
    #f6f1ec;
  background-size: 170% 170%;
  animation: drift 30s ease-in-out infinite alternate;
}
@keyframes drift { from { background-position: 0 0; } to { background-position: 100% 100%; } }
.pearl-bg::before {           /* the oyster, softened */
  content: ""; position: absolute; inset: -20px;
  background: url(images/pearl-bg.jpg) center / cover;
  opacity: .9; filter: blur(2px);
}
.pearl-bg::after {            /* slow light sweep, like turning a shell in the sun */
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 60%;
  background: linear-gradient(105deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.28) 50%, rgba(255,255,255,0) 100%);
  filter: blur(22px); animation: sweep 16s ease-in-out 2s infinite;
}
@keyframes sweep { 0% { transform: translateX(0); } 55%, 100% { transform: translateX(380%); } }
.pearl-bg .p {
  position: absolute; border-radius: 50%; opacity: .75;
  background: radial-gradient(circle at 32% 28%, #fff 0, rgba(255,255,255,.92) 14%, rgba(238,224,242,.8) 46%, rgba(206,192,226,.5) 70%, rgba(206,192,226,0) 72%);
  box-shadow: inset -3px -4px 8px rgba(160,140,190,.22);
  animation: bob var(--d, 12s) ease-in-out var(--delay, 0s) infinite alternate;
}
@keyframes bob { from { transform: translate3d(0,0,0); } to { transform: translate3d(16px,-42px,0); } }

/* ===== Tabs ===== */
.tabs {
  position: sticky; top: 0; z-index: 30;
  display: flex; justify-content: center; gap: .35rem; padding: .7rem 1rem;
  background: rgba(250,246,242,.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.tabs a {
  text-decoration: none; white-space: nowrap; color: var(--ink-soft);
  padding: .5rem .9rem; font-size: .9rem; letter-spacing: .1em; position: relative; transition: color .25s;
}
.tabs a::after { content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .2rem; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform .3s ease; }
.tabs a:hover { color: var(--ink); }
.tabs a:hover::after, .tabs a[aria-current="page"]::after { transform: scaleX(1); }
.tabs a[aria-current="page"] { color: var(--ink); }
@media (max-width: 760px) {
  .tabs { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
}

/* ===== Shell logo ===== */
.shell { display: block; }
.shell svg { overflow: visible; width: 100%; height: auto; }
.shell .outline { fill: url(#gfill); }
.brand { display: block; width: fit-content; margin: 0 auto; padding: 2rem 1rem 0; }
.brand img { width: clamp(120px, 24vw, 160px); height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.logo-hero { width: clamp(250px, 44vw, 420px); height: auto; margin: 0 auto; animation: write 3s ease-out both; }
@keyframes write { from { clip-path: inset(0 100% 0 0); opacity: .4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
.shell.hero-shell { width: clamp(120px, 22vw, 180px); margin: 0 auto 1.25rem; }
.draw .outline, .draw .rib { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s ease forwards; }
.draw .rib { animation-delay: .5s; }
.draw .outline { fill-opacity: 0; animation: draw 2.2s ease forwards, fillin 1.6s ease 1.6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { fill-opacity: 1; } }
.shell:hover .outline { filter: drop-shadow(0 0 6px rgba(200,180,220,.9)); }

/* ===== Layout ===== */
main { padding: 0 1rem 3rem; animation: rise .9s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.panel {
  max-width: 54rem; margin: 2rem auto 0; padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 3.5rem);
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.8); border-radius: 28px;
  box-shadow: 0 0 0 1px rgba(166,134,82,.16), 0 24px 60px rgba(130,110,150,.10);
}
.panel.wide { max-width: 64rem; }
.page-title { text-align: center; font-size: clamp(2.2rem, 6vw, 3.4rem); margin-bottom: 1rem; }
.lede { text-align: center; max-width: 34rem; margin: 0 auto; color: var(--ink-soft); }
.rule { height: 1px; border: 0; margin: 2.25rem auto; max-width: 14rem; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.next { text-align: center; margin-top: 2.5rem; }
.next a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.next a:hover { border-color: var(--gold); }

/* ===== Home ===== */
.hero { text-align: center; padding: clamp(2.5rem, 7vw, 5rem) 1rem 1rem; }
.hero h1 { font-size: clamp(3.6rem, 14vw, 9.5rem); letter-spacing: -.01em; text-shadow: 0 1px 0 rgba(255,255,255,.8); }
.hero h1 .amp { font-style: italic; color: var(--gold); padding: 0 .08em; }
.hero .date { margin-top: 1.4rem; font-family: var(--display); font-style: italic; font-size: clamp(1.5rem, 3.6vw, 2rem); }
.hero .venue { margin: .3rem auto 0; max-width: 34rem; color: var(--ink-soft); }
.hero .count { margin-top: 1.4rem; color: var(--ink-soft); font-size: .98rem; font-variant-numeric: tabular-nums; min-height: 1.75em; }
.hero .note { margin-top: 2rem; font-family: var(--display); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); }
.btn {
  display: inline-block; margin-top: 1.5rem; padding: .9rem 2.6rem; border-radius: 999px; cursor: pointer;
  text-decoration: none; font-family: var(--body); font-weight: 400; font-size: .98rem; letter-spacing: .14em;
  color: var(--ink); background: transparent; border: 1px solid var(--ink);
  transition: background-color .25s ease, color .25s ease;
}
.btn:hover { background: var(--ink); color: #fbf8f4; }

.welcome { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 800px) { .welcome { grid-template-columns: 5fr 6fr; gap: 4rem; } }
.arch {
  aspect-ratio: 4 / 5; width: 100%; max-width: 26rem; margin: 0 auto; overflow: hidden;
  border-radius: 999px 999px 1.5rem 1.5rem; background: url(images/oyster-1.jpg) center / cover;
  box-shadow: 0 0 0 1px var(--line), 0 0 0 9px rgba(255,255,255,.55), 0 0 0 10px var(--line);
}
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 68% center; }
.welcome h2 { font-size: clamp(2rem, 4.5vw, 2.6rem); margin-bottom: 1rem; }

.triptych { display: flex; justify-content: center; align-items: flex-end; gap: clamp(.6rem, 2vw, 1.6rem); padding: 4rem 1rem 0; }
.triptych div { flex: 1 1 0; max-width: 16rem; border-radius: 999px 999px 0 0; background-size: cover; background-position: center; box-shadow: 0 0 0 1px var(--line); }
.triptych div:nth-child(1) { aspect-ratio: 3 / 4.4; background-image: url(images/oyster-2.jpg); }
.triptych div:nth-child(2) { aspect-ratio: 3 / 5.4; background-image: url(images/oyster-3.jpg); }
.triptych div:nth-child(3) { aspect-ratio: 3 / 4.4; background-image: url(images/oyster-1.jpg); }

/* ===== Columns & lists ===== */
.cols { display: grid; gap: 2.75rem; margin-top: 2.5rem; }
@media (min-width: 760px) { .cols { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.cols h2, .stay h2 { font-size: 1.6rem; padding-bottom: .6rem; margin-bottom: .9rem; border-bottom: 1px solid var(--line); }
.cols ul { padding-left: 1.1rem; color: var(--ink-soft); }
.cols li + li { margin-top: .7rem; }
.aside { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); color: var(--ink-soft); }
.hotel { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.hotel:last-of-type { border-bottom: 1px solid var(--line); }
.hotel h3 { font-size: 1.4rem; margin-bottom: .2rem; }
.hotel p { color: var(--ink-soft); font-size: 1rem; }
.stay h2 { margin-top: 2.25rem; }

/* ===== Schedule ===== */
.day { margin-top: 3rem; }
.day > h2 { font-style: italic; font-size: clamp(1.5rem, 3.4vw, 1.9rem); color: var(--gold); padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.timeline { list-style: none; padding: 0; margin: .75rem 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9.4rem; top: 1.2rem; bottom: 1.2rem; width: 1px; background: linear-gradient(#ecdad7, var(--gold), #cde4e8); }
.timeline li { display: grid; grid-template-columns: 8rem 1fr; gap: 0 2.4rem; padding: 1.1rem 0; position: relative; }
.timeline li::after {
  content: ""; position: absolute; left: 9.4rem; top: 1.85rem; width: 11px; height: 11px; transform: translateX(-5px); border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #e9dff0 55%, #c9b087); box-shadow: 0 0 0 4px rgba(255,255,255,.55);
}
.timeline .time { font-family: var(--display); font-style: italic; font-size: 1.05rem; color: var(--ink-soft); text-align: right; line-height: 1.8; }
.timeline h3 { font-size: 1.4rem; margin-bottom: .2rem; }
.timeline p { color: var(--ink-soft); font-size: 1rem; }
.timeline .meta { font-size: .95rem; margin-bottom: .3rem; }
.timeline .links { margin-top: .6rem; font-size: .92rem; }
.timeline .links a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) {
  .timeline::before { left: .35rem; }
  .timeline li { grid-template-columns: 1fr; padding-left: 2rem; }
  .timeline li::after { left: .35rem; top: 1.75rem; }
  .timeline .time { text-align: left; line-height: 1.6; }
}
.timeline li { opacity: 0; animation: rise .8s ease forwards; }
.timeline li:nth-child(1) { animation-delay: .15s; } .timeline li:nth-child(2) { animation-delay: .3s; } .timeline li:nth-child(3) { animation-delay: .45s; }

/* ===== Q&A ===== */
.faq { margin-top: 2.25rem; }
.faq details { border-top: 1px solid var(--line); padding: 1.1rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; font-family: var(--display); font-size: 1.25rem; font-weight: 400; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: .6rem; color: var(--ink-soft); }

.center { text-align: center; }
footer { text-align: center; padding: 1rem 1.5rem 3rem; color: var(--ink-soft); font-size: .95rem; }
footer .names { font-family: var(--display); font-style: italic; font-size: 1.5rem; color: var(--ink); }

/* ===== Envelope intro ===== */
.intro { display: none; position: fixed; inset: 0; z-index: 100; place-items: center; align-content: center; justify-items: center; overflow: hidden; transition: opacity .9s ease, visibility .9s; }
.intro-on .intro { display: grid; }
.intro .pearl-bg { position: absolute; z-index: 0; }
.intro.leaving { opacity: 0; visibility: hidden; }
.intro > *:not(.pearl-bg) { position: relative; z-index: 1; }
.skip { position: absolute !important; top: 1rem; right: 1.25rem; background: none; border: 0; color: var(--ink-soft); font: inherit; font-size: .95rem; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.env { position: relative; width: min(86vw, 420px); aspect-ratio: 7 / 5; perspective: 1400px; margin-top: 9rem; }
.env .back { position: absolute; inset: 0; border-radius: 6px; background: linear-gradient(160deg, #e9dfee, #d9e8ed); box-shadow: 0 24px 50px rgba(110,90,130,.28); }
.env .letter {
  position: absolute; z-index: 2; left: 6%; right: 6%; top: 8%; height: 86%;
  background: linear-gradient(#fffdfb, #f8f3ee); border-radius: 4px; padding: .7rem .8rem; text-align: center; overflow: hidden;
  box-shadow: 0 2px 10px rgba(110,90,130,.15);
  transition: transform 1.1s cubic-bezier(.3,.7,.2,1) .8s;
}
.letter .mini-logo { width: 118px; height: auto; margin: 0 auto .1rem; }
.letter .l1 { font-family: var(--display); font-size: clamp(1.6rem, 6.6vw, 2.3rem); line-height: 1; }
.letter .l1 em { color: var(--gold); }
.letter .l2 { font-size: .8rem; color: var(--ink-soft); margin-top: .4rem; line-height: 1.4; }
.letter .l3 { font-family: var(--display); font-style: italic; font-size: 1rem; margin-top: .35rem; }
.env .front { position: absolute; inset: 0; z-index: 3; border-radius: 6px; background: linear-gradient(160deg, #f6ecef, #e6def0 55%, #d8eaee); clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); }
.env .flap {
  position: absolute; z-index: 4; left: 0; right: 0; top: 0; height: 54%; transform-origin: top center;
  background: linear-gradient(180deg, #efe6f2, #e3dcee); clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform .9s ease, z-index 0s .45s;
}
.env .seal {
  position: absolute; z-index: 6; left: 50%; top: 54%; width: 64px; height: 64px; transform: translate(-50%, -50%);
  border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 28%, #ecdcb2, #c9a766 60%, #a68652);
  box-shadow: 0 4px 12px rgba(100,80,40,.35), inset 0 1px 2px rgba(255,255,255,.6);
  transition: opacity .4s, transform .5s; animation: pulse 2.4s ease-in-out infinite;
}
.seal svg { width: 34px; }
@keyframes pulse { 0%,100% { box-shadow: 0 4px 12px rgba(100,80,40,.35), 0 0 0 0 rgba(201,167,102,.5); } 50% { box-shadow: 0 4px 12px rgba(100,80,40,.35), 0 0 0 14px rgba(201,167,102,0); } }
.env.open .seal { opacity: 0; transform: translate(-50%, -50%) scale(.6); pointer-events: none; animation: none; }
.env.open .flap { transform: rotateX(180deg); z-index: 1; }
.env.open .letter { transform: translateY(-80%); }
.hint { margin-top: 2.25rem; color: var(--ink-soft); font-family: var(--display); font-style: italic; font-size: 1.15rem; min-height: 2.4rem; text-align: center; }
.enter { opacity: 0; visibility: hidden; margin-top: 0; transition: opacity .8s; }
.intro.ready .enter { opacity: 1; visibility: visible; }
.intro.ready .hint { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .timeline li { opacity: 1; }
}
