/* ==========================================================================
   Forres Youth Choir — Global Stylesheet
   Brand Guide v1.0 · forresyouthchoir.co.uk
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@400;500;600;700&display=swap');

/* --- Custom Properties --- */
:root {
  /* Primary */
  --gold: #F5C400;
  --charcoal: #1C1C1C;

  /* Secondary */
  --warm-grey: #E8E4DC;
  --white: #FFFFFF;
  --mid-grey: #555555;

  /* Functional */
  --gold-hover: #e0b300;
  --gold-light: rgba(245, 196, 0, 0.1);
  --border-light: rgba(28, 28, 28, 0.08);
  --shadow-sm: 0 1px 3px rgba(28, 28, 28, 0.06);
  --shadow-md: 0 4px 12px rgba(28, 28, 28, 0.08);
  --shadow-lg: 0 8px 24px rgba(28, 28, 28, 0.1);

  /* Typography */
  --font-display: 'EB Garamond', Georgia, serif;
  --font-body: 'DM Sans', Calibri, system-ui, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --container: 1200px;
  --container-narrow: 800px;
  --nav-height: 72px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--mid-grey);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--charcoal);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--gold);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--charcoal);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p + p { margin-top: var(--space-sm); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.lead {
  font-size: 1.125rem;
  line-height: 1.8;
}

blockquote,
.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  line-height: 1.5;
  color: var(--charcoal);
}

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

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: var(--space-xl) 0;
}

.section--lg {
  padding: var(--space-2xl) 0;
}

.section--dark {
  background: var(--charcoal);
  color: var(--warm-grey);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--white);
}

.section--dark .eyebrow {
  color: var(--gold);
}

.section--gold {
  background: var(--gold);
  color: var(--charcoal);
}

.section--gold h1,
.section--gold h2,
.section--gold h3,
.section--gold h4,
.section--gold p {
  color: var(--charcoal);
}

.section--warm {
  background: var(--warm-grey);
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: var(--space-md);
}

.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--gold);
  height: var(--nav-height);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav__logo:hover {
  color: var(--charcoal);
}

.nav__links {
  display: none;
  align-items: center;
  gap: var(--space-md);
}

.nav__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--mid-grey);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--charcoal);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background: var(--gold);
  color: var(--charcoal) !important;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.nav__cta:hover {
  background: var(--gold-hover);
  color: var(--charcoal) !important;
}

.nav__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 960px) {
  .nav__links { display: flex; }
  .nav__toggle { display: none; }
}

/* Mobile menu */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  padding: var(--space-lg) var(--space-md);
  z-index: 99;
  flex-direction: column;
  gap: var(--space-sm);
}

.nav__mobile.active {
  display: flex;
}

.nav__mobile a {
  font-size: 1.25rem;
  font-weight: 500;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--border-light);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-align: center;
}

.btn--primary {
  background: var(--gold);
  color: var(--charcoal);
}

.btn--primary:hover {
  background: var(--gold-hover);
  color: var(--charcoal);
}

.btn--ghost {
  background: transparent;
  color: var(--charcoal);
  border: 2px solid var(--charcoal);
}

.btn--ghost:hover {
  background: var(--charcoal);
  color: var(--white);
}

.btn--white {
  background: var(--white);
  color: var(--charcoal);
}

.btn--white:hover {
  background: var(--warm-grey);
  color: var(--charcoal);
}

/* --- Hero --- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - var(--nav-height));
}

.hero__content {
  background: var(--charcoal);
  color: var(--warm-grey);
  padding: var(--space-xl) var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__content h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
  color: var(--white);
  margin-bottom: var(--space-sm);
}

.hero__content p {
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: var(--space-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.hero__actions .learn-more {
  color: var(--warm-grey);
  font-weight: 500;
  border-bottom: 1px solid var(--warm-grey);
  padding-bottom: 2px;
}

.hero__actions .learn-more:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.hero__aside {
  background: var(--gold);
  padding: var(--space-xl) var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: var(--charcoal);
  line-height: 1.5;
  margin-bottom: var(--space-lg);
}

.hero__stats {
  display: flex;
  gap: var(--space-lg);
}

.hero__stat {
  text-align: center;
}

.hero__stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--charcoal);
  display: block;
}

.hero__stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--charcoal);
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .hero__content {
    padding: var(--space-2xl);
  }

  .hero__aside {
    padding: var(--space-2xl);
  }
}

/* --- Pillars --- */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  background: var(--gold);
}

.pillar {
  background: var(--white);
  padding: var(--space-lg) var(--space-md);
}

.pillar__number {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: var(--space-xs);
}

.pillar h3 {
  margin-bottom: var(--space-sm);
}

@media (min-width: 960px) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
  }

  .pillar {
    padding: var(--space-xl) var(--space-lg);
  }
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: 6px;
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card--bordered {
  border-left: 3px solid var(--gold);
}

.card h3 {
  margin-bottom: var(--space-xs);
}

.card p {
  color: var(--mid-grey);
}

/* --- Director cards --- */
.director {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-left: 4px solid var(--gold);
  background: var(--white);
  margin-bottom: var(--space-md);
}

.director__photo {
  width: 160px;
  height: 160px;
  background: var(--warm-grey);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mid-grey);
  font-size: 0.875rem;
}

.director h3 {
  margin-bottom: 0.25rem;
}

.director__role {
  font-size: 0.875rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

@media (min-width: 640px) {
  .director {
    grid-template-columns: 160px 1fr;
  }
}

/* --- FAQ --- */
.faq__item {
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-md) 0;
}

.faq__question {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--charcoal);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

.faq__question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--gold);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq__item.active .faq__question::after {
  content: '−';
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq__item.active .faq__answer {
  max-height: 200px;
  padding-top: var(--space-sm);
}

/* --- Forms --- */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--charcoal);
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid #d1d1d1;
  border-radius: 4px;
  background: var(--white);
  color: var(--charcoal);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-light);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group input.error,
.form-group textarea.error {
  border-color: #d93025;
}

.form-group .error-msg {
  color: #d93025;
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group input.error ~ .error-msg,
.form-group textarea.error ~ .error-msg {
  display: block;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
  accent-color: var(--gold);
}

.checkbox-group label {
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--mid-grey);
}

.form-success {
  display: none;
  background: #e8f5e9;
  border: 1px solid #4caf50;
  border-radius: 6px;
  padding: var(--space-lg);
  text-align: center;
}

.form-success h3 {
  color: #2e7d32;
  margin-bottom: var(--space-xs);
}

.form-error {
  display: none;
  background: #fce8e6;
  border: 1px solid #d93025;
  border-radius: 6px;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.form-error p {
  color: #d93025;
  font-size: 0.9375rem;
}

/* --- Page Header --- */
.page-header {
  background: var(--charcoal);
  padding: var(--space-xl) 0;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  margin-bottom: var(--space-xs);
}

.page-header p {
  color: var(--warm-grey);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

.page-header .eyebrow {
  margin-bottom: var(--space-xs);
}

/* --- Repertoire Cards --- */
.repertoire-card {
  background: var(--white);
  border-radius: 6px;
  padding: var(--space-lg);
  border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-sm);
}

.repertoire-card h3 {
  margin-bottom: var(--space-xs);
}

/* --- Event cards --- */
.event-card {
  background: var(--white);
  border-radius: 6px;
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--gold);
}

.event-card__date {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-card h3 {
  margin: 0.25rem 0 var(--space-xs);
}

/* --- Footer --- */
.footer {
  background: var(--charcoal);
  color: var(--warm-grey);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

@media (min-width: 640px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

.footer__brand-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-xs);
}

.footer__social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.footer__social a {
  color: var(--warm-grey);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer__social a:hover {
  color: var(--gold);
}

.footer h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer ul a {
  color: var(--warm-grey);
  font-size: 0.9375rem;
}

.footer ul a:hover {
  color: var(--gold);
}

.footer__base {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer__base a {
  color: rgba(255, 255, 255, 0.5);
}

.footer__base a:hover {
  color: var(--gold);
}

.footer__legal {
  display: flex;
  gap: var(--space-md);
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-charcoal { color: var(--charcoal); }
.text-white { color: var(--white); }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

/* --- Skip to content (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--gold);
  color: var(--charcoal);
  padding: 0.5rem 1rem;
  font-weight: 600;
  z-index: 200;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
}

/* --- Brand statement (full width) --- */
.brand-statement {
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
}

.brand-statement blockquote {
  max-width: 800px;
  margin: 0 auto;
  font-size: clamp(1.375rem, 3.5vw, 1.875rem);
  color: var(--white);
}

/* --- Responsive helpers --- */
@media (max-width: 639px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 640px) {
  .hide-desktop { display: none !important; }
}
