/* QTK Fine Cabinetry, Christmas Toy Drive
   Same paper, ink and walnut as the homepage, with evergreen and warm-gold lights for the season. */

:root {
  --bg: #ebe5e3;
  --surface: #e1dad7;
  --line: #cfc5c0;
  --ink: #2b2622;
  --muted: #6a615d;
  --accent: #6a4527;
  --accent-strong: #523419;
  --accent-ink: #ffffff;
  --pine: #2f4537;
  --pine-deep: #1f2e25;
  --gold: #c9a05a;
  --berry: #8a2f28;
  --dark: #1f2e25;
  --dark-ink: #ebe5e3;
  --dark-muted: #b3bdb5;
  --error: #9b2c1c;

  --font: "Clash Grotesk", "Helvetica Neue", Arial, sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-intro: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --step-head: clamp(2.25rem, 1.3rem + 3vw, 4rem);
  --step-display: clamp(3rem, 1.6rem + 5.6vw, 7rem);

  --margin: clamp(1rem, 5vw, 5rem);
  --gutter: clamp(1rem, 2vw, 1.75rem);
  --section: clamp(5.5rem, 11vw, 10rem);
  --bar: 4.5rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--step-body); line-height: 1.45;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, p, figure, ul, ol, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }
:target { scroll-margin-top: var(--bar); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: var(--margin); top: -4rem; z-index: 60; background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; }
.skip:focus { top: 0.75rem; }

/* ---------- controls ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.5rem;
  background: var(--accent); color: var(--accent-ink); font-weight: 500; white-space: nowrap;
  transition: transform 140ms var(--ease-out), background-color 180ms ease;
}
.button:active { transform: scale(0.97); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.button-small { min-height: 2.75rem; padding: 0 1.1rem; font-size: var(--step-small); }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; text-decoration-thickness: 0.07em; transition: text-decoration-color 180ms ease; }
.link-under { text-decoration-color: currentColor; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-strong); }
  .link:hover { text-decoration-color: currentColor; }
}

/* ---------- bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 50; height: var(--bar);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 var(--margin); background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar-mark { display: flex; align-items: center; }
.bar-mark img { width: auto; height: 1.9rem; background: none; filter: brightness(0) opacity(0.86); }
@media (max-width: 40em) { .bar-mark img { height: 1.5rem; } }
.bar-nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.5vw, 2rem); font-size: var(--step-small); }
@media (max-width: 34em) { .bar-nav .link { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  padding: clamp(3rem, 8vw, 6.5rem) var(--margin) var(--section);
  grid-template-columns: 1fr;
}
@media (min-width: 56em) { .hero { grid-template-columns: 1.25fr 1fr; min-height: calc(100svh - var(--bar)); } }
.snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-text, .tree { position: relative; }
.eyebrow { font-size: var(--step-small); letter-spacing: 0.08em; text-transform: uppercase; color: var(--pine); font-weight: 500; }
.hero-title { margin-top: 1.25rem; font-size: var(--step-display); line-height: 0.98; letter-spacing: -0.025em; max-width: 12ch; }
.hero-lead { margin-top: 1.75rem; font-size: var(--step-intro); line-height: 1.45; color: var(--muted); max-width: 42ch; }
.hero-lead p + p, .section-lead p + p, .thanks-lead p + p { margin-top: 0.75em; }
.hero-act { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; }
.hero-tag { margin-top: 2rem; font-size: var(--step-small); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.hero-story { margin-top: 0.75rem; font-size: var(--step-small); }

/* tree */
.tree { justify-self: center; width: min(100%, 26rem); }
.tree svg { width: 100%; height: auto; overflow: visible; }
.tree-body path { fill: var(--pine); }
.tree-body rect { fill: var(--accent); }
.tree-lines path { fill: none; stroke: var(--gold); stroke-width: 1.4; opacity: 0.7; }
.tree-star path { fill: var(--gold); transform-origin: 160px 42px; animation: star 6s ease-in-out infinite; }
.tree-lights circle { fill: #f3d58f; animation: twinkle 2.4s ease-in-out infinite; animation-delay: var(--d); filter: drop-shadow(0 0 5px rgba(243, 213, 143, 0.9)); }
.tree-lights circle:nth-child(3n) { fill: #f0b9a4; }
.gift { stroke: none; }
.gift-a { fill: var(--berry); }
.gift-b { fill: var(--accent); }
.gift-c { fill: #a8b4a6; }
.ribbon { fill: none; stroke: var(--gold); stroke-width: 3; }
.ground { stroke: var(--ink); stroke-width: 1; opacity: 0.35; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes star { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.08) rotate(6deg); } }

/* ---------- sections ---------- */
.section-title { font-size: var(--step-head); line-height: 1.02; letter-spacing: -0.02em; }
.section-lead { margin-top: 1.25rem; font-size: var(--step-intro); line-height: 1.45; color: var(--muted); max-width: 46ch; }

/* wish list */
.wish { padding: var(--section) var(--margin); background: var(--surface); }
.wish-head { max-width: 60rem; }
.wish-grid { margin-top: clamp(3rem, 6vw, 5rem); }

/* each category is a gift tag hanging on its own string: notched top corners, a punched hole with a
   reinforcement ring, a slight tilt that swings level on hover. Packed as masonry with CSS columns. */
.wish-tags { columns: 3 18rem; column-gap: clamp(1.5rem, 3vw, 2.75rem); }
.wish-tag {
  --tag: #f6f1ea; --tag-ink: var(--ink); --tag-muted: var(--muted); --tag-dot: var(--gold); --tilt: -1.6deg;
  position: relative; isolation: isolate; break-inside: avoid; margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
  padding: calc(3.25rem + 3rem) clamp(1.5rem, 2.5vw, 2rem) 2rem; color: var(--tag-ink);
  rotate: var(--tilt); transform-origin: 50% 0;
}
.wish-tag::before {
  content: ""; position: absolute; inset: 3.25rem 0 0; z-index: -1;
  background:
    radial-gradient(circle at 50% 1.6rem, var(--surface) 0 0.42rem, rgb(255 255 255 / 0.4) 0.44rem 0.68rem, transparent 0.7rem),
    var(--tag);
  clip-path: polygon(1.5rem 0, calc(100% - 1.5rem) 0, 100% 1.5rem, 100% 100%, 0 100%, 0 1.5rem);
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.04);
}
/* the string, running up out of the hole */
.wish-tag::after {
  content: ""; position: absolute; left: calc(50% - 0.75px); top: 0; width: 1.5px; height: calc(3.25rem + 1.6rem);
  background: linear-gradient(var(--gold), color-mix(in srgb, var(--gold) 70%, var(--ink)));
}
.wish-tag:nth-child(3n + 2) { --tilt: 1.2deg; }
.wish-tag:nth-child(3n) { --tilt: -0.6deg; }
.tag-pine { --tag: var(--pine); --tag-ink: #eef1ec; --tag-muted: #b9c6bc; --tag-dot: var(--gold); }
.tag-berry { --tag: var(--berry); --tag-ink: #fbefec; --tag-muted: #e7bdb6; --tag-dot: #f1d29a; }
.tag-gold { --tag: var(--gold); --tag-ink: #2b2014; --tag-muted: #3f2f1a; --tag-dot: #fff8e8; }
.tag-walnut { --tag: var(--accent); --tag-ink: #f6ece3; --tag-muted: #d9bfa6; --tag-dot: var(--gold); }
.tag-paper { --tag: #f6f1ea; }
@media (max-width: 40em) { .wish-tag { --tilt: -0.8deg; } .wish-tag:nth-child(3n + 2) { --tilt: 0.7deg; } .wish-tag:nth-child(3n) { --tilt: -0.4deg; } }

.wish-group h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.1; text-align: center; }
.wish-group ul { margin-top: 1.25rem; display: grid; gap: 0.7rem; }
.wish-group li { position: relative; padding-left: 1.2rem; line-height: 1.35; }
.wish-group li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 0.4rem; height: 0.4rem; border-radius: 50%;
  background: var(--tag-dot, var(--gold));
}
.wish-group li span { display: block; margin-top: 0.15rem; font-size: var(--step-small); color: var(--tag-muted, var(--muted)); }

/* gift cards for families: a wide card that looks like the thing itself */
.wish-card {
  --tag-dot: var(--gold); --tag-muted: #b9c6bc;
  position: relative; overflow: hidden; margin-top: clamp(0.5rem, 2vw, 1.5rem);
  padding: clamp(1.75rem, 4vw, 3rem); border-radius: 1.25rem; color: #eef1ec;
  background:
    radial-gradient(120% 140% at 100% 0%, rgb(201 160 90 / 0.28), transparent 55%),
    linear-gradient(135deg, var(--pine) 0%, var(--pine-deep) 100%);
}
.wish-card::before {
  /* the card's chip */
  content: ""; position: absolute; top: clamp(1.75rem, 4vw, 3rem); right: clamp(1.75rem, 4vw, 3rem);
  width: 3rem; height: 2.25rem; border-radius: 0.4rem;
  background: linear-gradient(135deg, #e6c98d, var(--gold) 55%, #a7834a);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.15);
}
.wish-card-brand { font-size: var(--step-small); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.wish-card-brand span { margin-left: 0.6rem; color: #b9c6bc; letter-spacing: 0.08em; }
.wish-card h3 { margin-top: 1.5rem; text-align: left; }
.wish-note { margin-top: 0.75rem; max-width: 46ch; color: #c9d3cb; }
.wish-card ul { margin-top: 2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem var(--gutter); }
.wish-end { margin-top: clamp(2rem, 4vw, 3rem); display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; font-size: var(--step-small); }

/* drop off */
.drop {
  padding: var(--section) var(--margin); display: grid; gap: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: 1fr; align-items: start;
}
@media (min-width: 56em) { .drop { grid-template-columns: 1.3fr 1fr; } }
.steps { margin-top: clamp(2rem, 4vw, 3rem); display: grid; gap: 1.75rem; max-width: 36rem; }
.steps li { display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: baseline; }
.step-num {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1px solid var(--pine); color: var(--pine); font-weight: 500;
}
.steps strong { font-weight: 500; }
.drop-card { background: var(--pine); color: var(--dark-ink); padding: clamp(1.75rem, 4vw, 3rem); }
.drop-label { font-size: var(--step-small); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.drop-card address { margin-top: 1rem; font-size: var(--step-lead); line-height: 1.3; }
.drop-note { margin-top: 1.25rem; color: var(--dark-muted); }
.drop-note em { font-style: normal; color: var(--dark-ink); }
.drop-note strong { font-weight: 500; color: var(--dark-ink); }
.drop-links { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; }

/* pledge form */
.pledge { padding: 0 var(--margin) var(--section); }
.pledge-form {
  margin-top: clamp(2rem, 4vw, 3rem); max-width: 56rem; display: grid; gap: 1.5rem var(--gutter);
  grid-template-columns: 1fr;
}
@media (min-width: 40em) { .pledge-form { grid-template-columns: 1fr 1fr; } }
.form-group label, .form-group legend { display: block; font-size: var(--step-small); font-weight: 500; margin-bottom: 0.5rem; }
.form-wide { grid-column: 1 / -1; }
.choice-group { margin: 0; padding: 0; border: 0; min-width: 0; }
@media (min-width: 40em) { .choice-group:first-of-type { grid-column: 1; } }
.choice-group legend { padding: 0; }
.form-group .choice {
  display: flex; align-items: center; gap: 0.7rem; min-height: 2.75rem; margin: 0;
  font-size: var(--step-body); font-weight: 400; cursor: pointer;
}
.choice input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--pine); flex: none; }
.req { color: var(--berry); }
.opt { color: var(--muted); font-weight: 400; }
.field {
  width: 100%; min-height: 3.25rem; padding: 0.75rem 0.9rem; background: #f5f1ef;
  border: 1px solid var(--line); border-radius: 0; transition: border-color 180ms ease;
}
.field:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 1px var(--pine); }
.has-error .field { border-color: var(--error); }
.field-error { margin-top: 0.4rem; font-size: var(--step-small); color: var(--error); }
.form-end { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 0.5rem; }
.form-legal { font-size: var(--step-small); color: var(--muted); }
.form-status { grid-column: 1 / -1; padding: 1rem 1.25rem; border-left: 3px solid var(--pine); background: #f5f1ef; }
.form-status.is-error { border-color: var(--error); }

/* thank you */
.thanks {
  position: relative; overflow: hidden; text-align: center;
  padding: var(--section) var(--margin); background: var(--dark); color: var(--dark-ink);
}
.thanks-lights { display: flex; justify-content: center; gap: clamp(1.25rem, 4vw, 3rem); margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.thanks-lights span {
  width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #f3d58f;
  box-shadow: 0 0 14px 3px rgba(243, 213, 143, 0.55); animation: twinkle 2.4s ease-in-out infinite; animation-delay: var(--d);
}
.thanks-lights span:nth-child(3n) { background: #f0b9a4; box-shadow: 0 0 14px 3px rgba(240, 185, 164, 0.5); }
.thanks-title { font-size: var(--step-display); line-height: 1; letter-spacing: -0.025em; }
.thanks-lead { margin: 1.75rem auto 0; max-width: 44ch; font-size: var(--step-intro); line-height: 1.45; color: var(--dark-muted); }
.thanks-sign { margin-top: 2rem; font-size: var(--step-small); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }

/* footer */
.foot { padding: 1.75rem var(--margin); background: var(--dark); color: var(--dark-muted); font-size: var(--step-small); border-top: 1px solid rgba(235, 229, 227, 0.12); }
.foot p { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }

/* ---------- reveal ---------- */
.js [data-rise], .js [data-reveal] { opacity: 0; transform: translateY(1.25rem); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-rise].is-in, .js [data-reveal].is-in { opacity: 1; transform: none; }

/* tags swing level when pointed at */
.js .wish-tag[data-reveal] { transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out), rotate 700ms cubic-bezier(0.34, 1.56, 0.64, 1); transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0s; }
@media (hover: hover) and (pointer: fine) { .wish-tag:hover { rotate: 0deg; } }

@media (prefers-reduced-motion: reduce) {
  .wish-tag, .wish-tag:hover { rotate: var(--tilt); }
  html { scroll-behavior: auto; }
  .tree-star path, .tree-lights circle, .thanks-lights span { animation: none; }
  .js [data-rise], .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}
