/* ============================================================
   OPEN Forum 2026 — Save-the-Date posters
   Fully fluid: every size scales from the card's own width (--w),
   so one layout looks right from phone to desktop and still
   exports crisply. Screenshot / print the card to PNG.
   ============================================================ */

:root {
  --green-950: #0a2016;
  --green-900: #0e2a1d;
  --green-850: #123425;
  --green-800: #163f2d;
  --gold:        #c9a45c;
  --gold-soft:   #d8bd7e;
  --gold-bright: #ebd193;
  --cream:     #f4efe1;
  --cream-dim: #d7d1c1;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Mulish", "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--sans);
  background: #05130c;
  color: var(--cream);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 12px 64px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- The poster card ----
   --w is the rendered width; every dimension below is a fraction of it,
   so the whole poster scales as one unit. On desktop it caps at 1080px. */
.std {
  --w: min(1080px, 100vw - 24px);
  width: var(--w);
  position: relative;
  overflow: hidden;
  color: var(--cream);
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(32, 87, 64, 0.65), transparent 55%),
    radial-gradient(90% 70% at 50% 120%, rgba(18, 52, 37, 0.9), transparent 60%),
    linear-gradient(180deg, var(--green-900), var(--green-950));
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

/* Optional photo background:
   add  style="--photo:url('../assets/photos/photo-5.jpg'); --photo-opacity:.68"
   to the .std element */
.std::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--photo, none);
  background-size: cover;
  background-position: var(--photo-position, center);
  opacity: var(--photo-opacity, 0);
}
/* dark green wash — stronger top & bottom, lighter in the middle so the
   photo reads through, matching the reference poster */
.std::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 70% at 50% 50%, transparent 30%, rgba(8, 26, 18, 0.5) 100%),
    linear-gradient(180deg, rgba(8, 26, 18, 0.82) 0%, rgba(8, 26, 18, 0.42) 36%, rgba(8, 26, 18, 0.5) 62%, rgba(8, 26, 18, 0.93) 100%);
}

/* faint blueprint grid */
.std__grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 6% 6%,
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 6% 6%;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 30%, #000 40%, transparent 85%);
          mask-image: radial-gradient(120% 100% at 50% 30%, #000 40%, transparent 85%);
}

/* ---- Logo lockup ---- */
.std__logo { display: flex; align-items: center; gap: calc(var(--w) * 0.011); }
.std__logo svg { width: calc(var(--w) * 0.05); height: calc(var(--w) * 0.0352); }
.std__logo .t { display: flex; flex-direction: column; line-height: 1; }
.std__logo .t b { font-family: var(--serif); font-size: calc(var(--w) * 0.0207); letter-spacing: 0.06em; color: var(--cream); }
.std__logo .t span { font-size: calc(var(--w) * 0.0092); letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold-soft); margin-top: calc(var(--w) * 0.0037); }

/* ---- Shared text bits ---- */
.std__body { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: calc(var(--w) * 0.02); }
/* keep type crisp over photographs */
.std__body > *, .std__logo .t b, .std__logo .t span { text-shadow: 0 0.2em 1.4em rgba(0, 0, 0, 0.55); }

.eyebrow { font-size: calc(var(--w) * 0.0185); letter-spacing: 0.5em; text-transform: uppercase; font-weight: 800; color: var(--gold); }
.diamond { color: var(--gold); letter-spacing: 0.5em; font-size: calc(var(--w) * 0.0133); }
.title { font-family: var(--serif); font-weight: 700; line-height: 1; color: var(--cream); }
.title em { font-style: italic; color: var(--gold-bright); }
.subtitle { font-family: var(--serif); font-style: italic; color: var(--cream-dim); line-height: 1.4; }
.date { font-family: var(--serif); font-weight: 800; color: var(--gold); letter-spacing: 0.04em; line-height: 1; }
.venue { font-weight: 700; letter-spacing: 0.02em; color: var(--cream); }

/* gold hairline */
.rule { width: calc(var(--w) * 0.083); height: calc(var(--w) * 0.0028); background: var(--gold); border: 0; }

/* Download hint (screen only) */
.hint {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  font-family: var(--sans); font-size: 0.82rem; color: #9fb0a4; text-align: center;
  background: rgba(10,32,22,0.9); border: 1px solid rgba(201,164,92,0.25);
  padding: 8px 16px; border-radius: 999px; backdrop-filter: blur(8px);
  max-width: calc(100vw - 24px);
}
.hint b { color: var(--gold-soft); }

/* Embed mode: when a poster is shown inside the gallery preview iframe
   (?embed=1) it fills the frame edge-to-edge with no chrome. */
body.embed { padding: 0; }
body.embed .std { --w: 100vw; box-shadow: none; }
body.embed .hint { display: none; }

@media print {
  body { background: #fff; padding: 0; }
  .hint { display: none; }
  .std { box-shadow: none; }
}
