:root {
  --bg: #f6fbfb;
  --ink: #16242a;
  --muted: #60717a;
  --line: rgba(32, 60, 70, 0.14);
  --rose: #b8325a;
  --green: #23835f;
  --blue: #286fa6;
  --violet: #6c4aa4;
  --aqua: #2aa889;
  --danger: #842d38;
  --danger-soft: #fde9ed;
  --shadow: 0 18px 46px rgba(20, 49, 58, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff 0%, var(--bg) 46%, #edf8f3 100%);
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(40, 111, 166, 0.32);
  outline-offset: 3px;
}

.hero {
  max-width: 1220px;
  min-height: 660px;
  margin: 0 auto;
  padding: 76px 20px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  gap: 34px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: 4.4rem;
  line-height: 0.98;
}

.hero p,
.section-heading p,
.event-card p,
.care-card p,
.resource-card p,
.plan-status,
.footer p {
  color: var(--muted);
}

.hero-copy > p:not(.eyebrow) {
  max-width: 700px;
  font-size: 1.1rem;
}

.hero-actions,
.poster-actions,
.safety-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover,
.filter-button:hover,
.event-card:hover,
.care-card:hover,
.resource-card:hover {
  transform: translateY(-2px);
}

.primary {
  background: var(--rose);
  color: #fff;
}

.primary:hover {
  background: #982849;
}

.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--blue);
}

.light {
  background: #fff;
  color: var(--danger);
}

.poster-shell {
  min-width: 0;
  width: 100%;
}

.poster-art {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: #dbe9ef;
  box-shadow: var(--shadow);
}

.poster-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 20, 27, 0.58) 0%, rgba(8, 20, 27, 0.1) 37%, rgba(8, 20, 27, 0.76) 100%),
    linear-gradient(90deg, rgba(184, 50, 90, 0.2), rgba(35, 131, 95, 0.08), rgba(40, 111, 166, 0.16));
}

.poster-copy,
.poster-footer {
  position: absolute;
  left: 22px;
  right: 22px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.48);
}

.poster-copy {
  top: 24px;
}

.poster-copy p,
.poster-copy span,
.poster-footer span {
  margin: 0;
  color: #fff;
  font-weight: 900;
}

.poster-copy h2 {
  max-width: 340px;
  margin: 8px 0;
  font-size: 2.65rem;
  line-height: 0.95;
}

.poster-footer {
  bottom: 22px;
}

.poster-footer strong {
  display: block;
  max-width: 330px;
  font-size: 1.15rem;
  line-height: 1.15;
}

.poster-footer span {
  display: block;
  margin-top: 8px;
  color: #f7fbfb;
}

.safety-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px max(20px, calc((100vw - 1220px) / 2 + 20px));
  background: var(--danger);
  color: #fff;
}

.safety-band h2 {
  max-width: 790px;
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.05;
}

.safety-band p {
  max-width: 820px;
  margin: 10px 0 0;
  color: #ffe7eb;
}

.safety-band .eyebrow {
  color: #ffe7eb;
}

.month-section,
.events-section,
.care-section,
.resource-section,
.watch-section,
.source-section {
  max-width: 1220px;
  margin: 0 auto;
  padding: 72px 20px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-size: 3rem;
  line-height: 1.05;
}

.calendar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-button {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.filter-button.active {
  background: var(--blue);
  color: #fff;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-day {
  min-height: 190px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(20, 49, 58, 0.06);
}

.calendar-day.is-empty {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  margin-bottom: 8px;
}

.day-name,
.day-number {
  font-weight: 900;
}

.day-name {
  color: var(--blue);
  font-size: 0.78rem;
}

.day-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #edf5f8;
}

.mini-event {
  display: block;
  margin: 7px 0;
  padding: 7px;
  border-left: 4px solid var(--aqua);
  border-radius: 6px;
  background: #f7fbfb;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.mini-event[data-kind="lgbtq"] {
  border-color: var(--rose);
}

.mini-event[data-kind="recovery"] {
  border-color: var(--green);
}

.mini-event[data-kind="nearby"] {
  border-color: var(--violet);
}

.care-prompt {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.event-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.event-card,
.care-card,
.plan-card,
.resource-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease;
}

.event-card {
  min-height: 330px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-card h3,
.care-card h3,
.resource-card h3,
.plan-heading h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.14;
}

.event-card p {
  margin: 0;
}

.event-meta {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 7px;
  background: #f1f6f7;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 900;
}

.tag.lgbtq {
  background: #fdeaf0;
  color: var(--rose);
}

.tag.mental-health {
  background: #e9f5f1;
  color: var(--green);
}

.tag.recovery {
  background: #eef6ff;
  color: var(--blue);
}

.tag.nearby {
  background: #f0ecfa;
  color: var(--violet);
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.small-link,
.copy-event {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
}

.copy-event {
  cursor: pointer;
}

.care-layout,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.care-card,
.resource-card {
  min-height: 235px;
  padding: 22px;
}

.care-card span,
.resource-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.plan-card {
  max-width: 760px;
  margin-top: 18px;
  padding: 22px;
}

.plan-heading {
  margin-bottom: 10px;
}

label {
  display: block;
  margin: 14px 0 7px;
  font-weight: 900;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(32, 60, 70, 0.18);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(40, 111, 166, 0.18);
  outline-offset: 0;
  border-color: var(--blue);
}

.plan-card .button {
  margin-top: 16px;
}

.resource-card.urgent {
  border-color: rgba(132, 45, 56, 0.28);
  background: var(--danger-soft);
}

.watch-section {
  background:
    linear-gradient(90deg, rgba(184, 50, 90, 0.08), rgba(201, 148, 28, 0.08), rgba(35, 131, 95, 0.08), rgba(40, 111, 166, 0.08));
  max-width: none;
}

.watch-section .section-heading,
.source-section .section-heading {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.source-list {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.source-list a {
  min-height: 44px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
}

.footer {
  padding: 30px 20px 42px;
  text-align: center;
}

.footer-inner {
  max-width: 760px;
  margin: 0 auto;
}

.footer p {
  margin: 0;
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .poster-shell {
    max-width: 440px;
  }

  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-list,
  .care-layout,
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .hero {
    padding-top: 58px;
  }

  .hero h1 {
    font-size: 2.7rem;
  }

  .section-heading h2,
  .safety-band h2 {
    font-size: 2.15rem;
  }

  .calendar-grid,
  .event-list,
  .care-layout,
  .resource-grid,
  .source-list {
    grid-template-columns: 1fr;
  }

  .calendar-day {
    min-height: 0;
  }

  .poster-copy h2 {
    font-size: 2.15rem;
  }
}

@media print {
  body.printing-poster {
    background: #fff;
  }

  body.printing-poster * {
    visibility: hidden;
  }

  body.printing-poster .poster-shell,
  body.printing-poster .poster-shell * {
    visibility: visible;
  }

  body.printing-poster .poster-shell {
    position: absolute;
    inset: 0;
    max-width: none;
    width: 100%;
    padding: 0;
  }

  body.printing-poster .poster-art {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.printing-poster .poster-actions {
    display: none;
  }
}
