/* EAM 2027 · base: fuentes, paleta y componentes compartidos */

@font-face {
  font-family: "Caslon Graphique";
  src: url("../fonts/CaslonGraphique.otf") format("opentype");
  font-display: swap;
}

:root {
  /* Paleta del equipo de diseño (EAM 27 Propuesta) */
  --sky: #77a9c1;
  --sky-deep: #5e9ab2;
  --sky-ink: #3c7290;      /* azul legible para texto pequeño */
  --lavender: #aab5c9;
  --orange: #ffa550;
  --orange-deep: #ef7d22;
  --brown: #8c5323;
  --brown-deep: #6b3f1a;
  --cream: #f2f0e1;
  --cream-2: #e9e5d2;
  --ink: #2f3b45;
  --ink-soft: #5b6670;
  --white: #fffdf6;

  --sunrise: radial-gradient(circle at 50% 30%, #f6f2e2 0 30%, #f7c48a 55%, #ef7d22 72%, #aab5c9 100%);

  --font-display: "Caslon Graphique", "Playfair Display", Georgia, serif;
  --font-body: "Montserrat", system-ui, sans-serif;

  --radius: 14px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.05; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }

.display { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
.kicker {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.grain { position: relative; isolation: isolate; }
.grain::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .5 0 0 0 0 .4 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Botón de registro: compartido */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.6em; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--orange-deep); outline-offset: 3px; }
.btn-sun { background: var(--orange-deep); color: #fff; box-shadow: 0 8px 24px -10px rgba(239,125,34,.8); }
.btn-sun:hover { background: #d96a12; }
.btn-ghost-dark { border-color: var(--brown); color: var(--brown); }
.btn-ghost-dark:hover { background: var(--brown); color: var(--cream); }

/* Retrato con máscara de sol (para invitados sin foto todavía) */
.sun-avatar {
  aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--sunrise);
  display: grid; place-items: center; position: relative;
}
.sun-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sun-avatar .initials { font-family: var(--font-display); font-size: clamp(2rem, 6vw, 3.4rem); color: var(--white); text-shadow: 0 2px 12px rgba(140,83,35,.35); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Tarjetas de costos (generadas desde eam27.js) */
.costs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; text-align: left; }
.cost { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: 1.1rem 1.1rem .8rem; border: 2px solid transparent; }
.cost.current { border-color: var(--orange-deep); box-shadow: 0 16px 36px -18px rgba(239,125,34,.7); }
.cost.past { opacity: .5; }
.cost-period { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: 0 0 .6rem; font-family: var(--font-display); text-transform: uppercase; font-size: 1.3rem; color: var(--brown); line-height: 1.1; }
.cost-badge { font-family: var(--font-body); font-size: .62rem; font-weight: 700; letter-spacing: .12em; background: var(--orange-deep); color: #fff; padding: .35em .7em; border-radius: 999px; }
.cost dl { margin: 0; }
.cost dl div { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .4rem 0; border-top: 1px solid var(--cream-2); }
.cost dt { font-size: .82rem; color: var(--ink-soft); }
.cost dt small { display: block; font-size: .7rem; }
.cost dd { margin: 0; font-weight: 700; font-size: .95rem; white-space: nowrap; }
.cost-note { grid-column: 1 / -1; margin: .4rem 0 0; font-size: .82rem; }
@media (max-width: 900px) { .costs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .costs { grid-template-columns: 1fr; } }
