/* Theatre My Way — static site styles
   Palette taken from the logo: bright blue, charcoal ink, orange accent,
   warm cream surface. Contrast checked for WCAG AA. */

:root {
  --ink: #26272b;         /* body text — ~13:1 on white */
  --ink-soft: #4a4c52;    /* secondary text — ~8:1 on white */
  --blue: #1089d3;        /* brand blue — UI / large headings */
  --blue-ink: #0a5c8a;    /* darker blue for body-text links — AA on white */
  --blue-deep: #0b4a6f;   /* hover / active */
  --orange: #e67e28;      /* accent, used sparingly */
  --orange-ink: #b5590f;  /* orange that meets AA as text on white */
  --cream: #f5f0e6;       /* warm surface */
  --surface: #ffffff;
  --page: #faf9f6;
  --line: #e3ddce;        /* hairline on cream */
  --radius: 12px;
  --shadow: 0 2px 6px rgba(38, 39, 43, 0.08), 0 8px 24px rgba(38, 39, 43, 0.06);
  --maxw: 1080px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Skip link & focus ---------- */
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }

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

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

main { display: block; }

section { padding: 48px 0; }

h1, h2, h3 { line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-top: 0; }
h3 { font-size: 1.2rem; }

a { color: var(--blue-ink); text-underline-offset: 2px; }
a:hover { color: var(--blue-deep); }

p { margin: 0 0 1em; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 48px; height: 48px; border-radius: 50%; display: block; }
.brand strong { font-size: 1.15rem; letter-spacing: -0.01em; }
.brand span { display: block; font-size: 0.72rem; color: var(--ink-soft); font-weight: 400; }

.main-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.main-nav a:hover { background: var(--cream); color: var(--blue-deep); }
.main-nav a[aria-current="page"] {
  color: var(--blue-deep);
  box-shadow: inset 0 -3px 0 var(--orange);
  border-radius: 8px 8px 0 0;
}

/* ---------- Hero ---------- */
.hero { background: var(--cream); border-bottom: 1px solid var(--line); }
.hero .container { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero-copy p.lead { font-size: 1.25rem; color: var(--ink-soft); max-width: 46ch; }
.hero-art { text-align: center; }
.hero-art img { width: min(320px, 70%); height: auto; border-radius: 50%; box-shadow: var(--shadow); }

.tagline { font-style: italic; color: var(--orange-ink); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--blue);
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn.secondary { background: transparent; color: var(--blue-deep); }
.btn.secondary:hover { background: var(--cream); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Feature strip (what we do) ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.feature h3 { margin-top: 0; color: var(--blue-deep); }
.feature p { margin-bottom: 0; color: var(--ink-soft); }

/* ---------- Section heading ---------- */
.section-head { margin-bottom: 8px; }
.section-head p { color: var(--ink-soft); max-width: 60ch; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Card grid / feed ---------- */
.card-grid {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover, .card:focus-within { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 4 / 3; background: var(--cream); overflow: hidden; position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media.is-logo { display: grid; place-items: center; background: var(--cream); }
.card-media.is-logo img { width: 62%; height: auto; object-fit: contain; }
.card-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(38,39,43,0.82); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 4px 10px; border-radius: 999px;
}
.card-badge.has-video::before { content: "▶ "; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.1rem; }
.card-body h3 a { text-decoration: none; color: var(--ink); }
.card-body h3 a:hover { color: var(--blue-deep); }
/* Make the whole card clickable while keeping the link the accessible target */
.card-body h3 a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card-date { font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.card-snippet { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.filters button {
  font: inherit; font-size: 0.9rem; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer;
}
.filters button:hover { background: var(--cream); }
.filters button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Single post ---------- */
.post { max-width: 760px; margin: 0 auto; }
.post-meta { color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.8rem; margin-bottom: 8px; }
.post h1 { margin-top: 0; }
.post-body p { font-size: 1.08rem; }
.breadcrumb { font-size: 0.9rem; margin-bottom: 20px; }
.breadcrumb a { font-weight: 600; }

.post-figure { margin: 0 0 24px; }
.post-figure img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.post-figure.is-logo { background: var(--cream); border-radius: var(--radius); padding: 40px; text-align: center; }
.post-figure.is-logo img { width: min(260px, 60%); box-shadow: none; }
figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 8px; }

/* ---------- Carousel ---------- */
.carousel { margin: 0 0 24px; }
.carousel-viewport { position: relative; background: var(--cream); border-radius: var(--radius); overflow: hidden; }
.carousel-track { display: flex; transition: transform 0.3s ease; }
.carousel-slide { min-width: 100%; }
.carousel-slide img { width: 100%; height: auto; display: block; }
.carousel-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.carousel-btn {
  font: inherit; font-weight: 700; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--line); border-radius: 999px;
  width: 48px; height: 48px; display: grid; place-items: center;
}
.carousel-btn:hover { background: var(--cream); border-color: var(--blue); color: var(--blue-deep); }
.carousel-btn[disabled] { opacity: 0.4; cursor: default; }
.carousel-status { font-size: 0.9rem; color: var(--ink-soft); font-weight: 600; }
.carousel-caption { font-size: 0.95rem; color: var(--ink-soft); margin-top: 10px; min-height: 1.5em; }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }
.carousel-dots button { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 1px solid var(--blue); background: transparent; cursor: pointer; }
.carousel-dots button[aria-current="true"] { background: var(--blue); }

/* ---------- Video ---------- */
.video-wrap { margin: 0 0 20px; }
.video-wrap video { width: 100%; height: auto; border-radius: var(--radius); background: #000; display: block; }
.notice {
  background: #fff8ef; border: 1px solid var(--orange); border-left-width: 5px;
  border-radius: 8px; padding: 14px 16px; margin: 16px 0; font-size: 0.95rem; color: var(--ink);
}
.notice strong { color: var(--orange-ink); }

details.transcript { margin: 12px 0 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
details.transcript summary { cursor: pointer; padding: 12px 16px; font-weight: 700; }
details.transcript summary:hover { color: var(--blue-deep); }
details.transcript .transcript-body { padding: 0 16px 16px; color: var(--ink-soft); }

/* ---------- YouTube embed ---------- */
.embed { margin: 0 0 24px; }
.embed .frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed .label { font-weight: 600; margin-bottom: 8px; }

/* ---------- Hashtags ---------- */
.hashtags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.hashtags li { list-style: none; }
.hashtags span { font-size: 0.82rem; color: var(--ink-soft); background: var(--cream); padding: 3px 10px; border-radius: 999px; }
.hashtags ul { display: contents; margin: 0; padding: 0; }

/* ---------- Team ---------- */
.team-grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.team-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.team-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.team-card .team-copy { padding: 20px; }
.team-card h3 { margin: 0 0 2px; }
.team-card .role { color: var(--orange-ink); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.team-card p { font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #e8e8ea; padding: 40px 0; margin-top: 40px; }
.site-footer a { color: #9cd2f2; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.site-footer .tagline { color: #f2c79b; }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-art { order: -1; }
  .site-header .container { min-height: auto; padding-top: 10px; padding-bottom: 10px; }
  body { font-size: 17px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel-track { transition: none; }
  .card { transition: none; }
}
