@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Outfit:wght@400;500;600;700&family=Great+Vibes&display=swap');

:root {
  --night: #0b1220;
  --ink: #e8e2d4;
  --gold: #d4b06a;
  --gold-deep: #b48a3c;
  --paper: #f4efe4;
  --muted: #9aa3b2;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Outfit', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
button, .primary { transition: background .2s, color .2s, transform .2s; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 18px 6%;
  background: #0b1220ee;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #ffffff12;
}
.brand { display: flex; align-items: center; gap: 12px; letter-spacing: 2.4px; font-size: 11px; font-weight: 500; }
.brand i { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 16px; letter-spacing: 0; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
  font-family: var(--serif); font-size: 18px; color: var(--gold);
}
.topbar nav { display: flex; gap: 28px; font-size: 12px; color: #c5c9d1; }
.topbar nav a:hover { color: var(--gold); }
.edit-button {
  border: 1px solid #d4b06a80; background: transparent; color: var(--ink);
  padding: 12px 18px; border-radius: 999px; font-size: 12px;
}
.edit-button span { color: var(--gold); margin-left: 10px; }
.edit-button:hover { background: #ffffff10; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: calc(100vh - 78px);
  max-width: 1440px;
  margin: 0 auto;
}
.hero-visual { position: relative; min-height: 620px; }
.portrait { margin: 0; height: 100%; overflow: hidden; }
.portrait img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center 18%;
  filter: saturate(1.05) contrast(1.04);
}
.portrait:after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 55%, #0b1220 100%),
              linear-gradient(180deg, transparent 70%, #0b1220 100%);
}
.portrait-tag {
  position: absolute; bottom: 28px; left: 28px; z-index: 1;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #f4efe4cc;
}
.hero-copy {
  padding: 80px 8% 48px 7%;
  display: flex; flex-direction: column; justify-content: center;
}
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 2.4px; color: var(--gold); margin: 0; }
.hero-kicker {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 3.1vw, 36px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.script-line {
  font-family: 'Great Vibes', cursive;
  font-size: 34px; color: #e8d6a8; margin: 28px 0 8px;
}
.hero-wordmark { margin: 22px 0 18px; max-width: 540px; }
.wordmark-celebrating {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 500;
  line-height: 0.95;
  margin: 0;
}
.wordmark-daddy {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(48px, 6.2vw, 78px);
  color: var(--gold);
  line-height: 1.05;
  margin: -4px 0 12px;
}
.wordmark-daddy i {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.42em;
  font-weight: 500;
  margin-right: 10px;
  vertical-align: 8px;
}
.hero-copy h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.4px;
  margin: 0 0 10px;
}
.wordmark-seventy {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(72px, 9vw, 118px);
  line-height: 0.8;
  letter-spacing: -4px;
  color: var(--gold);
  margin: 6px 0 10px;
}
.wordmark-seventy span {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: 0.52em;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 0.08em;
}
.wordmark-retire {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.38em;
  color: #e8e2d4;
}
.wordmark-retire:before,
.wordmark-retire:after {
  content: '';
  flex: 1;
  max-width: 56px;
  height: 1px;
  background: var(--gold);
}
h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 6.2vw, 92px);
  line-height: 0.98; letter-spacing: -2px; margin: 0 0 22px;
}
.hero-description {
  max-width: 420px; font-size: 15px; line-height: 1.8; color: var(--muted); margin: 0 0 32px;
}
.primary {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 28px;
  background: var(--gold); color: var(--night);
  padding: 16px 24px; border: 0; border-radius: 999px;
  font-size: 13px; font-weight: 600; min-height: 50px;
}
.primary:hover { background: #e4c384; transform: translateY(-2px); }
.hero-cta { align-self: flex-start; }

.invitation-body {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 8%;
  padding: 88px 6% 80px;
  background: var(--paper); color: #1c2433;
}
.invitation-story .eyebrow { color: var(--gold-deep); }
.honoring { font-family: var(--serif); font-style: italic; font-size: 22px; color: #6b7280; margin: 28px 0 8px; }
#display-name {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(36px, 4vw, 56px); line-height: 1.08; margin: 0 0 22px; overflow-wrap: anywhere;
}
.invitation-copy { font-size: 15px; line-height: 1.9; color: #4b5563; white-space: pre-line; }
.closing { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--gold-deep); margin: 28px 0 0; }

.event-panel {
  background: #0b1220; color: var(--ink);
  padding: 36px 32px; border-radius: 4px 48px 4px 4px;
}
.event-panel .eyebrow { color: var(--gold); }
.event-panel h3 {
  font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.08; margin: 14px 0 8px;
}
.event-panel h3 em { color: var(--gold); }
.event-row { display: flex; gap: 16px; padding: 20px 0; border-top: 1px solid #ffffff18; }
.event-row:last-child { padding-bottom: 0; }
.detail-num { font-family: var(--serif); color: var(--gold); font-size: 18px; width: 28px; flex-shrink: 0; }
.event-date p, .detail-label, .dress { font-size: 10px; letter-spacing: 1.6px; color: #c9b48a; margin: 0 0 8px; }
.event-date div, .venue h4 { font-size: 16px; font-weight: 500; margin: 0; }
#display-time, #display-address { font-size: 13px; color: #9aa3b2; margin: 6px 0 0; }
.dress { margin: 0; }
.dress span { display: block; font-size: 14px; letter-spacing: 0; color: var(--ink); margin-top: 8px; line-height: 1.6; }

.response {
  text-align: center; padding: 80px 24px 72px;
  background:
    radial-gradient(circle at 20% 20%, #d4b06a18, transparent 40%),
    radial-gradient(circle at 80% 80%, #d4b06a12, transparent 40%),
    var(--night);
}
.response h2 {
  font-family: var(--serif); font-weight: 400; font-size: 52px; line-height: 1.08; margin: 20px 0 14px;
}
.response h2 em { color: var(--gold); }
.response-copy { color: var(--muted); margin-bottom: 28px; }
#rsvp-form {
  max-width: 440px; margin: 0 auto 18px; text-align: left;
  background: #10182a; border: 1px solid #d4b06a33; border-radius: 12px; padding: 22px 22px 18px;
}
#rsvp-form label { color: #d8d0c0; }
#rsvp-form input { background: #0b1220; color: var(--ink); border-color: #ffffff22; }
#rsvp-form .primary { width: 100%; }

.secondary-actions {
  display: flex; justify-content: center; align-items: center; gap: 14px;
  margin: 22px 0 16px; color: #9aa3b2;
}
.secondary-actions button { border: 0; background: transparent; color: inherit; font-size: 12px; padding: 8px; }
.secondary-actions button:hover { color: var(--gold); }
.rsvp-note, #status { color: #8b93a3; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
#status:empty { display: none; }

.page-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 28px 6%; border-top: 1px solid #ffffff14; color: #8b93a3;
}
.page-footer .brand { font-size: 11px; }
.page-footer > span { font-family: var(--serif); font-style: italic; font-size: 18px; color: #d8d0c0; }
.page-footer > a:last-child { font-size: 11px; letter-spacing: 1.4px; }

dialog {
  border: 1px solid #d4b06a55; border-radius: 12px; padding: 28px;
  max-width: 490px; width: calc(100% - 28px); max-height: 90vh;
  background: var(--paper); color: #1c2433; box-shadow: 0 24px 100px #0006;
}
dialog::backdrop { background: #05080fd4; backdrop-filter: blur(8px); }
.modal-heading { display: flex; justify-content: space-between; align-items: center; }
.modal-heading h2 { font-family: var(--serif); font-size: 34px; margin: 4px 0; }
.modal-heading button { font-size: 28px; border: 0; background: none; color: #1c2433; padding: 8px; }
.editor-note { font-size: 13px; color: #6b7280; line-height: 1.6; }
label { display: block; font-size: 12px; margin: 14px 0; }
input, textarea {
  display: block; width: 100%; font: inherit; font-size: 15px; color: #1c2433;
  border: 1px solid #d7d0c3; padding: 12px; margin-top: 7px; border-radius: 6px; background: #fffdf8;
}
textarea { resize: vertical; }
.form-row { display: flex; gap: 14px; }
.form-row label { flex: 1; min-width: 0; }
form > .primary { width: 100%; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button, .primary { transition: none; }
  .primary:hover { transform: none; }
}

@media screen {
  .hero-copy, .invitation-story, .event-panel, .event-row > div, .event-row > .dress { min-width: 0; }
  .event-date, .venue, .dress { overflow-wrap: anywhere; }
  .edit-button, .secondary-actions button, .modal-heading button, .page-footer > a:last-child { min-height: 44px; }
  .modal-heading button { min-width: 44px; }
  dialog { max-height: calc(100dvh - 32px); overscroll-behavior: contain; scrollbar-gutter: stable; }
  input, textarea { font-size: 16px; min-height: 48px; max-width: 100%; }
}

@media (max-width: 950px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-visual { min-height: 0; aspect-ratio: 4/5; max-height: 640px; }
  .portrait:after { background: linear-gradient(180deg, transparent 55%, #0b1220 100%); }
  .hero-copy { padding: 36px 7% 48px; }
  .invitation-body { grid-template-columns: 1fr; gap: 36px; padding: 52px 6%; }
  .topbar nav { display: none; }
}

@media (max-width: 650px) {
  .topbar { padding: 14px 5%; gap: 10px; }
  .brand { font-size: 10px; letter-spacing: 1.4px; }
  h1 { font-size: clamp(42px, 12vw, 64px); }
  .hero-copy h1 { font-size: clamp(22px, 6.4vw, 30px); }
  .script-line { font-size: 28px; }
  .wordmark-seventy { font-size: clamp(68px, 22vw, 96px); }
  .response h2 { font-size: clamp(34px, 10vw, 46px); }
  .response { padding: 52px 6%; }
  .response > .primary, #rsvp-form { width: 100%; max-width: 340px; }
  .page-footer { flex-wrap: wrap; padding: 22px 6%; }
  .page-footer > span { order: 3; width: 100%; }
  .form-row { display: block; }
  dialog { width: calc(100% - 20px); padding: 22px 18px; }
}

.thanks-body { min-height: 100dvh; display: flex; flex-direction: column; }
.thanks-page {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 6% 56px;
  background:
    radial-gradient(circle at 12% 18%, #d4b06a22, transparent 36%),
    radial-gradient(circle at 88% 82%, #d4b06a14, transparent 42%),
    var(--night);
}
.thanks-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  background: #10182a;
  border: 1px solid #d4b06a44;
  overflow: hidden;
  box-shadow: 0 40px 120px #0008;
}
.thanks-portrait {
  margin: 0;
  position: relative;
  min-height: 520px;
}
.thanks-portrait img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center 18%;
  filter: saturate(1.05) contrast(1.04);
}
.thanks-portrait:after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 40%, #10182a 100%),
              linear-gradient(180deg, transparent 70%, #10182a 100%);
}
.thanks-seal {
  position: absolute; right: 22px; bottom: 22px; z-index: 1;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
  background: #0b1220cc;
  font-family: var(--serif); font-size: 24px; color: var(--gold);
}
.thanks-copy {
  padding: 64px 56px 56px 40px;
  display: flex; flex-direction: column; justify-content: center;
}
.thanks-lead {
  max-width: 420px; font-size: 16px; line-height: 1.85; color: var(--muted); margin: 0 0 22px;
}
.thanks-copy .closing { margin: 0 0 32px; }
.thanks-copy .primary { align-self: flex-start; }

@media (max-width: 950px) {
  .thanks-card { grid-template-columns: 1fr; }
  .thanks-portrait { min-height: 0; aspect-ratio: 4/5; max-height: 420px; }
  .thanks-portrait:after { background: linear-gradient(180deg, transparent 45%, #10182a 100%); }
  .thanks-copy { padding: 36px 7% 44px; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .topbar, .hero-cta, .response, .page-footer, dialog { display: none !important; }
  body, .invitation-body { background: #fff; }
  .hero { grid-template-columns: 1fr 1fr; min-height: 280px; }
  .hero-visual { min-height: 280px; }
  .invitation-body { padding: 24px; gap: 24px; grid-template-columns: 1fr 1fr; }
  .event-panel { break-inside: avoid; }
}
