/*
Theme Name: HMA Redesign
Theme URI: https://hopkintonmusic.com/
Author: Hopkinton Music Association
Description: Accessible redesign prototype theme for Hopkinton Music Association.
Version: 0.1.0
Text Domain: hma-redesign
*/

:root {
  --ink: #10213d;
  --muted: #56627a;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --line: #d9d2c8;
  --burgundy: #8f1027;
  --brass: #c79642;
  --shadow: 0 24px 70px rgba(16, 33, 61, 0.14);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.skip-link {
  background: var(--ink);
  color: white;
  left: 1rem;
  padding: 0.75rem 1rem;
  position: absolute;
  top: -5rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  background: rgba(251, 250, 247, 0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner,
.section-wrap,
.events,
.editor-preview,
.donate-band,
.photos,
.drive-section,
.site-footer {
  margin: 0 auto;
  max-width: 1180px;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.header-inner {
  align-items: center;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: auto 1fr auto;
  min-height: 76px;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0.8rem;
  min-width: 0;
  text-decoration: none;
}

.brand .custom-logo-link {
  display: inline-flex;
  flex: 0 0 auto;
  height: 58px !important;
  max-height: 58px !important;
  max-width: 130px !important;
  overflow: hidden;
  width: 130px !important;
}

.custom-logo,
.site-logo,
.brand img {
  display: block;
  height: auto !important;
  max-height: 58px !important;
  max-width: 130px !important;
  object-fit: contain;
  width: auto !important;
}

.brand-mark {
  align-items: center;
  background: var(--burgundy);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 800;
  height: 46px;
  justify-content: center;
  letter-spacing: 0.04em;
  width: 46px;
}

.brand strong,
.brand span span {
  display: block;
}

.brand strong {
  font-size: 1.25rem;
  line-height: 1.1;
}

.brand span span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.1;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 1.35rem;
  justify-content: flex-end;
}

.site-nav li {
  list-style: none;
}

.site-nav a,
.text-link {
  font-weight: 700;
  text-decoration-color: rgba(143, 16, 39, 0.35);
  text-underline-offset: 0.25em;
}

.site-nav a {
  font-size: 0.98rem;
  text-decoration: none;
}

.button,
.header-cta {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 52px;
  padding: 0.82rem 1.3rem;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}

.button-primary,
.header-cta {
  background: var(--burgundy);
  color: white;
}

.button-secondary {
  background: white;
  border-color: rgba(16, 33, 61, 0.22);
  color: var(--ink);
}

.button:hover,
.header-cta:hover,
.event-item:hover,
.photo-grid article:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: none;
  font: inherit;
  font-weight: 800;
  min-height: 48px;
  padding: 0.5rem 0.9rem;
}

.hero {
  display: grid;
  min-height: min(760px, calc(100dvh - 76px));
  overflow: hidden;
  place-items: center;
  position: relative;
}

.hero-image,
.hero-scrim {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-scrim {
  background: linear-gradient(90deg, rgba(5, 14, 30, 0.9) 0%, rgba(5, 14, 30, 0.66) 40%, rgba(5, 14, 30, 0.12) 100%);
}

.hero-content {
  margin: 0 auto;
  max-width: 1180px;
  padding: 6rem 1.25rem;
  position: relative;
  width: 100%;
}

.hero h1 {
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 6vw, 5.1rem);
  line-height: 0.98;
  margin: 0;
  max-width: 900px;
}

.hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  margin: 1.5rem 0 0;
  max-width: 650px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.content-hero {
  background: var(--ink);
  color: white;
  padding: 5rem 0;
}

.content-hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 1;
  margin: 0;
  max-width: 900px;
}

.content-hero p {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin: 1.1rem 0 0;
  max-width: 760px;
}

.quick-actions {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: -3.2rem;
  position: relative;
  z-index: 2;
}

.quick-actions a {
  background: white;
  border: 1px solid var(--line);
  min-height: 146px;
  padding: 1.5rem;
  text-decoration: none;
}

.quick-actions strong,
.quick-actions span {
  display: block;
}

.quick-actions span,
.section-heading p,
.mission p,
.editor-copy p,
.drive-section p,
.donate-band p {
  color: var(--muted);
  margin-top: 0.35rem;
}

.section-grid,
.editor-preview,
.drive-section,
.content-grid,
.marathon-layout {
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.mission,
.events,
.editor-preview,
.donate-band,
.photos,
.drive-section,
.content-grid,
.marathon-layout,
.people-grid {
  padding-bottom: 5rem;
  padding-top: 5rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.mission-card,
.drive-card,
.admin-panel,
.photo-grid article,
.content-card,
.person-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mission-card,
.drive-card,
.content-card,
.person-card {
  box-shadow: var(--shadow);
  padding: 2rem;
}

.content-card h1,
.content-card h2,
.person-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
}

.content-card h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.content-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin-top: 0;
}

.content-card p,
.content-card li,
.person-card p {
  color: var(--muted);
  font-size: 1.08rem;
}

.content-card a:not(.button),
.person-card a {
  color: var(--burgundy);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.content-card ul {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
  padding-left: 1.25rem;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.accent-card {
  background: linear-gradient(160deg, #ffffff 0%, #f1f6f2 100%);
}

.runner-photo {
  margin-bottom: 1.5rem;
}

.runner-photo img {
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.runner-quote {
  border-left: 5px solid var(--burgundy);
  color: var(--ink) !important;
  font-size: 1.25rem !important;
  font-weight: 800;
  margin: 1rem 0 1.5rem;
  padding-left: 1rem;
}

.marathon-admin-list {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

.marathon-admin-list span {
  color: var(--muted);
  display: block;
}

.people-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 0;
}

.gallery-link-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: 5rem;
  padding-top: 0;
}

.gallery-link-card {
  display: grid;
  gap: 1rem;
}

.gallery-link-card .button {
  justify-self: start;
}

.person-card h2 {
  color: var(--ink);
  font-size: 1.35rem;
  margin-bottom: 0.45rem;
}

.person-card p {
  margin-bottom: 0.5rem;
}

.mission-card strong,
.drive-card strong {
  color: var(--burgundy);
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.event-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.event-item {
  align-items: center;
  background: white;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 118px 1fr auto;
  padding: 1.35rem;
}

.event-item + .event-item {
  border-top: 1px solid var(--line);
}

.event-item time {
  border-right: 1px solid var(--line);
  color: var(--burgundy);
  display: grid;
  justify-items: center;
  padding-right: 1.2rem;
  text-transform: uppercase;
}

.event-item time strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.1rem;
  line-height: 0.95;
}

.event-item p {
  color: var(--muted);
  margin-bottom: 0;
}

.event-item a {
  border: 1px solid rgba(16, 33, 61, 0.24);
  border-radius: 8px;
  font-weight: 800;
  padding: 0.65rem 0.95rem;
  text-decoration: none;
}

.editor-preview {
  align-items: center;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  max-width: none;
  padding-left: max(1.25rem, calc((100vw - 1180px) / 2));
  padding-right: max(1.25rem, calc((100vw - 1180px) / 2));
}

.editor-copy img {
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  object-fit: cover;
}

.admin-panel {
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-top {
  align-items: center;
  background: var(--ink);
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.admin-list {
  display: grid;
  gap: 1px;
}

.admin-list div {
  background: white;
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
}

.admin-list span {
  color: var(--muted);
}

.donate-band {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: white;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 5rem;
  margin-top: 5rem;
  padding-bottom: 2.4rem;
  padding-top: 2.4rem;
}

.donate-band p {
  color: rgba(255, 255, 255, 0.82);
}

.donate-actions {
  display: grid;
  gap: 0.9rem;
  justify-items: start;
  min-width: max-content;
}

.donate-band .text-link {
  color: white;
}

.photo-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr 1fr 0.85fr;
}

.photo-grid article {
  min-height: 100%;
  overflow: hidden;
}

.photo-grid img {
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.photo-grid h3,
.photo-grid p,
.photo-grid .text-link {
  margin: 1.1rem;
}

.drive-section {
  align-items: start;
  padding-top: 0;
}

.drive-card ul {
  color: var(--muted);
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.site-footer {
  background: #0c1b33;
  color: white;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.2fr 1fr 1fr;
  max-width: none;
  padding-bottom: 3rem;
  padding-left: max(1.25rem, calc((100vw - 1180px) / 2));
  padding-right: max(1.25rem, calc((100vw - 1180px) / 2));
  padding-top: 3rem;
}

.footer-brand .brand-mark {
  background: white;
  color: var(--burgundy);
}

.footer-brand .custom-logo,
.footer-brand .site-logo,
.footer-brand img {
  background: white;
  border-radius: 8px;
  max-height: 72px !important;
  max-width: 150px !important;
  padding: 0.25rem;
}

.footer-brand span span,
.site-footer p {
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a {
  color: white;
  font-weight: 700;
}

.site-footer h2 {
  font-family: inherit;
  font-size: 1.2rem;
}

.page-template-template-hma-home .entry-content,
.home .entry-content {
  display: contents;
}

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(199, 150, 66, 0.8);
  outline-offset: 3px;
}

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

@media (max-width: 920px) {
  .header-inner {
    grid-template-columns: auto auto;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .site-nav,
  .header-cta {
    display: none;
  }

  .site-nav.is-open {
    background: white;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 0;
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .site-nav.is-open a {
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
  }

  .quick-actions,
  .section-grid,
  .editor-preview,
  .drive-section,
  .site-footer,
  .photo-grid,
  .content-grid,
  .marathon-layout,
  .people-grid,
  .gallery-link-grid {
    grid-template-columns: 1fr;
  }

  .event-item {
    align-items: start;
    grid-template-columns: 92px 1fr;
  }

  .event-item a {
    grid-column: 2;
    justify-self: start;
  }

  .donate-band {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 17px;
  }

  .hero {
    min-height: 680px;
  }

  .hero-content {
    align-self: end;
    padding-bottom: 4rem;
    padding-top: 4rem;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 12vw, 4.2rem);
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button,
  .header-cta {
    width: 100%;
  }

  .quick-actions {
    margin-top: 0;
    padding-top: 1.25rem;
  }

  .event-item {
    grid-template-columns: 1fr;
  }

  .event-item time {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    justify-items: start;
    padding-bottom: 0.85rem;
    padding-right: 0;
    width: 100%;
  }

  .event-item a {
    grid-column: 1;
  }
}
