/* Creations calendar — styled after the printed monthly flyer. */
:root {
  color-scheme: light;
  --ink: #2b2b2b;
  --line: #3a3a3a;
  --muted: #6b6b6b;
  --paper: #ffffff;
  --info: #4a5878;

  --orange: #e2632b;
  --purple: #8e2c9e;
  --red: #c8312b;
  --green: #4a7a24;
  --blue: #2b62c4;
  --pink: #d63a7a;
  --teal: #13808a;
  --brown: #8a5a2b;

  --r1: #e23b3b; --r2: #f08a24; --r3: #e0a800; --r4: #4caf3a;
  --r5: #1e9bb8; --r6: #3d5bd9; --r7: #a33bc2;

  --f-display: 'Luckiest Guy', 'Arial Black', sans-serif;
  --f-fun: 'Chewy', 'Comic Sans MS', cursive;
  --f-thin: 'Josefin Sans', 'Century Gothic', sans-serif;
  --f-cond: 'Oswald', 'Arial Narrow', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-thin);
}
img { max-width: 100%; }

.c-orange { --c: var(--orange); }
.c-purple { --c: var(--purple); }
.c-red    { --c: var(--red); }
.c-green  { --c: var(--green); }
.c-blue   { --c: var(--blue); }
.c-pink   { --c: var(--pink); }
.c-teal   { --c: var(--teal); }
.c-brown  { --c: var(--brown); }

.sheet { max-width: 1500px; margin: 0 auto; padding: 12px 16px 16px; container-type: inline-size; }

/* ---------- header ---------- */
.flyer {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 4px 0 8px;
}
.brand { text-align: center; }
.logo { max-height: 150px; }
.rainbow { white-space: nowrap; }
.rainbow > span { display: inline-block; }
.rainbow .r1 { color: var(--r1); } .rainbow .r2 { color: var(--r2); } .rainbow .r3 { color: var(--r3); }
.rainbow .r4 { color: var(--r4); } .rainbow .r5 { color: var(--r5); } .rainbow .r6 { color: var(--r6); }
.rainbow .r7 { color: var(--r7); }
.rainbow > span:nth-child(odd)  { transform: rotate(-4deg) translateY(1px); }
.rainbow > span:nth-child(even) { transform: rotate(3deg) translateY(-2px); }

.brand-word {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 5.2cqi, 4.6rem);
  line-height: 1;
  letter-spacing: .01em;
  text-shadow: 2px 3px 0 rgba(0, 0, 0, .12);
}
.tagline {
  font-family: var(--f-fun);
  color: var(--purple);
  font-size: clamp(.95rem, 1.6cqi, 1.4rem);
  line-height: 1.15;
  margin-top: 4px;
}

.title {
  margin: 0;
  text-align: center;
  font-weight: normal;
  line-height: .9;
}
.headline {
  display: block;
  font-family: var(--f-display);
  color: var(--red);
  text-transform: uppercase;
  font-size: clamp(2.6rem, 7cqi, 6rem);
  transform: rotate(-3deg);
  text-shadow: 3px 4px 0 rgba(0, 0, 0, .1);
}
.month {
  font-family: var(--f-display);
  text-transform: uppercase;
  font-size: clamp(2.2rem, 6cqi, 5.2rem);
  text-shadow: 2px 3px 0 rgba(0, 0, 0, .12);
}
.year {
  display: block;
  font-family: var(--f-thin);
  font-weight: 300;
  color: var(--muted);
  font-size: clamp(.9rem, 1.4cqi, 1.2rem);
  letter-spacing: .3em;
  margin-top: 6px;
}
.info {
  font-family: var(--f-cond);
  color: var(--info);
  text-align: center;
  font-size: clamp(.78rem, 1.15cqi, 1.05rem);
  line-height: 1.45;
}

/* ---------- month navigation ---------- */
.monthnav { display: flex; justify-content: space-between; align-items: center; min-height: 2.4rem; margin: 2px 0 6px; }
.nav-btn {
  font-family: var(--f-fun);
  font-size: 1.15rem;
  color: var(--purple);
  text-decoration: none;
  border: 2px solid currentColor;
  border-radius: 999px;
  padding: .2em .9em;
  transition: background .15s, color .15s;
}
.nav-btn:hover, .nav-btn:focus-visible { background: var(--purple); color: #fff; }

/* ---------- grid ---------- */
.weekdays, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekdays div {
  text-align: center;
  font-family: var(--f-thin);
  font-size: clamp(.95rem, 2.3cqi, 2.2rem);
  letter-spacing: .06em;
  padding: 0 0 6px;
}
.grid { border-top: 1.5px solid var(--line); border-left: 1.5px solid var(--line); }
.day {
  position: relative;
  min-height: clamp(105px, 10.5cqi, 158px);
  padding: 4px 5px 6px;
  border-right: 1.5px solid var(--line);
  border-bottom: 1.5px solid var(--line);
  overflow: hidden;
}
.day-head { float: right; margin: 0 0 2px 4px; line-height: 1; }
.dow { display: none; }
.num {
  font-family: var(--f-thin);
  font-weight: 300;
  font-size: clamp(1.3rem, 2.7cqi, 2.6rem);
  color: var(--ink);
  text-decoration: none;
}

.ev {
  display: block;
  width: 100%;
  margin: 0 0 3px;
  padding: 2px;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--c, var(--orange));
  font: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.ev:hover, .ev:focus-visible { background: color-mix(in srgb, var(--c, var(--orange)) 9%, transparent); outline: none; }
.ev:focus-visible { box-shadow: 0 0 0 2px var(--c, var(--orange)); }
.ev-text { display: block; }
.ev-title, .ev-time, .ev-price, .ev-sub { display: block; }
.ev-title { font-family: var(--f-fun); font-size: clamp(.92rem, 1.7cqi, 1.55rem); line-height: 1.05; }
.ev-time  { font-family: var(--f-fun); font-size: clamp(.85rem, 1.55cqi, 1.45rem); line-height: 1.1; }
.ev-price { font-family: var(--f-fun); font-size: clamp(1rem, 1.9cqi, 1.75rem); line-height: 1; }
.ev-sub   { font-family: var(--f-cond); font-weight: 500; color: #3b2f5c; font-size: clamp(.72rem, 1.1cqi, 1.02rem); line-height: 1.15; }
.ev.has-img { display: flex; align-items: center; gap: 4px; }
.ev.has-img .ev-text { flex: 1; min-width: 0; }
.ev-img { flex: 0 0 auto; max-width: 46%; max-height: clamp(54px, 7cqi, 105px); object-fit: contain; border-radius: 3px; }
.day.busy .ev-title { font-size: clamp(.85rem, 1.4cqi, 1.25rem); }
.day.busy .ev-time  { font-size: clamp(.8rem, 1.3cqi, 1.15rem); }
.day.busy .ev-img   { max-height: clamp(40px, 4.5cqi, 70px); }

.none, .hint { text-align: center; color: var(--muted); font-family: var(--f-fun); font-size: 1.1rem; }
.hint { font-size: .95rem; margin: 10px 0 0; }

/* ---------- details popover ---------- */
#pop-backdrop { position: fixed; inset: 0; background: rgba(30, 20, 40, .35); z-index: 10; }
#pop {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  width: min(440px, calc(100vw - 24px));
  background: #fff;
  border-radius: 14px;
  border-top: 7px solid var(--c, var(--orange));
  box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
  padding: 18px 20px 20px;
  font-family: var(--f-thin);
}
#pop[hidden], #pop-backdrop[hidden], #pop [hidden] { display: none; }
#pop h2 { font-family: var(--f-fun); font-weight: normal; color: var(--c, var(--orange)); font-size: 1.9rem; line-height: 1.05; margin: 0 28px 4px 0; }
.pop-close {
  position: absolute; top: 6px; right: 8px;
  width: 36px; height: 36px; border: 0; background: none;
  font-size: 1.8rem; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 50%;
}
.pop-close:hover { background: #f1eef3; }
.pop-img { display: block; width: 100%; max-height: 260px; object-fit: contain; margin: 0 0 10px; border-radius: 8px; }
.pop-date { font-weight: 600; font-size: 1.05rem; margin: 0 0 2px; }
.pop-meta { font-family: var(--f-cond); color: #3b2f5c; font-size: 1.05rem; margin: 0 0 10px; }
.pop-details { white-space: pre-line; line-height: 1.45; margin: 0 0 10px; }
.pop-details:empty, .pop-meta:empty, .pop-repeats:empty { display: none; }
.pop-repeats { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.pop-link {
  display: inline-block; background: var(--c, var(--orange)); color: #fff; text-decoration: none;
  font-family: var(--f-fun); font-size: 1.15rem; padding: .35em 1em; border-radius: 999px;
}

/* ---------- phones: agenda list ---------- */
@media (max-width: 640px) {
  .sheet { padding: 8px 12px 12px; }
  .flyer { grid-template-columns: 1fr; gap: 6px; }
  .brand { order: 1; }
  .title { order: 2; }
  .info { order: 3; font-size: .82rem; }
  .logo { max-height: 90px; }

  .weekdays { display: none; }
  .grid { display: block; border: 0; }
  .day.blank, .day.empty { display: none; }
  .day {
    display: flex;
    gap: 10px;
    min-height: 0;
    padding: 10px 2px;
    border: 0;
    border-bottom: 1.5px solid #d9d4dc;
    overflow: visible;
  }
  .grid .day:not(.empty):not(.blank) ~ .day { border-top: 0; }
  .day-head {
    float: none;
    flex: 0 0 3.4rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2px;
  }
  .dow { display: block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .num { font-size: 2rem; }
  .evs { flex: 1; min-width: 0; }
  .ev { text-align: left; padding: 4px 6px; margin-bottom: 4px; }
  .ev-title { font-size: 1.3rem; }
  .ev-time { font-size: 1.15rem; }
  .ev-price { font-size: 1.3rem; }
  .ev-sub { font-size: .95rem; }
  .ev.has-img { flex-direction: row-reverse; justify-content: space-between; gap: 10px; }
  .ev-img { max-width: 34%; max-height: 80px; }
  .day.busy .ev-title { font-size: 1.2rem; }
  .day.busy .ev-time { font-size: 1.05rem; }
  .day.busy .ev-img { max-height: 64px; }
}

/* ---------- print (handy for a paper flyer) ---------- */
@media print {
  @page { size: letter landscape; margin: .3in; }
  .monthnav, .hint, #pop, #pop-backdrop { display: none !important; }
  .sheet { padding: 0; max-width: none; }
  .day { min-height: 1.15in; break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
