/* ============================================================
   Invitație Iulian & Larisa — 17 octombrie 2026
   Registru: old money clasic. Serif de contrast înalt,
   versale reale, aur vechi, compoziție asimetrică.
   ============================================================ */

:root {
  --oxblood:    #3D0A12;
  --oxblood-lo: #2E070D;
  --wine:       #6B1420;
  --ink:        #2A0A0E;

  --ivory:      #F5F0E4;
  --ivory-deep: #EBE4D6;

  --gold:       #A8894F;   /* solo ornamento y filetes: 2,91:1, no sirve para texto */
  --gold-text:  #7E6434;   /* 4,91:1 — el mismo matiz, apto para texto */
  --gold-lift:  #C6A96B;
  --stone:      #6E675B;   /* 4,92:1 sobre marfil — era #8A8377 a 3,30 */
  --line:       #DDD4C2;

  --display: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --body:    'Cormorant Garamond', Georgia, serif;
  --caps:    'Cormorant SC', 'Cormorant Garamond', Georgia, serif;
  --script:  'Allura', 'Snell Roundhand', 'Apple Chancery', cursive;

  --flap-h:   min(92px, 11svh);

  --break: clamp(56px, 13vw, 84px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--oxblood);
  font-family: var(--body);
  font-size: 18px;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2 { margin: 0; font-weight: 400; }
p { margin: 0; }

[hidden] { display: none !important; }

/* cifre de stil vechi — detaliu de tipar, nu ornament */
.num { font-variant-numeric: oldstyle-nums; font-feature-settings: 'onum' 1; }

a { color: var(--wine); text-decoration: none; }

:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
.gate :focus-visible { outline-color: var(--gold-lift); }
::placeholder { color: var(--stone); opacity: 1; }


/* ============================================================
   Elemente de bază
   ============================================================ */

/* etichetă în versale reale — nu majuscule cu letter-spacing */
.lbl {
  font-family: var(--caps);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .07em;
  color: var(--wine);
}
.lbl--gold { color: var(--gold-text); }

.h2 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 6.5vw, 2.35rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -.008em;
  text-wrap: balance;
}

.lede {
  margin-top: 12px;
  font-size: 1.06rem;
  line-height: 1.62;
  color: var(--stone);
  max-width: 58ch;
  text-wrap: pretty;
}

.fineprint {
  font-family: var(--caps);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--stone);
}
.fineprint--center { margin-top: 20px; }

.rule { display: block; height: 1px; background: var(--gold); opacity: .6; }
.rule--tiny { width: 40px; }

/* separator: filet cu romb, convenția clasică de papetărie.
   Desenat în CSS — nicio imagine, orice rezoluție. */
.divider {
  width: 132px;
  height: 7px;
  border: 0;
  margin: var(--break) auto;
  position: relative;
  background:
    linear-gradient(var(--gold), var(--gold)) left  center / 52px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right center / 52px 1px no-repeat;
  opacity: .7;
}
.divider::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: var(--gold);
  transform: rotate(45deg);
}

.btn {
  display: inline-block;
  border: 1px solid var(--wine);
  border-radius: 2px;
  background: var(--wine);
  color: var(--ivory);
  font-family: var(--caps);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .1em;
  padding: 13px 30px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.btn:hover { background: transparent; color: var(--wine); }
.btn--sm { font-size: .78rem; padding: 10px 22px; }
.btn[disabled] { opacity: .55; cursor: default; }

.link {
  border: 0;
  background: none;
  padding: 0;
  font-family: var(--caps);
  font-size: .82rem;
  letter-spacing: .07em;
  color: var(--wine);
  cursor: pointer;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  transition: border-color .2s ease;
}
.link:hover { border-bottom-color: var(--wine); }
.link--arrow::after { content: ' →'; }


/* ============================================================
   Poarta / plicul
   ============================================================ */

.gate {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  transition: opacity .7s ease;
}

.gate__ground {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 8%, #571421 0%, var(--oxblood) 42%, var(--oxblood-lo) 100%);
}

.gate__arch {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(1400px, 150%);
  height: 100%;
  transform: translateX(-50%);
  opacity: .085;
}

.gate__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(closest-side at 50% 44%, rgba(0,0,0,0) 40%, rgba(20,3,7,.72) 100%);
}

.gate__scroll {
  position: relative;
  height: 100%;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, var(--flap-h)) 18px 32px;
}

.envelope {
  position: relative;
  width: min(94%, 500px);
  margin: auto;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 3vh, 28px);
  perspective: 1500px;
}

/* plicul fotografiat înlocuiește cartonul desenat în CSS */
.envelope__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 980 / 688;
  transform-style: preserve-3d;
  box-shadow: 0 26px 54px rgba(0,0,0,.55);
  border-radius: 2px;
  display: grid;
  place-items: center;
  transition: transform 1s cubic-bezier(.3,.7,.3,1), opacity .6s ease;
}

/* ------------------------------------------------------------
   Deschiderea plicului.
   Corpul și clapa sunt aceeași fotografie, decupată în două
   regiuni complementare cu clip-path — se îmbină exact cât timp
   plicul e închis, fără cusătură. Liniile de îndoire ating
   marginile laterale la 6% (stânga) și 4% (dreapta), iar vârful
   V-ului cade la 50% / 51%.
   Nu e nevoie de bibliotecă: rotația 3D o face CSS nativ.
   ------------------------------------------------------------ */
.envelope__body {
  position: absolute;
  inset: 0;
  background: url(assets/sobre.webp) center / contain no-repeat;
  clip-path: polygon(0 6%, 50% 51%, 100% 4%, 100% 100%, 0 100%);
}

/* Clapa e un carton cu două fețe: containerul se rotește și ține
   preserve-3d, iar fiecare față își ascunde propriul spate.
   preserve-3d și backface-visibility pe ACELAȘI element nu
   funcționează — fața nu se mai pictează deloc. */
.envelope__flap {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 100% 4%, 50% 51%, 0 6%);
  transform-origin: 50% 0;
  transform: rotateX(0deg) translateZ(1px);
  transform-style: preserve-3d;
  transition: transform 1.05s cubic-bezier(.42,.02,.28,1);
}

/* fața: fotografia plicului, aliniată exact cu corpul */
.envelope__flap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url(assets/sobre.webp) center / contain no-repeat;
  backface-visibility: hidden;
}

/* reversul: hârtie simplă. Fără el, dincolo de 90° s-ar vedea
   fotografia plicului oglindită — de aici senzația de fals. */
.envelope__flap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(#D6CBB6 0%, #E7DFCD 55%, #F1EADB 100%);
  transform: rotateX(180deg);
  backface-visibility: hidden;
}

/* interiorul plicului, descoperit când clapa se ridică */
.envelope__lining {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 100% 4%, 50% 51%, 0 6%);
  /* aceeași hârtie ca plicul, doar în umbră: un degrade plat se
     citea ca un carton bej lipit înăuntru */
  background:
    linear-gradient(rgba(48,28,20,.42) 0%, rgba(48,28,20,.16) 22%, rgba(48,28,20,.06) 46%),
    url(assets/sobre.webp) center / cover no-repeat;
  filter: saturate(.72) brightness(.9);
}

/* mâinile, ghicite prin hârtia plicului.
   Fără mască, dreptunghiul fotografiei se vede lipit pe plic. */
.envelope__hands {
  position: absolute;
  inset: 7% 5% 6%;
  background: url(assets/maini.webp) center / cover no-repeat;
  opacity: .19;
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(78% 74% at 50% 48%, #000 18%, transparent 76%);
          mask-image: radial-gradient(78% 74% at 50% 48%, #000 18%, transparent 76%);
}

.envelope__inner {
  position: relative;
  /* într-un context preserve-3d, poziția pe Z bate z-index —
     conținutul trebuie ridicat peste clapă ca să nu-l acopere */
  transform: translateZ(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.6vh, 15px);
  padding: 0 12%;
  text-align: center;
}

/* --- fazele deschiderii ---
   1. lifting: clapa se ridică pe balamaua de sus, plicul se înclină
   2. zoom:    conținutul iese ca o scrisoare trasă afară, apoi se stinge */
.envelope__inner { transition: transform .8s cubic-bezier(.3,.7,.3,1), opacity .5s ease; }

.gate[data-phase="lifting"] .envelope__flap  { transform: rotateX(-155deg) translateZ(1px); }
.gate[data-phase="lifting"] .envelope__photo { transform: translateY(-3%) rotateX(6deg); }

.gate[data-phase="zoom"] { opacity: 0; }
.gate[data-phase="zoom"] .envelope__flap  { transform: rotateX(-158deg) translateZ(1px); }
.gate[data-phase="zoom"] .envelope__photo { transform: translateY(-13%) scale(1.45); opacity: 0; }
.gate[data-phase="zoom"] .envelope__inner { transform: translateZ(6px) translateY(-42%) scale(1.08); }
.gate[data-phase="zoom"] .envelope__lede,
.gate[data-phase="zoom"] #btn-deschide { opacity: 0; transition: opacity .4s ease; }

.gate[data-phase="open"] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .envelope__flap, .envelope__photo, .envelope__inner { transition: none !important; }
}

/* lacăt de ceară */
.seal {
  position: relative;
  flex: 0 0 auto;
  width: min(62px, 13vw, 8.5svh);
  height: min(62px, 13vw, 8.5svh);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 6px 12px rgba(61,10,18,.42));
}
.seal__wax { position: absolute; inset: 0; width: 100%; height: 100%; }
.seal__mono {
  position: relative;
  font-family: var(--display);
  font-size: min(1.15rem, 3vh);
  letter-spacing: .04em;
  color: var(--ivory);
}
.seal__amp { font-style: italic; color: var(--gold-lift); padding: 0 .06em; }

.names { display: flex; flex-direction: column; align-items: center; }
.names__n {
  font-family: var(--script);
  font-size: min(3.7rem, 14.5vw, 9.6svh);
  font-weight: 400;
  line-height: .95;
  letter-spacing: .01em;
  padding: .05em 0;
}
.names__amp {
  font-family: var(--display);
  font-style: italic;
  font-size: min(1.3rem, 4.4vw, 3.4svh);
  color: var(--gold);
  line-height: 1;
  margin: .1em 0 .14em;
}

.envelope__date {
  font-size: min(1.02rem, 4vw, 2.7svh);
  letter-spacing: .04em;
  color: var(--wine);
}

/* lede și buton stau acum pe fundalul oxblood, sub plic */
.envelope__lede {
  font-size: min(1.08rem, 4.4vw, 3svh);
  line-height: 1.5;
  color: #D8C6B4;
  text-align: center;
  text-wrap: pretty;
}
.envelope .btn {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--wine);
}
.envelope .btn:hover {
  background: transparent;
  border-color: var(--gold);
  color: var(--ivory);
}


/* ============================================================
   Modal
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(30,5,10,.76);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal__card {
  position: relative;
  width: min(100%, 350px);
  background: var(--ivory);
  border: 1px solid var(--gold);
  border-radius: 2px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  padding: 32px 26px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.modal__close {
  position: absolute;
  top: 6px;
  right: 10px;
  border: 0;
  background: none;
  color: var(--stone);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.iban { font-size: 1.02rem; letter-spacing: .04em; color: var(--ink); word-break: break-word; }
.iban__owner { font-size: .95rem; color: var(--stone); }
.modal__card .btn { margin-top: 6px; }


/* ============================================================
   Foaia
   ============================================================ */

.page { min-height: 100svh; display: flex; justify-content: center; }

.sheet {
  width: 100%;
  max-width: 600px;
  /* hârtie, nu o coloană cu fundal deschis: grăunte fin, umbră în
     trei straturi colorate în oxblood și un fir de aur pe margine */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.30'/%3E%3C/svg%3E");
  background-color: var(--ivory);
  background-blend-mode: multiply;
  padding: 0 clamp(22px, 7vw, 56px) 56px;
  box-shadow:
    0 1px 2px rgba(61,10,18,.10),
    0 12px 28px -8px rgba(61,10,18,.26),
    0 48px 120px -24px rgba(20,3,7,.52),
    0 0 0 1px rgba(168,137,79,.14);
  /* laminile sângerează pe marginea hârtiei, nu peste ea */
  overflow: hidden;
}

/* ------------------------------------------------------------
   Fotografii: duoton oxblood → aur → fildeș, ca să nu aducă
   paletă proprie. Marginile se dizolvă cu mască — o fotografie
   tăiată drept se citește ca dreptunghi lipit, nu ca atmosferă.
   ------------------------------------------------------------ */
.hero, .footer { position: relative; }
.hero > *, .footer > * { position: relative; z-index: 1; }

.hero::before,
.footer::before {
  content: '';
  position: absolute;
  z-index: 0;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* A doua fotografie cu verighete (în #info) a fost scoasă: repeta
   subiectul din hero și, tăiată de marginea hârtiei, se citea ca o
   pată închisă cu cant drept. Secțiunea primește ornamentul lateral. */

/* arcada florală, la sânge pe marginea de jos, în spatele monogramei */
.footer::before {
  left: 50%;
  transform: translateX(-50%);
  /* sângerează sub marginea hârtiei: altfel se vede cantul de jos
     al fotografiei tăiat drept în mijlocul paginii */
  bottom: -88px;
  /* de la un capăt la altul al hârtiei: lățimea secțiunii plus
     padding-ul foii de o parte și de alta */
  width: calc(100% + 2 * clamp(22px, 7vw, 56px));
  height: 330px;
  background-image: url(assets/arcada.webp);
  /* încadrare pe deschiderea arcadei, nu pe scaunele din prim-plan */
  background-size: 116% auto;
  background-position: center 24%;
  opacity: .17;
  -webkit-mask-image: linear-gradient(to top, #000 6%, transparent 82%);
          mask-image: linear-gradient(to top, #000 6%, transparent 82%);
}

.section { position: relative; }
.section--center { text-align: center; }
.section--center .lede { margin-left: auto; margin-right: auto; }


/* --- Hero: centrat --- */
.hero {
  padding: clamp(52px, 13vw, 88px) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(18px, 4vw, 26px);
}
/* Numele în caligrafie: e singurul loc unde un scris de mână are
   sens. Allura are ascendente și descendente ample — de aici
   line-height mai mare și padding, altfel se taie buclele. */
.hero__n {
  font-family: var(--script);
  font-size: clamp(3.9rem, 19vw, 5.8rem);
  font-weight: 400;
  line-height: .96;
  letter-spacing: .01em;
  padding: .06em 0;
}
/* Ampersandul rămâne în Playfair cursiv: dă contrast între cele
   două cuvinte scrise de mână, în loc să le topească într-unul. */
.hero__amp {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 5.4vw, 1.9rem);
  color: var(--gold-text);
  line-height: 1;
  margin: .12em 0 .18em;
}

.hero__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: clamp(22px, 6vw, 34px);
  font-size: clamp(1.05rem, 4.4vw, 1.22rem);
  letter-spacing: .05em;
  color: var(--wine);
}

.hero__lede {
  margin-top: clamp(26px, 6vw, 36px);
  font-size: clamp(1.02rem, 4.2vw, 1.14rem);
  line-height: 1.62;
  color: var(--stone);
  max-width: 46ch;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}

/* countdown */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  max-width: 400px;
  margin-top: clamp(28px, 7vw, 40px);
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.countdown__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.countdown__cell + .countdown__cell { border-left: 1px solid var(--line); }
.countdown__num {
  font-family: var(--display);
  font-size: clamp(1.5rem, 6.5vw, 1.85rem);
  line-height: 1;
  color: var(--ink);
}
.countdown__lbl {
  font-family: var(--caps);
  font-size: .7rem;
  letter-spacing: .08em;
  color: var(--stone);
}


/* --- Ordinea zilei: retícula asimetrică --- */
.os { margin-top: clamp(28px, 7vw, 40px); }

.os__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.os__row:last-child { border-bottom: 1px solid var(--line); }

.os__label {
  font-family: var(--caps);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .07em;
  color: var(--gold-text);
  line-height: 1.35;
}

.os__body { display: flex; flex-direction: column; gap: 5px; align-items: start; }
.os__body--tight { gap: 3px; }

.os__time {
  font-family: var(--display);
  font-size: 1.65rem;
  line-height: 1.1;
  color: var(--wine);
}
.os__place { font-size: 1.14rem; color: var(--ink); }
.os__addr  { font-size: 1rem; color: var(--stone); }
.os__line  { font-size: 1.08rem; color: var(--ink); }
.os__line a { border-bottom: 1px solid var(--line); }
.os__line a:hover { border-bottom-color: var(--gold); }
.os__body .link { margin-top: 8px; }


@media (min-width: 480px) {
  /* baseline desalineaba las etiquetas de dos líneas contra el número
     grande; se alinea ópticamente por arriba */
  .os__row { grid-template-columns: 132px 1fr; gap: 26px; align-items: start; }
  .os__label { text-align: right; padding-top: 6px; }
}


/* --- Formular --- */
.form { display: flex; flex-direction: column; gap: 26px; margin-top: clamp(28px, 7vw, 38px); }
.form__branch { display: flex; flex-direction: column; gap: 26px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.field { display: flex; flex-direction: column; gap: 10px; }

.input, .textarea {
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.14rem;
}
.input {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 2px;
}
.input:focus { border-bottom-color: var(--gold); }
.textarea {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 12px;
  font-size: 1.06rem;
  resize: vertical;
}
.textarea:focus { border-color: var(--gold); }
.input--tight, .textarea--tight { margin-top: 6px; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice__btn {
  padding: 13px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-family: var(--caps);
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.choice__btn:hover { border-color: var(--gold); }
.choice__btn[aria-pressed="true"] {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--ivory);
}

.notice {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--wine);
  background: var(--ivory-deep);
  border-left: 2px solid var(--gold);
  padding: 12px 16px;
}

.form__submit { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

.thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: clamp(24px, 8vw, 44px) 0;
}
.thanks__sprig { width: 56px; color: var(--gold); opacity: .7; }
.thanks .lede { margin-top: 0; }


/* --- Darul --- */
.dar { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 30px; }
.dar__box {
  width: min(210px, 62%);
  border: 0;
  padding: 0;
  background: none;
  color: var(--wine);
  cursor: pointer;
  animation: darFloat 5.5s ease-in-out infinite;
}
.dar__box svg { display: block; width: 100%; height: auto; }
.dar__box:hover { color: var(--gold); }

@keyframes darFloat {
  0%   { transform: translateY(0)    rotate(-1.1deg); }
  50%  { transform: translateY(-9px) rotate(1.1deg); }
  100% { transform: translateY(0)    rotate(-1.1deg); }
}


/* --- Urări --- */
.guestbook { display: flex; flex-direction: column; gap: 14px; margin-top: clamp(26px, 7vw, 36px); }
.guestbook__actions { display: flex; justify-content: flex-start; }
.thanks { text-align: center; }

.guestbook__list { display: flex; flex-direction: column; margin-top: 22px; }
.urare {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.urare__nume {
  font-family: var(--caps);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .07em;
  color: var(--gold);
}
.urare__mesaj { font-size: 1.1rem; line-height: 1.5; text-wrap: pretty; }
/* una URL pegada se salía de la caja y .sheet{overflow:hidden} la cortaba */
.urare__mesaj, .urare__nume, .os__place, .os__line, .os__addr { overflow-wrap: anywhere; }


/* --- Footer --- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: var(--break);
  padding-top: 32px;
  padding-bottom: 96px;
  border-top: 1px solid var(--line);
}
.footer__mono {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: .06em;
  color: var(--wine);
}
.footer__amp { font-style: italic; color: var(--gold); padding: 0 .1em; }
.footer__date {
  font-family: var(--caps);
  font-size: .8rem;
  letter-spacing: .12em;
  color: var(--gold-text);
}


/* ============================================================
   Apariția la scroll
   ============================================================ */

[data-reveal] { transition: opacity .7s ease, transform .7s ease; }
[data-reveal="pending"] { opacity: 0; transform: translateY(14px); }


/* ============================================================
   Mișcare redusă
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], [data-reveal="pending"] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .dar__box { animation: none !important; }
  .gate, .envelope__flap, .envelope__photo, .envelope__inner { transition: none !important; }
}


/* ============================================================
   Corecții de auditoría — 2026-09-07
   ============================================================ */

/* --- texto solo para lectores de pantalla --- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --- mensajes de error de formulario ---
   Un `return` sin mensaje deja al invitado pulsando el botón sin saber
   por qué no pasa nada. */
.field__err {
  font-family: var(--caps);
  font-size: .84rem;
  letter-spacing: .04em;
  color: var(--wine);
  padding-left: 12px;
  border-left: 2px solid var(--wine);
}
.field__err--block { align-self: stretch; max-width: 34em; }

.fallback {
  align-self: stretch;
  max-width: 34em;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--stone);
  background: var(--ivory-deep);
  border-left: 2px solid var(--gold);
  padding: 12px 16px;
}
.fallback a { border-bottom: 1px solid var(--gold); }

.input[aria-invalid="true"] { border-bottom-color: var(--wine); border-bottom-width: 2px; }

.lbl--sub { color: var(--stone); font-size: .74rem; }

/* --- countdown: cifras que no bailan cada segundo --- */
.countdown__num { font-variant-numeric: tabular-nums oldstyle-nums; min-width: 2.4ch; }

/* --- dianas táctiles ---
   Los teléfonos de los novios eran el objetivo más pequeño de la página
   y son el uso de emergencia real de una invitación. */
.os__line a,
.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.modal__close {
  width: 44px; height: 44px;
  top: 2px; right: 2px;
  display: grid; place-items: center;
}
.input, .btn--sm { min-height: 44px; }

/* --- hover que no se queda pegado en táctil --- */
@media (hover: none) {
  .btn:hover  { background: var(--wine); color: var(--ivory); }
  .envelope .btn:hover { background: var(--ivory); color: var(--wine); }
  .link:hover { border-bottom-color: var(--gold); }
}

/* --- pantallas bajas: landscape de móvil y zoom ≥200% ---
   Con la plica a 980/688 sobre todo el ancho, el lede y el botón
   quedaban 111 px fuera de pantalla sin ningún indicio de scroll. */
@media (max-height: 600px) {
  .gate__scroll { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
  .envelope { gap: 12px; }
  .envelope__inner { gap: 4px; }
  .envelope__lede { font-size: .95rem; }
  /* width:auto + aspect-ratio colapsa dentro de flex: el ancho
     se calcula explícitamente desde la altura disponible. */
  .envelope__photo { width: min(100%, calc(46vh * 980 / 688)); }
}

@media (max-height: 600px) and (min-width: 640px) {
  /* landscape: la plica al lado del texto, no encima */
  .envelope {
    flex-direction: row;
    justify-content: center;
    width: min(96%, 820px);
    gap: clamp(20px, 4vw, 44px);
  }
  .envelope__photo {
    flex: 0 0 auto;
    width: min(52%, calc(74vh * 980 / 688));
  }
  .envelope__acciones { align-items: flex-start; }
  .envelope__lede { text-align: left; }
}

/* --- impresión ---
   La generación de los abuelos imprimirá esto. */
@media print {
  .gate, .modal, .countdown, .hero__actions,
  #rsvp-form, .guestbook, .dar, .divider { display: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  body { background: #fff; }
  .sheet { max-width: none; padding: 0; }
  .hero::before, .footer::before { display: none; }
  .os__row { break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .7em; word-break: break-all; }
  a[href^="tel:"]::after { content: ""; }
}

/* --- contraste forzado (Windows): las fotos decorativas desaparecen
       y dejarían huecos sin explicación --- */
@media (forced-colors: active) {
  .hero::before, .footer::before, .envelope__hands, .gate__arch { display: none; }
}

.envelope__acciones {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.4vh, 24px);
}


/* ============================================================
   Ronda 2
   ============================================================ */

/* --- radios reales: agrupación y flechas nativas ---
   El input queda fuera del grid (absoluto) para que .choice siga
   siendo dos columnas, pero conserva el foco del teclado. */
.choice { position: relative; }
.choice__input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}
.choice__btn {
  display: grid;
  place-items: center;
  padding: 13px 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-family: var(--caps);
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.choice__input:checked + .choice__btn {
  background: var(--wine);
  border-color: var(--wine);
  color: var(--ivory);
}
.choice__input:focus-visible + .choice__btn {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}

fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 10px; }

/* --- ramas animadas ---
   0fr→1fr sí es animable; `display:none` no lo era, y el salto de
   382 px caía justo bajo el dedo. */
.branch {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .34s cubic-bezier(.2,.8,.2,1);
}
.branch[data-open] { grid-template-rows: 1fr; }
.branch__in {
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.branch[data-open] > .branch__in { padding-top: 4px; }

/* --- un solo lenguaje de campo: subrayado, como el papel --- */
.textarea {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 2px;
  font-size: 1.14rem;
  resize: vertical;
}
.textarea:focus { border-bottom-color: var(--gold); }

/* --- detalles de sistema --- */
::selection { background: rgba(168,137,79,.28); color: var(--ink); }
:root { scrollbar-color: var(--gold) transparent; scrollbar-width: thin; }

@media (prefers-reduced-motion: reduce) {
  .branch { transition: none !important; }
}


/* ============================================================
   Ronda 3
   ============================================================ */

/* --- nota práctica bajo cada dirección --- */
.os__note {
  font-size: .96rem;
  line-height: 1.45;
  color: var(--stone);
}
/* contenido que los novios aún deben rellenar: visible para ellos,
   discreto para el invitado, imposible de olvidar al revisar */
[data-placeholder] em {
  font-style: normal;
  font-family: var(--caps);
  font-size: .78rem;
  letter-spacing: .05em;
  color: var(--gold-text);
  white-space: nowrap;
}

/* --- confirmación en verde del guestbook --- */
.field__err--ok { color: var(--gold-text); border-left-color: var(--gold); }

/* --- la sección enfocada por el ancla no debe pintar anillo --- */
#rsvp:focus { outline: none; }
#rsvp:focus-visible { outline: none; }

/* --- BUG-062: el scroll suave global animaba también la
       restauración de posición al volver atrás --- */
html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) {
  html:has(:target) { scroll-behavior: smooth; }
}
#rsvp, #acasa { scroll-margin-top: 24px; }

/* --- calendario: enlace primero, .ics como alternativa --- */
.cal { display: flex; flex-direction: column; align-items: center; gap: 6px; }
/* ============================================================
   Ronda 4
   ============================================================ */

/* --- el sobre entero es el botón --- */
.envelope__photo { cursor: pointer; }
.envelope__open {
  position: absolute;
  inset: 0;
  transform: translateZ(12px);   /* en preserve-3d la Z manda sobre z-index */
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
}
.envelope__open:focus-visible {
  outline: 2px solid var(--gold-lift);
  outline-offset: 6px;
}
/* Reacția la puntere: plicul se ridică, umbra se adâncește și ceara
   prinde puțină lumină. Clapa NU se mișcă — un plic întredeschis la
   hover arată ca o cutie de carton, nu ca papetărie. */
@media (hover: hover) and (pointer: fine) {
  .envelope__photo {
    transition:
      transform .55s cubic-bezier(.22,.8,.28,1),
      box-shadow .55s cubic-bezier(.22,.8,.28,1),
      opacity .6s ease;
  }
  .envelope__photo:hover {
    transform: translateY(-6px) scale(1.012);
    box-shadow:
      0 2px 6px rgba(20,3,7,.30),
      0 34px 72px rgba(0,0,0,.58),
      0 60px 120px -30px rgba(0,0,0,.45);
  }
  .seal { transition: transform .55s cubic-bezier(.22,.8,.28,1), filter .55s ease; }
  .envelope__photo:hover .seal {
    transform: scale(1.055);
    filter: drop-shadow(0 10px 18px rgba(61,10,18,.5));
  }
  /* un reflex cald traversează hârtia, ca lumina pe un plic real */
  .envelope__photo::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 2px;
    pointer-events: none;
    background: linear-gradient(105deg,
      rgba(255,246,226,0) 34%, rgba(255,246,226,.5) 50%, rgba(255,246,226,0) 66%);
    opacity: 0;
    transform: translateX(-24%) translateZ(11px);
    transition: opacity .5s ease, transform 1.1s cubic-bezier(.22,.8,.28,1);
  }
  .envelope__photo:hover::after { opacity: .55; transform: translateX(24%) translateZ(11px); }
}

.lbl--hint {
  color: var(--gold-lift);
  opacity: .85;
  animation: pulsHint 3.4s ease-in-out infinite;
}
@keyframes pulsHint {
  0%, 100% { opacity: .55; }
  50%      { opacity: .95; }
}

/* --- fondo del héroe: la pareja --- */
.hero { isolation: isolate; }
.hero__foto {
  position: absolute;
  z-index: 0;
  /* sângerează lateral până sub marginea hârtiei; înălțimea o
     limităm noi, ca să nu continue în spatele secțiunii următoare.
     `overflow:hidden` pe .hero ar fi tăiat-o și pe orizontală. */
  inset: -7% -20% auto -20%;
  height: 66%;
  background: url(assets/inele.webp) center 46% / cover no-repeat;
  opacity: .46;
  mix-blend-mode: multiply;
  pointer-events: none;
  /* se stinge în jos, ca textul să nu pară tăiat de marginea pozei */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 38%, rgba(0,0,0,.55) 62%, transparent 92%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 38%, rgba(0,0,0,.55) 62%, transparent 92%);
}

@media (prefers-reduced-motion: reduce) {
  .lbl--hint { animation: none; }
  .envelope__photo:hover { transform: none; }
}


/* ============================================================
   Ronda 6
   ============================================================ */

/* --- ornament lateral pentru secțiunile fără fotografie ---
   Un fir de aur care se stinge la ambele capete, cu un punct la
   mijloc. Stă în padding-ul hârtiei: nu atinge niciun text. */
#info, #rsvp, #urari { position: relative; }
#info::before,    #info::after,
#rsvp::before,    #rsvp::after,
#urari::before,   #urari::after {
  content: '';
  position: absolute;
  top: 9%;
  height: 82%;
  width: 7px;
  pointer-events: none;
  opacity: .45;
  background:
    radial-gradient(circle at 50% 50%, var(--gold) 1.5px, transparent 1.9px)
      center / 7px 7px no-repeat,
    linear-gradient(to bottom, transparent, var(--gold) 15%,
                    var(--gold) 85%, transparent) center / 1px 100% no-repeat;
}
#info::before, #rsvp::before, #urari::before { left:  calc(-1 * clamp(13px, 3.6vw, 32px)); }
#info::after,  #rsvp::after,  #urari::after  { right: calc(-1 * clamp(13px, 3.6vw, 32px)); }

