/*
 * Peta Perjalanan (Pernikahan) — a journey on a quiet map: paper with faint contour lines (--inv-land), one dashed
 * route (--inv-accent) down the whole page through a pin per section, passport stamps, a compass on the cover.
 * DM Mono for map notes, Jost for text, the client's heading font for names and titles.
 * Phones: the route on the left. ≥ 900px: a centred route, the stops alternating left and right.
 */

:root {
    --inv-primary: #1f2a3a;
    --inv-accent: #c4453a;
    --inv-background: #efe9dd;
    --inv-text: #1f2a3a;
    --inv-land: #7d9a86;
    --inv-radius: 14px;
    --pp-serif: var(--inv-font-heading, 'Cormorant Garamond'), Georgia, serif;
    --pp-sans: 'Jost', system-ui, sans-serif;
    --pp-mono: 'DM Mono', ui-monospace, monospace;
    --pp-soft: color-mix(in srgb, var(--inv-text) 70%, transparent);
    --pp-line: color-mix(in srgb, var(--inv-text) 18%, transparent);
    --pp-paper: color-mix(in srgb, var(--inv-background) 60%, #fff);
    --pp-route-x: 1.45rem;
    /* contour lines, used as a mask so they take the variant's land colour */
    --pp-contours: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' fill='none' stroke='%23000' stroke-width='1'%3E%3Cpath d='M-20 80C60 40 120 120 210 90S360 20 440 70'/%3E%3Cpath d='M-20 110C70 70 130 150 215 120S355 55 440 100'/%3E%3Cpath d='M-20 140C80 100 140 180 220 150S350 90 440 130'/%3E%3Cellipse cx='300' cy='290' rx='70' ry='42'/%3E%3Cellipse cx='300' cy='290' rx='46' ry='26'/%3E%3Cellipse cx='300' cy='290' rx='22' ry='11'/%3E%3Cpath d='M-20 330C40 300 90 360 150 335S230 300 260 360'/%3E%3Cpath d='M-20 360C45 330 95 390 155 365S235 330 262 392'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.pp-body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--inv-background); color: var(--inv-text); font: 300 .96rem/1.7 var(--pp-sans); -webkit-font-smoothing: antialiased; }
/* the contours on the paper */
body.pp-body::before, .pp-cover::before {
    content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .28;
    background: var(--inv-land); -webkit-mask: var(--pp-contours) 0 0 / 420px 420px; mask: var(--pp-contours) 0 0 / 420px 420px;
}
p, h1, h2, h3, blockquote, ol { margin: 0; }
.pp-preview { position: fixed; z-index: 60; top: 0; left: 0; right: 0; padding: .35rem 1rem; text-align: center; background: var(--inv-text); color: var(--inv-background); font-size: .72rem; }

/* ---------- type ---------- */
.pp-mono { font: 500 .68rem/1.5 var(--pp-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--inv-accent); }
.pp-title { font: 400 clamp(1.7rem, 7.5vw, 2.2rem)/1.2 var(--pp-serif); }
.pp-names { font: 400 clamp(2.4rem, 11vw, 3.2rem)/1.08 var(--pp-serif); }
.pp-amp { font-style: italic; color: var(--inv-accent); }
.pp-text { color: var(--pp-soft); }
.pp-arabic { font: 400 1.5rem/1.9 'Amiri', serif; }
.pp-note { padding: 1rem 1.1rem; border-radius: 4px; background: var(--pp-paper); box-shadow: 0 1px 0 var(--pp-line), 0 14px 26px -22px rgb(0 0 0 / .5); rotate: -.6deg; }
.pp-note p { font: italic 400 1.05rem/1.6 var(--pp-serif); }
.pp-note cite { display: block; margin-top: .6rem; font-style: normal; }
.pp-tag { display: inline-flex; padding: .3rem .7rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--pp-line); color: var(--inv-text); text-decoration: none; font: 500 .72rem/1.3 var(--pp-mono); }

.pp-button, .pp-body .inv-button {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.5rem; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--inv-accent); color: #fff; font: 500 .74rem/1.2 var(--pp-mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
    box-shadow: 0 12px 22px -14px var(--inv-accent);
}
.pp-body .inv-button--outline { background: transparent; color: var(--inv-text); box-shadow: inset 0 0 0 1px var(--inv-text); }

/* the pin: a filled circle with a ring */
.pp-pin { display: block; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--inv-accent); box-shadow: 0 0 0 4px var(--inv-background), 0 0 0 5px var(--inv-accent); }

/* the passport stamp */
.pp-stamp {
    display: inline-grid; place-items: center; align-content: center; width: 6.2rem; height: 6.2rem; border-radius: 50%; rotate: -12deg;
    color: var(--inv-accent); border: 2px solid currentColor; box-shadow: inset 0 0 0 4px var(--inv-background), inset 0 0 0 5px currentColor;
    font-family: var(--pp-mono); text-transform: uppercase; text-align: center; opacity: .88;
}
.pp-stamp__top, .pp-stamp__bottom { font-size: .5rem; letter-spacing: .14em; }
.pp-stamp__main { font-size: 1rem; font-weight: 500; letter-spacing: .04em; line-height: 1.3; }

/* ---------- the route and the stops ---------- */
.pp-main { position: relative; z-index: 1; max-width: 32rem; margin: 0 auto; padding: 2rem 0 6rem; }
.pp-main::before {
    content: ''; position: absolute; left: var(--pp-route-x); top: 0; bottom: 4rem; width: 0;
    border-left: 2px dashed color-mix(in srgb, var(--inv-accent) 75%, transparent);
}
.pp-stop { position: relative; display: grid; gap: 1rem; padding: 2.6rem 1.4rem 2.6rem calc(var(--pp-route-x) + 1.9rem); }
.pp-stop > .pp-pin { position: absolute; left: calc(var(--pp-route-x) - .5rem + 1px); top: 2.7rem; }
.pp-stop__label { margin-top: -.05rem; }

/* couple: two starting points */
.pp-duo { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.pp-person { display: grid; gap: .3rem; align-content: start; min-width: 0; }
.pp-person__photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; margin-bottom: .4rem; box-shadow: 0 16px 26px -20px rgb(0 0 0 / .6); }
.pp-person__nick { font: 400 1.6rem/1.1 var(--pp-serif); }
.pp-person__name { font-weight: 500; font-size: .88rem; line-height: 1.35; }
.pp-person .pp-text { font-size: .8rem; line-height: 1.5; }

/* love story: legs of the journey */
.pp-legs { display: grid; gap: 1.8rem; list-style: none; padding: 0; }
.pp-leg { position: relative; display: grid; gap: .45rem; }
.pp-leg::before { content: ''; position: absolute; left: calc(-1.9rem - .3rem + 1px); top: .3rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--inv-background); box-shadow: inset 0 0 0 2px var(--inv-accent); }
.pp-leg__photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; }
.pp-leg__title { font: 400 1.4rem/1.25 var(--pp-serif); }

/* countdown */
.pp-countdown__head { display: flex; align-items: center; gap: 1.1rem; }
.pp-body .inv-countdown { gap: .4rem; }
.pp-body .inv-countdown__item { flex: 1; min-width: 0; max-width: 4.6rem; padding: .7rem .2rem; border-radius: 12px; background: var(--pp-paper); box-shadow: inset 0 0 0 1px var(--pp-line); }
.pp-body .inv-countdown__value { font: 500 1.5rem/1.1 var(--pp-mono); }
.pp-body .inv-countdown__label { font: 500 .56rem/1.3 var(--pp-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--pp-soft); }
.pp-body .inv-countdown__actions { margin-top: 1rem; display: grid; gap: .5rem; justify-items: start; }

/* events: destination cards with a dashed edge */
.pp-dests { display: grid; gap: 1.2rem; }
.pp-dest { display: grid; gap: .45rem; padding: 1.3rem 1.2rem; border-radius: 16px; background: var(--pp-paper); outline: 1.5px dashed color-mix(in srgb, var(--inv-accent) 55%, transparent); outline-offset: -7px; box-shadow: 0 18px 30px -24px rgb(0 0 0 / .55); }
.pp-dest__photo { width: calc(100% + 2.4rem); margin: -1.3rem -1.2rem .6rem; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px 16px 0 0; }
.pp-dest__name { display: flex; align-items: center; gap: .45rem; font: 400 1.6rem/1.2 var(--pp-serif); }
.pp-dest__name svg { flex: none; color: var(--inv-accent); }
.pp-dest__venue { font-weight: 500; }
.pp-dest .inv-button { justify-self: start; margin-top: .4rem; }
.pp-body .inv-maps__frame { width: 100%; height: 11rem; border: 0; border-radius: 12px; margin-top: .5rem; filter: sepia(.35) saturate(.85); }

/* gallery */
.pp-body .pp-gallery .inv-gallery { gap: .5rem; }
.pp-body .pp-gallery .inv-gallery__item { border-radius: 12px; }

/* cards, forms, lists */
.pp-card { padding: 1.3rem 1.1rem; border-radius: 16px; background: var(--pp-paper); box-shadow: inset 0 0 0 1px var(--pp-line), 0 18px 30px -24px rgb(0 0 0 / .5); }
.pp-body .inv-form label, .pp-body .inv-form__choices legend { font: 500 .64rem/1.4 var(--pp-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--pp-soft); }
.pp-body .inv-form input:not([type=radio]):not([type=checkbox]), .pp-body .inv-form select, .pp-body .inv-form textarea { border-radius: 10px; border-color: var(--pp-line); background: #fff; color: #1f2a3a; font: 300 1rem/1.4 var(--pp-sans); }
.pp-body .inv-form input[type=radio], .pp-body .inv-form input[type=checkbox] { accent-color: var(--inv-accent); }
.pp-body .inv-form .inv-button { width: 100%; }
.pp-body .inv-wish { border-radius: 4px; background: #fff; box-shadow: 0 1px 0 var(--pp-line), 0 8px 16px -14px rgb(0 0 0 / .5); }
.pp-body .inv-wish:nth-child(odd) { rotate: -.5deg; }
.pp-body .inv-wish:nth-child(even) { rotate: .5deg; }
.pp-body .inv-wish__name { font: 500 .78rem/1.3 var(--pp-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--inv-accent); }
.pp-body .inv-gift__account { border-radius: 16px; background: var(--pp-paper); outline: 1.5px dashed color-mix(in srgb, var(--inv-accent) 55%, transparent); outline-offset: -7px; }
.pp-body .inv-gift__number { font: 500 1.3rem/1.3 var(--pp-mono); letter-spacing: .04em; }
.pp-body .inv-gift__account .inv-button { margin-top: .6rem; padding: .55rem 1rem; }

/* closing */
.pp-closing__photo { position: relative; }
.pp-closing__photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; box-shadow: 0 22px 36px -26px rgb(0 0 0 / .6); }
.pp-closing__stamp { position: absolute; right: -.6rem; bottom: -1.4rem; background: color-mix(in srgb, var(--inv-background) 85%, transparent); }
.pp-closing__names { font-size: clamp(2rem, 9vw, 2.6rem); margin-top: .4rem; }

/* ---------- cover ---------- */
.pp-cover { position: fixed; inset: 0; z-index: 30; display: flex; overflow: hidden; background: var(--inv-background); }
.pp-cover::before { position: absolute; }
.pp-compass { position: absolute; z-index: 1; top: calc(.9rem + env(safe-area-inset-top)); left: .9rem; width: 3.4rem; color: var(--inv-text); opacity: .6; }
.pp-cover__inner {
    position: relative; z-index: 2; width: 100%; min-height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .7rem; text-align: center;
    padding: calc(1.6rem + env(safe-area-inset-top)) 1.6rem calc(1.8rem + env(safe-area-inset-bottom));
}
.pp-cover__map { position: relative; width: min(62vw, 17rem, 34svh); margin: .6rem 0 1rem; }
.pp-cover__photo { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 22px; box-shadow: 0 24px 40px -28px rgb(0 0 0 / .7); }
.pp-cover__route { position: absolute; left: -22%; top: -8%; width: 144%; height: 118%; color: var(--inv-accent); pointer-events: none; }
html.inv-anim .pp-cover__route path { stroke-dashoffset: 0; animation: pp-walk 3s linear infinite; }
@keyframes pp-walk { to { stroke-dashoffset: -24; } }
.pp-cover__pin { position: absolute; left: 50%; bottom: -1.6rem; translate: -50% 0; }
.pp-cover__stamp { position: absolute; right: -1.8rem; top: -1.4rem; width: 5rem; height: 5rem; background: color-mix(in srgb, var(--inv-background) 80%, transparent); }
.pp-cover__stamp .pp-stamp__main { font-size: .8rem; }
.pp-cover__date { color: var(--inv-text); }
.pp-cover__quote { max-width: 21rem; font: italic 400 .95rem/1.5 var(--pp-serif); color: var(--pp-soft); }
.pp-ticket { display: grid; gap: .1rem; width: min(100%, 19rem); padding: .75rem 1rem; border-radius: 12px; background: var(--pp-paper); outline: 1.5px dashed color-mix(in srgb, var(--inv-accent) 55%, transparent); outline-offset: -6px; }
.pp-ticket__name { font: 400 1.2rem/1.3 var(--pp-serif); overflow-wrap: anywhere; }
.pp-cover--leave { transition: opacity .9s ease, transform 1s cubic-bezier(.6, 0, .3, 1); }
.pp-cover--gone { opacity: 0; transform: scale(1.05); }
@media (max-height: 740px) {
    .pp-cover__inner { gap: .5rem; }
    .pp-cover__map { width: min(54vw, 15rem, 30svh); }
    .pp-names { font-size: clamp(2.1rem, 10vw, 2.8rem); }
    .pp-cover__quote { font-size: .88rem; line-height: 1.4; }
}
@media (max-height: 640px) {
    .pp-cover__map { width: min(46vw, 13rem, 26svh); margin-bottom: .8rem; }
    .pp-ticket { padding: .55rem .9rem; }
}

/* ---------- shared floating UI ---------- */
.pp-body .inv-nav {
    --inv-nav-bg: color-mix(in srgb, var(--pp-paper) 92%, transparent);
    --inv-nav-text: color-mix(in srgb, var(--inv-text) 70%, transparent);
    --inv-nav-active: var(--inv-accent);
    border-color: var(--pp-line); box-shadow: 0 16px 30px -18px rgb(0 0 0 / .45);
}
.pp-body .inv-nav--icons .inv-nav__item { border-radius: 50%; }
.pp-body .inv-nav--icons .inv-nav__item.is-active { color: #fff; }
.pp-body .inv-music__button { background: var(--inv-accent); }
.pp-body .inv-scroller__toggle, .pp-body .inv-pb-button, .pp-body .inv-to-top { background: var(--pp-paper); color: var(--inv-text); box-shadow: inset 0 0 0 1px var(--pp-line), 0 10px 20px -12px rgb(0 0 0 / .45); }
.pp-body .inv-to-top { border-radius: 50%; }
.pp-body .inv-music__space { background: transparent; }
.pp-body .inv-branding { position: relative; z-index: 1; }

/* ---------- wide screens: a centred route, stops alternating ---------- */
@media (min-width: 900px) {
    .pp-main { max-width: 62rem; padding-top: 4rem; }
    .pp-main::before { left: 50%; }
    .pp-stop { width: 50%; padding: 3rem 3.2rem 3rem 2.6rem; }
    .pp-stop:nth-child(odd) { margin-left: 50%; }
    .pp-stop:nth-child(odd) > .pp-pin { left: calc(-.5rem + 1px); }
    .pp-stop:nth-child(even) { padding: 3rem 2.6rem 3rem 3.2rem; text-align: right; justify-items: end; }
    .pp-stop:nth-child(even) > .pp-pin { left: auto; right: calc(-.5rem - 1px); }
    .pp-stop:nth-child(even) .pp-leg::before { left: auto; right: calc(-2.6rem - .3rem); }
    .pp-stop:nth-child(even) .pp-dest, .pp-stop:nth-child(even) .pp-card { text-align: left; }
    .pp-cover__map { width: min(26vw, 19rem, 40vh); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    html.inv-anim .pp-cover__route path { animation: none; }
    .pp-cover--gone { transform: none; }
}
