@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600&family=Zen+Maru+Gothic:wght@500;700&display=swap');

:root {
	color-scheme: dark;
	font-family: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
	font-weight: 500;
	color: #f0e8ce;
	background: #132e2a;
	font-synthesis: none;
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
	height: 100svh;
	overflow: hidden;
	background: radial-gradient(ellipse at 78% 45%, #31504455, transparent 55%);
}
button {
	font: inherit;
}
button:focus-visible {
	outline: 2px solid #ceb579;
	outline-offset: 5px;
}
#snow {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 5;
	opacity: 0.5;
}
.texture {
	display: none;
}
.masthead {
	position: absolute;
	top: 22px;
	right: 4%;
	z-index: 10;
}
#motion-toggle {
	display: flex;
	align-items: center;
	gap: 7px;
	min-height: 44px;
	padding: 8px 12px;
	color: #b5bca7;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 17px;
}
#motion-toggle span {
	font-size: 10px;
}
main { height: 100svh; }
.hero {
  height: 100svh;
  position: relative;
  display: flex;
  padding: 55px 7% 30px;
  align-items: center;
  overflow: clip;
  isolation: isolate;
}
.hero::after {
  content: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, #132e2a80 0%, #132e2a40 38%, transparent 70%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(580px, 61%);
  padding: 30px;
  border: 1px solid #d3d4b433;
  border-radius: 18px;
  background: #132e2aeb;
  box-shadow: 0 12px 40px #061d2033;
  text-shadow: none;
}
h1 {
	font: 600 clamp(54px, 8svh, 82px) / 1.05 'Fredoka', 'Arial Rounded MT Bold', sans-serif;
	letter-spacing: -1px;
	margin: 0 0 clamp(15px, 3svh, 30px);
}
.title-bottom {
	display: block;
	white-space: nowrap;
	font-size: 0.72em;
	letter-spacing: -0.5px;
	margin-top: 12px;
}
.title-bottom i {
	font-style: normal;
	font-size: 0.72em;
	color: #c45b46;
	padding-right: 8px;
}
.intro {
	font-size: 14px;
	line-height: 2;
	margin: 0 0 clamp(14px, 2.5svh, 25px);
}
.date-line {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	font-size: 18px;
	letter-spacing: 0.5px;
	margin: 0 0 9px;
}
.calendar-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; flex-shrink: 0;
  border: none; border-radius: 10px;
  color: #f0e8ce; background: transparent; cursor: pointer;
}
.calendar-link:hover { color: #ceb579; }
.calendar-link:focus-visible { outline: 2px solid #ceb579; outline-offset: 3px; }
@media (max-width: 360px) {
  .date-line { font-size: 12px !important; gap: 3px; }
}
.location {
	font-size: 14px;
	margin: 0;
	color: #d0d3c0;
}
.invitation-details {
	margin: clamp(16px, 2.5svh, 26px) 0 0;
	padding-top: clamp(12px, 2svh, 22px);
	border-top: 1px solid #d3d4b42b;
	font-size: 13px;
	line-height: 1.9;
}
.invitation-details > div {
	display: grid;
	grid-template-columns: 6em minmax(0, 1fr);
	align-items: baseline;
	margin-bottom: clamp(10px, 1.7svh, 17px);
}
.invitation-details > div:last-child {
	grid-template-columns: max-content minmax(0, 1fr);
	margin-bottom: 0;
}
.invitation-details dt {
	color: #ceb579;
	font-size: inherit;
	margin: 0;
}
.invitation-details dd {
	margin: 0;
	color: #d0d3c0;
}
.invitation-details small {
  display: block;
  font-size: .85em;
  line-height: 1.8;
  margin-top: 5px;
}
.scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.landscape {
  position: absolute;
  width: max(100%, 1000px);
  bottom: -12%;
  left: 50%;
  transform: translateX(-50%);
  height: auto;
  opacity: 1;
  filter: saturate(1.25);
}
.moon {
	z-index: 1;
	border: 0;
	padding: 0;
	cursor: pointer;
	pointer-events: auto;
	position: absolute;
	width: 70px;
	height: 70px;
	border-radius: 50%;
	background: #e3d8ab;
	top: 13%;
	right: 18%;
	box-shadow: 0 0 70px #e8d7a41a, inset -12px -6px 0 #d2c99d;
}
.landscape { pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.landscape:focus-visible { outline: 2px dashed #ceb579; outline-offset: -10px; }
#show-tree { cursor: pointer; }
#show-tree:focus-visible { outline: none; }
#show-tree:focus-visible .tree-hit { stroke: #f0e8ce; stroke-width: 2; stroke-dasharray: 5 5; }
.show-bulbs { opacity: 0; }
.light-show .show-bulbs { opacity: 1; }
.light-show circle {
  animation: tree-lights 2.8s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.light-show .tree-star {
  fill: #fff0ac;
  filter: drop-shadow(0 0 8px #ffd95e);
  animation: tree-star-glow 2s ease-in-out infinite;
}
@keyframes tree-lights {
  0%, 100% { fill: #ff799f; filter: drop-shadow(0 0 5px #ff799f); }
  33% { fill: #ffe78f; filter: drop-shadow(0 0 9px #ffd76a); }
  66% { fill: #87fff1; filter: drop-shadow(0 0 6px #55e9e1); }
}
@keyframes tree-star-glow {
  50% { filter: drop-shadow(0 0 15px #ffe58b); }
}
@media (prefers-reduced-motion: reduce) {
  .light-show circle { fill: #ffe78f; filter: drop-shadow(0 0 5px #ffd76a); }
}
.scene[data-lights="1"] .house-lights { fill: #ff91be; }
.scene[data-lights="2"] .house-lights { fill: #8bfff0; }
.scene[data-lights="1"] .landscape { filter: saturate(1.5) hue-rotate(-12deg); }
.scene[data-lights="2"] .landscape { filter: saturate(1.3) hue-rotate(15deg); }
.surprise-status {
  position: fixed; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%); z-index: 12; margin: 0;
  padding: 9px 16px; border-radius: 30px; background: #132e2af2;
  color: #f0e8ce; font-size: 12px; text-align: center;
  pointer-events: none; width: max-content; max-width: 90vw;
}
.surprise-status:empty { display: none; }
.secret-hint {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 0;
  width: 100%;
  margin: 0;
  padding: 0 14px;
  z-index: 4;
  color: #f0e8ce;
  font-size: 10px;
  letter-spacing: 1px;
  text-align: center;
  text-shadow: 0 1px 4px #132e2a, 0 0 10px #132e2a;
  pointer-events: none;
}
.sound-toggle {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: 5%;
  z-index: 12; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 12px; border: 0; border-radius: 24px;
  background: #132e2acf; color: #f0e8ce; cursor: pointer;
}
.sound-toggle > span:first-child { font-size: 22px; }
.sound-label { font-size: 11px; }
.sound-toggle[aria-pressed="true"] { color: #ffe09a; }
.title-trigger {
  display: block; font: inherit; letter-spacing: inherit; line-height: inherit;
  color: inherit; text-shadow: inherit; text-align: left; padding: 0;
  background: none; border: none; cursor: pointer; touch-action: manipulation;
}
.santa-flight {
  border: 0; padding: 6px; background: none; cursor: pointer;
  pointer-events: auto; min-height: 48px; z-index: 7; touch-action: manipulation;
}
.santa-flight:focus-visible {
  animation-play-state: paused; transform: none !important;
  position: fixed; left: 14px; top: 12px; bottom: auto;
}
.dropped-present {
  position: fixed; bottom: 65px; width: 52px; height: 56px;
  z-index: 13; background: none; border: none; cursor: pointer;
  animation: present-fall 1.1s cubic-bezier(.45,0,.8,1) both;
  padding: 4px; font-size: 35px; touch-action: manipulation;
}
.gift-box {
  display: block; width: 38px; height: 34px; background: #e65368;
  border: 2px solid #ffb881; box-shadow: 0 5px 0 #172b34;
  position: relative;
}
.gift-box::before { content: ''; position: absolute; left: 14px; top: -3px; width: 7px; height: 35px; background: #ffe598; }
.gift-box::after { content: ''; position: absolute; left: -3px; top: 6px; width: 40px; height: 7px; background: #ffe598; }
@keyframes present-fall {
  from { transform: translateY(var(--fall-from)) rotate(-12deg); }
  85% { transform: translateY(0) rotate(7deg); }
  to { transform: translateY(0) rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  .santa-flight { display: block !important; position: fixed; left: 8px; top: 8px; bottom: auto; width: 125px; transform: none; }
  .dropped-present { transform: none; }
}
.tap-spark {
  position: fixed; left: var(--x); top: var(--y); z-index: 11;
  color: var(--spark-color); pointer-events: none; font-size: 17px;
  animation: sparkle .85s ease-out forwards;
}
@keyframes sparkle {
  from { transform: translate(-50%, -50%) scale(.5); opacity: 1; }
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0); opacity: 0; }
}
.santa-flight.summoned { animation: summoned-flight 6s linear forwards; }
@keyframes summoned-flight {
  from { transform: translateX(-300px) rotate(-5deg); }
  to { transform: translateX(calc(100vw + 300px)) rotate(-5deg); }
}
.sky-star {
	position: absolute;
	color: #ceb579;
	font-size: 22px;
}
.star-one {
	top: 22%;
	left: 57%;
}
.star-two {
	top: 17%;
	right: 8%;
	font-size: 12px;
}
.star-three {
	top: 34%;
	right: 5%;
}
.santa-flight {
	position: absolute;
	top: 55px;
	left: 0;
	width: 230px;
	z-index: 7;
	pointer-events: auto;
	transform: translateX(-300px);
	animation: fly 42s linear infinite 3s;
	opacity: 0.65;
}
.santa-flight svg {
	width: 100%;
	pointer-events: none;
}
::view-transition-old(root) { animation: edition-out .45s ease-in both; }
::view-transition-new(root) { animation: edition-in .6s ease-out both; }
@keyframes edition-out { to { opacity: 0; filter: blur(8px); transform: scale(1.04); } }
@keyframes edition-in { from { opacity: 0; filter: blur(8px); transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
.chimney-smoke {
	animation: smoke 6s ease-in-out infinite;
}
.house-lights {
	animation: twinkle 4s ease-in-out infinite;
}
.motion-paused * {
	animation-play-state: paused !important;
}
@keyframes fly {
	0% {
		transform: translate(-300px, 45px) rotate(-5deg);
	}
	34%,
	100% {
		transform: translate(1650px, -5px) rotate(-5deg);
	}
}
@keyframes smoke {
	50% {
		transform: translateY(-10px);
		opacity: 0.09;
	}
}
@keyframes twinkle {
	50% {
		opacity: 0.5;
	}
}

@media (max-width: 720px) {
  .masthead { top: 8px; right: 4%; }
  .hero { padding: 55px 7% 24px; }
  .hero-copy { width: 100%; padding: 24px 20px; }
  .hero::after { background: linear-gradient(90deg, #132e2a66, #132e2a26 75%, transparent); }
  h1 { font-size: clamp(46px, 7svh, 60px); margin-bottom: 20px; }
  .title-bottom { margin-top: 8px; }
  .intro { font-size: 13px; line-height: 1.9; margin-bottom: 20px; }
  .date-line { font-size: 15px; letter-spacing: 0; }
  .location { font-size: 12px; }
  .invitation-details { font-size: 12px; margin-top: 20px; padding-top: 16px; line-height: 1.9; }
  .invitation-details > div { margin-bottom: 12px; }
  .landscape { width: max(700px, 100vw); bottom: -25px; }
  .moon { width: 48px; height: 48px; right: 10%; top: 18%; }
  .star-one { left: 80%; top: 9%; }
  .star-two { right: 5%; top: 28%; }
  .star-three { display: none; }
  .santa-flight { width: 170px; top: 20px; animation-duration: 38s; }
}
@media (max-height: 700px) and (max-width: 720px) {
  .hero-copy { padding: 20px 16px; }
  .hero { padding-top: 47px; padding-bottom: 14px; }
  h1 { font-size: clamp(38px, 11.5vw, 46px); margin-bottom: 13px; }
  .intro { font-size: 12px; margin-bottom: 14px; line-height: 1.7; }
  .date-line { font-size: 14px; margin-bottom: 6px; }
  .invitation-details { margin-top: 14px; padding-top: 11px; line-height: 1.7; }
  .invitation-details > div { margin-bottom: 9px; }
}
@media (max-height: 540px) and (min-width: 600px) {
  .hero { padding: 50px 5% 20px; }
  .hero-copy { width: 100%; display: grid; grid-template-columns: 1fr 1.2fr; column-gap: 35px; align-items: start; }
  h1 { font-size: clamp(42px, 7vw, 60px); margin-bottom: 18px; }
  .intro { font-size: 12px; margin-bottom: 15px; grid-column: 1; }
  .date-line { font-size: 14px; grid-column: 1; }
  .location { font-size: 12px; grid-column: 1; }
  .invitation-details { grid-column: 2; grid-row: 1 / span 4; margin: 0; padding: 0; border: 0; font-size: 12px; line-height: 1.8; }
  .hero::after { background: #132e2a66; }
}
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
	.santa-flight {
		display: none;
	}
}
