:root {
  --ink: #503840;
  --muted: #7e6970;
  --paper: #fffafb;
  --panel: #ffffff;
  --sage: #77a993;
  --coral: #ef5fa3;
  --blue: #a88fd1;
  --gold: #f1c985;
  --line: #f0dde4;
  --shadow: 0 22px 55px rgba(134, 94, 111, 0.12);
  --invito-top: url("assets/invito-top-ribbon-full.png");
  --invito-bottom: url("assets/invito-bottom-ribbon-full.png");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

#cerimonia-info,
#ricevimento-info,
#rsvp,
#regalo,
#info,
#musica {
  scroll-margin-top: 104px;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(255, 250, 251, 0.9);
  border-bottom: 1px solid rgba(240, 221, 228, 0.84);
  backdrop-filter: blur(18px);
}

.site-header.compact {
  position: sticky;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  color: #a96e87;
  white-space: nowrap;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 20px;
  color: var(--ink);
  font-size: 14px;
  align-items: center;
}

nav a {
  white-space: nowrap;
}

.nav-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 160px;
  display: none;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.nav-group:hover .nav-submenu,
.nav-group:focus-within .nav-submenu {
  display: grid;
}

.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 120px clamp(20px, 7vw, 92px) 76px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 250, 251, 0.9), rgba(255, 250, 251, 0.54) 55%, rgba(255, 250, 251, 0.22)),
    url("assets/VPL.jpg") center / cover no-repeat;
}

.hero-copy {
  position: relative;
  overflow: hidden;
  width: min(620px, 100%);
  border: 1px solid rgba(240, 221, 228, 0.95);
  border-radius: 8px;
  padding: clamp(100px, 9vw, 128px) clamp(28px, 5vw, 44px) clamp(84px, 8vw, 104px);
  background: #ffffff;
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(170, 110, 135, 0.18);
}

.hero-copy::before,
.hero-copy::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  background-repeat: no-repeat;
  background-size: 100% auto;
  pointer-events: none;
}

.hero-copy::before {
  top: 0;
  height: 148px;
  background-image: var(--invito-top);
  background-position: top center;
}

.hero-copy::after {
  bottom: 0;
  height: 148px;
  background-image: var(--invito-bottom);
  background-position: bottom center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #cf7d9f;
  position: relative;
  z-index: 1;
  font-size: 18px;
  text-transform: none;
  margin-bottom: 8px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-family: "Baskerville", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 500;
  letter-spacing: 0;
  max-width: none;
  white-space: nowrap;
  line-height: 0.98;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 500;
}

h3 {
  font-size: 21px;
}

.date {
  margin: 14px 0 0;
  font-size: clamp(16px, 2.2vw, 21px);
  position: relative;
  z-index: 1;
}

.intro {
  max-width: 520px;
  margin: 14px 0 0;
  color: rgba(80, 56, 64, 0.84);
  font-size: 16px;
  position: relative;
  z-index: 1;
}

.hero-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}

.hero-note {
  display: block;
  border: 1px solid rgba(222, 143, 174, 0.24);
  border-radius: 8px;
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.72);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.hero-note:hover {
  transform: translateY(-1px);
  border-color: rgba(239, 95, 163, 0.34);
  box-shadow: 0 12px 28px rgba(239, 95, 163, 0.12);
}

.hero-note span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-note strong {
  font-size: 15px;
}

.hero-actions,
.gift-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

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

.button.primary {
  color: white;
  background: var(--coral);
}

.button.secondary {
  color: var(--ink);
  border-color: rgba(169, 110, 135, 0.32);
  background: rgba(255, 255, 255, 0.6);
}

.button.full {
  width: 100%;
}

.section {
  padding: 88px clamp(20px, 6vw, 84px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: start;
}

.split > div > p:not(.eyebrow),
.section-heading p,
.gift-hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.panel,
.info-card,
.gift-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(20px, 4vw, 34px);
}

form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--sage);
  font-weight: 800;
}

.section-heading {
  margin-bottom: 30px;
}

.detail-stack {
  display: grid;
  gap: 22px;
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.detail-card-media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 28px;
  align-items: start;
}

.detail-copy {
  min-width: 0;
}

.detail-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.detail-icon {
  min-width: 72px;
  min-height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #fff7f9 0%, #ffeef4 100%);
  color: #8f6475;
  flex-shrink: 0;
  font-size: 32px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(239, 95, 163, 0.14);
}

.detail-heading p,
.detail-body p {
  color: var(--muted);
  margin: 0;
}

.detail-body {
  display: grid;
  gap: 14px;
}

.detail-figure {
  margin: 0;
}

.detail-figure img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.gift-copy {
  display: grid;
  gap: 18px;
}

.prose-panel {
  display: grid;
  gap: 16px;
}

.prose-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.section-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 17px;
}

#cerimonia-info .detail-figure figcaption {
  display: none;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 6vw, 84px);
  color: #fff7f9;
  background: #8e6274;
}

.gift-page,
.admin-page {
  padding: 54px clamp(20px, 6vw, 84px) 88px;
}

.gift-hero {
  max-width: 780px;
  margin-bottom: 42px;
}

.gift-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 24px;
  align-items: start;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

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

.gift-card {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.gift-card small {
  color: var(--blue);
  font-weight: 900;
}

.gift-card p {
  margin: 0;
  color: var(--muted);
}

.custom-gift-card {
  border-color: rgba(169, 110, 135, 0.35);
  background: #fff4f7;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: white;
}

.price {
  font-size: 24px;
  font-weight: 900;
}

.checkout {
  position: sticky;
  top: 96px;
}

.cart-items {
  display: grid;
  gap: 10px;
  min-height: 56px;
  color: var(--muted);
}

.cart-row,
.cart-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.cart-row button {
  border: 0;
  color: var(--coral);
  background: transparent;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.cart-total {
  margin: 12px 0 18px;
  font-size: 20px;
}

.iban-box {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
  border-radius: 8px;
  padding: 16px;
  background: #fff1f5;
}

.iban-box span,
.iban-box small {
  color: var(--muted);
}

.gift-summary {
  display: grid;
  gap: 14px;
}

.gift-summary p {
  margin: 0;
  color: var(--muted);
}

.gift-summary small {
  color: var(--blue);
  font-weight: 900;
}

.checkout-form {
  display: grid;
  gap: 18px;
}

.check-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 10px;
  font-weight: 700;
}

.check-row input {
  width: 18px;
  margin-top: 4px;
}

.link-button {
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.link-button.danger {
  color: var(--coral);
  font-weight: 800;
}

.admin-grid {
  display: grid;
  gap: 22px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--sage);
}

.row-delete {
  border: 1px solid rgba(239, 95, 163, 0.18);
  border-radius: 6px;
  padding: 8px 10px;
  color: #a05573;
  background: #fff6f9;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.row-delete:hover {
  background: #ffeef5;
}

@media (max-width: 920px) {
  .split,
  .gift-layout,
  .checkout-layout,
  .detail-card-media {
    grid-template-columns: 1fr;
  }

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

  .checkout {
    position: static;
  }
}

@media (max-width: 620px) {
  .site-header,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-notes {
    grid-template-columns: 1fr;
  }

  nav {
    justify-content: flex-start;
  }

  .nav-submenu {
    left: auto;
    right: 0;
  }

  .detail-icon {
    min-width: 58px;
    min-height: 58px;
    font-size: 26px;
  }

  .hero {
    min-height: 86vh;
    padding-top: 150px;
  }

  .hero-copy {
    padding-top: 98px;
    padding-bottom: 84px;
  }

  .hero-copy::before,
  .hero-copy::after {
    height: 92px;
  }

  .gift-list {
    grid-template-columns: 1fr;
  }

  .section,
  .gift-page,
  .admin-page {
    padding-left: 18px;
    padding-right: 18px;
  }
}
