/* Santa Toolbox — shared styles. Matches the app: pine and cranberry backdrops, kraft-paper gift tags, gold accents. */

:root {
  --pine-top: #0d3d33;
  --pine-bottom: #05171a;
  --cranberry: #7f0a1a;
  --cranberry-deep: #29030f;
  --paper: #eed6a8;
  --ink: #5c331a;
  --gold: #ffcc4d;
  --red: #dc1a24;
  --text: #fff;
  --text-secondary: rgb(255 255 255 / 0.72);
  --glass: rgb(255 255 255 / 0.09);
  --glass-border: rgb(255 255 255 / 0.16);
  --radius: 24px;
  --serif: "New York", ui-serif, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  line-height: 1.5;
  background: linear-gradient(180deg, var(--pine-top), var(--pine-bottom)) fixed;
  -webkit-font-smoothing: antialiased;
}

body.cranberry {
  background: linear-gradient(180deg, var(--cranberry), var(--cranberry-deep)) fixed;
}

a { color: var(--gold); }

img { max-width: 100%; display: block; }

/* Falling snow drawn by snow.js */
#snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

main, header, footer, nav { position: relative; z-index: 1; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(620px, 100% - 40px); margin-inline: auto; }

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.topbar nav a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
}
.topbar nav a:hover { color: var(--text); }
.topbar nav a.nav-cta { color: var(--ink); padding: 8px 16px; font-size: 0.95rem; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 12px; }
.secondary { color: var(--text-secondary); }
.center { text-align: center; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font: 600 1rem var(--sans);
  text-decoration: none;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.15s ease, background 0.15s ease;
}
.button:hover { background: rgb(255 255 255 / 0.16); }
.button:active { transform: scale(0.97); }
.button.primary { background: var(--paper); color: var(--ink); border-color: transparent; }
.button.primary:hover { background: #f5e2bb; }
.button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.buttons.center { justify-content: center; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0 60px;
}
.hero .lede { font-size: 1.2rem; color: var(--text-secondary); max-width: 34ch; }
.hero-art { position: relative; aspect-ratio: 1; width: 100%; }
.hero-art .icon {
  width: 62%;
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  border-radius: 22.5%;
  overflow: hidden;
  clip-path: inset(0 round 22.5%);
  box-shadow: 0 30px 60px rgb(0 0 0 / 0.45);
}
.hero-art .floating {
  position: absolute;
  width: 26%;
  padding: 3%;
  background: #fff;
  border-radius: 22%;
  box-shadow: 0 12px 26px rgb(0 0 0 / 0.3);
  animation: bob 6s ease-in-out infinite;
}
.hero-art .floating:nth-child(2) { top: 2%; left: 4%; rotate: -10deg; }
.hero-art .floating:nth-child(3) { top: 6%; right: 2%; rotate: 9deg; animation-delay: -2s; }
.hero-art .floating:nth-child(4) { bottom: 4%; left: 8%; rotate: 7deg; animation-delay: -4s; }
.hero-art .floating:nth-child(5) { bottom: 0; right: 8%; rotate: -8deg; animation-delay: -1s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* Countdown */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 22px 0 8px;
  max-width: 420px;
}
.countdown div {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 10px 4px;
  text-align: center;
}
.countdown strong {
  display: block;
  font: 800 2rem var(--rounded);
  font-variant-numeric: tabular-nums;
}
.countdown span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Candy-cane progress bar */
.candy {
  height: 14px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  overflow: hidden;
  max-width: 420px;
}
.candy > div {
  height: 100%;
  border-radius: 999px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 8px, #fff 8px 16px);
  background-size: 22.6px 22.6px;
  animation: candy 1.4s linear infinite;
}
@keyframes candy { to { background-position: 22.6px 0; } }

/* Feature cards */
.section { padding: 56px 0; }
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.card .feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: var(--paper);
}
.card .feature-icon img { width: 38px; }
.card p { color: var(--text-secondary); }
.card .button { margin-top: 8px; }

/* Kraft-paper gift tag */
.tag {
  position: relative;
  background: linear-gradient(180deg, #f3dfb6, var(--paper));
  color: var(--ink);
  border-radius: 6px 6px 14px 14px;
  clip-path: polygon(14% 0, 86% 0, 100% 12%, 100% 100%, 0 100%, 0 12%);
  padding: 40px 30px 30px;
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.35);
}
.tag::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 12px;
  height: 12px;
  translate: -50% 0;
  border-radius: 50%;
  background: var(--pine-bottom);
}
.tag::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px dashed rgb(92 51 26 / 0.3);
  border-radius: 4px 4px 10px 10px;
  clip-path: inherit;
  pointer-events: none;
}
.tag h1, .tag h2, .tag h3 { color: var(--ink); }
.tag .secondary { color: rgb(92 51 26 / 0.75); }

/* Footer */
.site-footer {
  padding: 48px 0 60px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  margin-top: 40px;
}
.site-footer .wrap { display: grid; gap: 22px; justify-items: center; text-align: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--text); }
.made-by { display: flex; align-items: center; gap: 12px; text-align: left; }
.made-by img { width: 44px; height: 44px; flex: none; }
.made-by .copyright { font-size: 0.8rem; opacity: 0.8; margin-top: 2px; }

/* Prose pages (privacy, support) */
.prose { padding: 20px 0 40px; }
.prose h2 { font-size: 1.5rem; margin-top: 30px; }
.prose p, .prose li { color: var(--text-secondary); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 10px; }
  .hero .lede, .countdown, .candy { margin-inline: auto; }
  .hero .buttons { justify-content: center; }
  .hero-art { max-width: 360px; margin-inline: auto; order: -1; }
  .topbar nav a:not(.keep) { display: none; }
}

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