@import url('https://fonts.googleapis.com/css2?family=Parisienne&family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;600;700&display=swap');

* { box-sizing: border-box; }

:root {
  --navy: #0e3b63;
  --blue: #1d688b;
  --gold: #c7a45b;
  --sand: #f1dcb9;
  --paper: #ffffff;
  --ink: #163f60;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.92) 54%, rgba(250,239,221,.92) 100%),
    radial-gradient(circle at 50% 43%, rgba(218,241,246,.88) 0, transparent 27%),
    radial-gradient(circle at 14% 88%, rgba(245,224,193,.85) 0, transparent 25%),
    radial-gradient(circle at 86% 88%, rgba(245,224,193,.85) 0, transparent 25%);
}

/* ocean and whitewashed beach floor */
body::before {
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: 39vh;
  min-height: 250px;
  z-index: -3;
  background:
    url("data:image/svg+xml,%3Csvg width='1600' height='390' viewBox='0 0 1600 390' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 150 C180 100 330 190 520 148 C730 100 885 205 1090 148 C1300 90 1435 142 1600 112 L1600 390 L0 390Z' fill='%23dceff5' fill-opacity='.75'/%3E%3Cpath d='M0 216 C230 158 382 245 602 204 C842 158 998 246 1200 206 C1370 172 1488 186 1600 171 L1600 390 L0 390Z' fill='%23f2d9b2' fill-opacity='.88'/%3E%3Cpath d='M0 286 C215 253 410 304 625 274 C872 238 1018 302 1235 276 C1418 250 1518 262 1600 252 L1600 390 L0 390Z' fill='%23fff8ec' fill-opacity='.96'/%3E%3C/svg%3E") bottom center/cover no-repeat;
}

body::after {
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: 15vh;
  min-height: 105px;
  z-index: -2;
  opacity: .62;
  background:
    repeating-linear-gradient(0deg, rgba(164,124,82,.17) 0 2px, transparent 2px 23px),
    linear-gradient(90deg, rgba(255,255,255,.78), rgba(238,218,188,.46), rgba(255,255,255,.75));
}

.page {
  min-height: 100vh;
  position: relative;
  padding: clamp(6px, 1vw, 15px) clamp(14px, 2.5vw, 44px);
}

/* very visible palm leaves like original mockup */
.palm-corner {
  position: fixed;
  top: -14px;
  width: clamp(180px, 24vw, 360px);
  height: clamp(145px, 18vw, 270px);
  z-index: 0;
  opacity: .52;
  pointer-events: none;
}

.palm-left { left: -26px; transform: rotate(4deg); }
.palm-right { right: -26px; transform: scaleX(-1) rotate(4deg); }

.palm-corner span {
  position: absolute;
  left: 12%;
  top: 44%;
  width: 94%;
  height: clamp(14px, 1.6vw, 24px);
  background: linear-gradient(90deg, rgba(79,118,84,.82), rgba(132,155,97,.55), transparent);
  border-radius: 100% 0 100% 0;
  transform-origin: left center;
  filter: drop-shadow(0 8px 8px rgba(80,100,60,.06));
}

.palm-corner span:nth-child(1) { transform: rotate(-56deg); }
.palm-corner span:nth-child(2) { transform: rotate(-34deg); }
.palm-corner span:nth-child(3) { transform: rotate(-14deg); }
.palm-corner span:nth-child(4) { transform: rotate(8deg); }
.palm-corner span:nth-child(5) { transform: rotate(29deg); }
.palm-corner span:nth-child(6) { transform: rotate(50deg); }

.hero {
  position: relative;
  z-index: 2;
  max-width: 1520px;
  min-height: calc(100vh - 18px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(7px, 1vh, 15px);
}

.hero-title {
  text-align: center;
}

h1 {
  font-family: Parisienne, cursive;
  font-size: clamp(60px, 8.1vw, 128px);
  font-weight: 400;
  line-height: .78;
  margin: clamp(6px, .8vh, 13px) 0 0;
  color: var(--navy);
  text-shadow: 0 8px 26px rgba(14,59,99,.08);
}

.title-rule {
  width: min(510px, 54vw);
  margin: clamp(5px, .75vh, 10px) auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
}

.title-rule span {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.title-rule em {
  font-style: normal;
  font-size: clamp(13px, 1.1vw, 18px);
}

.hero-title p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: clamp(.22em, .34vw, .38em);
  color: #345d79;
  font-size: clamp(10px, .9vw, 15px);
}

.main-collage {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(340px, 500px) minmax(210px, 1fr);
  gap: clamp(18px, 2.3vw, 36px);
  align-items: center;
  min-height: 0;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: clamp(10px, 1.15vw, 17px);
}

.polaroid {
  background: var(--paper);
  padding: clamp(6px, .7vw, 10px);
  border-radius: 2px;
  box-shadow: 0 16px 34px rgba(25,55,78,.16), 0 1px 0 rgba(255,255,255,.92) inset;
  transform: rotate(var(--rot));
  transition: .25s ease;
}

.polaroid:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 0 22px 42px rgba(25,55,78,.21);
}

.polaroid img {
  width: 100%;
  height: clamp(95px, 15.5vh, 158px);
  object-fit: cover;
  display: block;
}

.center-piece {
  text-align: center;
}

.portrait-card {
  background: #fff;
  padding: clamp(10px, 1vw, 14px);
  border-radius: 3px;
  box-shadow: 0 22px 58px rgba(25,55,78,.18);
  position: relative;
}

.portrait-card::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 10px;
  z-index: -1;
  background: radial-gradient(circle at 50% 48%, rgba(215,240,245,.78), transparent 70%);
}

.portrait-card img {
  width: 100%;
  height: clamp(260px, 42vh, 440px);
  object-fit: cover;
  display: block;
}

h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(38px, 4.6vw, 72px);
  line-height: .88;
  margin: clamp(12px, 1.4vh, 18px) 0 6px;
  color: var(--navy);
  font-weight: 700;
}

.dates {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: clamp(.13em, .22vw, .25em);
  color: #365d78;
  font-size: clamp(10px, .95vw, 14px);
}

.gold-heart {
  color: var(--gold);
  font-size: clamp(14px, 1.2vw, 21px);
  margin: clamp(4px, .7vh, 8px) 0 0;
}

.script-caption {
  margin: clamp(4px, .7vh, 8px) 0 clamp(9px, 1vh, 14px);
  font-family: Parisienne, cursive;
  color: #1d5e86;
  font-size: clamp(24px, 2.55vw, 36px);
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: min(292px, 100%);
  height: clamp(44px, 5.9vh, 59px);
  padding: 0 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #123f67, #1d6b90);
  color: white;
  border: 1px solid rgba(255,255,255,.76);
  box-shadow: 0 14px 28px rgba(18,63,103,.27);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  font-size: clamp(12px, .95vw, 15px);
  cursor: pointer;
}

.upload-btn input { display: none; }

.status {
  min-height: 18px;
  margin: 6px 0 0;
  color: #315d78;
  font-size: 12px;
}

.bottom-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(75px, 1fr));
  gap: clamp(8px, 1vw, 14px);
  width: min(1180px, 84vw);
  margin: 0 auto;
  align-items: end;
}

.bottom-strip .polaroid img {
  height: clamp(72px, 11vh, 118px);
}

.beach-decor {
  position: fixed;
  bottom: clamp(12px, 2vh, 28px);
  z-index: 1;
  pointer-events: none;
  opacity: .76;
}

.decor-left { left: clamp(10px, 2.5vw, 46px); }
.decor-right { right: clamp(10px, 2.5vw, 46px); }

.shell-round {
  width: clamp(42px, 5vw, 74px);
  height: clamp(42px, 5vw, 74px);
  border-radius: 50%;
  border: clamp(8px, .8vw, 12px) solid rgba(197,154,92,.48);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.8), 0 10px 20px rgba(120,90,50,.10);
  display: inline-block;
}

.shell-small {
  width: clamp(28px, 3vw, 46px);
  height: clamp(22px, 2.6vw, 38px);
  margin-left: 8px;
  display: inline-block;
  background: radial-gradient(ellipse at bottom, rgba(199,164,91,.45), rgba(255,246,229,.85));
  border-radius: 80% 80% 25% 25%;
  border: 1px solid rgba(185,142,80,.28);
  transform: rotate(-12deg);
}

.starfish {
  display: inline-block;
  color: rgba(199,145,76,.64);
  font-size: clamp(62px, 7vw, 116px);
  transform: rotate(18deg);
  filter: drop-shadow(0 8px 14px rgba(130,90,50,.11));
}

.grass {
  display: inline-block;
  width: 50px;
  height: 90px;
  margin-left: 9px;
  opacity: .52;
  background: repeating-linear-gradient(86deg, transparent 0 7px, rgba(160,125,65,.7) 8px 10px, transparent 11px 18px);
  transform: translateY(20px) rotate(-8deg);
}

.music-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  border: 1px solid rgba(255,255,255,.75);
  background: rgba(17,59,99,.94);
  color: white;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(17,59,99,.22);
}

@media (max-width: 1050px) {
  .hero {
    min-height: auto;
  }

  .main-collage {
    grid-template-columns: 1fr;
    max-width: 680px;
    margin: 0 auto;
  }

  .center-piece { order: 1; }
  .left-grid { order: 2; }
  .right-grid { order: 3; }

  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .polaroid img {
    height: clamp(105px, 18vw, 155px);
  }

  .portrait-card img {
    height: auto;
    aspect-ratio: 1.06 / 1;
  }

  .bottom-strip {
    width: min(680px, 100%);
    grid-template-columns: repeat(3, 1fr);
    margin-top: 10px;
  }

  .bottom-strip .polaroid img {
    height: clamp(100px, 20vw, 150px);
  }

  .beach-decor {
    display: none;
  }
}

@media (max-width: 560px) {
  .page {
    padding: 9px 10px 28px;
  }

  h1 {
    font-size: clamp(58px, 18vw, 84px);
  }

  .hero-title p {
    letter-spacing: .18em;
  }

  .photo-grid,
  .bottom-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .upload-btn {
    width: 100%;
  }

  .music-btn {
    right: 10px;
    bottom: 10px;
    padding: 9px 13px;
    font-size: 12px;
  }

  .palm-corner {
    width: 170px;
    height: 120px;
    opacity: .35;
  }
}

@media (min-width: 1051px) and (max-height: 820px) {
  .page {
    padding-top: 4px;
    padding-bottom: 6px;
  }

  .hero {
    min-height: calc(100vh - 10px);
    gap: 6px;
  }

  h1 {
    font-size: clamp(54px, 6.9vw, 94px);
  }

  .main-collage {
    grid-template-columns: minmax(190px, 1fr) minmax(315px, 430px) minmax(190px, 1fr);
    gap: 20px;
  }

  .polaroid img {
    height: clamp(78px, 13vh, 120px);
  }

  .portrait-card img {
    height: clamp(225px, 39vh, 340px);
  }

  h2 {
    font-size: clamp(34px, 3.8vw, 54px);
  }

  .script-caption {
    font-size: 26px;
  }

  .upload-btn {
    height: 44px;
  }

  .bottom-strip .polaroid img {
    height: clamp(58px, 9.6vh, 86px);
  }
}
