/* ---------- Design tokens ---------- */
:root {
  --bg: #faf6f0;
  --bg-elevated: #ffffff;
  --text: #262220;
  --text-muted: #6b6259;
  --accent: #a8583c;
  --accent-strong: #8c4630;
  --accent-contrast: #fff8f3;
  --border: rgba(38, 34, 32, 0.12);
  --material-bg: rgba(255, 255, 255, 0.72);
  --material-border: rgba(255, 255, 255, 0.6);
  --scrim: rgba(20, 17, 14, 0.45);
  --shadow-sm: 0 1px 2px rgba(38, 34, 32, 0.08), 0 1px 1px rgba(38, 34, 32, 0.04);
  --shadow-md: 0 16px 34px -18px rgba(38, 34, 32, 0.35);
  --shadow-lg: 0 30px 70px -24px rgba(20, 17, 14, 0.45);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  /* Always-light text/borders for content laid over the hero photo — the photo
     stays dark regardless of system theme, so this must not flip with it. */
  --on-media: #fff8f3;
  color-scheme: light;
}

@media (prefers-contrast: more) {
  :root {
    --material-bg: var(--bg-elevated);
    --border: currentColor;
  }
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 100%/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
section { padding: clamp(4rem, 9vw, 7.5rem) clamp(1.25rem, 5vw, 3rem); scroll-margin-top: 6rem; }

/* ---------- Typography ---------- */
.hero__names {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 10vw, 6.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.section-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-media);
  opacity: 0.85;
}
.hero__date {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-media);
  opacity: 0.9;
  margin-top: 0.75rem;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-top: 0.75rem;
}

/* ---------- Layout helpers ---------- */
.section-head { max-width: 62rem; margin: 0 auto 3rem; }
.section-head--center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head--center .section-sub { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--on-media);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  cursor: pointer;
  transition: transform 120ms ease-out, background 150ms ease-out;
}
.pill-btn:active { transform: scale(0.96); }
.pill-btn:hover { background: rgba(255, 255, 255, 0.16); }

.pill-btn--solid {
  color: var(--accent-contrast);
  background: var(--accent);
  border-color: var(--accent);
}
.pill-btn--solid:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

.chip-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 120ms ease-out, background 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
}
.chip-btn:active { transform: scale(0.96); }
.chip-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 0.9rem clamp(1.25rem, 5vw, 3rem);
  background: transparent;
  transition: background 220ms ease-out, box-shadow 220ms ease-out, backdrop-filter 220ms ease-out;
}
.nav.is-condensed {
  background: var(--material-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--material-border);
}
.nav__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

@media (max-width: 30rem) {
  .nav__links { gap: 0.9rem; }
  .nav__links a { font-size: 0.68rem; }
  .nav__links .nav__cta { padding: 0.4rem 0.8rem; }
}
.nav__links a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
}
.nav.is-condensed .nav__links a { opacity: 0.9; pointer-events: auto; }
.nav.is-condensed .nav__links a:hover { opacity: 1; }
.nav__links .nav__cta {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid currentColor;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: clamp(1.25rem, 5vw, 3rem) clamp(1.25rem, 5vw, 3rem) 5rem;
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10, 8, 6, 0.15), rgba(10, 8, 6, 0) 45%),
    url('/img/hero.jpg') center 30% / cover no-repeat,
    linear-gradient(155deg, #4a3a30 0%, #2c2420 45%, #1a1512 100%);
  filter: grayscale(1) contrast(1.08);
  transform: translateZ(0);
}

@media (max-width: 40rem) {
  .hero__media { background-position: 26% 30%; }
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 8, 6, 0.65), rgba(10, 8, 6, 0) 60%);
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 52rem;
  color: var(--on-media);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}
.hero__scrollhint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--on-media);
  opacity: 0.85;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.hero__scrollhint svg {
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- Gifts ---------- */
.gifts__controls {
  max-width: 62rem;
  margin: 0 auto 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.gifts__search input {
  width: 100%;
  max-width: 24rem;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}
.gifts__search input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.gifts__chips, .gifts__price {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  padding-right: clamp(1.25rem, 5vw, 3rem);
  scrollbar-width: none;
}
.gifts__chips::-webkit-scrollbar, .gifts__price::-webkit-scrollbar { display: none; }

.gifts__grid {
  max-width: 62rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 60rem) {
  .gifts__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 40rem) {
  .gifts__grid { grid-template-columns: 1fr; }
}
.gift-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
  display: flex;
  flex-direction: column;
}
.gift-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.gift-card__media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(140deg, var(--gc-a, #e7ddcf), var(--gc-b, #cbb89a));
  position: relative;
  overflow: hidden;
}
.gift-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gift-card__body { padding: 1.1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.gift-card__eyebrow { font-size: 0.72rem; color: var(--text-muted); }
.gift-card__title { font-size: 1rem; font-weight: 600; }
.gift-card__price { color: var(--accent); font-weight: 600; margin-top: 0.35rem; }
.gift-card__cta {
  margin-top: 0.9rem;
  align-self: flex-start;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  transition: transform 120ms ease-out, background 150ms ease-out, color 150ms ease-out;
}
.gift-card__cta:active { transform: scale(0.95); }
.gift-card__cta:hover { background: var(--accent); color: var(--accent-contrast); }

.gifts__empty { text-align: center; color: var(--text-muted); margin-top: 2.5rem; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}
.footer__names { font-family: var(--font-display); font-size: 1.6rem; }
.footer__meta { color: var(--text-muted); margin-top: 0.5rem; }
.footer__whatsapp-title {
  margin-top: 2rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.footer__whatsapp-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.9rem;
}
.footer__whatsapp-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  transition: transform 120ms ease-out, background 150ms ease-out, color 150ms ease-out;
}
.footer__whatsapp-btn:active { transform: scale(0.96); }
.footer__whatsapp-btn:hover { background: var(--accent); color: var(--accent-contrast); }

/* ---------- Bottom sheet ---------- */
.sheet-scrim {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
  z-index: 50;
}
.sheet-scrim.is-visible { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 51;
  max-width: 30rem;
  margin: 0 auto;
  background: var(--material-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--material-border);
  border-bottom: none;
  border-radius: 1.75rem 1.75rem 0 0;
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 1.5rem calc(1.75rem + env(safe-area-inset-bottom));
  transform: translateY(100%);
  visibility: hidden;
  touch-action: none;
}
.sheet__grabber {
  width: 2.5rem;
  height: 0.3rem;
  border-radius: var(--radius-pill);
  background: var(--border);
  margin: 0.5rem auto 1rem;
}
.sheet__content h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 0.2rem; }
.sheet__price { color: var(--accent); font-weight: 600; margin-bottom: 1.25rem; }
.sheet__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  margin-bottom: 0.75rem;
}
.sheet__option-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.sheet__option-value { font-size: 1rem; font-weight: 600; margin-top: 0.15rem; word-break: break-all; }
.sheet__copy-btn {
  flex-shrink: 0;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
  transition: transform 120ms ease-out, background 150ms ease-out, color 150ms ease-out;
}
.sheet__copy-btn:active { transform: scale(0.94); }
.sheet__copy-btn.is-copied { background: var(--accent); color: var(--accent-contrast); }
.sheet__whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 120ms ease-out, background 150ms ease-out;
}
.sheet__whatsapp:active { transform: scale(0.97); }
.sheet__close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

/* ---------- Reduced motion / transparency ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__scrollhint svg { animation: none; }
  .gift-card, .pill-btn, .chip-btn, .gift-card__cta, .sheet__copy-btn, .sheet__whatsapp {
    transition-duration: 1ms !important;
  }
  .sheet { transition: opacity 200ms ease, visibility 200ms ease !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav.is-condensed, .sheet {
    background: var(--bg-elevated);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .pill-btn { background: rgba(0, 0, 0, 0.35); }
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
