
:root {
  --pink: #ef78ba;
  --teal: #10cdb4;
  --yellow: #ffc21c;
  --black: #050505;
  --cream: #fffdfc;
  --text: #252525;
  --muted: #555555;
  --border: #e6e6e6;

  --heading-font: "Lora", Georgia, serif;
  --body-font: "Nunito Sans", Arial, sans-serif;
}

/* Reset and base styles */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 5px;
  border-radius: 4px;
}

.page {
  width: min(100% - 48px, 1000px);
  margin-inline: auto;
  padding: 40px 0;
}

/* Header and logo */

.site-header {
  text-align: center;
}

.logo {
  display: block;
  width: min(360px, 75vw);
  height: auto;
  margin: 0 auto 48px;
}

/* Introduction */

.hero,
.section-heading {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 8px 16px;
  border-radius: 50px;
  background: var(--yellow);
  color: var(--black);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  color: var(--black);
  font-family: var(--heading-font);
  font-weight: 700;
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1.08;
}

.hero-intro {
  max-width: 650px;
  margin: 0 auto;
  font-size: 19px;
  line-height: 1.65;
}

.hero-supporting {
  max-width: 620px;
  margin: 20px auto 0;
}

.accent {
  width: 70px;
  height: 7px;
  margin: 36px auto 60px;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    var(--pink) 0 33%,
    var(--teal) 33% 66%,
    var(--yellow) 66% 100%
  );
}

/* Upcoming events section */

.events-section {
  padding: 48px 0;
  background: transparent;
}

.section-heading h2,
.map-card h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.5vw, 42px);
  line-height: 1.15;
}

.section-heading > p:last-child {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

.events-intro {
  margin-top: 36px;
  text-align: center;
}

.events-intro h3 {
  margin: 0 0 6px;
  font-size: 26px;
}

.events-intro p {
  margin: 0;
}

/* Event list */

.events-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 800px;
  margin: 28px auto 0;
}

/* Individual event card */

.event-card {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--cream);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

@media (hover: hover) {
  .event-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
    transform: translateY(-2px);
  }
}

/* Event date header */

.event-date {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  margin: 0;
  padding: 12px 22px;
  background: var(--pink);
  color: var(--black);
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.event-date span {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.event-date strong {
  font-family: var(--heading-font);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

/* Event details */

.event-content {
  min-width: 0;
  padding: 22px 24px 24px;
}

.event-card h4 {
  margin: 0 0 12px;
  color: var(--black);
  font-family: var(--heading-font);
  font-size: 23px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.event-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.event-meta a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-underline-offset: 3px;
}

.event-meta a:hover {
  text-decoration-color: var(--pink);
}

.event-description {
  margin: 14px 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.event-description:empty {
  display: none;
}

/* Event buttons */

.button {
  display: inline-block;
  max-width: 100%;
  margin-top: 8px;
  margin-right: 16px;
  padding: 10px 18px;
  border-radius: 6px;
  font-family: var(--body-font);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.button:focus-visible {
  outline-offset: 4px;
}

/* Event details link */

.event-link {
  color: #ffffff;
  border: 2px solid var(--black);
  background: var(--black);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.event-link:hover {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--black);
}

.event-link:focus-visible {
  outline: 3px solid var(--pink);
}

/* Directions link */

.location-link {
  color: #000000;
  border: 2px solid var(--teal);
  background: var(--teal);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.location-link:hover {
  border-color: var(--yellow);
  background: var(--black);
  color: var(--yellow);
}

.location-link:focus-visible {
  outline: 3px solid var(--pink);
}

/* Loading, empty and error messages */

.events-message {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

/* Community Compass map and directory */

.map-section {
  padding: 72px 0 24px;
}

.map-card {
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
  padding: 40px;
  border: 3px solid var(--black);
  border-radius: 24px;
  background: #fce5f1;
  box-shadow: 8px 8px 0 var(--teal);
}

.map-card h2 {
  max-width: 720px;
}

.map-card p:not(.eyebrow) {
  max-width: 780px;
}

/* Newsletter sign-up */

.signup-card {
  margin-top: 12px;
  padding: 28px;
  padding-top: 8px;
  border: none;
  border-radius: 16px;
  background: var(--cream);
}

.signup-card h3 {
  margin: 0 0 8px;
  font-size: 26px;
  text-align: center;
}

.signup-content p {
  margin: 0 0 24px;
  color: var(--muted);
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 15px;
  font-weight: 800;
}

.form-field input {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #bdbdbd;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.form-field input:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.consent {
  font-size: 15px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--teal);
}

.signup-button {
  align-self: stretch;
  width: 100%;
  padding: 12px 22px;
  border: 2px solid var(--black);
  border-radius: 6px;
  background: var(--black);
  color: #ffffff;
  font-family: var(--body-font);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.signup-button:hover {
  background: var(--teal);
  color: var(--black);
}

.signup-button:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 4px;
}

.form-note {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Footer */

.site-footer {
  padding-top: 32px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

/* Tablet and mobile */

@media (max-width: 600px) {
  .page {
    width: min(100% - 32px, 1000px);
    padding-top: 24px;
  }

  .logo {
    width: min(300px, 80vw);
    margin-bottom: 36px;
  }

  .hero-intro {
    font-size: 17px;
  }

  .hero-supporting {
    font-size: 16px;
  }

  .accent {
    margin: 30px auto 44px;
  }

  /* Events section */

  .events-section {
    padding: 28px 0;
  }

  .events-intro {
    margin-top: 28px;
  }

  .events-intro h3 {
    font-size: 23px;
  }

  .events-grid {
    gap: 16px;
    margin-top: 24px;
  }

  .event-card {
    border-radius: 10px;
  }

  .event-date {
    min-height: 58px;
    padding: 12px 18px;
  }

  .event-date strong {
    font-size: 27px;
  }

  .event-content {
    padding: 18px;
  }

  .event-card h4 {
    font-size: 21px;
  }

  .event-meta {
    font-size: 14px;
  }

  .event-description {
    font-size: 15px;
  }

  .button {
    margin-right: 8px;
    padding: 10px 16px;
  }

  /* Map and directory card */

  .map-section {
    padding-top: 56px;
  }

  .map-card {
    padding: 28px 22px;
    border: 3px solid var(--black);
    border-radius: 18px;
    box-shadow: 5px 5px 0 var(--teal);
  }

  /* Newsletter sign-up */

  .signup-card {
    margin-top: 24px;
    padding: 20px 16px;
    border-radius: 12px;
  }

  .signup-content h3 {
    font-size: 23px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .signup-button {
    width: 100%;
  }
}

/* Respect visitors who prefer reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .event-card:hover {
    transform: none;
  }
}
