/* =====================================================================
   Municipal Wind Orchestra — public site styles
   RTL/LTR: uses CSS logical properties (margin-inline-start, inset-inline-end…)
   so the same rules work for dir="rtl" (Hebrew) and dir="ltr" (English).
   ===================================================================== */

:root {
  --navy: #13294b;
  --navy-2: #1d3b6a;
  --brass: #c9a227;
  --brass-2: #e3c25a;
  --ink: #1d2433;
  --muted: #5d6677;
  --bg: #ffffff;
  --bg-alt: #f5f3ee;
  --card: #ffffff;
  --line: #e4e0d6;
  --ok: #1d7a46;
  --err: #b42318;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(19, 41, 75, .08);
  --font-he: "Rubik", "Assistant", "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
  --font-en: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  font-family: var(--font-en);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
html[lang="he"] body { font-family: var(--font-he); }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); }
a:hover { color: var(--brass); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.25; color: var(--navy); margin: 0 0 .6em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); position: relative; padding-bottom: .35em; }
h2::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: 0;
  width: 56px; height: 4px; border-radius: 2px; background: var(--brass);
}
h3 { font-size: 1.25rem; }

.container { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-alt { background: var(--bg-alt); }
.mt { margin-top: 2.5rem; }
.muted { color: var(--muted); }
.prose { white-space: pre-line; margin: 0 0 1em; }
.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.skip-link { position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 100;
  background: var(--brass); color: #000; padding: .5rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(19, 41, 75, .97);
  backdrop-filter: saturate(150%) blur(8px);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; }
.brand:hover { color: var(--brass-2); }
.brand-logo { width: 32px; height: 32px; fill: var(--brass); flex: none; }
html[dir="rtl"] .brand-logo { transform: scaleX(-1); }
.brand-name { font-size: 1rem; line-height: 1.2; max-width: 22ch; }

.main-nav { display: flex; align-items: center; gap: 1.25rem; }
.main-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.main-nav ul a {
  display: block; padding: .5rem .8rem; border-radius: 8px;
  color: #e9eef7; text-decoration: none; font-weight: 500;
}
.main-nav ul a:hover, .main-nav ul a.is-active { background: rgba(255, 255, 255, .1); color: var(--brass-2); }

.lang-switch {
  display: inline-flex; align-items: center; padding: .4rem .9rem;
  border: 2px solid var(--brass); border-radius: 999px;
  color: var(--brass-2); text-decoration: none; font-weight: 700; font-size: .9rem;
  font-family: var(--font-en);
}
html[lang="en"] .lang-switch { font-family: var(--font-he); }
.lang-switch:hover { background: var(--brass); color: var(--navy); }

.menu-toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; color: #fff; }
.menu-bars, .menu-bars::before, .menu-bars::after {
  display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px;
  position: relative; transition: transform .2s, opacity .2s;
}
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.menu-bars::before { top: -7px; }
.menu-bars::after  { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after  { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .5rem;
    padding: 1rem 1.25rem 1.5rem; background: var(--navy);
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav ul { flex-direction: column; }
  .main-nav ul a { padding: .8rem; font-size: 1.1rem; }
  .lang-switch { align-self: flex-start; }
  .no-js .main-nav { position: static; display: flex; }
  .no-js .menu-toggle { display: none; }
  .no-js .header-inner { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(201, 162, 39, .35), transparent 60%),
    radial-gradient(900px 500px at 0% 120%, rgba(227, 194, 90, .18), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
}
.hero::after { /* subtle staff-lines motif */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08;
  background: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 14px);
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  top: 38%; bottom: 38%;
}
.hero-inner { position: relative; z-index: 1; padding-block: clamp(4rem, 12vw, 8rem); max-width: 860px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5.5vw, 3.4rem); margin-bottom: .2em; }
.hero-sub { color: var(--brass-2); font-size: 1.2rem; margin: 0 0 1rem; font-weight: 500; }
.hero-tagline { font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: #dfe6f3; margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .75rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brass); color: var(--navy); }
.btn-primary:hover { background: var(--brass-2); color: var(--navy); }
.btn-ghost { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-sm { padding: .45rem 1rem; font-size: .9rem; }

/* ---------- Layout helpers ---------- */
.grid-2 { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow);
}

/* ---------- About ---------- */
.conductor { display: flex; gap: 1.4rem; align-items: flex-start; }
.conductor img { width: 140px; height: 140px; object-fit: cover; border-radius: 50%; border: 4px solid var(--brass); flex: none; }
.conductor-name { font-weight: 700; font-size: 1.15rem; margin: 0 0 .4rem; }
@media (max-width: 520px) { .conductor { flex-direction: column; align-items: center; text-align: center; } }

.rehearsals dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0 0 1rem; }
.rehearsals dt { font-weight: 700; color: var(--navy); }
.rehearsals dd { margin: 0; }

/* ---------- Members ---------- */
.member-section { margin-top: 2.2rem; }
.member-section h3 {
  display: inline-block; padding: .2rem .9rem; border-radius: 999px;
  background: var(--navy); color: #fff; font-size: 1rem;
}
.member-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.member {
  display: flex; align-items: center; gap: .9rem; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem;
}
.member img, .avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar {
  display: grid; place-items: center; font-weight: 700; font-size: 1.4rem;
  background: linear-gradient(135deg, var(--brass-2), var(--brass)); color: var(--navy);
}
.member strong { display: block; }
.member .muted { font-size: .92rem; }
.member-bio summary { cursor: pointer; color: var(--navy-2); font-weight: 700; list-style: none; }
.member-bio summary::-webkit-details-marker { display: none; }
.member-bio p { margin: .3rem 0 0; font-size: .92rem; white-space: pre-line; }

/* ---------- Concerts ---------- */
.concert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.concert { border-inline-start: 6px solid var(--brass); }
.concert h3 { margin: .3rem 0; }
.concert-date { color: var(--brass); font-weight: 700; font-size: .95rem; }
.concert-loc { margin: 0 0 .6rem; color: var(--muted); }

.archive { margin-top: 2.5rem; background: var(--bg-alt); border-radius: var(--radius); padding: 1rem 1.4rem; }
.archive summary { cursor: pointer; font-weight: 700; color: var(--navy); font-size: 1.1rem; }
.archive-list { margin: 1rem 0 0; padding-inline-start: 1.2rem; }
.archive-list li { margin-bottom: .35rem; }

/* ---------- Contact ---------- */
.contact-form { display: grid; gap: 1rem; }
.contact-form label { display: grid; gap: .35rem; font-weight: 600; }
.contact-form input, .contact-form textarea {
  font: inherit; font-weight: 400; padding: .75rem .9rem; border-radius: 10px;
  border: 1px solid #cfd6e3; background: #fff; color: var(--ink); width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--navy-2); outline: 2px solid rgba(29, 59, 106, .2); }
.contact-form button { justify-self: start; }
html[dir="rtl"] .contact-form input[dir="ltr"] { text-align: right; }

.contact-info { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .5rem; }
.social { display: flex; gap: .7rem; margin-bottom: 1.5rem; }
.social a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: #fff; transition: background .15s;
}
.social a:hover { background: var(--brass); color: var(--navy); }
.social svg { width: 22px; height: 22px; fill: currentColor; }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

.alert { padding: .9rem 1.1rem; border-radius: 10px; font-weight: 600; }
.alert-ok  { background: #e7f6ee; color: var(--ok); border: 1px solid #b7e2c8; }
.alert-err { background: #fdecea; color: var(--err); border: 1px solid #f5c2bc; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c7d0e0; padding-block: 1.6rem; text-align: center; font-size: .95rem; }
.site-footer p { margin: 0; }

/* ---------- Reveal animation (added by main.js) ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Print ---------- */
@media print {
  .site-header, .hero-actions, .contact-form, .map, .social { display: none !important; }
  .hero { background: none; color: #000; } .hero h1 { color: #000; }
}
