﻿:root {
  --ink: #3a1f2e;
  --ink-soft: #5c3348;
  --muted: #9a6b80;
  --line: rgba(196, 91, 122, 0.22);
  --rose: #c45b7a;
  --rose-deep: #9a3d5c;
  --blush: #f3c4d0;
  --blush-soft: #fce8ee;
  --gold: #d4b07a;
  --gold-soft: #f0e0c0;
  --mint: #e8f5ee;
  --paper: #fff5f8;
  --cream: #fffaf7;
  --white: #fffcfb;
  --night: #2a1420;
  --shell: min(1120px, calc(100% - 2.5rem));
  --display: "El Messiri", Georgia, serif;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; overflow: hidden; }

body {
  margin: 0;
  height: 100svh;
  max-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-underline-offset: 0.18em; }
button, input, textarea { font: inherit; }
img { max-width: 100%; display: block; }

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 8% -5%, rgba(243, 196, 208, 0.55), transparent 55%),
    radial-gradient(820px 480px at 100% 0%, rgba(212, 176, 122, 0.28), transparent 55%),
    linear-gradient(180deg, #fce8ee 0%, #fff5f8 42%, #fffaf7 100%);
}

.atmosphere__stars {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 20%, rgba(196, 91, 122, 0.9), transparent),
    radial-gradient(1px 1px at 28% 55%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 62% 18%, rgba(212, 176, 122, 0.95), transparent),
    radial-gradient(1px 1px at 78% 42%, rgba(196, 91, 122, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 90% 70%, rgba(255, 255, 255, 0.8), transparent);
  animation: twinkle 5s ease-in-out infinite alternate;
}

@keyframes twinkle { from { opacity: 0.3; } to { opacity: 0.75; } }

.shell { width: var(--shell); margin-inline: auto; }
.shell--narrow { width: min(680px, calc(100% - 2.5rem)); }

.nav {
  position: relative;
  z-index: 40;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid rgba(196, 91, 122, 0.16);
  background: rgba(255, 252, 251, 0.72);
  backdrop-filter: blur(14px);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.nav__crown { color: var(--rose); font-size: 1rem; }

.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  font-size: 0.84rem;
  font-weight: 500;
}

.nav__links a {
  text-decoration: none;
  color: var(--ink-soft);
  opacity: 0.78;
}

.nav__links a:hover,
.nav__links a.is-active {
  opacity: 1;
  color: var(--rose-deep);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.28em;
}

.nav__link-ext {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rose-deep);
  text-decoration: none;
}

.page {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(0.75rem, 2vh, 1.35rem) 0;
}

.page--night { padding: 0; }

.section__head { margin-bottom: 0.85rem; }
.section__head h2 {
  margin: 0.2rem 0 0.35rem;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
}
.section__head p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.eyebrow {
  margin: 0;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.eyebrow--light { color: rgba(243, 196, 208, 0.95); }

.hero--split {
  position: relative;
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
  padding: clamp(0.75rem, 2vh, 1.5rem) clamp(1rem, 3vw, 2rem);
  overflow: hidden;
  background:
    radial-gradient(700px 420px at 12% 18%, rgba(243, 196, 208, 0.28), transparent 60%),
    radial-gradient(640px 380px at 92% 8%, rgba(212, 176, 122, 0.28), transparent 55%),
    linear-gradient(135deg, #2a1420 0%, #9a3d5c 45%, #c45b7a 100%);
  color: var(--cream);
}

.hero--split .hero__copy { position: relative; z-index: 2; max-width: 560px; }

.hero__stage {
  position: relative;
  z-index: 2;
  justify-self: center;
  width: min(100%, 420px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hero__frame {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid rgba(243, 196, 208, 0.65);
  box-shadow: 0 0 0 6px rgba(255, 250, 247, 0.06), 0 20px 50px rgba(0, 0, 0, 0.35);
  background: #2a1420;
  aspect-ratio: 3 / 4;
  max-height: min(68vh, 560px);
}

.hero--split .hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero__caption {
  margin: 0.85rem 0 0;
  text-align: center;
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--blush);
}

.hero__petals, .atmosphere__petals, .profile__petals {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  bottom: -8%;
  width: 14px;
  height: 18px;
  border-radius: 70% 10% 70% 10%;
  background: linear-gradient(135deg, #fce8ee, #c45b7a);
  box-shadow: 0 0 14px rgba(196, 91, 122, 0.55);
  animation: petalFall linear infinite;
  opacity: 0.85;
}

.petal--gold {
  background: linear-gradient(135deg, #fff8ef, #d4b07a);
  box-shadow: 0 0 14px rgba(212, 176, 122, 0.55);
}

.atmosphere__petals .petal { opacity: 0.5; width: 11px; height: 14px; }

@keyframes petalFall {
  0% { transform: translate3d(0,0,0) rotate(0deg) scale(calc(var(--petal-scale,1)*0.85)); opacity: 0; }
  12% { opacity: 0.9; }
  100% { transform: translate3d(24px,-115vh,0) rotate(220deg) scale(calc(var(--petal-scale,1)*1.05)); opacity: 0; }
}

.hero__kicker {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blush);
}

.hero__brand {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.02;
  background: linear-gradient(120deg, #fffaf7 0%, #f3c4d0 45%, #d4b07a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 28px rgba(0,0,0,0.35));
}

.hero__title {
  margin: 0.3rem 0 0.7rem;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3.5vw, 2.4rem);
  font-weight: 500;
  font-style: italic;
  color: rgba(255, 250, 247, 0.92);
}

.hero__lede {
  margin: 0 0 1rem;
  max-width: 38ch;
  color: rgba(255, 250, 247, 0.78);
  font-size: clamp(0.92rem, 1.6vw, 1.05rem);
  font-weight: 300;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  max-width: 420px;
}

.hero__stats div {
  padding: 0.85rem 0.7rem;
  border: 1px solid rgba(243, 196, 208, 0.4);
  background: rgba(42, 20, 32, 0.35);
  backdrop-filter: blur(8px);
  text-align: center;
}

.hero__stats dt {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--blush);
}

.hero__stats dd {
  margin: 0.25rem 0 0;
  color: rgba(255, 250, 247, 0.65);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #d47895, #c45b7a);
  color: #fffaf7;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(154, 61, 92, 0.32);
  transition: transform 0.2s var(--ease);
}

.btn:hover { transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 250, 247, 0.5);
  color: #fffaf7;
  box-shadow: none;
}

.page .btn--ghost {
  border-color: rgba(196, 91, 122, 0.4);
  color: var(--rose-deep);
}

.profile {
  display: grid;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}

.profile__portrait {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(196, 91, 122, 0.4);
  box-shadow: 0 16px 40px rgba(42, 20, 32, 0.14);
  min-height: 0;
  height: 100%;
  background: #2a1420;
}

.profile__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: min(58vh, 520px);
  object-fit: cover;
  object-position: center 18%;
}

.profile__portrait figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(transparent, rgba(42, 20, 32, 0.88));
  color: var(--blush);
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  z-index: 2;
}

.profile__main {
  padding: 1rem 1.15rem;
  border-radius: 20px;
  background: rgba(255, 252, 251, 0.86);
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(196, 91, 122, 0.1);
  overflow: hidden;
  min-height: 0;
}

.profile__main h3 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
}

.profile__role { margin: 0 0 0.9rem; color: var(--rose); font-weight: 600; }
.profile__bio { margin: 0 0 1.25rem; color: var(--ink-soft); }

.profile__facts { display: grid; gap: 0.65rem; margin: 0; }
.profile__facts div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
}
.profile__facts dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.profile__facts dd { margin: 0; font-weight: 500; }

.path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.path__item {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(255, 252, 251, 0.82);
  border: 1px solid var(--line);
}

.path__item time {
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rose-deep);
}

.path__item h3 { margin: 0 0 0.2rem; font-family: var(--display); font-size: 1.05rem; }
.path__item .org { margin: 0 0 0.25rem; color: var(--rose); font-weight: 600; font-size: 0.88rem; }
.path__item p:last-child { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }

.elements {
  display: grid;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
}

.elements__item {
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: rgba(255, 252, 251, 0.84);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(196, 91, 122, 0.08);
}

.elements__item span {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: var(--rose-deep);
}

.elements__item h3 { margin: 0 0 0.35rem; font-family: var(--display); font-size: 1.25rem; }
.elements__item p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.elements__item em {
  display: block;
  margin-top: 0.55rem;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.moment {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  background:
    radial-gradient(700px 420px at 20% 20%, rgba(243, 196, 208, 0.22), transparent 60%),
    linear-gradient(135deg, #2a1420 0%, #9a3d5c 50%, #c45b7a 100%);
  color: var(--cream);
}

.moment__inner {
  width: 100%;
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem 0;
}

.moment__copy h2 {
  margin: 0.25rem 0 0.4rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.moment__copy p { margin: 0; color: rgba(255, 250, 247, 0.75); }

.clock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.clock div {
  padding: 1rem 0.5rem;
  text-align: center;
  border-radius: 16px;
  border: 1px solid rgba(243, 196, 208, 0.4);
  background: rgba(42, 20, 32, 0.4);
  backdrop-filter: blur(8px);
}

.clock strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--blush);
  transition: transform 0.2s var(--ease);
}

.clock strong.is-tick { transform: scale(1.06); }
.clock span {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 250, 247, 0.65);
}

.moment__done {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--blush);
}

.letter {
  padding: 1.25rem 1.35rem;
  border-radius: 20px;
  background: rgba(255, 252, 251, 0.9);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(196, 91, 122, 0.1);
  overflow: auto;
  max-height: 100%;
}

.letter p {
  margin: 0 0 0.9rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.letter__sign {
  font-family: var(--display);
  font-size: 1rem !important;
  color: var(--ink) !important;
}

.guestbook {
  display: grid;
  gap: 1rem;
  flex: 1;
  min-height: 0;
}

.guestbook__form {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 252, 251, 0.88);
  border: 1px solid var(--line);
}

.guestbook__form label { display: grid; gap: 0.35rem; }
.guestbook__form label span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.guestbook__form input,
.guestbook__form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  resize: none;
}

.guestbook__form input:focus,
.guestbook__form textarea:focus {
  outline: 2px solid rgba(243, 196, 208, 0.55);
  border-color: var(--rose);
}

.guestbook__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  overflow: auto;
  min-height: 0;
}

.guestbook__list:empty::before {
  content: "No petals yet — leave the first wish ✦";
  display: block;
  padding: 1rem;
  border-radius: 16px;
  border: 1px dashed rgba(196, 91, 122, 0.3);
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
}

.wish {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 252, 251, 0.88);
  border: 1px solid var(--line);
}

.wish__name { margin: 0 0 0.25rem; font-family: var(--display); font-weight: 700; }
.wish__message { margin: 0 0 0.35rem; color: var(--ink-soft); }
.wish__time { font-size: 0.72rem; color: var(--muted); }

.footer {
  flex: 0 0 auto;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(196, 91, 122, 0.14);
  background: rgba(255, 252, 251, 0.65);
  backdrop-filter: blur(10px);
}

.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.footer__name {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
}

.footer__links { display: flex; gap: 0.85rem; }
.footer__links a { text-decoration: none; color: var(--rose-deep); font-weight: 600; }

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (min-width: 900px) {
  .hero--split { grid-template-columns: 1.05fr 0.95fr; }
  .hero__frame { max-height: none; height: min(100%, 62vh); }
  .profile { grid-template-columns: 1fr 1.05fr; }
  .path__item { grid-template-columns: 8rem 1fr; }
  .elements { grid-template-columns: repeat(2, 1fr); }
  .moment__inner { grid-template-columns: 1fr 1.15fr; align-items: end; }
  .guestbook { grid-template-columns: 0.95fr 1.05fr; align-items: start; }
}

@media (max-width: 899px) {
  .nav { flex-wrap: wrap; padding: 0.5rem 0.75rem; }
  .nav__links {
    display: flex;
    order: 3;
    width: 100%;
    gap: 0.6rem 0.85rem;
    padding-top: 0.2rem;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .nav__link-ext { display: none; }
  .hero--split { grid-template-rows: auto minmax(0, 1fr); gap: 0.75rem; }
  .hero__stats { max-width: none; }
  .hero__stats dd { font-size: 0.62rem; }
  .profile__facts div { grid-template-columns: 1fr; gap: 0.1rem; }
  .hero__brand { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .hero__frame { max-height: min(42vh, 320px); aspect-ratio: 4 / 5; }
  .hero__caption { display: none; }
  .footer__links { display: none; }
  .path__item { grid-template-columns: 1fr; gap: 0.2rem; }
  .path__item p:last-child { display: none; }
  .elements__item p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .guestbook__list { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere__stars, .petal, .reveal, .clock strong {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
