:root {
  --bg: #fff8f5;
  --bg-deep: #fff1eb;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-soft: rgba(255, 245, 236, 0.92);
  --panel-strong: #fff6ef;
  --text: #311301;
  --muted: #6d5345;
  --line: rgba(136, 115, 100, 0.22);
  --amber: #d4780a;
  --gold: #f0a830;
  --terracotta: #c4603a;
  --rust: #b84a1a;
  --bark: #6b3510;
  --forest: #5d6d3d;
  --success: #2f6b46;
  --error: #9c3320;
  --shadow: 0 26px 60px rgba(107, 53, 16, 0.12);
  --shadow-soft: 0 14px 34px rgba(107, 53, 16, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1160px;
  --serif: "Alegreya", "Georgia", serif;
  --sans: "Work Sans", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at top left, rgba(212, 120, 10, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(196, 96, 58, 0.14), transparent 28%),
    linear-gradient(180deg, #fffaf7 0%, var(--bg) 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.75), transparent 24%),
    linear-gradient(180deg, #fffaf7 0%, #fff4ec 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(107, 53, 16, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 74%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 24px 18px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f6b847 0%, #d4780a 50%, #b84a1a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), var(--shadow-soft);
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-title {
  font-family: var(--serif);
  font-size: 1.46rem;
  line-height: 0.94;
  font-weight: 700;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.nav a,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.84);
  border: 1px solid var(--line);
  color: var(--bark);
  box-shadow: 0 4px 18px rgba(107, 53, 16, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.nav a:hover,
.chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(107, 53, 16, 0.08);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.92fr);
  gap: 22px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 251, 247, 0.84), rgba(255, 244, 236, 0.94));
  border: 1px solid rgba(224, 200, 152, 0.62);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -34%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 120, 10, 0.18), transparent 70%);
  pointer-events: none;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  gap: 18px;
  padding: 10px 12px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(240, 168, 48, 0.12);
  border: 1px solid rgba(212, 120, 10, 0.18);
  color: var(--bark);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(107, 53, 16, 0.34);
}

.hero-title,
.section-title,
.panel h3,
.gift-card h3,
.dialog h3,
.metric .value,
.letter-card blockquote {
  font-family: var(--serif);
}

.hero-title {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.hero-title em {
  color: var(--amber);
  font-style: italic;
}

.hero-subtitle {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.72;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.meta-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(224, 200, 152, 0.74);
  box-shadow: var(--shadow-soft);
}

.meta-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-value {
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--bark);
}

.cta-row,
.location-actions,
.subnav,
.dialog .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.64;
  transform: none;
}

.btn-primary {
  color: #fffaf4;
  background: linear-gradient(135deg, var(--terracotta), var(--rust));
  box-shadow: 0 14px 28px rgba(184, 74, 26, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--amber), var(--terracotta));
}

.btn-secondary {
  color: var(--bark);
  background: rgba(255, 250, 244, 0.92);
  border-color: rgba(224, 200, 152, 0.78);
}

.hero-visual {
  margin: 0;
  min-height: 460px;
  border-radius: calc(var(--radius-xl) - 8px);
  overflow: hidden;
  border: 1px solid rgba(224, 200, 152, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), var(--shadow);
  background: linear-gradient(180deg, rgba(107, 53, 16, 0.12), rgba(107, 53, 16, 0.04));
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.section {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: rgba(255, 251, 247, 0.82);
  border: 1px solid rgba(224, 200, 152, 0.6);
  box-shadow: var(--shadow-soft);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.section-copy {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  line-height: 1.74;
}

.stack {
  display: grid;
  gap: 18px;
}

.letter-card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 245, 236, 0.94));
  border: 1px solid rgba(224, 200, 152, 0.76);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.letter-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--gold), var(--terracotta));
}

.letter-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.letter-card blockquote {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.2;
  color: var(--bark);
}

.letter-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.78;
}

.letter-signature {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(224, 200, 152, 0.76);
  font-weight: 700;
  color: var(--bark);
}

.panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 246, 238, 0.9));
  border: 1px solid rgba(224, 200, 152, 0.7);
  box-shadow: var(--shadow-soft);
}

.panel h3 {
  margin: 0 0 8px;
  font-size: 1.7rem;
  line-height: 1;
}

.panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(224, 200, 152, 0.92);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: rgba(212, 120, 10, 0.9);
  box-shadow: 0 0 0 4px rgba(212, 120, 10, 0.1);
}

.textarea {
  min-height: 136px;
  resize: vertical;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(224, 200, 152, 0.9);
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.radio-pill input {
  accent-color: var(--amber);
}

.status {
  min-height: 22px;
  font-size: 0.95rem;
  color: var(--muted);
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--error);
}

.gift-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gift-card {
  position: relative;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 246, 238, 0.92));
  border: 1px solid rgba(224, 200, 152, 0.72);
  box-shadow: var(--shadow-soft);
}

.gift-card h3 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.05;
}

.gift-card .tag {
  display: inline-flex;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(240, 168, 48, 0.14);
  color: var(--amber);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gift-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.gift-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.state-available {
  background: rgba(47, 107, 70, 0.1);
  color: var(--success);
}

.state-reserved {
  background: rgba(156, 51, 32, 0.12);
  color: var(--error);
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(224, 200, 152, 0.72);
}

.table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.92);
}

.table th,
.table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(224, 200, 152, 0.5);
}

.table th {
  background: rgba(255, 245, 236, 0.96);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 246, 238, 0.92));
  border: 1px solid rgba(224, 200, 152, 0.72);
  box-shadow: var(--shadow-soft);
}

.metric .label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.metric .value {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 0.95;
  font-weight: 700;
}

.metric .note {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.empty-state,
.loading-state {
  display: grid;
  place-items: center;
  padding: 40px 20px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(224, 200, 152, 0.9);
  color: var(--muted);
  background: rgba(255, 250, 245, 0.72);
  text-align: center;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(49, 19, 1, 0.48);
  backdrop-filter: blur(8px);
  z-index: 50;
}

.dialog-backdrop[data-open="true"] {
  display: grid;
}

.dialog {
  width: min(100%, 560px);
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 238, 0.98));
  box-shadow: 0 32px 80px rgba(49, 19, 1, 0.24);
  border: 1px solid rgba(224, 200, 152, 0.88);
}

.dialog h3 {
  margin: 0 0 10px;
  font-size: 2.2rem;
}

.footer {
  padding: 18px 6px 0;
  color: var(--muted);
  text-align: center;
}

.footer strong {
  color: var(--bark);
}

.celebration-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(49, 19, 1, 0.84);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.celebration-backdrop[data-open="true"] {
  display: flex;
}

.celebration-card {
  position: relative;
  width: min(100%, 520px);
  padding: 34px 28px;
  border-radius: 42px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 245, 236, 0.98));
  box-shadow: 0 34px 84px rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(240, 168, 48, 0.32);
  text-align: center;
  overflow: hidden;
}

.celebration-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 0.95;
  color: var(--bark);
}

.celebration-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.celebration-icons {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
  font-size: clamp(2rem, 7vw, 2.8rem);
}

.celebration-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.celebration-piece {
  position: absolute;
  left: 50%;
  top: 52%;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  animation: celebrationBurst 1.4s ease-out forwards;
  animation-delay: var(--delay, 0ms);
  opacity: 0;
}

.fade-in {
  animation: fadeIn 640ms ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes celebrationBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
  }

  14% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px)))
      scale(1.16)
      rotate(var(--r, 0deg));
  }
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 360px;
  }

  .gift-grid,
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site {
    padding-inline: 14px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .section,
  .letter-card {
    padding: 16px;
  }

  .hero-meta,
  .form-grid,
  .gift-grid,
  .metrics,
  .letter-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
  }

  .hero-visual {
    min-height: 300px;
  }

  .gift-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .celebration-card {
    padding: 26px 20px;
    border-radius: 32px;
  }
}
