/* Medina County Art League
 *
 * Palette is MCAL's own, lifted from the Wix theme: primary red/blue/yellow
 * (fitting for an art league) over a near-black navy. Those three are loud, so
 * they are used as accents and never as large fields -- the page is a neutral
 * ground and the artwork supplies the colour.
 *
 * Deliberately light-only. A dark theme would invert the surround on every
 * photograph of a painting, and artwork should be judged against a consistent
 * neutral ground.
 */

:root {
  --red:    #ed1c24;
  --blue:   #0088cb;
  --yellow: #ffcb05;

  --ink:      #1c2331;   /* navy-black; softer than #000 under serif text */
  --ink-2:    #4a5568;
  --ink-3:    #79839a;
  --page:     #ffffff;
  --surface:  #f7f7f5;
  --line:     #e4e4df;

  --serif: "Noticia Text", Georgia, "Times New Roman", serif;
  --sans:  "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --measure: 68ch;       /* readable line length for article prose */
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

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

a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--red); }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---- header ---------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--page);
  position: sticky; top: 0; z-index: 20;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px;
}
.site-logo img { width: 232px; height: auto; }

.site-nav ul {
  list-style: none; display: flex; gap: 28px; margin: 0; padding: 0;
  flex-wrap: wrap;
}
.site-nav a {
  font-weight: 600; font-size: .88rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  padding-bottom: 3px; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--red); border-bottom-color: var(--red); }

/* ---- typography ------------------------------------------------------ */

h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin-top: 1.6em; }
h3 { font-size: 1.28rem; margin-top: 1.5em; }
h4 { font-size: 1.1rem; margin-top: 1.4em; }

.eyebrow {
  font-family: var(--sans); font-size: .76rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
  margin: 0 0 10px;
}

time { color: var(--ink-3); font-size: .88rem; }

/* ---- blog index ------------------------------------------------------ */

.page-head { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.page-head .intro {
  font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; margin: 0;
}

.post-list {
  list-style: none; margin: 0; padding: 48px 0 72px;
  display: grid; gap: 40px 32px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.post-card__media {
  display: block; aspect-ratio: 3 / 2; overflow: hidden;
  background: var(--surface); border-radius: var(--radius); margin-bottom: 14px;
}
.post-card__media img { width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease; }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card h2 { font-size: 1.22rem; margin: 0 0 6px; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--red); }
.post-card p { color: var(--ink-2); font-size: .94rem; margin: 8px 0 0; }

/* ---- article --------------------------------------------------------- */

.post { padding: 48px 0 80px; }
.post__header { max-width: var(--measure); margin: 0 auto 32px; }
.post__hero { margin: 0 0 40px; }
.post__hero img { width: 100%; border-radius: var(--radius); }

.post__body { max-width: var(--measure); margin: 0 auto; }
.post__body > * { margin-top: 0; margin-bottom: 1.15em; }
.post__body p { font-size: 1.06rem; }
.post__body ul, .post__body ol { padding-left: 1.3em; }
.post__body li { margin-bottom: .4em; }

/* Images and galleries break out past the text measure -- the artwork is the
 * point of this site, so it gets more room than the prose.
 *
 * These target Wagtail's own per-block wrapper (`.block-<name>`) as direct
 * children. Matching descendants instead applied the transform twice, once on
 * the wrapper and once on the figure inside it, shifting every image off
 * centre by half its width. */
.post__body > .block-image,
.post__body > .block-gallery {
  max-width: none;
  width: min(100%, var(--wrap));
  margin-left: 50%;
  transform: translateX(-50%);
}
.post__body > .block-image figure { margin: 0; }
.post__body > .block-image img { width: 100%; border-radius: var(--radius); }

.gallery {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  margin-top: 1.6em; margin-bottom: 1.6em;
}
.gallery img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); background: var(--surface);
}

.post__body table {
  width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1.6em 0;
}
.post__body th, .post__body td {
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.post__body th, .post__body td:first-child {
  font-weight: 600; color: var(--ink); width: 34%;
}

.button {
  display: inline-block; background: var(--red); color: #fff;
  font-weight: 600; font-size: .92rem; letter-spacing: .02em;
  padding: 11px 26px; border-radius: var(--radius); text-decoration: none;
}
.button:hover { background: var(--ink); color: #fff; }

.categories { display: flex; gap: 8px; flex-wrap: wrap; padding: 0; margin: 14px 0 0; }
.categories span {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line);
  padding: 4px 11px; border-radius: 999px;
}

.post__footer {
  max-width: var(--measure); margin: 56px auto 0;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.post__footer a { font-weight: 600; text-decoration: none; }

/* ---- footer ---------------------------------------------------------- */

.site-footer {
  margin-top: 80px; padding: 40px 0;
  border-top: 3px solid var(--yellow); background: var(--surface);
}
.site-footer__name {
  font-family: var(--serif); font-weight: 700; font-size: 1.05rem; margin: 0 0 4px;
}
.site-footer__meta { color: var(--ink-3); font-size: .88rem; margin: 0; }

/* ---- narrow ---------------------------------------------------------- */

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header { position: static; }
  .site-header__inner { justify-content: center; text-align: center; }
  .site-nav ul { gap: 16px; justify-content: center; }
  .post__body > .block-image, .post__body > .block-gallery {
    width: 100%; margin-left: 0; transform: none;
  }
}

/* ---- home ------------------------------------------------------------ */

.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--surface), var(--page));
}
.hero h1 { max-width: 16ch; margin-bottom: .3em; }
.hero__text { font-size: 1.16rem; color: var(--ink-2); max-width: 58ch; }
.hero__text p { margin: 0; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin: 56px 0 0; padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}
.section-head h2 { margin: 0; }
.section-head a {
  font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap;
}
.template-homepage .post-list { padding-top: 36px; }

/* ---- utility bar ----------------------------------------------------- */

.utility-bar {
  background: var(--ink); color: #fff; font-size: .82rem;
}
.utility-bar__inner {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 22px; padding-top: 7px; padding-bottom: 7px;
}
.utility-bar nav { display: flex; gap: 20px; }
.utility-bar a { color: #d8dbe2; text-decoration: none; }
.utility-bar a:hover { color: #fff; }
.utility-bar__cta {
  background: var(--red); color: #fff !important;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  font-size: .74rem; padding: 5px 14px; border-radius: var(--radius);
}
.utility-bar__cta:hover { background: var(--yellow); color: var(--ink) !important; }

/* ---- main menu ------------------------------------------------------- */

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 10px; margin: -10px;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block; width: 24px; height: 2px; background: var(--ink);
  content: ""; position: relative;
}
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after  { top: 5px; }

.menu { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.menu__item { position: relative; }
.menu__item > a {
  display: block; font-weight: 600; font-size: .86rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.menu__item > a:hover { color: var(--red); border-bottom-color: var(--red); }

/* A caret only where there is actually something to open. */
.menu__item--has-children > a::after {
  content: ""; display: inline-block; margin-left: 7px;
  border: 4px solid transparent; border-top-color: currentColor;
  transform: translateY(2px);
}

.menu__sub {
  list-style: none; margin: 0; padding: 8px 0;
  position: absolute; top: 100%; left: -14px; min-width: 216px; z-index: 30;
  background: var(--page); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(28, 35, 49, .1);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.menu__item:hover > .menu__sub,
.menu__item:focus-within > .menu__sub {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.menu__sub a {
  display: block; padding: 7px 18px; font-size: .9rem;
  color: var(--ink-2); text-decoration: none;
}
.menu__sub a:hover { background: var(--surface); color: var(--red); }

/* ---- events ---------------------------------------------------------- */

.schedule-note {
  margin: 40px 0 8px; padding: 20px 24px;
  background: var(--surface); border-left: 3px solid var(--blue);
  border-radius: var(--radius); color: var(--ink-2);
}
.schedule-note p { margin: 0; }

.event-list { list-style: none; margin: 0; padding: 28px 0 40px; }
.event-row {
  display: grid; grid-template-columns: 76px 1fr auto;
  gap: 24px; align-items: start;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.event-row__date {
  text-align: center; border: 1px solid var(--line);
  border-top: 3px solid var(--red); border-radius: var(--radius);
  padding: 8px 4px 10px; line-height: 1.1;
}
.event-row__mon {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--red);
}
.event-row__day {
  display: block; font-family: var(--serif); font-size: 1.7rem; font-weight: 700;
}
.event-row__yr { display: block; font-size: .7rem; color: var(--ink-3); }

.event-row__kind {
  margin: 0 0 4px; font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
.event-row h3 { margin: 0 0 6px; font-size: 1.22rem; }
.event-row h3 a { color: var(--ink); text-decoration: none; }
.event-row h3 a:hover { color: var(--red); }
.event-row__meta {
  margin: 0 0 8px; font-size: .9rem; color: var(--ink-2);
  display: flex; gap: 14px; flex-wrap: wrap;
}
.event-row__where::before { content: "·"; margin-right: 14px; color: var(--ink-3); }
.event-row__body p:last-child { margin: 0; color: var(--ink-2); font-size: .95rem; }
.event-row__media img { width: 190px; border-radius: var(--radius); }

.event-list--past .event-row__date {
  border-top-color: var(--ink-3); opacity: .75;
}
.event-list--past .event-row__mon { color: var(--ink-3); }

.empty { color: var(--ink-3); padding: 24px 0 8px; }

.event-facts {
  display: flex; gap: 40px; flex-wrap: wrap; margin: 20px 0 0;
  padding: 18px 0 0; border-top: 1px solid var(--line);
}
.event-facts dt {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px;
}
.event-facts dd { margin: 0; font-weight: 600; }
.event-facts .muted { font-weight: 400; color: var(--ink-2); font-size: .92rem; }

.lede { font-size: 1.14rem; color: var(--ink-2); }

/* ---- footer nav ------------------------------------------------------ */

.site-footer__inner {
  display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.site-footer__nav ul {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap;
}
.site-footer__nav a {
  color: var(--ink-2); text-decoration: none; font-size: .88rem; font-weight: 600;
}
.site-footer__nav a:hover { color: var(--red); }

/* ---- narrow ---------------------------------------------------------- */

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-header__inner { flex-wrap: nowrap; }
  .site-nav {
    display: none; flex-basis: 100%; order: 3; padding: 8px 0 4px;
  }
  .site-nav.is-open { display: block; }
  .menu { flex-direction: column; gap: 0; }
  .menu__item > a { padding: 11px 0; border-bottom: 1px solid var(--line); }
  .menu__item--has-children > a::after { display: none; }
  /* Dropdowns cannot be hovered on touch, so submenus are simply always
     visible once the menu is open. */
  .menu__sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    border: 0; box-shadow: none; padding: 2px 0 8px 16px; min-width: 0;
  }
  .menu__sub a { padding: 6px 0; }

  .event-row { grid-template-columns: 62px 1fr; }
  .event-row__media { display: none; }
}

/* ---- contact form ---------------------------------------------------- */

.cform { max-width: 40rem; margin: 40px 0 72px; }
.cform__row { margin-bottom: 20px; }
.cform label {
  display: block; font-size: .82rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px;
}
.cform .req { color: var(--red); }

.cform input[type="text"], .cform input[type="email"], .cform input[type="url"],
.cform input[type="number"], .cform input[type="date"], .cform input[type="datetime-local"],
.cform textarea, .cform select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--page); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 11px 13px;
}
.cform textarea { min-height: 170px; resize: vertical; }
.cform input:focus, .cform textarea:focus, .cform select:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 136, 203, .15);
}
.cform input[type="checkbox"], .cform input[type="radio"] { margin-right: 8px; }

.cform__help { margin: 5px 0 0; font-size: .85rem; color: var(--ink-3); }
.cform__error { margin: 5px 0 0; font-size: .85rem; color: var(--red); font-weight: 600; }
.cform__row--error input, .cform__row--error textarea, .cform__row--error select {
  border-color: var(--red);
}
.cform__errors {
  margin-bottom: 20px; padding: 12px 16px; border-radius: var(--radius);
  background: #fdecec; border: 1px solid var(--red); color: var(--ink);
}
.cform button { border: 0; cursor: pointer; font-family: inherit; }

/* Honeypot. Kept out of the layout without display:none or hidden, both of
   which bots skip -- it has to look like a real field to a script and be
   unreachable for a person, including via keyboard and screen reader. */
.hp-wrap {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}
