/* Auntie Claus Christmas Wish List
   Ground is cold snow, wishes are white gift tags, the masthead is spruce
   with a candy-cane edge. Atkinson Hyperlegible for reading (grandparents
   and small screens), Young Serif for names and headings. */

:root {
  --snow: #eef2f4;
  --paper: #ffffff;
  --ink: #1b2a3d;
  --ink-soft: #55647a;
  --frost: #cfd9e0;
  --spruce: #1e5a46;
  --spruce-deep: #153f32;
  --cranberry: #a61e36;
  --cranberry-deep: #7f1529;
  --foil: #8a6417;
  --measure: 40rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font: 400 1.0625rem/1.55 "Atkinson Hyperlegible", system-ui, sans-serif;
}

h1, h2, h3, .wordmark-name, .person-name {
  font-family: "Young Serif", Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 6vw, 2.75rem); margin: 0 0 .5rem; }
h2 { font-size: 1.5rem; margin: 2.75rem 0 .875rem; }
h3 { font-size: 1.1875rem; margin: 0 0 .25rem; }
p { margin: 0 0 1rem; }
a { color: var(--cranberry); }
small { color: var(--ink-soft); font-size: .9375rem; }

.lede { color: var(--ink-soft); font-size: 1.125rem; max-width: 34rem; }
.hint { color: var(--ink-soft); font-size: .9375rem; margin: .375rem 0 .75rem; }
.empty { color: var(--ink-soft); font-style: italic; }
.loading { padding: 4rem 1.25rem; text-align: center; color: var(--ink-soft); }

:focus-visible { outline: 3px solid var(--foil); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  background: var(--spruce);
  color: #fff;
  /* The candy-cane edge: the one loud thing on the page. */
  border-bottom: 10px solid transparent;
  border-image: repeating-linear-gradient(135deg, var(--cranberry) 0 12px, #fff 12px 24px) 10;
}

.masthead-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.125rem 1.25rem 0;
}

.wordmark { color: inherit; text-decoration: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: .125rem .75rem; }
.wordmark-name { font-size: 1.75rem; }
.wordmark-sub { font-size: .9375rem; opacity: .85; }

nav { display: flex; gap: .25rem; margin-top: .875rem; overflow-x: auto; }
nav a {
  color: #fff; text-decoration: none; white-space: nowrap;
  padding: .5rem .875rem; border-radius: 6px 6px 0 0;
}
nav a:hover { background: var(--spruce-deep); }
nav a.current { background: var(--snow); color: var(--ink); font-weight: 700; }

main { max-width: var(--measure); margin: 0 auto; padding: 2rem 1.25rem 3rem; }

footer {
  max-width: var(--measure); margin: 0 auto; padding: 1.25rem;
  border-top: 1px solid var(--frost); color: var(--ink-soft); font-size: .9375rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}

/* ------------------------------------------------------------ sign-in door */

.door {
  max-width: 27rem;
  padding-top: clamp(2.5rem, 12vh, 6rem);
}
.door h1 { font-size: clamp(2.75rem, 12vw, 4rem); color: var(--spruce); }
.door h1 span {
  display: block; font-size: 1.25rem; color: var(--cranberry);
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif; font-weight: 700; margin-top: .375rem;
}
.door-form { margin-top: 1.75rem; }
.door-form .btn { margin-top: .875rem; width: 100%; }

/* ------------------------------------------------------------------- forms */

label, legend { display: block; font-weight: 700; margin: 1rem 0 .3125rem; padding: 0; }

input[type=text], input[type=email], textarea {
  width: 100%;
  font: inherit; color: inherit;
  background: var(--paper);
  border: 1.5px solid var(--frost);
  border-radius: 6px;
  padding: .625rem .75rem;
}
input[type=text]:hover, input[type=email]:hover, textarea:hover { border-color: var(--ink-soft); }
textarea { resize: vertical; }
::placeholder { color: #7b8899; opacity: 1; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.check { display: flex; align-items: flex-start; gap: .5rem; font-weight: 400; margin: .375rem 0; cursor: pointer; }
.check input { width: 1.1875rem; height: 1.1875rem; margin: .1875rem 0 0; accent-color: var(--spruce); flex: none; }

.picks {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0 1rem;
  margin: .25rem 0 0; padding: .5rem .875rem; background: var(--snow); border-radius: 6px;
}

.share { margin-top: .25rem; }
.share label[for] { margin-top: .75rem; }
.row.tight { margin-top: 0; flex-wrap: nowrap; }
.row.tight input { flex: 1; min-width: 0; }

.card {
  background: var(--paper);
  border-radius: 8px;
  padding: 1.25rem 1.375rem 1.375rem;
  margin: 1.5rem 0 0;
  box-shadow: 0 1px 0 var(--frost);
  scroll-margin-top: 1rem;
}
.card > h2, .card > h3 { margin: 0; font-size: 1.3125rem; }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1rem; }
fieldset > .row:first-of-type { margin-top: .25rem; }

/* ----------------------------------------------------------------- buttons */

.btn {
  font: inherit; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--ink); border-radius: 6px;
  background: var(--paper); color: var(--ink);
  padding: .5625rem 1rem; text-decoration: none; display: inline-block;
}
.btn:hover { background: var(--snow); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--cranberry); border-color: var(--cranberry); color: #fff; }
.btn.primary:hover { background: var(--cranberry-deep); border-color: var(--cranberry-deep); }
.btn.quiet { border-color: var(--frost); font-weight: 400; padding: .375rem .75rem; }
.btn.quiet:hover { border-color: var(--ink-soft); }
.btn.armed { background: var(--cranberry); border-color: var(--cranberry); color: #fff; font-weight: 700; }
.btn.chip { border-radius: 99px; border-color: var(--frost); font-weight: 400; padding: .3125rem .875rem; }
.btn.chip.on { background: var(--spruce); border-color: var(--spruce); color: #fff; font-weight: 700; }
.btn.link { border: 0; background: none; padding: 0; color: var(--cranberry); text-decoration: underline; font-weight: 400; }

.switcher { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }

/* ----------------------------------------------------------------- notices */

.notice {
  background: #e3efe9; border-left: 4px solid var(--spruce);
  padding: .75rem 1rem; border-radius: 0 6px 6px 0; margin: 0 0 1.5rem;
}
.notice.bad { background: #f8e7ea; border-left-color: var(--cranberry); }
form .notice { margin: 1rem 0 0; }

/* --------------------------------------------------------------- gift tags */

.tags { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }

.tag {
  position: relative;
  background: var(--paper);
  padding: 1rem 1.25rem 1rem 3.25rem;
  /* Clipped corners on the string end, like a luggage-style gift tag. */
  clip-path: polygon(1.125rem 0, 100% 0, 100% 100%, 1.125rem 100%, 0 calc(100% - 1.125rem), 0 1.125rem);
}
/* The punched hole. */
.tag::before {
  content: ""; position: absolute; left: 1.125rem; top: 50%;
  width: .875rem; height: .875rem; margin-top: -.4375rem; border-radius: 50%;
  background: var(--snow); box-shadow: inset 0 0 0 2px var(--foil);
}
.tag h3 { overflow-wrap: anywhere; }
.tag-link { display: inline-block; margin-bottom: .25rem; overflow-wrap: anywhere; }
.tag-notes { margin: .125rem 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.tag-meta { margin: .375rem 0 0; color: var(--ink-soft); font-size: .9375rem; }
.tag-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }

.tag.bought h3 { color: var(--ink-soft); }
.stamp {
  color: var(--spruce); font-weight: 700; font-size: .9375rem;
  border: 1.5px solid var(--spruce); border-radius: 4px; padding: .1875rem .5rem;
  transform: rotate(-1.5deg);
}

.tags.faded .tag { opacity: .75; }

details.past { margin-top: 2rem; }
details.past summary { cursor: pointer; color: var(--ink-soft); padding: .5rem 0; }
details.past .tags { margin-top: .5rem; }

/* ------------------------------------------------------------ family lists */

details.person { border-top: 1px solid var(--frost); }
details.person:last-of-type { border-bottom: 1px solid var(--frost); }
details.person summary {
  cursor: pointer; padding: 1rem 0;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem;
}
.person-name { font-size: 1.5rem; }
.person-count { color: var(--ink-soft); font-size: .9375rem; }
details.person[open] summary .person-name { color: var(--spruce); }
details.person .tags { padding-bottom: 1.25rem; }

/* ------------------------------------------------------------ Santa's desk */

.members, .log { list-style: none; margin: 0; padding: 0; }
.member {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  padding: .875rem 0; border-top: 1px solid var(--frost);
}
.member .row { margin-top: 0; }
.member-main { display: flex; flex-direction: column; min-width: 0; }
.member-detail { color: var(--ink-soft); font-size: .9375rem; overflow-wrap: anywhere; }
.badge {
  font: 700 .8125rem "Atkinson Hyperlegible", system-ui, sans-serif;
  background: var(--cranberry); color: #fff; border-radius: 99px; padding: .0625rem .5rem; margin-left: .5rem;
  vertical-align: middle;
}
.log li { padding: .625rem 0; border-top: 1px solid var(--frost); display: flex; flex-direction: column; }
.log span { color: var(--ink-soft); font-size: .9375rem; }

@media (prefers-reduced-motion: no-preference) {
  .btn, nav a, input, textarea { transition: background-color .12s, border-color .12s; }
}
