/* Mashti Community: shared styles.
   Palette and type follow the original WordPress theme (Spectra One + Inter). */

:root {
  --black: #000;
  --white: #fff;
  --heading: #220c10;
  --body: #4b5563;
  --muted: #6e7787;
  --outline: #e6e9ef;
  --surface: #f8fafc;
  --band: #f0f0f0;
  --radius: 6px;
  --shadow: 0 30px 40px -12px rgba(0, 0, 0, .12);
  --shadow-hover: 0 30px 40px -12px rgba(0, 0, 0, .2);
  --wide: 1200px;
  --content: 760px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 84px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--heading); font-weight: 700; }
.site-nav a:not(.btn), .site-footer a, .logo { font-weight: 400; }
a:hover { color: var(--heading); }

h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 .6em;
  font-weight: 600;
}
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: clamp(22px, 3vw, 28px); }

p { margin: 0 0 1em; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--white); color: var(--black); padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background .2s ease;
}
.btn:hover, .btn:focus-visible { background: #333; color: var(--white); }
.btn-inverse { background: var(--white); color: var(--black); }
.btn-inverse:hover, .btn-inverse:focus-visible { background: #e2e2e2; color: var(--black); }

/* ---------- Header ---------- */
.site-header { background: var(--black); color: var(--white); position: sticky; top: 0; z-index: 10; }
:target, [id] { scroll-margin-top: var(--header-h); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 84px;
}
.logo img { width: 210px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; }
.site-nav a:not(.btn) { color: var(--white); text-decoration: none; font-size: 16px; }
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] { color: var(--white); font-weight: 700; }
/* reserve bold width so hover/current bold text does not shift the menu */
.site-nav a[data-label]::after {
  content: attr(data-label); display: block; height: 0; overflow: hidden;
  visibility: hidden; font-weight: 700;
}

.nav-toggle {
  display: none;
  background: none; border: 0; color: var(--white); cursor: pointer;
  width: 44px; height: 44px; padding: 10px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; height: 2px; background: currentColor; position: relative; content: "";
}
.nav-toggle span::before { top: -7px; position: absolute; width: 100%; }
.nav-toggle span::after { top: 7px; position: absolute; width: 100%; }

@media (max-width: 860px) {
  .logo img { width: 160px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--black);
    flex-direction: column; align-items: flex-start;
    padding: 8px var(--gutter) 24px;
    gap: 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a:not(.btn) { display: block; padding: 8px 0; font-size: 18px; }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Hero (home): tagline + live events over a parallax image ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  padding: clamp(36px, 5vw, 64px) 0 clamp(48px, 6vw, 80px);
  scroll-margin-top: var(--header-h);
}
.hero-bg {
  position: absolute; inset: 0;
  background: url(../img/hero.jpg) 49% 56% / cover no-repeat;
}
/* Parallax: the image scrolls at 20% of page speed. Done as a scroll-driven CSS
   animation so the browser moves it in the same frame as the scroll (a JS
   scroll handler lags a frame behind and flickers). Over the first 1000px of
   page scroll the layer is pushed down 800px, so on screen it moves 200px.
   Browsers without scroll timelines (currently Firefox) get a still image. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-bg {
      animation: hero-parallax linear both;
      animation-timeline: scroll(root block);
      animation-range: 0px 1000px;
    }
  }
}
@keyframes hero-parallax {
  from { transform: translateY(0); }
  to { transform: translateY(800px); }
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgb(0, 0, 0) 6%, rgba(10, 10, 10, .5) 100%);
}
.hero > :not(.hero-bg) { position: relative; }
.hero-tagline {
  color: var(--white);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: clamp(14px, 1.6vw, 18px);
  text-align: center;
  margin: 0 var(--gutter) clamp(28px, 4vw, 44px);
}

/* ---------- Events carousel ---------- */
.carousel { position: relative; }
.events-track {
  display: flex; gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 20px 16px 28px;
  margin: -20px -16px 0;
  scroll-padding: 0 16px;
}
.events-track::-webkit-scrollbar { display: none; }
.events-track .event-slot { flex: 0 0 300px; scroll-snap-align: start; display: flex; flex-direction: column; }
.events-track .event-slot .event { flex: 1; }
.event-countdown {
  color: var(--white); font-weight: 700; font-size: 15px;
  letter-spacing: .5px; text-transform: uppercase;
  margin: 0 0 10px 2px;
}
@media (max-width: 520px) {
  .events-track .event-slot { flex-basis: calc(100vw - 2 * var(--gutter) - 24px); }
}
.events-track .events-status { color: #e2e8f0; width: 100%; }
.events-track .events-status a { color: var(--white); font-weight: 700; }

.carousel-btn {
  position: absolute; top: calc(50% - 12px); transform: translateY(-50%);
  z-index: 2;
  width: 64px; height: 64px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--white); color: var(--black);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.carousel-btn[hidden] { display: none; }
.carousel-btn:hover, .carousel-btn:focus-visible { background: var(--black); color: var(--white); }
.carousel-btn svg { width: 34px; height: 34px; fill: currentColor; }
.carousel-btn.prev { left: -20px; }
.carousel-btn.next { right: -20px; }
@media (max-width: 1280px) {
  .carousel-btn.prev { left: -8px; }
  .carousel-btn.next { right: -8px; }
}
@media (max-width: 520px) {
  .carousel-btn { width: 52px; height: 52px; }
}

/* ---------- Page header (inner pages) ---------- */
.page-head {
  background: var(--surface);
  padding: clamp(60px, 9vw, 112px) var(--gutter) clamp(40px, 6vw, 72px);
  text-align: center;
}
.page-head h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: .3em; }
.page-head p { font-size: clamp(18px, 2vw, 23px); color: #334155; margin: 0 auto; max-width: 700px; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-band { background: rgba(240, 240, 240, .66); }
.section-title { text-align: center; margin-bottom: clamp(28px, 4vw, 48px); }
.section-title p { color: var(--muted); margin: 0; }

/* ---------- Home cards ---------- */
.cards {
  display: grid; gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 30px 25px 0;
  display: flex; flex-direction: column;
  transition: box-shadow .2s ease;
  text-decoration: none;
  color: inherit;
}
.card { font-weight: 400; }
.card:hover { box-shadow: var(--shadow-hover); color: inherit; }
.card h2 { font-size: 26px; margin-bottom: .2em; }
.card p { color: var(--muted); margin-bottom: 18px; }
.card .btn { align-self: flex-start; margin-bottom: 26px; }
.card img { margin: auto -25px 0; width: calc(100% + 50px); aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Purpose ---------- */
.purpose h2 { text-align: center; }
.purpose .lead { font-size: 20px; color: var(--heading); text-align: center; }

/* ---------- Live events (Fienta) ---------- */
.events-grid {
  display: grid; gap: 30px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.event {
  color: inherit; text-decoration: none; font-weight: 400;
  transition: transform .2s ease, box-shadow .2s ease;
  background: var(--white);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
}
.event-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--outline); }
.event-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.event-date {
  color: var(--heading); font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; font-size: 13px; margin-bottom: 6px;
}
.event h3 { font-size: 20px; margin-bottom: 10px; }
.event-meta { font-size: 15px; color: var(--muted); margin-bottom: 18px; }
.event-meta div { margin-bottom: 2px; }
.event:hover, .event:focus-visible { transform: scale(1.05); box-shadow: var(--shadow-hover); color: inherit; }
.event:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.event-meta { margin-bottom: 0; }
.event { position: relative; }
.event-badge {
  position: absolute; top: 12px; left: 12px;
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: 5px 10px; border-radius: 4px;
  background: var(--black); color: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.event-badge.is-out { background: #b42318; }
.event.is-out .event-img { filter: grayscale(.7) brightness(.85); }
.events-status { text-align: center; color: var(--muted); }
.events-more { text-align: center; margin-top: 36px; }

/* ---------- Topic blocks (Talks / Workshops) ---------- */
.topic {
  display: grid; gap: clamp(24px, 4vw, 56px);
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: start;
  padding: clamp(36px, 5vw, 56px) 0;
  border-top: 1px solid var(--outline);
}
.topic:first-child { border-top: 0; }
.topic img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius); }
.topic.small { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
.topic.small img { aspect-ratio: 2 / 3; }
.topic h3 { margin-bottom: .5em; }
.topic h4 {
  font-size: 14px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); margin: 1.6em 0 .6em;
}
@media (max-width: 700px) {
  .topic, .topic.small { grid-template-columns: 1fr; }
  .topic img, .topic.small img { aspect-ratio: 4 / 3; max-height: 360px; }
}

.event-list { list-style: none; padding: 0; margin: 0; }
.event-list li { padding: 8px 0; border-bottom: 1px solid var(--outline); font-size: 16px; }
.event-list li:last-child { border-bottom: 0; }
.event-list a { text-decoration: none; color: var(--heading); font-weight: 500; }
.event-list a:hover { text-decoration: underline; color: var(--heading); }
.event-list .when { display: block; font-size: 14px; color: var(--muted); }
.event-list .note { font-size: 12px; font-weight: 600; color: #b42318; text-transform: uppercase; margin-left: 4px; }

.upcoming-callout {
  background: var(--surface); border-left: 4px solid var(--black);
  padding: 18px 22px; margin: 0 0 8px; border-radius: 0 var(--radius) var(--radius) 0;
}
.upcoming-callout p { margin: 0; }

.subhead { text-align: center; margin: clamp(48px, 7vw, 80px) 0 0; }

/* ---------- Community ---------- */
.collab {
  position: relative; color: var(--white); text-align: center;
  background: url(../img/band.jpg) 50% 50% / cover no-repeat;
  padding: clamp(64px, 9vw, 112px) var(--gutter);
}
.collab::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.collab > * { position: relative; max-width: 760px; margin-left: auto; margin-right: auto; }
.collab h1 { color: var(--white); font-size: clamp(34px, 5vw, 52px); }
.collab a:not(.btn) { color: var(--white); font-weight: 700; }

.team { display: grid; gap: clamp(40px, 6vw, 72px); }
.member {
  display: grid; gap: clamp(24px, 4vw, 48px);
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: start;
}
.member img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.member h3 { margin-bottom: .1em; }
.member .role { color: var(--heading); font-weight: 700; margin-bottom: 1em; }
@media (max-width: 700px) {
  .member { grid-template-columns: 1fr; }
  .member img { max-width: 420px; }
}

/* ---------- Podcasts ---------- */
.episode { padding: 40px 0; border-top: 1px solid var(--outline); }
.episode:first-child { border-top: 0; padding-top: 0; }
.episode h3 { margin-bottom: .5em; }
.episode iframe { width: 100%; height: 160px; border: 0; margin: 10px 0 6px; }
.episode ul { padding-left: 1.2em; }
.episode .src { font-size: 14px; }

/* ---------- Prose (privacy) ---------- */
.prose h2 { font-size: 24px; margin-top: 1.6em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: #cbd5e1; padding: 56px 0 32px; font-size: 14px; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-top {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px;
  padding-bottom: 28px; border-bottom: 1px solid #1f2937;
}
.footer-top img { width: 190px; }
.footer-info { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.footer-info strong { color: var(--white); font-weight: 600; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 24px;
}
.socials { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; }
.socials svg { width: 26px; height: 26px; fill: currentColor; display: block; }
