/* =====================================================================
   Holly template: a traditional Christmas party. Cranberry red,
   evergreen, and gold on cream, a tartan ribbon, holly, falling snow,
   and photos that hang like ornaments.
   See public/templates/README.md for how templates work.
   ===================================================================== */

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

:root {
  /* Customizable per event (event_colors). These are the defaults. */
  --color-primary: #a3161f;     /* cranberry: headline, buttons, berries */
  --color-accent: #1f5a3a;      /* evergreen: holly, tree, page */
  --color-background: #18402c;  /* the page behind the cards */
  --color-text: #2b2420;        /* warm ink */
  --color-surface: #fbf6ea;     /* cream cards */

  --gold: #c9a24a;
  --gold-light: #e8cf8e;
  --muted: #7b6d60;
  --line: color-mix(in srgb, var(--gold) 45%, transparent);
  --font-script: 'Great Vibes', cursive;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Lora', Georgia, serif;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-background);
  /* Soft light from the top, like a fireplace glow */
  background-image: radial-gradient(ellipse 120% 50% at 50% 0%, color-mix(in srgb, var(--color-accent) 70%, #fff3d0 6%), transparent 70%);
  background-repeat: no-repeat;
  color: var(--color-text);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#main-page { position: relative; max-width: 540px; margin: 0 auto; padding: 18px 16px 28px; opacity: 0; transition: opacity 0.6s ease; }
#main-page.visible { opacity: 1; }

/* Falling snow (two layers of dots drifting down) */
.hol-snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.85) 1.6px, transparent 2.2px),
    radial-gradient(circle, rgba(255, 255, 255, 0.55) 1.1px, transparent 1.6px);
  background-size: 120px 120px, 70px 70px;
  background-position: 0 0, 35px 25px;
  animation: hol-snow 18s linear infinite;
}
@keyframes hol-snow { to { background-position: 40px 480px, 75px 305px; } }
@media (prefers-reduced-motion: reduce) { .hol-snow { animation: none; } }

#main-page > :not(.hol-snow) { position: relative; z-index: 1; }

/* ===================== HERO ===================== */
.hol-hero {
  text-align: center;
  padding: 46px 22px 30px;
  background: var(--color-surface);
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3), inset 0 0 0 6px var(--color-surface), inset 0 0 0 7px var(--line);
  overflow: hidden;
}

/* A red-and-green tartan ribbon across the top */
.hol-ribbon {
  height: 22px;
  margin: -46px -22px 26px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 4px, transparent 4px 22px, rgba(255, 255, 255, 0.18) 22px 24px, transparent 24px 44px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.12) 0 4px, transparent 4px 11px),
    linear-gradient(90deg, var(--color-primary) 0 50%, var(--color-accent) 50% 100%);
  background-size: auto, auto, 44px 100%;
  border-bottom: 2px solid var(--gold);
}

.hol-holly { display: block; width: 116px; height: auto; margin: 0 auto 8px; }
.hol-holly--small { width: 72px; margin-bottom: 6px; }
.h-leaf { fill: var(--color-accent); }
.h-leaf--2 { fill: color-mix(in srgb, var(--color-accent) 85%, #000); }
.h-vein { fill: none; stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.2; }
.h-berry { fill: var(--color-primary); }
.h-shine { fill: #fff; opacity: 0.6; }

.hol-lead { font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; color: var(--color-accent); }

.hol-headline {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(56px, 16vw, 86px);
  line-height: 1.05;
  color: var(--color-primary);
  margin: 4px 0 10px;
}

.hol-label { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; color: var(--muted); }
.hol-name { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 9vw, 42px); line-height: 1.15; color: var(--color-accent); margin-top: 4px; }
.hol-class { margin-top: 6px; font-family: var(--font-display); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); }
.hol-majors { margin-top: 12px; }

/* ===================== ORNAMENTS (photos or the art) ===================== */
.hol-ornaments { display: flex; justify-content: center; align-items: flex-start; gap: 22px; padding-top: 46px; margin: 4px 0 6px; }

.hol-ornament {
  position: relative;
  width: 44%;
  max-width: 210px;
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--gold-light), var(--gold) 45%, color-mix(in srgb, var(--gold) 70%, #000));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}
/* The second one hangs a little lower */
.hol-ornament:nth-child(2) { margin-top: 30px; }

/* Gold cap on top */
.hol-ornament::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 34px;
  height: 16px;
  margin-left: -17px;
  border-radius: 3px 3px 2px 2px;
  background: repeating-linear-gradient(90deg, var(--gold-light) 0 3px, var(--gold) 3px 6px);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25);
}

/* Ribbon it hangs from */
.hol-ornament::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  width: 3px;
  height: 46px;
  margin-left: -1.5px;
  background: var(--color-primary);
}
.hol-ornament:nth-child(2)::after { height: 76px; }

.hol-ornament img,
.hol-ornament svg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.2);
}

.hol-ornament--art svg { background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--color-accent) 70%, #fff 8%), color-mix(in srgb, var(--color-accent) 90%, #000) 80%); }
.hol-ornament--art:nth-child(2) svg { background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--color-primary) 80%, #fff 6%), color-mix(in srgb, var(--color-primary) 85%, #000) 80%); }

.hol-ornaments:has(> :only-child) .hol-ornament { width: 60%; max-width: 260px; }
.hol-ornaments:has(> :only-child) .hol-ornament:nth-child(2) { margin-top: 0; }

/* Illustration colors */
.t-snowdot { fill: rgba(255, 255, 255, 0.8); }
.t-ground { fill: #f4f1ea; }
.t-trunk { fill: #6b4528; }
.t-tree { fill: #2f7a4c; }
.t-tree--2 { fill: #286b43; }
.t-tree--3 { fill: #215e3a; }
.t-garland { fill: none; stroke: var(--gold-light); stroke-width: 2; stroke-dasharray: 1 5; stroke-linecap: round; }
.t-orn--red { fill: #d0303a; }
.t-orn--gold { fill: var(--gold-light); }
.t-star { fill: var(--gold-light); stroke: var(--gold); stroke-width: 1.5; stroke-linejoin: round; }
.t-gift--red { fill: #c42a33; }
.t-gift--green { fill: #2f7a4c; }
.t-ribbon { fill: var(--gold-light); }
.t-bow { fill: var(--gold-light); stroke: var(--gold); stroke-width: 1; }
.s-snow { fill: #fdfdfb; }
.s-shade { fill: #dfe4ea; }
.s-arm { fill: none; stroke: #5b3a22; stroke-width: 3.5; stroke-linecap: round; }
.s-scarf { fill: #2f7a4c; }
.s-scarf-stripe { fill: none; stroke: var(--gold-light); stroke-width: 2.5; stroke-linecap: round; }
.s-hat { fill: #1d1a1c; }
.s-band { fill: #c42a33; }
.s-holly { fill: #2f7a4c; }
.s-coal { fill: #25211f; }
.s-carrot { fill: #e87a2a; }

/* ===================== CARDS ===================== */
.hol-card {
  margin-top: 26px;
  padding: 30px 24px;
  background: var(--color-surface);
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28), inset 0 0 0 6px var(--color-surface), inset 0 0 0 7px var(--line);
}

.hol-section-title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.15;
  text-align: center;
  color: var(--color-primary);
  margin-bottom: 14px;
}

.hol-details { display: grid; gap: 18px; text-align: center; margin-top: 34px; }
.hol-detail { display: grid; gap: 2px; }
.hol-detail + .hol-detail { padding-top: 16px; border-top: 1px dashed var(--line); }
.hol-detail-label { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; color: var(--color-accent); margin-bottom: 4px; }
.hol-detail-value { font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.3; }
.hol-detail-sub { color: var(--muted); }
.location-locked { display: block; font-style: italic; color: var(--muted); margin-top: 4px; }

.hol-note-card { text-align: center; }
.hol-note { font-size: 19px; font-style: italic; line-height: 1.7; }

.hol-gifts { display: grid; gap: 12px; }
.hol-gift {
  display: block;
  padding: 16px 18px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.hol-gift:hover { border-color: var(--color-primary); }
.hol-gift-name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--color-primary); }
.hol-gift-desc { color: var(--muted); font-size: 16px; }

.hol-count { text-align: center; color: var(--muted); margin-bottom: 14px; }
.hol-count span { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--color-primary); margin-right: 4px; }
.hol-guest-names { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.guest-pill { padding: 5px 14px; border-radius: 999px; font-size: 16px; background: color-mix(in srgb, var(--color-accent) 12%, #fff); border: 1px solid color-mix(in srgb, var(--color-accent) 25%, transparent); }
.guest-pill:nth-child(even) { background: color-mix(in srgb, var(--color-primary) 10%, #fff); border-color: color-mix(in srgb, var(--color-primary) 22%, transparent); }
.no-guests { color: var(--muted); font-style: italic; }

/* ===================== FORMS (also used by the shared cancel modal) ===================== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--color-accent); margin-bottom: 6px; }

.form-input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, #ddd);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 17px;
  color: var(--color-text);
  -webkit-appearance: none;
}
.form-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent); }

.btn-primary, .btn-secondary {
  display: block;
  width: 100%;
  padding: 15px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border-radius: 6px;
}

.btn-primary { margin-top: 6px; border: none; color: #fff; background: var(--color-primary); box-shadow: 0 4px 0 color-mix(in srgb, var(--color-primary) 65%, #000); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 color-mix(in srgb, var(--color-primary) 65%, #000); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { margin-top: 12px; background: transparent; color: var(--muted); border: 1px solid var(--line); font-size: 12px; }

.form-message { display: none; margin-top: 12px; padding: 12px 14px; border-radius: 6px; font-size: 16px; }
.form-message.success { display: block; background: color-mix(in srgb, var(--color-accent) 12%, #fff); color: var(--color-accent); }
.form-message.error { display: block; background: #fbe6e6; color: #8f1d24; }

#rsvp-done { text-align: center; }
.rsvp-done-text { font-family: var(--font-script); font-size: 44px; line-height: 1.15; color: var(--color-primary); }
.rsvp-done-status { color: var(--muted); margin: 8px 0 18px; }
.link-button { margin-top: 12px; background: none; border: none; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* ===================== PHOTO DUMP ===================== */
.hol-locked { text-align: center; color: var(--muted); font-style: italic; }
.photos-grid-dump { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.dump-photo { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 6px; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); background: #eee; cursor: zoom-in; }
.dump-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dump-photo-credit { position: absolute; left: 8px; bottom: 8px; background: rgba(251, 246, 234, 0.92); color: var(--color-text); font-size: 13px; padding: 2px 10px; border-radius: 999px; }

/* ===================== FOOTER ===================== */
.hol-footer { text-align: center; padding: 36px 0 18px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: rgba(255, 255, 255, 0.75); font-size: 15px; }
.hol-footer-name { font-family: var(--font-script); font-size: 40px; line-height: 1.2; color: #fff; }

/* The policy links at the bottom sit on the green page */
.legal-links { color: #fff; }

/* ===================== MAJORS ===================== */
.major-badge--bold { background: var(--color-primary); color: #fff; }
.major-badge--bold svg { color: #fff; }
.major-badge--subtle { color: var(--muted); opacity: 1; }
.major-badge--subtle svg { color: var(--color-accent); }

/* ===================== ENVELOPE INTRO ===================== */
/* Shared envelope (shared/base.css): a cranberry envelope on evergreen, gold seal */
:root {
  --env-backdrop: var(--color-background);
  --env-paper: #a91d26;
  --env-bottom: #8e1820;
  --env-side: #9c1a23;
  --env-flap-top: #b8262f;
  --env-flap-bottom: #9a1b23;
  --env-line: rgba(232, 207, 142, 0.45);
  --env-seal-light: var(--gold-light);
  --env-seal-dark: var(--gold);
  --env-seal-text: #6e1218;
  --env-seal-font: var(--font-script);
  --env-seal-style: normal;
  --env-hint: var(--gold-light);
  --env-card: var(--color-surface);
  --env-card-border: var(--line);
  --env-title-font: var(--font-script);
  --env-title-size: 30px;
  --env-title: var(--color-primary);
  --env-name: var(--color-accent);
  --env-lead: var(--muted);
}

/* ===================== SECRET SANTA ===================== */
.hol-santa { text-align: center; }
.hol-santa-gift { width: 58px; height: 58px; margin: 0 auto 4px; display: block; }
.g-box { fill: var(--color-primary); }
.g-lid { fill: color-mix(in srgb, var(--color-primary) 85%, #000); }
.g-ribbon, .g-bow { fill: var(--gold-light); }
.hol-santa-text { font-size: 18px; line-height: 1.6; }
.hol-santa-budget { margin-top: 10px; font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--color-accent); }
.santa-match { border-color: var(--line); background: #fff; }
.santa-match-name { font-family: var(--font-display); color: var(--color-primary); }
