/* christmas.dad-look.com - a Christmas party for one book: pine green, cranberry red, gold, falling snow */
body { margin: 0; background: #0f3b2e; color: #fdf8ee; font-family: Helvetica, Arial, sans-serif; }
[hidden] { display: none !important; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #f2c94c; outline-offset: 3px; }
.xm-kicker { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.3em; text-transform: uppercase; color: #f2c94c; }
.xm-small { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: #4e5f58; }

/* Snow: three layers of dots drifting down */
.xm-snow { position: fixed; inset: 0; z-index: 0; pointer-events: none;
	background-image: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1.5px, transparent 2.5px), radial-gradient(circle, rgba(255, 255, 255, 0.7) 0 2px, transparent 3px), radial-gradient(circle, rgba(255, 255, 255, 0.5) 0 1px, transparent 2px);
	background-size: 120px 120px, 200px 200px, 80px 80px; background-position: 0 0, 40px 60px, 20px 30px; }

/* Hero */
.xm-hero { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; padding: 64px 24px 30px; text-align: center; }
.xm-hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 6vw, 62px); font-weight: 400; line-height: 1.1; }
.xm-name { color: #f2c94c; }
.xm-sub { margin: 18px auto 0; max-width: 620px; font-size: 18px; line-height: 1.5; color: #d5e6dd; }

.xm-page { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 20px 24px 0; display: flex; flex-direction: column; gap: 32px; }

/* The invitation */
.xm-invite-wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.xm-invite { position: relative; padding: 46px 40px 36px; border-radius: 6px; background: #fdf8ee; color: #2a2420; text-align: center; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4); border: 10px solid #fdf8ee; outline: 2px solid #b32b3a; outline-offset: -18px; }
.xm-invite-kicker { position: relative; margin: 0; font-family: Georgia, serif; font-size: 18px; font-style: italic; color: #6b5d50; }
.xm-invite-name { position: relative; margin: 12px 0; font-family: Georgia, serif; font-size: clamp(36px, 6vw, 56px); font-weight: 400; line-height: 1.1; color: #b32b3a; overflow-wrap: anywhere; }
.xm-invite-text { position: relative; margin: 0 auto; max-width: 380px; font-family: Georgia, serif; font-size: 19px; line-height: 1.5; }
.xm-details { position: relative; margin: 26px 0 0; text-align: left; border-top: 1px solid #e3d8c6; }
.xm-details div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid #e3d8c6; }
.xm-details dt { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #0f3b2e; padding-top: 2px; }
.xm-details dd { margin: 0; font-size: 16px; line-height: 1.45; }
.xm-invite-foot { position: relative; margin: 20px 0 0; font-family: Georgia, serif; font-size: 16px; color: #6b5d50; }

.xm-side { display: flex; flex-direction: column; gap: 20px; }
.xm-form, .xm-rsvp { padding: 24px; border-radius: 8px; background: #fdf8ee; color: #2a2420; }
.xm-form label, .xm-form-title { display: block; margin: 0 0 12px; font-family: Georgia, serif; font-size: 22px; }
.xm-form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.xm-form input { flex: 1; min-width: 0; min-height: 52px; padding: 0 16px; border: 2px solid #c9bda9; border-radius: 8px; font: inherit; font-size: 17px; background: #ffffff; }
.xm-button { min-height: 52px; padding: 0 22px; border: 0; border-radius: 8px; background: #b32b3a; color: #ffffff; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; }
.xm-button:hover { background: #941f2d; }
.xm-button-small { min-height: 44px; font-size: 15px; margin-top: 4px; }
.xm-button-link { display: inline-flex; align-items: center; text-decoration: none; }
.xm-small-link { display: inline-block; margin-top: 12px; font-size: 14px; color: #0f3b2e; font-weight: 700; }
.xm-rsvp h2 { margin: 0 0 12px; font-family: Georgia, serif; font-size: 22px; font-weight: 400; }
.xm-rsvp-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.xm-chip { min-height: 44px; padding: 0 20px; border: 2px solid #0f3b2e; border-radius: 999px; background: #ffffff; color: #0f3b2e; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.xm-chip:hover { background: #e8f1ec; }
.xm-chip[aria-pressed="true"] { background: #0f3b2e; color: #ffffff; }
.xm-rsvp-note { margin: 12px 0 0; font-size: 16px; font-weight: 700; color: #b32b3a; }
.xm-rsvp-note:empty { display: none; }
.xm-status { margin: 10px 0 0; font-size: 14px; font-weight: 700; color: #2e7d32; }
.xm-status:empty { display: none; }

/* Party cards */
.xm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.xm-card { padding: 22px; border-radius: 8px; background: #fdf8ee; color: #2a2420; }
.xm-card h2 { margin: 0 0 10px; font-family: Georgia, serif; font-size: 24px; font-weight: 400; color: #0f3b2e; }
.xm-card p { margin: 0 0 10px; font-size: 15px; line-height: 1.5; }
.xm-guests, .xm-menu { margin: 0; padding: 0; list-style: none; }
.xm-guests li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 8px 0; border-bottom: 1px solid #e3d8c6; font-size: 15px; }
.xm-guests span { grid-column: 1; font-size: 13px; color: #6b5d50; }
.xm-guests i { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 13px; font-style: normal; font-weight: 700; color: #b32b3a; text-align: right; }
.xm-guests b { overflow-wrap: anywhere; }
.xm-menu li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid #e3d8c6; font-size: 15px; }
.xm-menu span { font-size: 13px; color: #6b5d50; }
.xm-santa { margin-top: 14px; min-height: 30px; }
.xm-santa p { margin: 0; }
.xm-santa .xm-paper { display: inline-block; margin-bottom: 8px; padding: 12px 18px; background: #ffffff; border: 1px dashed #c9bda9; font-family: Georgia, serif; font-size: 22px; color: #b32b3a; transform: rotate(-2deg); }

/* Ugly sweater: a red knit with a white zigzag and the book in the middle */
.xm-sweater-art { display: flex; justify-content: center; margin-bottom: 12px; }
.xm-knit { position: relative; width: 150px; height: 120px; border-radius: 30px 30px 10px 10px; background-color: #b32b3a;
	background-image: linear-gradient(135deg, transparent 75%, #fdf8ee 75%), linear-gradient(225deg, transparent 75%, #fdf8ee 75%); background-size: 16px 16px; background-position: 0 12px, 0 12px; background-repeat: repeat-x;
	display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -10px 0 #8f2230; }
.xm-book-mini { display: block; width: 38px; height: 52px; border-radius: 2px; background: #1a1a1a url("/img/dad-look-i-wrote-a-book-front-cover.jpg") 57% 50% / 260% auto; box-shadow: 0 0 0 3px #f2c94c; }

/* Mistletoe room */
.xm-room { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); height: 130px; border-radius: 8px; background: linear-gradient(#e8f1ec, #d4e4da); overflow: hidden; margin-bottom: 4px; }
.xm-spot { position: relative; border: 0; border-right: 1px dashed rgba(15, 59, 46, 0.25); background: none; cursor: pointer; }
.xm-spot:last-of-type { border-right: 0; }
.xm-spot:hover { background: rgba(255, 255, 255, 0.4); }
.xm-mistletoe { position: absolute; top: 0; left: 50%; width: 30px; height: 40px; margin-left: -15px; opacity: 0; background: radial-gradient(circle at 50% 80%, #d92b3a 0 5px, transparent 6px), radial-gradient(ellipse at 25% 55%, #2f7d4a 0 9px, transparent 10px), radial-gradient(ellipse at 75% 55%, #2f7d4a 0 9px, transparent 10px), linear-gradient(#6b5d50, #6b5d50) 50% 0 / 2px 18px no-repeat; }
.xm-spot.is-hung .xm-mistletoe { opacity: 1; }
.xm-room-book { position: absolute; bottom: 12px; left: calc(var(--spot, 1) * 33.33% + 16.66% - 17px); width: 34px; height: 46px; border-radius: 2px; background: #1a1a1a url("/img/dad-look-i-wrote-a-book-front-cover.jpg") 57% 50% / 260% auto; transition: left 0.6s cubic-bezier(0.3, 1.4, 0.5, 1); }

/* Bottom */
.xm-bottom { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 56px 24px 48px; display: flex; flex-direction: column; gap: 28px; }
.xm-cta { padding: 44px 24px; border-radius: 10px; background: #b32b3a; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); }
.xm-cta .xm-kicker { color: #ffe6a6; }
.xm-cta h2 { margin: 0; font-family: Georgia, serif; font-size: 40px; font-weight: 400; line-height: 1.1; }
.xm-cta p { margin: 0; max-width: 560px; font-size: 17px; line-height: 1.5; color: #ffe9e9; }
.xm-cta-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; box-sizing: border-box; width: 100%; max-width: 560px; min-height: 72px; padding: 18px 24px; border-radius: 999px; background: #ffffff; color: #b32b3a; font-size: 21px; font-weight: 900; text-transform: uppercase; text-decoration: none; }
.xm-cta-button:hover { background: #fff3f3; }
.xm-cta-arrow { display: inline-block; }
.xm-share { min-height: 48px; padding: 0 22px; border: 2px solid #ffffff; border-radius: 999px; background: none; color: #ffffff; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.xm-share:hover { background: #ffffff; color: #b32b3a; }
.xm-cta .xm-status { color: #ffe6a6; }
.xm-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 1.5; color: #a9c7b8; border-top: 1px solid #2b5a4b; padding-top: 14px; }
.xm-bottom .more-title { color: #fdf8ee; }

@media (max-width: 900px) {
	.xm-invite-wrap { grid-template-columns: minmax(0, 1fr); }
	.xm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.xm-hero { padding: 44px 16px 20px; }
	.xm-sub { font-size: 16px; }
	.xm-page { padding: 12px 16px 0; gap: 22px; }
	.xm-invite { padding: 34px 20px 26px; }
	.xm-details div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.xm-form, .xm-rsvp, .xm-card { padding: 20px 16px; }
	.xm-form .xm-button { width: 100%; }
	.xm-grid { grid-template-columns: minmax(0, 1fr); }
	.xm-bottom { padding: 44px 16px 40px; }
	.xm-cta h2 { font-size: 30px; }
	.xm-cta-button { font-size: 17px; min-height: 64px; }
}

/* Animations - only with JavaScript and when the visitor allows motion */
@media (prefers-reduced-motion: no-preference) {
	.xm-snow { animation: xm-snow 18s linear infinite; }
	.js .xm-hero > * { animation: xm-rise 0.7s ease both; }
	.js .xm-hero > *:nth-child(2) { animation-delay: 0.15s; }
	.js .xm-hero > *:nth-child(3) { animation-delay: 0.3s; }
	.js .xm-invite { animation: xm-open 1s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; transform-origin: top center; }
	.xm-name { display: inline-block; animation: xm-twinkle 3s ease-in-out infinite; }
	.xm-santa .xm-paper { animation: xm-unfold 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
	.xm-spot.is-hung .xm-mistletoe { animation: xm-drop 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
	.xm-book-mini { animation: xm-wiggle 2.6s ease-in-out infinite; }
	.xm-chip.is-pop { animation: xm-pop 0.35s ease; }
	.xm-cta-button { animation: xm-glow 2.2s ease-in-out infinite; transition: transform 0.15s ease; }
	.xm-cta-button:hover { transform: scale(1.02); }
	.xm-cta-arrow { animation: xm-nudge 1.1s ease-in-out infinite; }
}

@keyframes xm-snow { from { background-position: 0 0, 40px 60px, 20px 30px; } to { background-position: 30px 720px, 0 1260px, 60px 510px; } }
@keyframes xm-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes xm-open { from { opacity: 0; transform: perspective(900px) rotateX(-40deg) translateY(-20px); } to { opacity: 1; transform: none; } }
@keyframes xm-twinkle { 0%, 100% { text-shadow: 0 0 0 rgba(242, 201, 76, 0); } 50% { text-shadow: 0 0 18px rgba(242, 201, 76, 0.7); } }
@keyframes xm-unfold { from { opacity: 0; transform: rotate(-12deg) scale(0.6); } to { opacity: 1; transform: rotate(-2deg); } }
@keyframes xm-drop { from { transform: translateY(-50px); } to { transform: none; } }
@keyframes xm-wiggle { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes xm-pop { 0% { transform: scale(1); } 50% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes xm-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); } 50% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); } }
@keyframes xm-nudge { 0%, 100% { transform: none; } 50% { transform: translateX(8px); } }
