@font-face { font-family: 'Instrument Serif'; src: url('../assets/fonts/InstrumentSerif-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; src: url('../assets/fonts/InstrumentSerif-Italic.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('../assets/fonts/Manrope.ttf') format('truetype'); font-weight: 200 800; font-display: swap; }

:root {
  --verde: #12332B;
  --verde-2: #0E2A23;
  --verde-3: #1A4238;
  --verde-4: #24544A;
  --laton: #C9A35B;
  --laton-2: #E2C58A;
  --crema: #F2EBDD;
  --papel: #FAF6EE;
  --tinta: #0C1F1A;
  --tinta-2: #45574F;
  --tinta-3: #7D8B84;
  --linea: #DCD3C2;
  --vino: #8E3B32;
  --ok: #3E8E63;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --r-s: 10px; --r-m: 16px; --r-l: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.5, -0.2, .3, 1.4);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papel); color: var(--tinta); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.02; letter-spacing: -.01em; }
p { margin: 0; }
em { font-family: var(--serif); font-style: italic; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--laton); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 54px; padding: 0 1.5em; border-radius: 999px; border: 0; background: var(--verde); color: var(--crema); font-weight: 700; font-size: 1rem; text-decoration: none; transition: transform .15s var(--ease), background .2s, opacity .2s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: var(--verde-3); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--laton { background: var(--laton); color: var(--tinta); }
.btn--laton:hover { background: var(--laton-2); }
.btn--ghost { background: transparent; color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--linea); }
.btn--ghost:hover { background: rgba(18, 51, 43, .05); }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 1.1em; font-size: .9rem; }
.btn--danger { background: transparent; color: var(--vino); box-shadow: inset 0 0 0 1.5px rgba(142, 59, 50, .35); }

.field { display: grid; gap: 8px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--tinta-2); }
.input { width: 100%; min-height: 54px; padding: 0 16px; background: #fff; border: 1.5px solid var(--linea); border-radius: var(--r-m); font-size: 1.05rem; transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--verde); box-shadow: 0 0 0 4px rgba(18, 51, 43, .08); }
.input::placeholder { color: var(--tinta-3); }
.field__error { color: var(--vino); font-size: .85rem; }
.field__error:empty { display: none; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: .88rem; color: var(--tinta-2); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--verde); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; background: rgba(18, 51, 43, .07); color: var(--verde); }
.chip--laton { background: var(--laton); color: var(--tinta); }
.chip--vino { background: rgba(142, 59, 50, .1); color: var(--vino); }
.kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .2em; font-weight: 700; color: var(--laton); }

/* Aviso de demo (obligatorio al publicar) */
.demo-flag { position: fixed; z-index: 90; right: 12px; bottom: 12px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--tinta); color: var(--laton-2); padding: 6px 10px; border-radius: 999px; opacity: .85; pointer-events: none; }

.toast-wrap { position: fixed; left: 0; right: 0; top: max(14px, env(safe-area-inset-top)); display: grid; gap: 8px; justify-items: center; pointer-events: none; z-index: 100; padding: 0 16px; }
.toast { background: var(--tinta); color: var(--crema); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: .95rem; box-shadow: 0 14px 40px rgba(12, 31, 26, .28); max-width: 440px; animation: toast-in .45s var(--spring) both; }
.toast--error { background: var(--vino); }
.toast.out { animation: toast-out .3s ease-in both; }
@keyframes toast-in { from { transform: translateY(-24px) scale(.94); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(-16px); opacity: 0; } }

dialog { border: 0; padding: 0; background: transparent; color: var(--tinta); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(12, 31, 26, .45); backdrop-filter: blur(3px); }

/* Marcador de foto: elegante mientras llegan las fotos reales */
.ph { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 30% 20%, hsl(var(--h, 152) 30% 30%), hsl(var(--h, 152) 35% 14%)); color: rgba(242, 235, 221, .9); display: grid; place-items: center; }
.ph::after { content: ''; position: absolute; inset: 0; 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); mix-blend-mode: overlay; }
.ph svg { width: 34%; max-width: 64px; height: auto; opacity: .55; position: relative; z-index: 1; }
.ph__initial { font-family: var(--serif); font-size: clamp(2rem, 9vw, 3.4rem); position: relative; z-index: 1; line-height: 1; }
.photo { width: 100%; height: 100%; object-fit: cover; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
