/* ==========================================================================
   Ximena & Martín · wedding site
   1. Tokens  2. Base  3. Nav  4. Hero  5. Sections  6. Components
   7. Motion  8. Responsive
   Change colors/fonts in :root only.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --ivory: #f5f1e8;
  --paper: #faf7f0;
  --green: #596a50;
  --green-dark: #3e513b;
  --deep: #354835;
  --brown: #786454;
  --gold: #ad8c61;
  --line: #dcd7c9;
  --sage-bg: #ecece2;
  --muted: #66705d;
  /* status colors, used only by the gift registry (/regalos) */
  --warn-bg: #f3e6cf;
  --warn-ink: #5e4116;
  --ok-bg: #dfe9d6;
  --ok-ink: #2f4a2b;
  --err-bg: #f1d9d3;
  --err-ink: #7a2e22;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'DM Sans', Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* 2. Base ------------------------------------------------------------------ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--deep);
  background: var(--ivory);
  font-family: var(--font-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
h1, h2, h3, .big { font-family: var(--font-serif); font-weight: 400; }
::selection { background: #d9e0d2; }

.eyebrow {
  letter-spacing: .29em;
  font-size: 11px;
  text-transform: uppercase;
  color: #74836a;
  font-weight: 600;
}
.muted { font-size: 12px; line-height: 1.7; color: #6b7666; }
.notice { font-size: 12px; color: #727c70; margin-top: 18px; }

/* 3. Nav ------------------------------------------------------------------- */
nav {
  position: sticky; top: 0; z-index: 10;
  background: #f7f3e9ef;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .4s var(--ease);
}
nav.scrolled { box-shadow: 0 6px 24px #3548351a; }
.nav {
  max-width: 1120px; margin: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; gap: 12px;
}
.brand {
  font-family: var(--font-serif);
  font-size: 27px; text-decoration: none; white-space: nowrap;
}
.links { display: flex; flex-wrap: wrap; gap: 17px; justify-content: end; }
.links a {
  position: relative;
  font-size: 11px; letter-spacing: .11em; text-transform: uppercase;
  text-decoration: none; font-weight: 500;
  padding: 4px 0;
  transition: color .25s;
}
.links a::after {                       /* underline grows from the left */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.links a:hover, .links a.active { color: var(--gold); }
.links a:hover::after, .links a.active::after { transform: scaleX(1); }

.progress {                             /* thin reading-progress bar */
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 20;
  background: var(--gold);
  transform: scaleX(0); transform-origin: left;
}

/* 4. Hero ------------------------------------------------------------------ */
.hero {
  min-height: 80vh;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  max-width: 1080px; margin: auto; padding: 55px 26px 70px; gap: 48px;
}
.hero h1 {
  font-size: clamp(70px, 8vw, 112px);
  line-height: .83; margin: 25px 0;
}
.hero h1 em { color: var(--gold); font-style: italic; }
.hero p { line-height: 1.9; }
.hero-cta { margin-top: 29px; }
.hero-art {
  width: 100%; max-width: 410px; margin: auto; display: block;
  box-shadow: 0 18px 55px #574b3830;
  transition: box-shadow .6s var(--ease);
  will-change: transform;
}
.hero-art:hover { box-shadow: 0 26px 70px #574b3840; }
.date { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; }

/* 5. Sections -------------------------------------------------------------- */
.section { padding: 90px 22px; scroll-margin-top: 70px; }
.section.alt { background: var(--sage-bg); }
.inner { max-width: 1010px; margin: auto; }
.center { text-align: center; }
.section h2 {
  font-size: clamp(49px, 6vw, 73px);
  line-height: 1; margin: 12px 0 22px;
}
.section-intro { max-width: 600px; margin: 0 auto 38px; line-height: 1.8; color: var(--muted); }
.thin-rule {
  height: 1px; width: 95px; background: #a6a88e; margin: 24px 0;
}
.center .thin-rule { margin: 24px auto; }

/* 6. Components ------------------------------------------------------------ */
.button {
  display: inline-block;
  border: 1px solid var(--green); background: var(--green); color: #fff;
  text-decoration: none; padding: 14px 25px;
  text-transform: uppercase; letter-spacing: .13em;
  font-size: 11px; font-weight: 600; border-radius: 2px;
  transition: background .25s, color .25s, transform .3s var(--ease), box-shadow .3s var(--ease);
}
.button:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px #35483528;
}
.button:active { transform: translateY(0); }
.button.outline { background: transparent; color: var(--green); }
.button.outline:hover { background: #e8eadd; }

/* details */
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; align-items: center; }
.details-art { max-width: 390px; width: 100%; margin: auto; display: block; box-shadow: 0 14px 40px #574b3822; }
.detail-card { padding: 20px 0; border-bottom: 1px solid var(--line); }
.detail-card strong { display: block; font-size: 13px; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 7px; }
.detail-card p { line-height: 1.8; margin: 0; color: #596855; }
.map-link { margin-top: 15px; }

/* timeline */
.timeline { max-width: 600px; margin: 50px auto 0; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 95px; top: 15px; bottom: 15px; width: 1px;
  background: #b8c0aa;
  transform-origin: top;
}
.time-item { display: grid; grid-template-columns: 95px 1fr; align-items: center; gap: 34px; padding: 19px 0; }
.time-item time { text-align: right; padding-right: 22px; font-size: 13px; font-weight: 500; letter-spacing: .1em; }
.time-item span { position: relative; font-family: var(--font-serif); font-size: 33px; text-align: left; }
.time-item span::before {
  content: ''; position: absolute; left: -39px; top: 13px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #8c9c80; border: 3px solid var(--sage-bg);
  transition: transform .4s var(--ease), background .3s;
}
.time-item:hover span::before { transform: scale(1.5); background: var(--gold); }

/* rsvp */
.rsvp-panel { background: var(--paper); border: 1px solid #ddd8ca; padding: 55px 30px; max-width: 670px; margin: auto; box-shadow: 0 14px 40px #574b3818; }
.rsvp-panel p { line-height: 1.8; }

/* hotels */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.hotel {
  padding: 26px; background: #faf8f2; border: 1px solid #e4dfd3;
  display: flex; flex-direction: column; min-height: 235px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.hotel:hover { transform: translateY(-4px); box-shadow: 0 16px 34px #3548351c; border-color: #cfc9b6; }
.hotel h3 { font-size: 29px; font-weight: 500; line-height: 1.1; margin: 12px 0; }
.hotel p { font-size: 12px; line-height: 1.7; color: #6a705f; margin: 3px 0; }
.hotel .actions { margin-top: auto; padding-top: 18px; display: flex; gap: 14px; flex-wrap: wrap; }
.hotel .actions a { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; text-underline-offset: 4px; font-weight: 600; }

/* restaurants */
.rest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 35px; }
.restaurant {
  border: 1px solid #d8d6c8; background: #f9f8f1;
  padding: 20px 12px; text-align: center;
  font-family: var(--font-serif); font-size: 24px; text-decoration: none;
  transition: background .3s, transform .35s var(--ease), box-shadow .35s var(--ease);
}
.restaurant:hover { background: #e4e7dc; transform: translateY(-3px); box-shadow: 0 10px 22px #35483518; }

/* dress code */
.dress { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; align-items: center; }
.dress img { width: 100%; max-width: 420px; display: block; margin: auto; }
.dress-copy h3 { font-size: 33px; }
.dress-copy p { line-height: 1.9; }

/* footer */
.footer { background: #4e614c; color: var(--ivory); text-align: center; padding: 55px 20px; }
.footer .big { font-size: 60px; margin: 10px 0; }
.footer .muted { color: #d9e0d2; }
.footer .eyebrow { color: #e2e9dc; }
.footer .button { border-color: #eee; background: #eee; color: #42533d; margin-top: 15px; }
.footer .button:hover { background: #fff; }

/* 6b. Chat assistant (js/chat.js) ------------------------------------------ */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 30; font-family: var(--font-sans); }
.chat-bubble {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--green); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 28px #3548353d;
  transition: transform .3s var(--ease), background .25s, box-shadow .3s var(--ease);
}
.chat-bubble:hover { background: var(--green-dark); transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 32px #35483550; }
.chat-bubble:focus-visible, .chat-send:focus-visible, .chat-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.chat.open .chat-bubble { transform: scale(.92); }

.chat-panel {
  position: absolute; right: 0; bottom: 72px;
  width: min(340px, calc(100vw - 40px)); height: min(440px, 62vh);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border: 1px solid #ddd8ca; border-radius: 14px;
  box-shadow: 0 22px 60px #35483533;
  transform-origin: bottom right;
}
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--green); color: #fff; }
.chat-title { font-family: var(--font-serif); font-size: 22px; line-height: 1.1; }
.chat-title small { display: block; font-family: var(--font-sans); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; opacity: .8; margin-top: 3px; }
.chat-close { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; opacity: .85; }
.chat-close:hover { opacity: 1; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 82%; padding: 10px 14px; font-size: 14px; line-height: 1.5; border-radius: 14px; }
.chat-msg.bot { align-self: flex-start; background: var(--sage-bg); color: var(--deep); border-bottom-left-radius: 4px; }
.chat-msg.user { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.typing { display: flex; gap: 4px; padding: 14px; }
.chat-msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: #8c9c80; animation: chat-dot 1s infinite ease-in-out; }
.chat-msg.typing i:nth-child(2) { animation-delay: .15s; }
.chat-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff9; }
.chat-input {
  flex: 1; min-width: 0; border: 1px solid #d8d6c8; background: #fff; border-radius: 20px;
  padding: 10px 14px; font: inherit; font-size: 16px; /* 16px stops iOS zoom-on-focus */ color: var(--deep);
}
.chat-input:focus { outline: none; border-color: var(--green); }
.chat-send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--green); color: #fff; font-size: 18px; cursor: pointer; transition: background .25s; }
.chat-send:hover { background: var(--green-dark); }

/* Phones: the open chat becomes a full-screen sheet. --chat-h / --chat-top are
   set by js/chat.js from visualViewport so it shrinks above the on-screen keyboard. */
html.chat-lock, html.chat-lock body { overflow: hidden; overscroll-behavior: none; }
.chat-log { overscroll-behavior: contain; }
@media (max-width: 520px) {
  .chat.open .chat-bubble { display: none; }
  .chat-panel {
    position: fixed; left: 0; right: 0; bottom: auto;
    top: var(--chat-top, 0px);
    width: auto; height: var(--chat-h, 100dvh);
    border: 0; border-radius: 0;
  }
  .chat-head { padding: 16px; }
  .chat-close { font-size: 32px; padding: 0 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  .chat-panel:not([hidden]) { animation: chat-in .35s var(--ease); }
  .chat-msg { animation: chat-msg .35s var(--ease); }
  .js .chat-bubble { animation: chat-pop .6s var(--ease) 1.2s backwards; }
}
@keyframes chat-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes chat-msg { from { opacity: 0; transform: translateY(8px); } }
@keyframes chat-pop { from { opacity: 0; transform: scale(.6); } }

/* 6c. Gift registry (regalos.html + js/regalos.js) ------------------------
   Mobile-first single column: most guests will do this from a phone. */
.gift { max-width: 680px; margin: auto; padding: 28px 20px 140px; }
.gift h1 { font-size: clamp(40px, 9vw, 60px); line-height: 1; margin: 10px 0 14px; }
.gift h2 { font-size: clamp(30px, 6vw, 38px); line-height: 1.05; margin: 0; }
.gift h3 { font-size: 24px; line-height: 1.15; margin: 0; }
.gift p { margin: 0; line-height: 1.7; }
.gift button { font-family: inherit; cursor: pointer; }
.gift button:focus-visible, .gift input:focus-visible, .gift textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gift .button { min-height: 48px; }
.gift .button.small { padding: 9px 16px; min-height: 40px; }
.gift .button.block { width: 100%; text-align: center; }
.gift .button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.g-stack { display: flex; flex-direction: column; gap: 16px; }
.g-stack-lg { display: flex; flex-direction: column; gap: 30px; }
.g-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.g-muted { font-size: 14px; color: var(--muted); }

.g-sim { background: var(--warn-bg); color: var(--warn-ink); font-size: 13px; text-align: center; padding: 8px 12px; }
.g-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.g-tab { flex: 1; border: 1px solid var(--line); background: transparent; color: var(--deep); border-radius: 2px; padding: 10px 12px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.g-tab[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }

.g-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 26px; }
.g-steps li { flex: 1; text-align: center; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding-top: 8px; border-top: 3px solid var(--line); color: var(--muted); }
.g-steps li.done { border-color: var(--green); }
.g-steps li.on { border-color: var(--green); color: var(--deep); font-weight: 600; }

.g-note { background: var(--sage-bg); border-left: 3px solid var(--gold); padding: 13px 15px; font-size: 14px; line-height: 1.6; }
.g-warn { background: var(--warn-bg); color: var(--warn-ink); padding: 13px 15px; font-size: 14px; line-height: 1.6; }
.g-err { background: var(--err-bg); color: var(--err-ink); padding: 8px 12px; font-size: 14px; margin-top: 6px; }

.g-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px; }  /* 1fr rows: every card is as tall as the tallest, whatever its text */
.g-card { background: var(--paper); border: 1px solid var(--line); text-align: center; overflow: hidden; display: flex; flex-direction: column; }
.g-zoom { display: block; width: 100%; padding: 0; border: 0; background: var(--sage-bg); cursor: zoom-in; position: relative; }
.g-zoom::after { content: '+'; position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); color: var(--deep); font-size: 16px; line-height: 24px; box-shadow: 0 2px 6px #35483533; }
.g-art { display: block; width: 100%; height: auto; aspect-ratio: 357 / 208; object-fit: cover; background: var(--sage-bg); }
.g-card-body { padding: 12px 12px 14px; display: grid; gap: 7px; justify-items: center; align-content: start; flex: 1; }
.g-card-body .g-buy { width: 100%; grid-template-columns: 1fr; margin-top: auto; }
.g-card h3 { font-size: 19px; line-height: 1.12; min-height: 2.24em; display: grid; align-items: center; }  /* always reserves 2 lines */
.g-card .g-muted { font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 4.2em; }  /* and 3 lines for the description */
.g-card .button { padding: 11px 8px; font-size: 10.5px; letter-spacing: .1em; width: 100%; }
.g-card .g-qty { width: 100%; }
.g-card .g-qty span { flex: 1; }
.g-card .g-qty button { width: 40px; height: 40px; font-size: 20px; }
.g-badge { position: absolute; left: 6px; top: 6px; background: var(--green); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; }
@media (min-width: 760px) { .g-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(900px, calc(100vw - 40px)); position: relative; left: 50%; transform: translateX(-50%); } }
@media (min-width: 900px) { .g-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.g-price { font-family: var(--font-serif); font-size: 27px; font-weight: 600; line-height: 1; }
.g-cur { font-family: var(--font-sans); font-size: 11px; letter-spacing: .1em; font-weight: 600; color: var(--muted); margin-left: 2px; }
.g-price sup { font-size: 12px; font-weight: 500; vertical-align: top; position: relative; top: 4px; margin-right: 2px; }
.g-buy { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: end; }
.g-buy-free { grid-template-columns: 1fr auto; width: 100%; }
.g-free { text-align: center; }
.g-free .g-chips { justify-content: center; }
.g-incart { font-size: 14px; color: var(--green-dark); }
.g-link { border: 0; background: none; padding: 0; color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.g-cupos { font-size: 12px; color: var(--muted); line-height: 1.3; }
.g-cupos.low { color: var(--gold); font-weight: 600; }
.g-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.g-qty button { width: 48px; height: 44px; border: 0; background: var(--sage-bg); color: var(--deep); font-size: 22px; }
.g-qty span { min-width: 44px; text-align: center; font-weight: 600; }

.g-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.g-chip { border: 1px solid var(--line); background: var(--paper); color: var(--deep); border-radius: 999px; padding: 10px 18px; font-weight: 500; min-height: 44px; }
.g-chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }

.gift label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.g-help { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.gift input[type=text], .gift input[type=email], .gift input[type=tel], .gift textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px stops iOS zoom-on-focus */
  padding: 12px 14px; min-height: 48px; border: 1px solid var(--line); background: var(--paper); color: var(--deep); border-radius: 2px;
}
.gift textarea { min-height: 96px; resize: vertical; }
.g-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.g-check input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.g-hp { position: absolute; left: -9999px; }   /* honeypot: bots fill it, people never see it */

.g-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--paper); border-top: 1px solid var(--line); padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); }
.g-bar-in { max-width: 680px; margin: auto; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.g-total { font-family: var(--font-serif); font-size: 30px; font-weight: 600; line-height: 1; }

.g-origin { display: grid; gap: 10px; }
.g-origin button { text-align: left; padding: 16px; border: 1px solid var(--line); background: var(--paper); color: var(--deep); }
.g-origin button[aria-pressed="true"] { border: 2px solid var(--green); padding: 15px; }
.g-origin b { display: block; font-size: 17px; font-weight: 600; }
.g-origin small { color: var(--muted); font-size: 14px; }

.g-data { background: var(--paper); border: 1px solid var(--line); }
.g-data .r { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.g-data .r:first-child { border-top: 0; }
.g-sign { font-family: var(--font-serif); font-style: italic; font-size: 24px; color: var(--green-dark); margin-top: 6px !important; }
.g-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.g-data .g-total-row { background: var(--sage-bg); }
.g-data .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.g-data .v { font-weight: 600; word-break: break-word; font-variant-numeric: tabular-nums; }
.g-code { text-align: center; background: var(--sage-bg); border: 2px dashed var(--gold); padding: 20px; display: grid; gap: 8px; justify-items: center; }
.g-code .big { font-family: var(--font-serif); font-size: 50px; letter-spacing: .12em; font-weight: 600; line-height: 1.1; }

/* "Lo que ven ustedes" (demo): totals per account + guest list as cards */
.gift.wide { max-width: 960px; }
.g-tot { display: grid; grid-template-columns: 1fr; gap: 12px; }
.g-tot-card { background: var(--paper); border: 1px solid var(--line); padding: 16px; display: grid; gap: 6px; align-content: start; }
.g-tot-main { font-family: var(--font-serif); font-size: 32px; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.g-prog { height: 6px; background: var(--sage-bg); margin: 6px 0; }
.g-prog span { display: block; height: 100%; background: var(--green); }
.g-tot-dl { margin: 0; display: grid; gap: 4px; font-size: 14px; }
.g-tot-dl div { display: flex; justify-content: space-between; gap: 10px; }
.g-tot-dl dt { color: var(--muted); }
.g-tot-dl dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.g-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.g-rowc { background: var(--paper); border: 1px solid var(--line); padding: 14px; display: grid; gap: 10px; }
.g-rowc.ok { border-left: 4px solid var(--green); }
.g-rowc-name { font-family: var(--font-serif); font-size: 22px; line-height: 1.15; }
.g-rowc-amt { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.g-rowc-act { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.g-empty { text-align: center; padding: 24px 0; }
.g-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.g-msg { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--gold); padding: 16px; display: grid; gap: 8px; }
.g-msg blockquote { margin: 0; font-family: var(--font-serif); font-size: 22px; font-style: italic; line-height: 1.35; overflow-wrap: anywhere; }
@media (min-width: 720px) {
  .g-tot { grid-template-columns: repeat(3, 1fr); }
  .g-rowc { grid-template-columns: 1fr auto auto; align-items: center; gap: 24px; }
  .g-rowc-act { min-width: 190px; justify-content: flex-end; }
  .g-rowc-amt { flex-direction: column; align-items: flex-end; gap: 2px; }
}
.g-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--sage-bg); color: var(--muted); }
.g-pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.g-pill.wait { background: var(--warn-bg); color: var(--warn-ink); }
.g-pill.new { border: 1px solid var(--gold); color: var(--deep); }

.g-toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--deep); color: var(--ivory); padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 20; opacity: 0; pointer-events: none; width: max-content; max-width: calc(100vw - 40px); text-align: center; }
.g-toast.show { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .g-toast { transition: opacity .25s var(--ease); } }

.g-center { text-align: center; justify-items: center; }
.g-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.6; }
.g-counter { text-align: right; margin: 4px 0 0; }

/* cart button in the nav + side panel "Tu regalo" */
.g-cartbtn { border: 1px solid var(--green); background: transparent; color: var(--green-dark); font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; padding: 8px 14px; border-radius: 2px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.g-cartbtn[hidden] { display: none; }
.g-langs { display: inline-flex; border: 1px solid var(--line); }
.g-lang { border: 0; background: transparent; color: var(--deep); font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .1em; padding: 7px 9px; cursor: pointer; }
.g-lang[aria-pressed="true"] { background: var(--green); color: #fff; }
.g-lang:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 520px) { .g-lang { font-size: 9px; padding: 4px 7px; } .g-cartbtn { padding: 3px 9px; font-size: 9px; gap: 6px; } .g-cartn { min-width: 16px; padding: 0 5px; } }
.g-cartn { background: var(--green); color: #fff; border-radius: 999px; min-width: 20px; padding: 1px 6px; text-align: center; letter-spacing: 0; }
.g-overlay { position: fixed; inset: 0; background: var(--deep); opacity: .45; z-index: 40; }
.g-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 41; background: var(--ivory); border-left: 1px solid var(--line); display: flex; flex-direction: column; box-shadow: -18px 0 50px #3548352e; }
.g-drawer[hidden], .g-overlay[hidden], .g-bar[hidden], .g-tabs[hidden], .g-sim[hidden] { display: none; }
.g-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.g-drawer-head h2 { font-size: 34px; }
.g-x { border: 0; background: none; color: var(--deep); font-size: 34px; line-height: 1; padding: 0 6px; cursor: pointer; min-width: 44px; min-height: 44px; }
.g-drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; display: grid; gap: 22px; align-content: start; overscroll-behavior: contain; }
.g-drawer-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--paper); display: grid; gap: 10px; }
.g-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.g-lines li { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.g-line-r { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.g-line-r .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.g-qty-s button { width: 40px; height: 40px; }
.g-qty button:disabled { opacity: .35; cursor: not-allowed; }
.g-bar-sum { border: 0; background: none; text-align: left; padding: 0; color: var(--deep); display: grid; gap: 2px; }
/* enlarged illustration (native size: the source files are 357px wide, never upscaled) */
.g-zoomd { border: 0; padding: 0; background: var(--paper); color: var(--deep); width: min(405px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; box-shadow: 0 24px 70px #35483555; }
.g-zoomd::backdrop { background: #35483573; }
.g-zoomd img { display: block; width: 100%; max-width: 357px; height: auto; margin: 0 auto; }
.g-zoomd-body { padding: 16px 18px 20px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.g-zoomd-body h2 { font-size: 30px; margin: 0; }
.g-zoomd-body p { margin: 0; }
html.g-lock, html.g-lock body { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { .g-drawer:not([hidden]) { animation: g-slide .3s var(--ease); } }
@keyframes g-slide { from { transform: translateX(24px); opacity: 0; } }

/* 6d. Gift registry section on the home page (index.html #regalos) */
.gift-epigraph { margin: 0 auto 30px; max-width: 520px; }
.gift-epigraph blockquote { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: 24px; line-height: 1.4; color: var(--muted); }
.gift-epigraph figcaption { margin-top: 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.gift-copy { max-width: 600px; margin: 0 auto 38px; }
.gift-copy h3 { font-size: 29px; font-weight: 500; line-height: 1.15; margin: 0 0 14px; }
.gift-copy p { line-height: 1.8; color: var(--muted); margin: 0 0 12px; }
.gift-teaser { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 720px; margin: 0 auto; }
.gift-teaser img { width: 100%; height: auto; aspect-ratio: 357 / 208; object-fit: cover; border: 1px solid var(--line); box-shadow: 0 10px 24px #35483514; }
.g-login { max-width: 420px; margin: 0 auto; }
@media (max-width: 520px) { .gift-teaser { grid-template-columns: 1fr 1fr; } .gift-teaser img:nth-child(3) { display: none; } }

/* 7. Motion ----------------------------------------------------------------
   Everything below only applies when JS is on (html.js), so the page is fully
   visible without JS. Disabled for people who prefer reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0; transform: translateY(22px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    transition-delay: var(--d, 0ms);
  }
  .js [data-reveal].in { opacity: 1; transform: none; }

  .js .timeline::before { transform: scaleY(0); transition: transform 1.4s var(--ease); }
  .js .timeline.in::before { transform: scaleY(1); }

  /* hero entrance, staggered */
  .js .hero-copy > * { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
  .js .loaded .hero-copy > * { opacity: 1; transform: none; }
  .js .loaded .hero-copy > :nth-child(2) { transition-delay: .15s; }
  .js .loaded .hero-copy > :nth-child(3) { transition-delay: .3s; }
  .js .loaded .hero-copy > :nth-child(4) { transition-delay: .45s; }
  .js .loaded .hero-copy > :nth-child(5) { transition-delay: .6s; }
  .js .loaded .hero-copy > :nth-child(6) { transition-delay: .75s; }
  .js .hero-art { opacity: 0; transform: scale(.97); transition: opacity 1.3s var(--ease) .2s, transform 1.3s var(--ease) .2s, box-shadow .6s var(--ease); }
  .js .loaded .hero-art { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .progress { display: none; }
}

/* 8. Responsive ------------------------------------------------------------ */
@media (max-width: 820px) {
  .nav { flex-wrap: wrap; justify-content: center; }
  .links { justify-content: center; gap: 10px 14px; }
  .links a { font-size: 10px; }
  .hero { grid-template-columns: 1fr; text-align: center; gap: 30px; padding: 35px 24px 65px; }
  .hero .thin-rule { margin: 24px auto; }
  .hero-art { max-width: 320px; }
  .hero h1 { font-size: 72px; }
  .details, .dress { grid-template-columns: 1fr; }
  .details-art { max-width: 310px; }
  .grid, .rest-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 65px 20px; }
}
@media (max-width: 520px) {
  .nav { padding: 10px; }
  .brand { font-size: 23px; }
  .links { gap: 9px; }
  .links a { font-size: 9px; }
  .hero h1 { font-size: 66px; }
  .grid { grid-template-columns: 1fr; }
  .restaurant { font-size: 20px; padding: 17px 8px; }
  .section h2 { font-size: 52px; }
  .rsvp-panel { padding: 38px 18px; }
  .timeline::before { left: 100px; }
  .time-item { grid-template-columns: 100px 1fr; gap: 32px; }
  .time-item time { font-size: 12px; padding-right: 16px; white-space: nowrap; }
  .time-item span { font-size: 28px; }
}
