/* ==========================================================================
   Community Impact and Contact pages (Milestone 7A): additions to site.css.
   Classes are prefixed .sn-impact- (Community Impact, its subpages and
   /about/) and .sn-contact- (Contact). Same rules as site.css: --sn-* tokens,
   rem/em sizes, logical properties; one column at 768px and below.
   Mockup: "Website Page Mockups" pp. 78–89.
   ========================================================================== */

/* ---- Headings ------------------------------------------------------------ */

/* Wider than .sn-display's 18ch so "Empowering Families." and the subpage
   titles break where the mockup breaks them. */
.sn-impact-display {
  max-inline-size: 24ch;
}

/* The hero's three sentences, one per line (p. 78). */
.sn-impact-display > span {
  display: block;
}

/* Small capitals label above a block ("Our mission", "Caregivers", …). */
.sn-impact-label {
  margin-block: 0 0.75rem;
  color: var(--sn-navy);
  font-family: var(--sn-font-body);
  font-size: 0.85rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.45;
  text-transform: uppercase;
}

/* A block's own heading (Playfair), under its label. */
.sn-impact-block-title {
  margin-block: 0 0.75rem;
  color: var(--sn-navy);
  font-family: var(--sn-font-heading);
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
}

/* .sn-lead in italics ("Knowledge helps people make better decisions."). */
.sn-impact-lead {
  font-style: italic;
}

/* Our mission (p. 78): the statement in large Cormorant. */
.sn-impact-statement {
  max-inline-size: 42rem;
  margin: 0;
  color: var(--sn-navy);
  font-family: var(--sn-font-sub);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  font-weight: 600;
  line-height: 1.3;
}

/* ---- Blocks: cream card and navy panel ----------------------------------- */

/* Cards and panels stacked full width (subpages). */
.sn-impact-stack {
  display: grid;
  gap: 1.5rem;
  margin-block: 1.5rem 0;
}

/* Info cards: no lift on hover (nothing to click). */
.sn-impact-card:hover {
  transform: none;
  border-color: var(--sn-gold-line);
}

.sn-impact-card > :last-child {
  margin-block-end: 0;
}

/* Navy panel inside a cream band (pp. 79–88). */
.sn-impact-panel {
  box-sizing: border-box;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: var(--sn-radius);
  background: var(--sn-navy);
  color: var(--sn-cream);
}

.sn-impact-panel p {
  margin-block: 0 0.75rem;
}

.sn-impact-panel > :last-child {
  margin-block-end: 0;
}

.sn-impact-panel .sn-impact-label,
.sn-impact-panel .sn-impact-block-title {
  color: var(--sn-gold);
}

.sn-impact-panel a:not(.sn-btn) {
  color: var(--sn-gold);
}

/* Highlights and the founder's philosophy: space above, after a grid or text. */
#impact-highlights .sn-impact-panel,
.sn-impact-panel--statement {
  margin-block-start: 2rem;
}

/* Three outcome lines (p. 88): Safety. / Comfort. / Home retention. */
.sn-impact-lines {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sn-impact-lines li + li {
  margin-block-start: 0.25rem;
}

/* ---- Community Impact Highlights (p. 80): nine checked items ------------- */
.sn-impact-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1.5rem 0;
  margin-inline: 0;
  padding: 0;
  list-style: none;
}

.sn-impact-checks li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  box-sizing: border-box;
  margin: 0;
  padding-block: 1rem;
  padding-inline: 1.15rem;
  border: 1px solid var(--sn-gold);
  border-radius: var(--sn-radius);
  background: var(--sn-card);
  color: var(--sn-navy);
  font-weight: 700;
  line-height: 1.4;
}

/* Decorative check: the second content value hides it from screen readers
   (browsers without the alt-text syntax keep the first one). */
.sn-impact-checks li::before {
  content: "✓";
  content: "✓" / "";
  display: inline-grid;
  flex: none;
  place-items: center;
  inline-size: 1.4em;
  block-size: 1.4em;
  border-radius: 0.25em;
  background: var(--sn-gold);
  color: var(--sn-navy);
  font-size: 0.9em;
  line-height: 1;
}

@media (max-width: 1023.98px) {
  .sn-impact-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Impact Dashboard (p. 85): "Coming soon" only ----------------------- */
.sn-impact-soon {
  box-sizing: border-box;
  margin-block: 1.5rem 0;
  padding-block: clamp(2rem, 6vw, 3.5rem);
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  border-block-end: 3px solid var(--sn-gold);
  background: var(--sn-navy);
  text-align: center;
}

.sn-impact-soon p {
  margin: 0;
  color: var(--sn-gold);
  font-family: var(--sn-font-heading);
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

/* ---- Leadership profile (/about/, p. 86) -------------------------------- */
.sn-impact-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.5rem 2rem;
  align-items: center;
  margin-block: 0 2.5rem;
}

.sn-impact-profile .sn-portrait {
  inline-size: 12rem;
}

/* The Sérénity emblem standing in for the headshot. */
.sn-portrait__placeholder .sn-impact-emblem {
  inline-size: 80%;
  aspect-ratio: auto;
  object-fit: contain;
}

.sn-impact-profile__name {
  margin-block: 0 0.35rem;
  color: var(--sn-navy);
  font-family: var(--sn-font-heading);
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.sn-impact-profile__role {
  margin: 0;
  font-size: 1.05rem;
}

.sn-impact-prose p {
  max-inline-size: var(--sn-measure);
}

/* ---- Contact (p. 89) ----------------------------------------------------- */
.sn-contact-phone {
  margin-block: 0 0.5rem;
  font-family: var(--sn-font-heading);
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
}

.sn-band--navy .sn-contact-phone a {
  display: inline-flex;
  align-items: center;
  min-block-size: 3rem;
  color: var(--sn-gold);
  text-decoration: none;
}

.sn-band--navy .sn-contact-phone a:hover {
  color: var(--sn-gold-soft);
  text-decoration: underline;
}

.sn-contact-free {
  margin-block: 1.5rem 0;
  color: var(--sn-cream);
}

.sn-contact-details {
  margin-block: 0;
}

.sn-contact-emails {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Each address is its own 48px target and wraps rather than overflowing. */
.sn-contact-emails a {
  display: inline-block;
  box-sizing: border-box;
  max-inline-size: 100%;
  min-block-size: 3rem;
  padding-block: 0.7rem;
  color: var(--sn-navy);
  overflow-wrap: anywhere;
}

/* ---- One column at 768px and below -------------------------------------- */
@media (max-width: 767.98px) {
  .sn-impact-checks { grid-template-columns: 1fr; }
  .sn-impact-profile { grid-template-columns: 1fr; }
  .sn-impact-profile .sn-portrait { inline-size: min(100%, 12rem); }
}

/* ---- High contrast (accessibility toolbar), as in site.css -------------- */
html.serenity-hc .sn-impact-panel,
html.serenity-hc .sn-impact-checks li,
html.serenity-hc .sn-impact-soon {
  background: var(--sn-bg);
  color: var(--sn-text);
  border: 1px solid var(--sn-border);
}

html.serenity-hc .sn-impact-label,
html.serenity-hc .sn-impact-block-title,
html.serenity-hc .sn-impact-statement,
html.serenity-hc .sn-impact-profile__name,
html.serenity-hc .sn-impact-soon p,
html.serenity-hc .sn-contact-free {
  color: var(--sn-primary-strong);
}

html.serenity-hc .sn-impact-checks li::before {
  background: var(--sn-primary);
  color: var(--sn-on-primary);
}

/* Impact Dashboard: the Founder Vision panel under "Coming soon". */
.sn-impact-vision {
  margin-block-start: 2rem;
}
