/* Powder Blue theme */
:root {
  --p: #628a9c;        /* primary blue */
  --ink: #354c56;      /* main text */
  --mut: #697a81;      /* muted text */
  --bg: #faf8f3;       /* cream background */
  --bg2: #eef4f6;      /* pale blue background */
  --paper: #fffefb;    /* cards / letter */
  --env: #bcd8e4;      /* envelope */
  --env2: #c7dfe9;
  --envline: #a8c5d1;
  --rule: #d5e0e3;     /* thin lines */
  --t1: oklch(0.9 0.045 230);
  --t2: oklch(0.9 0.045 15);
  --t3: oklch(0.9 0.045 80);
  --t4: oklch(0.9 0.045 150);
  --pink: oklch(0.62 0.11 15);
  --pink-soft: oklch(0.72 0.09 15);
  --gold: oklch(0.72 0.09 80);
  --hot: oklch(0.55 0.13 10);
  --ps: oklch(0.94 0.03 15);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Great Vibes', cursive;
  --sans: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: #e9eef0; -webkit-font-smoothing: antialiased; }
a { color: var(--p); } a:hover { color: var(--ink); }
p { margin: 0; }
h2 { margin: 0; font-weight: 400; }
button { font: inherit; }

.invite { max-width: 430px; margin: 0 auto; background: var(--bg); font-family: var(--sans); color: var(--ink); overflow: hidden; position: relative; box-shadow: 0 0 60px rgba(53,76,86,.12); }
section { display: flex; flex-direction: column; align-items: center; text-align: center; }
.alt { background: var(--bg2); }

/* Shared bits */
.divider { display: flex; align-items: center; gap: 12px; }
.divider i { width: 42px; height: 1px; background: var(--rule); }
.divider span { font-family: var(--serif); font-size: 16px; color: var(--p); }
.label { font-size: 11px; letter-spacing: 2px; color: var(--p); }
.title { font-family: var(--serif); font-size: 36px; line-height: 1.08; color: var(--ink); text-wrap: balance; }
.muted { font-size: 13px; line-height: 1.7; color: var(--mut); max-width: 300px; text-wrap: pretty; }
.script-title { font-family: var(--script); font-size: 34px; color: var(--p); }

/* Nav */
.nav { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.monogram { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--p); }
.nav-link { display: flex; gap: 8px; align-items: center; text-decoration: none; font-size: 11px; letter-spacing: 1.5px; color: var(--ink); }
.nav-link span { color: var(--p); font-size: 13px; }

/* Cover */
.cover { display: block; }
.hero { position: relative; overflow: hidden; }
.hero-text { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 86px 12px 0; text-align: center; }
.sticker { display: inline-flex; align-items: center; gap: 6px; background: var(--p); color: #fff; border: 2px solid #fff; border-radius: 100px; padding: 3px 11px; font-size: 8.5px; letter-spacing: 1.6px; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 10px rgba(53,76,86,.14); animation: wiggle 2.8s ease-in-out infinite; }
.sticker .shh { font-family: var(--script); font-size: 18px; line-height: 1; letter-spacing: 0; font-weight: 400; }
.names { display: flex; align-items: baseline; justify-content: center; gap: 8px; flex-wrap: nowrap; white-space: nowrap; margin-top: 0; text-shadow: 0 1px 10px rgba(255,255,255,.7); }
.name { font-family: var(--script); font-size: 53px; line-height: 1.05; color: var(--ink); }
.amp { font-family: var(--script); font-size: 38px; color: var(--pink); }
.hero-sub { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: -8px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 24px; line-height: 1.3; color: var(--ink); text-shadow: 0 1px 8px rgba(255,255,255,.8); }
.hero-sub i { font-style: normal; font-size: 12px; color: var(--gold); }
.hero-photo { position: relative; }
.hero-img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 52% 0%; }
.hero-top-fade { position: absolute; inset: 0 0 auto; height: 42%; pointer-events: none; background: linear-gradient(rgba(236,239,240,.82) 0%, rgba(236,239,240,.55) 55%, rgba(236,239,240,0) 100%); }

.chapter { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 32px 28px 8px; text-align: center; }
.chapter-lines { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.line { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.3; }
.script { font-family: var(--script); font-style: normal; font-size: 34px; padding: 0 2px; }
.script.blue { color: var(--p); }
.script.pink { color: var(--pink); }
.spark { font-size: 12px; color: var(--gold); }
.join { font-size: 12px; line-height: 1.6; color: var(--mut); margin-top: 4px; text-wrap: balance; }
.script-name { font-family: var(--script); font-size: 22px; color: var(--p); margin-left: 2px; }

/* Letter + envelope */
.letter-section { padding: 32px 24px 56px; gap: 18px; }
.envelope { width: 100%; position: relative; padding-bottom: 120px; }
.env-back { position: absolute; left: 0; right: 0; top: 86px; bottom: 0; background: var(--env); border-radius: 6px; }
.letter-wrap { position: relative; margin: 0 22px; max-height: 210px; overflow: hidden; transition: max-height .9s cubic-bezier(.2,.8,.2,1); }
.envelope.open .letter-wrap { max-height: 900px; }
.letter { background: var(--paper); padding: 28px 22px 36px; box-shadow: 0 8px 24px rgba(53,76,86,.14); display: flex; flex-direction: column; gap: 16px; text-align: center; }
.salutation { font-family: var(--script); font-size: 36px; color: var(--p); }
.letter-body { font-family: var(--serif); font-size: 19px; line-height: 1.3; display: flex; flex-direction: column; gap: 12px; text-wrap: pretty; }
.italic { font-style: italic; }
.signature { font-family: var(--script); font-size: 26px; line-height: 1.2; color: var(--p); }
.signature.big { font-size: 32px; }
.env-fold, .env-front { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 0 0 6px 6px; }
.env-fold { height: 150px; background: var(--env2); clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%); }
.env-front { height: 96px; background: var(--env); clip-path: polygon(0 0, 50% 40%, 100% 0, 100% 100%, 0 100%); }
.seal { position: absolute; left: 50%; bottom: 52px; width: 48px; height: 48px; margin-left: -24px; border-radius: 50%; background: var(--bg); border: 1px solid var(--envline); color: var(--pink); font-family: var(--serif); font-size: 22px; cursor: pointer; box-shadow: 0 4px 12px rgba(53,76,86,.18); display: flex; align-items: center; justify-content: center; transition: transform .2s; }
.seal:hover { transform: scale(1.08); }
.letter-hint { background: none; border: 0; font-size: 11px; letter-spacing: 1.5px; color: var(--p); cursor: pointer; padding: 6px; }
.letter-section .divider { margin-top: 10px; }

/* Countdown */
.countdown { position: relative; display: flex; gap: 10px; justify-content: center; padding: 14px 0 6px; }
.cd-deco { position: absolute; font-family: var(--serif); }
.cd-heart { left: -14px; top: -6px; font-size: 26px; color: var(--pink-soft); }
.cd-spark { right: -12px; top: -10px; font-size: 24px; color: var(--gold); }
.cd { display: flex; flex-direction: column; align-items: center; gap: 8px; transform: rotate(var(--rot)); }
.cd-card { width: 68px; height: 84px; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; box-shadow: 0 6px 16px rgba(53,76,86,.1); display: flex; flex-direction: column; }
.cd-card i { height: 14px; background: var(--tab); }
.cd-card b { flex: 1; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.cd > span { font-size: 9px; letter-spacing: 1.6px; color: var(--p); }

/* Banner */
.banner { background: var(--p); color: #fff; padding: 12px 8px; font-size: clamp(8px, 2.4vw, 10.5px); letter-spacing: 1px; font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; }

/* Venue */
.venue { padding: 48px 24px 52px; gap: 20px; }
.venue-title { font-family: var(--serif); font-size: 34px; line-height: 1.08; color: var(--p); text-wrap: balance; }
.date-pill { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--rule); border-radius: 100px; padding: 10px 20px; transform: rotate(-1.5deg); font-family: var(--serif); font-size: 24px; white-space: nowrap; }
.date-pill span { color: var(--gold); font-size: 14px; font-family: var(--sans); }
.venue-img { display: block; width: 100%; aspect-ratio: 342 / 272; object-fit: cover; border-radius: 50% 50% 12px 12px / 46% 46% 12px 12px; }
.venue-details { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.city { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 29px; }
.city span { color: var(--p); font-size: 18px; }
.venue-name { font-family: var(--serif); font-size: 30px; line-height: 1.2; }
.venue-name small { display: inline-block; margin-top: 4px; font-size: 20px; color: var(--mut); }
.time { margin-top: 2px; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; color: var(--p); }
.secret-card { position: relative; width: 100%; margin-top: 30px; background: var(--paper); border-radius: 20px; padding: 38px 26px 26px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 10px 28px rgba(53,76,86,.08); }
.secret-badge { position: absolute; top: -22px; left: 50%; margin-left: -22px; width: 44px; height: 44px; border-radius: 50%; background: var(--p); border: 3px solid var(--bg2); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.secret-title { font-family: var(--script); font-size: 32px; line-height: 1.1; color: var(--p); }
.mini-divider { display: flex; align-items: center; gap: 10px; }
.mini-divider i { width: 28px; height: 1px; background: var(--rule); }
.mini-divider span { font-size: 10px; color: var(--gold); }
.secret-card p { font-size: 13px; line-height: 1.7; color: var(--mut); text-wrap: pretty; max-width: 280px; }

/* Dress code */
.dress { padding: 52px 32px; gap: 18px; }
.dress-name { display: flex; align-items: center; gap: 14px; font-family: var(--script); font-size: 42px; color: var(--p); }
.dress-name span { color: var(--gold); font-size: 20px; font-family: var(--sans); }
.dress .divider { margin-top: 6px; }

/* RSVP */
.rsvp { padding: 48px 24px 52px; gap: 18px; }
.surprise { font-family: var(--script); font-size: 46px; color: var(--hot); }
.lead { font-family: var(--serif); font-size: 20px; line-height: 1.3; text-wrap: pretty; }
.message { width: 100%; max-width: 330px; display: flex; align-items: flex-end; gap: 8px; margin: 10px 0 4px; text-align: left; }
.avatar { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--p); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-style: italic; font-size: 16px; }
.bubble { background: var(--paper); font-size: 14px; line-height: 1.5; padding: 12px 16px; border-radius: 20px 20px 20px 4px; box-shadow: 0 4px 14px rgba(53,76,86,.08); text-wrap: pretty; }

/* Leave a wish */
.wish { padding: 48px 24px 8px; gap: 16px; }
.wish .script { font-size: 44px; }
.wish-form { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.wish-form textarea { width: 100%; resize: vertical; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 16px 18px; font-family: var(--serif); font-size: 19px; line-height: 1.35; color: var(--ink); outline: none; box-shadow: 0 6px 18px rgba(53,76,86,.06); }
.wish-form textarea:focus { border-color: var(--p); }
.wish-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wish-from { font-size: 11px; color: var(--mut); }
.wish-btn { background: var(--p); color: #fff; border: 0; border-radius: 100px; padding: 11px 22px; font-size: 11px; letter-spacing: 1.6px; font-weight: 600; cursor: pointer; }
.wish-btn:disabled { opacity: .5; cursor: default; }
.wish-error { font-size: 12px; color: var(--hot); }
.wish-thanks { width: 100%; max-width: 340px; background: var(--paper); border-radius: 18px; padding: 26px 22px; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: 0 8px 22px rgba(53,76,86,.08); transform: rotate(-1deg); }
.wish-thanks[hidden], .wish-form[hidden], .wish-error[hidden] { display: none; }

/* Closing */
.closing { padding: 44px 24px 48px; gap: 14px; }
.closing-line { font-family: var(--serif); font-size: 23px; line-height: 1.2; text-wrap: balance; }
.ps { margin-top: 10px; background: var(--ps); border-radius: 14px; padding: 14px 18px; transform: rotate(-1deg); font-size: 12px; line-height: 1.6; text-wrap: pretty; }
.ps strong { font-weight: 600; }

/* Animations */
@keyframes wiggle { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(3deg) scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .sticker { animation: none; } }

@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes sway { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(-1deg) translateY(-3px); } }
@keyframes bubblePop { 0% { opacity: 0; transform: scale(.3) rotate(-12deg); } 70% { opacity: 1; transform: scale(1.08) rotate(3deg); } 100% { opacity: 1; transform: scale(1) rotate(-2deg); } }
/* Intro splash */
.intro { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; height: 100vh; z-index: 100; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; cursor: pointer; transition: opacity .6s ease; }
.intro.fade { opacity: 0; pointer-events: none; }
.intro-shh { font-family: var(--script); font-size: 84px; line-height: 1; color: var(--p); animation: bubblePop .8s cubic-bezier(.3,1.5,.5,1) .2s both; }
.intro-sub { font-size: 12px; letter-spacing: 3px; font-weight: 700; color: var(--ink); animation: bubblePop .7s cubic-bezier(.3,1.5,.5,1) .9s both; }
.intro-heart { font-size: 18px; color: var(--pink); animation: floaty 2.4s ease-in-out 1.4s infinite; }

/* ─── Tablet & desktop ─────────────────────────────────── */
@media (min-width: 768px) {
  body { background: var(--bg); }
  .invite { max-width: 640px; box-shadow: none; }
  .hero { border-radius: 24px; margin: 0 16px; }
  .intro { max-width: none; }

  .nav { height: 76px; padding: 0 36px; }
  .monogram { font-size: 28px; }
  .nav-link { font-size: 12px; }

  .hero-img { aspect-ratio: 5 / 4; object-position: 50% 20%; }
  .hero-text { padding-top: 96px; }
  .name { font-size: 66px; }
  .amp { font-size: 46px; }
  .hero-sub { font-size: 28px; }

  .title, .venue-title { font-size: 42px; }
  .venue-title { max-width: 460px; }
  .label { font-size: 12px; }
  .muted { font-size: 14px; max-width: 420px; }
  .script-title { font-size: 40px; }
  .line { font-size: 24px; }
  .script { font-size: 38px; }
  .join { font-size: 13px; }

  .letter-section { padding: 44px 60px 64px; }
  .envelope { max-width: 460px; }
  .letter-body { font-size: 20px; }
  .cd-card { width: 80px; height: 96px; }
  .cd-card b { font-size: 50px; }

  .banner { font-size: 12px; letter-spacing: 2px; padding: 14px 8px; }

  .venue, .rsvp, .dress, .closing { padding-left: 60px; padding-right: 60px; }
  .venue-img { max-width: 480px; }
  .secret-card { max-width: 460px; }
  .message { max-width: 400px; }
  .lead { font-size: 22px; max-width: 440px; }
  .wish-form, .wish-thanks { max-width: 420px; }
  .closing-line { font-size: 26px; }
  .ps { max-width: 440px; font-size: 13px; }
}

@media (min-width: 1200px) {
  .invite { max-width: 720px; }
}
