/* ==========================================================================
   St. Anthony Community Theater — temporary one-page site
   Palette pulled from the SACT logo blocks: red / purple / orange.
   ========================================================================== */

:root {
  --red:        #e0242c;
  --purple:     #8a2a8f;
  /* Lifted purple used ONLY for the gradient headline. The logo purple above is
     too dark to read as text over the hero photo — it measures 1.96:1 against the
     scrim, under the 3:1 WCAG minimum for large text. This one measures ~3.7:1. */
  --purple-lift: #c24fcc;
  --orange:     #f28b1c;

  --ink:        #14101a;
  --ink-2:      #1e1826;
  --ink-3:      #2b2334;
  --paper:      #fbf9f7;
  --paper-2:    #f2ede9;

  --text:       #221c2b;
  --text-muted: #5c5468;
  --on-dark:         #f6f2ef;
  --on-dark-muted:   #b6adc0;

  --line:       rgba(34, 28, 43, 0.12);
  --line-dark:  rgba(255, 255, 255, 0.14);

  --font-display: "Playfair Display", "Iowan Old Style", "Palatino Linotype",
                  Palatino, Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
               "Helvetica Neue", Arial, sans-serif;

  --wrap:   1200px;
  --radius: 18px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --shadow-lg: 0 24px 60px -20px rgba(20, 16, 26, 0.35);
  --shadow-md: 0 12px 32px -12px rgba(20, 16, 26, 0.28);
}

/* ---------------------------------------------------------------- reset --- */

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

html { -webkit-text-size-adjust: 100%; }

html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h2 { font-size: clamp(1.9rem, 1.35rem + 2.4vw, 3rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; max-width: 62ch; text-wrap: pretty; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

/* The logo purple only reaches 2.51:1 against the dark sections, under the 3:1 that
   WCAG 1.4.11 requires of a focus indicator — so keyboard focus was nearly invisible
   on the hero, Get Involved and footer. Orange measures 7.58:1 on the same ground. */
.nav :focus-visible,
.hero :focus-visible,
.section--dark :focus-visible,
.footer :focus-visible {
  outline-color: var(--orange);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--on-dark);
  border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* --------------------------------------------------------------- layout --- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 5rem); }

.section--dark {
  background: var(--ink);
  color: var(--on-dark);
  background-image:
    radial-gradient(60rem 30rem at 8% -10%, rgba(138, 42, 143, 0.5), transparent 70%),
    radial-gradient(48rem 28rem at 95% 110%, rgba(224, 36, 44, 0.32), transparent 70%);
}
.section--dark h2, .section--dark h3 { color: #fff; }

.section--contact {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}

.grid-2 {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (min-width: 62rem) {
  .grid-2 { grid-template-columns: 1.05fr 0.95fr; }
  .grid-2--narrow { grid-template-columns: 1.15fr 0.85fr; }
}

.mb { margin-bottom: 2.5rem; }

/* ------------------------------------------------------------ type bits --- */

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 1rem;
}
.eyebrow--dark { color: var(--purple); }

.lead {
  font-size: clamp(1.1rem, 1.02rem + 0.45vw, 1.35rem);
  line-height: 1.5;
  color: var(--text);
}
.section--dark .lead { color: var(--on-dark); }
.lead--wide { max-width: 58ch; }

.grad {
  background: linear-gradient(96deg, var(--red) 0%, var(--purple-lift) 48%, var(--orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------- buttons --- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.75rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.975rem;
  font-weight: 650;
  text-decoration: none;
  letter-spacing: 0.005em;
  /* Transparent border keeps --primary and --ghost the same size. Any gradient
     background on a .btn must also set background-origin — see .btn--primary. */
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(96deg, var(--red), var(--purple) 72%);
  /* Must follow the shorthand above, which resets background-origin to padding-box.
     At padding-box the gradient is sized to the padding box but painted across the
     border box, so it repeats — surfacing the tile's red start as a seam down the
     right edge, most obvious where the gradient has already turned purple. */
  background-origin: border-box;
  box-shadow: 0 10px 26px -12px rgba(224, 36, 44, 0.7);
}
.btn--primary:hover { box-shadow: 0 16px 34px -12px rgba(224, 36, 44, 0.75); }

.btn--ghost {
  background: transparent;
  color: currentColor;
  border-color: currentColor;
  opacity: 0.92;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); opacity: 1; }
.section:not(.section--dark) .btn--ghost:hover { background: rgba(34, 28, 43, 0.06); }

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

.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  padding-block: 1.1rem;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: #fff;
}
.brand img {
  width: 54px;
  height: auto;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
}
.brand__text {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.brand__text em {
  font-style: normal;
  font-weight: 400;
  opacity: 0.85;
  font-size: 0.92em;
}

.nav__links {
  display: none;
  gap: 1.85rem;
  font-size: 0.9rem;
  font-weight: 600;
}
@media (min-width: 56rem) { .nav__links { display: flex; } }

.nav__links a {
  color: #fff;
  text-decoration: none;
  padding-block: 0.35rem;
  position: relative;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  opacity: 0.9;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { transform: scaleX(1); }

/* ------------------------------------------------------------------ hero --- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(34rem, 88svh, 48rem);
  display: flex;
  align-items: flex-end;
  padding-block: clamp(6rem, 14vh, 9rem) clamp(3rem, 8vh, 5.5rem);
  background: var(--ink);
  overflow: hidden;
}

.hero__media { position: absolute; inset: 0; z-index: -2; }
/* <picture> is inline by default, which would leave the img with no height to fill. */
.hero__media picture { display: block; width: 100%; height: 100%; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    /* Darkens the left-hand text column so the eyebrow and headline stay legible
       over the bright centre of the photo, while the cast on the right stays lit. */
    linear-gradient(90deg, rgba(20, 16, 26, 0.82) 0%, rgba(20, 16, 26, 0.58) 34%,
                    rgba(20, 16, 26, 0.12) 62%, transparent 78%),
    linear-gradient(180deg, rgba(20, 16, 26, 0.72) 0%, rgba(20, 16, 26, 0.26) 26%,
                    rgba(20, 16, 26, 0.7) 70%, rgba(20, 16, 26, 0.93) 100%),
    linear-gradient(72deg, rgba(138, 42, 143, 0.34) 0%, transparent 60%);
}

/* Narrow screens: the text spans the full width, so the horizontal scrim above would
   dim the cast for no benefit. Weight the vertical one instead — the headline sits over
   the middle of the photo, where that gradient is at its lightest. */
@media (max-width: 47.99rem) {
  .hero__scrim {
    background:
      linear-gradient(180deg, rgba(20, 16, 26, 0.7) 0%, rgba(20, 16, 26, 0.42) 22%,
                      rgba(20, 16, 26, 0.82) 52%, rgba(20, 16, 26, 0.95) 100%),
      linear-gradient(72deg, rgba(138, 42, 143, 0.34) 0%, transparent 70%);
  }
}

.hero__inner { position: relative; color: #fff; }

.hero .eyebrow { color: var(--orange); }

.hero__title {
  font-size: clamp(2.75rem, 1.6rem + 6.4vw, 6rem);
  margin-bottom: 1.1rem;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}
.hero__title .grad { text-shadow: none; }

.hero__lede {
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.45rem);
  line-height: 1.45;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.94);
  margin-bottom: 2rem;
}
.hero__lede strong { color: #fff; }

.hero__badge {
  position: absolute;
  top: clamp(5.5rem, 12vh, 8rem);
  right: var(--gutter);
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--orange), var(--red));
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: rotate(-8deg);
}
.hero__badge span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.95;
}
.hero__badge strong {
  font-family: var(--font-display);
  font-size: 2.35rem;
  line-height: 1;
  margin-top: 0.1rem;
}
@media (min-width: 48rem) { .hero__badge { display: flex; } }

/* -------------------------------------------------------------- timeline --- */

.timeline {
  position: relative;
  padding-left: 2.1rem;
  border-left: 2px solid var(--line);
}

.timeline__item {
  position: relative;
  padding-bottom: 2rem;
}
.timeline__item:last-child { padding-bottom: 0; }

.timeline__item h3 { margin-bottom: 0.3rem; font-size: 1.075rem; }
.timeline__item h3 em {
  font-style: normal;
  font-weight: 600;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  /* Not var(--red): at 12.8px this counts as small text and needs 4.5:1, which the
     brand red misses at 4.49:1 on --paper. This darker red measures 4.97:1. */
  color: #d41f27;
}
.timeline__item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 44ch;
}

.timeline__dot {
  position: absolute;
  left: calc(-2.1rem - 1px);
  top: 0.42rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line);
  transform: translateX(-50%);
}
.is-done .timeline__dot { background: var(--purple); border-color: var(--purple); }
.is-active .timeline__dot {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 0 6px rgba(224, 36, 44, 0.16);
}
.timeline__item--goal .timeline__dot {
  background: var(--orange);
  border-color: var(--orange);
}
.timeline__item--goal h3 { color: var(--purple); }

/* --------------------------------------------------------------- gallery --- */

.gallery-section { background: var(--paper); }

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.75rem, 1.6vw, 1.15rem);
}
@media (min-width: 44rem) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.gallery__item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink-2);
  box-shadow: var(--shadow-md);
}
.gallery__item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gallery__item:hover img { transform: scale(1.035); }

@media (min-width: 44rem) {
  .gallery__item--wide { grid-column: span 2; }
  .gallery__item--wide img { aspect-ratio: 21 / 9; }
}

/* ----------------------------------------------------------------- cards --- */

.cards {
  display: grid;
  gap: 1.1rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}
@media (min-width: 48rem) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  padding: 1.85rem 1.6rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line-dark);
  backdrop-filter: blur(6px);
  transition: transform 0.22s ease, background-color 0.22s ease;
}
.card:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.085); }

.card h3 {
  margin-bottom: 0.55rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--orange);
  display: inline-block;
}
.card p {
  margin: 0;
  color: var(--on-dark-muted);
  font-size: 0.96rem;
}

/* ------------------------------------------------------------- cta panel --- */

.cta-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line-dark);
}
.cta-panel__title { margin-bottom: 0.4rem; }
.cta-panel__copy {
  margin: 0;
  color: var(--on-dark-muted);
  max-width: 46ch;
  font-size: 0.98rem;
}

/* --------------------------------------------------------------- history --- */

.shows {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 1.5rem 1.5rem 1.6rem;
}

.shows__title {
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Single column: several titles run past 40 characters, and two columns inside the
   narrow right-hand cell wrapped them onto three lines each. */
.shows__list {
  font-size: 0.92rem;
}
.shows__list li {
  display: flex;
  gap: 0.5rem;
  padding-block: 0.34rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(34, 28, 43, 0.06);
}
.shows__list li:last-child { border-bottom: 0; padding-bottom: 0; }
.shows__list b {
  flex: 0 0 3.1em;
  color: var(--purple);
  font-variant-numeric: tabular-nums;
}

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

.contact {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 56rem) { .contact { grid-template-columns: 1fr 1fr; } }

.contact h2 { margin-bottom: 0.5rem; }
.contact .lead { color: var(--text-muted); }

.contact__list { display: grid; gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.contact__list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
}
.contact__label {
  flex: 0 0 4.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact__list a {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid rgba(138, 42, 143, 0.28);
  transition: border-color 0.18s ease, color 0.18s ease;
}
.contact__list a:hover { color: var(--purple); border-color: var(--purple); }
.contact__note { font-size: 0.82rem; color: var(--text-muted); }
.contact__social { display: flex; flex-wrap: wrap; gap: 1.1rem; }

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

.footer {
  background: var(--ink);
  color: var(--on-dark-muted);
  padding-block: clamp(3rem, 6vw, 4.5rem);
  font-size: 0.9rem;
}

.footer__inner {
  display: grid;
  gap: 2.25rem;
}
@media (min-width: 56rem) {
  .footer__inner { grid-template-columns: 0.85fr 1.15fr; gap: 4rem; }
}

.footer__brand img { width: 92px; margin-bottom: 1rem; }
.footer__brand p {
  margin: 0;
  color: var(--on-dark);
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.4;
  max-width: 22ch;
}

.footer__meta p { margin-bottom: 1rem; max-width: 68ch; }
.footer__grant { font-size: 0.82rem; opacity: 0.72; }
.footer__copy {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.82rem;
  opacity: 0.72;
}

/* -------------------------------------------------------------- a11y/etc --- */

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .gallery__item:hover img,
  .btn:hover,
  .card:hover { transform: none; }
}

@media print {
  .nav, .hero__badge, .cta-row { display: none; }
  body { background: #fff; }
  .section--dark { background: #fff; color: #000; }
}
