/* ==========================================================================
   Panayiotis's baptism — "Little captain" theme
   Soft sky, sea blues, sail yellow, coral and rope, like a children's storybook.
   ========================================================================== */

:root {
  --cream: #fbf7ef;
  --sky: #e4f1f9;
  --sky-2: #cfe3f1;
  --sea-light: #9cc3e6;
  --sea: #7fb0dc;
  --navy: #2c4a6e;
  --navy-deep: #1f3550;
  --coral: #e07f62;
  --coral-soft: #fbe0d8;
  --coral-text: #b8513a;
  --sail: #f3c98b;
  --sail-soft: #fbecd2;
  --sail-text: #8a5d00;
  --rope: #c9a878;
  --rope-dark: #a98a5c;
  --brown: #7a5a3a;
  --ink: #23364f;
  --muted: #5a6b80;
  --line: rgba(44, 74, 110, .14);

  --display: "Comfortaa", "Alegreya Sans", system-ui, sans-serif;
  --story: "Alegreya", Georgia, serif;
  --body: "Alegreya Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1100px;
  --gutter: 16px;
  --radius: 24px;
  --wave-h: 36px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 18px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
.is-empty { display: none !important; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 8px; }

/* Avoid a flash of English before Greek is applied (with a safety net). */
html.i18n-pending body { visibility: hidden; animation: reveal-body 0s 1.2s forwards; }
@keyframes reveal-body { to { visibility: visible; } }

.icon { width: 20px; height: 20px; flex: none; }
.eyebrow { font: italic 500 19px/1.35 var(--story); color: var(--coral-text); }

/* ---------- rope ---------- */
.rope {
  height: 8px;
  background: repeating-linear-gradient(-60deg, var(--rope) 0 5px, var(--rope-dark) 5px 7px);
}
.rope-short { width: 110px; height: 6px; margin: 22px auto; border-radius: 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  border-radius: 999px; border: 2px solid transparent;
  font: 700 15px/1.2 var(--display);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); }
.btn-light { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-light .icon { color: var(--coral-text); }
.btn-light:hover { border-color: var(--navy); }
.btn-on-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-on-dark:hover { background: rgba(255, 255, 255, .1); }
.btn-sm { min-height: 42px; padding: 9px 18px; font-size: 14px; }

/* ---------- wavy section edges ---------- */
.section-sky { position: relative; z-index: 1; background: var(--sky); }
.section-sky::before, .section-sky::after, .site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; height: var(--wave-h); pointer-events: none;
  -webkit-mask: url("wave.svg") repeat-x 0 100% / 140px var(--wave-h);
  mask: url("wave.svg") repeat-x 0 100% / 140px var(--wave-h);
}
.section-sky::before { top: calc(1px - var(--wave-h)); background: var(--sky); }
.section-sky::after { bottom: calc(1px - var(--wave-h)); background: var(--sky); transform: scaleY(-1); }

/* ==========================================================================
   Top bar
   ========================================================================== */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 10px max(var(--gutter), env(safe-area-inset-left)) 10px max(var(--gutter), env(safe-area-inset-right));
  transition: background-color .3s, box-shadow .3s;
}
.topbar.is-scrolled {
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.monogram {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: #fff; flex: none;
}
.monogram .icon { width: 22px; height: 22px; }
.navlinks { display: none; list-style: none; margin: 0 auto; padding: 0; gap: 30px; }
.navlinks a { font: 700 14px/1 var(--display); color: var(--navy); text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.navlinks a:hover { border-color: var(--coral); }
.lang-toggle {
  margin-left: auto;
  display: inline-flex; padding: 4px; gap: 2px;
  border-radius: 999px; background: #fff; border: 1px solid var(--line);
}
.lang-toggle button {
  font: 700 13px/1 var(--display); letter-spacing: .04em;
  min-width: 46px; min-height: 36px; padding: 0 12px;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--navy); color: #fff; }
@media (min-width: 860px) {
  .navlinks { display: flex; }
  .lang-toggle { margin-left: 0; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; background: var(--cream); text-align: center; }
.scene { height: clamp(260px, 38vw, 440px); overflow: hidden; background: var(--sky); }
.scene svg { display: block; width: 100%; height: 100%; }
.boat { transform-box: fill-box; transform-origin: 50% 100%; animation: bob 5s ease-in-out infinite; }
.waves-back { animation: drift 10s linear infinite; }
.waves-front { animation: drift 7s linear infinite reverse; }
.beam { opacity: .7; animation: beam 4s ease-in-out infinite; }
.clouds > g { animation: cloud 26s ease-in-out infinite alternate; }
.clouds > g:nth-child(2) { animation-duration: 34s; }
.clouds > g:nth-child(3) { animation-duration: 30s; animation-direction: alternate-reverse; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-6px) rotate(1.5deg); } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-44px); } }
@keyframes beam { 0%, 100% { opacity: .3; } 50% { opacity: .85; } }
@keyframes cloud { from { transform: translateX(-18px); } to { transform: translateX(18px); } }

.hero-content { max-width: 780px; margin: 0 auto; padding: clamp(30px, 5vw, 48px) var(--gutter) clamp(64px, 9vw, 96px); }
.hero-verse { font: italic 500 clamp(20px, 4.6vw, 27px)/1.35 var(--story); color: var(--brown); }
.hero-lead { margin-top: 16px; font: 500 clamp(17px, 3.8vw, 20px)/1.5 var(--body); color: var(--muted); }
.name {
  margin-top: 6px;
  font: 700 clamp(48px, 13vw, 104px)/1.08 var(--display);
  letter-spacing: -.01em;
  color: var(--navy);
}
.name-alt { margin-top: 2px; font: 700 clamp(18px, 4.4vw, 24px)/1.3 var(--display); color: var(--coral-text); }
html[lang="el"] .name-alt { display: none; }

.chips { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: #fff; border: 2px solid #efe4cf;
  font: 700 14.5px/1.2 var(--display); color: var(--navy);
}
.chips .icon { width: 18px; height: 18px; color: var(--coral-text); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }

.countdown { margin-top: 36px; }
.countdown-title { font: italic 500 19px/1.4 var(--story); color: var(--brown); }
.countdown[data-phase="today"] .countdown-title,
.countdown[data-phase="after"] .countdown-title { font-size: clamp(22px, 5vw, 28px); color: var(--navy); }
.countdown-units { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
.countdown-units:empty { display: none; }
.cd-sep { display: none; }
.cd-unit {
  display: grid; place-content: center; justify-items: center;
  width: 84px; height: 84px; border-radius: 50%;
  background: #fff; border: 2px solid var(--sky-2);
}
.cd-num { font: 700 28px/1 var(--display); color: var(--navy); font-variant-numeric: tabular-nums; }
.cd-label { margin-top: 5px; font: 500 14px/1 var(--body); color: var(--muted); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(72px, 11vw, 120px) var(--gutter); }
.section-sky { padding-top: calc(clamp(72px, 11vw, 120px) + 10px); padding-bottom: calc(clamp(72px, 11vw, 120px) + 10px); }
.container { max-width: var(--maxw); margin: 0 auto; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(36px, 6vw, 56px); }
.section-title { margin-top: 6px; font: 700 clamp(32px, 6.4vw, 50px)/1.15 var(--display); color: var(--navy); }
.section-lead { margin-top: 12px; color: var(--muted); font-size: 18.5px; }

/* ---------- invitation note ---------- */
.note {
  position: relative;
  max-width: 720px; margin: 20px auto 0;
  padding: 64px clamp(22px, 6vw, 56px) 44px;
  background: #fff;
  border-radius: 28px;
  outline: 2px dashed var(--rope); outline-offset: -12px;
  text-align: center;
  box-shadow: 0 24px 50px -36px rgba(31, 53, 80, .5);
}
.note-ring { position: absolute; top: -36px; left: 50%; margin-left: -36px; width: 72px; height: 72px; }
.poem { margin-top: 14px; font: italic 500 clamp(20px, 4.4vw, 25px)/1.55 var(--story); color: var(--navy); }
.note-body { font: 400 clamp(17px, 3.8vw, 19px)/1.7 var(--body); color: var(--ink); }
.note-body strong { font-weight: 700; color: var(--navy); }
.godparent {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  margin-top: 24px; padding: 12px 28px; border-radius: 18px; background: var(--sky);
}
.godparent-label { font: 700 12px/1.3 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--coral-text); }
html[lang="el"] .godparent-label { text-transform: none; letter-spacing: .02em; font-size: 14px; }
.godparent-name { font: 700 clamp(18px, 4vw, 21px)/1.3 var(--display); color: var(--navy); }
.note-honour { margin-top: 24px; font: italic 500 clamp(19px, 4vw, 21px)/1.45 var(--story); color: var(--brown); }
.note-signoff { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 10px; font: 500 17px/1.4 var(--body); color: var(--muted); }
.note-signature { font: 700 clamp(20px, 4.4vw, 24px)/1.3 var(--display); color: var(--navy); }

.polaroid {
  margin: 0;
  background: #fff; padding: 10px 10px 34px; border-radius: 6px;
  box-shadow: 0 16px 34px -18px rgba(31, 53, 80, .5), 0 0 0 1px rgba(31, 53, 80, .06);
}
.note .polaroid { width: min(240px, 78%); margin: 0 auto 26px; rotate: -4deg; }
.note .polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }

/* ---------- the day ---------- */
.stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; }
.stop-fallback { text-align: center; }
.stop { display: grid; gap: 12px; }
.stop-marker { display: flex; align-items: center; gap: 12px; }
.stop-time {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 18px;
  border-radius: 999px; background: var(--navy); color: #fff;
  font: 700 16px/1.2 var(--display); white-space: nowrap;
}
.stop--tbc .stop-time { background: #fff; color: var(--navy); border: 2px dashed var(--coral); }
.stop-marker::after { content: ""; flex: 1; border-top: 3px dotted var(--rope); }

.stop-card {
  display: grid;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 50px -38px rgba(31, 53, 80, .55);
  border: 1px solid var(--line);
}
.stop-info { padding: clamp(24px, 5vw, 36px); }
.stop-name { margin-top: 4px; font: 700 clamp(21px, 4.4vw, 27px)/1.3 var(--display); color: var(--navy); }
.stop-address { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-weight: 700; color: var(--ink); }
.stop-address .icon { margin-top: 4px; color: var(--coral-text); }
.stop-note { margin-top: 18px; padding: 12px 16px; border-radius: 14px; background: var(--sail-soft); font-weight: 500; font-size: 17px; }
.stop-details { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.stop-details li { display: flex; gap: 12px; align-items: flex-start; font-size: 16.5px; line-height: 1.55; color: var(--muted); }
.stop-details .icon { margin-top: 2px; color: var(--navy); }
.stop-details strong { color: var(--ink); font-weight: 700; }
.stop-details a { color: var(--navy); font-weight: 700; text-underline-offset: 3px; }
.stop-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.stop-actions .btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.stop-actions .btn-ghost:hover { border-color: var(--navy); }
.stop-about { margin-top: 22px; padding-top: 18px; border-top: 2px dotted var(--line); color: var(--muted); font-size: 16px; }
.stop-map { position: relative; min-height: 300px; background: var(--sky-2); }
.stop-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.stop--tbc .stop-card { background: transparent; border: 2px dashed rgba(44, 74, 110, .2); box-shadow: none; }
.stop--tbc .stop-note { background: none; padding: 0; margin-top: 10px; color: var(--muted); }
.stop-tbc {
  display: inline-block; margin-top: 16px; padding: 5px 14px; border-radius: 999px;
  background: var(--coral-soft); color: var(--coral-text);
  font: 700 12.5px/1.3 var(--display);
}

@media (min-width: 860px) {
  .stop { grid-template-columns: 170px 1fr; gap: 26px; }
  .stop-marker { flex-direction: column; align-items: flex-end; gap: 12px; padding-top: 30px; }
  .stop-marker::after { flex: 1; border-top: 0; border-left: 3px dotted var(--rope); margin-right: 30px; }
  .stop:last-child .stop-marker::after { display: none; }
  .stop--confirmed .stop-card { grid-template-columns: 1.1fr 1fr; }
  .stop-map { min-height: 100%; }
}

.save-date { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: clamp(48px, 7vw, 64px); text-align: center; }
.save-date-title { font: 700 24px/1.2 var(--display); color: var(--navy); }
.save-date-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- good to know ---------- */
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.tip { padding: 26px 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.tip-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; }
.tip-icon .icon { width: 26px; height: 26px; }
.tip-sail { background: var(--sail-soft); color: var(--sail-text); }
.tip-sea { background: var(--sky); color: var(--navy); }
.tip-navy { background: var(--navy); color: #fff; }
.tip h3 { margin-top: 16px; font: 700 19px/1.3 var(--display); color: var(--navy); }
.tip p { margin-top: 8px; font-size: 17px; line-height: 1.6; color: var(--ink); }
@media (min-width: 640px) { .tips { grid-template-columns: repeat(2, 1fr); gap: 22px; } }
@media (min-width: 900px) { .tips { grid-template-columns: repeat(3, 1fr); } }

/* ---------- photos ---------- */
.polaroids { display: flex; justify-content: center; align-items: flex-start; gap: clamp(12px, 3vw, 28px); }
.photo-frame { display: block; width: clamp(96px, 27vw, 210px); text-decoration: none; pointer-events: none; }
.photo-frame:nth-child(1) { rotate: -5deg; }
.photo-frame:nth-child(2) { rotate: 3deg; translate: 0 -12px; }
.photo-frame:nth-child(3) { rotate: -2deg; }
.frame-inner {
  display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; border-radius: 3px;
  background: var(--sky); color: rgba(44, 74, 110, .4);
}
.frame-inner .icon { width: 30px; height: 30px; }
.photo-frame.has-photo { pointer-events: auto; }
.frame-inner img { width: 100%; height: 100%; object-fit: cover; }
.photos-cta { text-align: center; margin-top: 44px; }

/* ---------- footer ---------- */
.site-footer { position: relative; z-index: 2; margin-top: var(--wave-h); background: var(--navy); color: #fff; text-align: center; }
.site-footer::before { top: calc(1px - var(--wave-h)); background: var(--navy); }
.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 48px var(--gutter) calc(44px + env(safe-area-inset-bottom));
}
.footer-ring { width: 60px; height: 60px; }
.blessing { font: 700 clamp(34px, 8vw, 50px)/1.2 var(--display); color: var(--sail); }
.blessing-note { max-width: 40ch; font: italic 500 19px/1.45 var(--story); color: rgba(255, 255, 255, .88); }
.footer-love { margin: 6px 0 12px; font: 700 18px/1.4 var(--display); }
.footer-meta { margin-top: 14px; font-size: 15px; color: rgba(255, 255, 255, .7); }
.footer-meta a { color: inherit; text-underline-offset: 3px; }

/* ==========================================================================
   Photos page
   ========================================================================== */
.gallery-page .topbar { background: rgba(255, 255, 255, .92); box-shadow: 0 1px 0 var(--line); }
.gallery-page .lang-toggle { margin-left: auto; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font: 700 14px/1 var(--display); color: var(--navy); text-decoration: none; }
.back-link .icon { transform: scaleX(-1); width: 20px; height: 20px; color: var(--coral-text); }
.gallery-head { position: relative; z-index: 1; padding: 118px var(--gutter) 40px; text-align: center; background: var(--sky); }
.gallery-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(1px - var(--wave-h)); height: var(--wave-h);
  background: var(--sky); transform: scaleY(-1);
  -webkit-mask: url("wave.svg") repeat-x 0 100% / 140px var(--wave-h);
  mask: url("wave.svg") repeat-x 0 100% / 140px var(--wave-h);
}
.gallery-count { margin-top: 10px; color: var(--muted); font-weight: 500; }
.gallery-wrap { padding: calc(var(--wave-h) + 28px) var(--gutter) 96px; }
.gallery { max-width: 1280px; margin: 0 auto; columns: 2 160px; column-gap: 10px; }
@media (min-width: 720px) { .gallery { columns: 3 220px; column-gap: 14px; } }
.gallery-item {
  display: block; width: 100%; margin: 0 0 10px; padding: 0;
  border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in;
  background: var(--sky); break-inside: avoid;
}
@media (min-width: 720px) { .gallery-item { margin-bottom: 14px; } }
.gallery-item img { width: 100%; height: auto; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-empty { max-width: 520px; margin: 24px auto 0; text-align: center; display: grid; justify-items: center; gap: 22px; color: var(--muted); font-size: 19px; }
.gallery-empty .photo-frame { width: 160px; }

.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(20, 34, 52, .96); color: #fff;
}
.lightbox::backdrop { background: rgba(20, 34, 52, .96); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(12px, env(safe-area-inset-left)) 10px max(12px, env(safe-area-inset-right)); }
.lb-count { font: 700 14px/1 var(--display); color: rgba(255, 255, 255, .75); }
.lb-tools { display: flex; gap: 8px; }
.lb-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px;
  border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff;
  cursor: pointer; text-decoration: none;
}
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-stage { position: relative; min-height: 0; touch-action: pan-y; }
.lb-stage img { position: absolute; inset: 0 8px; width: calc(100% - 16px); height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-prev .icon { transform: scaleX(-1); }
@media (hover: none) { .lb-nav { display: none; } }
.lb-caption { min-height: 48px; padding: 12px var(--gutter) calc(14px + env(safe-area-inset-bottom)); text-align: center; font: italic 500 19px/1.4 var(--story); color: rgba(255, 255, 255, .85); }

/* ==========================================================================
   Motion
   ========================================================================== */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
html.js .reveal.is-in { opacity: 1; transform: none; }
.tips .tip.reveal:nth-child(2) { transition-delay: .08s; }
.tips .tip.reveal:nth-child(3) { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .boat, .waves-back, .waves-front, .beam, .clouds > g { animation: none; }
  .btn, .gallery-item img { transition: none; }
}

@media print {
  .topbar, .hero-actions, .countdown, .stop-map, .save-date, #share-btn, .photos-cta { display: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
