@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   SCA ISO Website — Modern Design System
   ============================================================ */

:root {
  /* Primary palette — warm terracotta/clay */
  --primary: #9b6b4a;
  --primary-dark: #6b4532;
  --primary-light: #b8876a;

  /* Accent — warm amber/golden */
  --accent: #c4913e;
  --accent-light: #f5e8d0;

  /* Backgrounds */
  --bg: #ffffff;
  --bg-subtle: #faf8f6;
  --surface: #ffffff;

  /* Text */
  --text: #2c2420;
  --text-muted: #6b5e56;
  --text-light: #998b82;

  /* Borders */
  --border: #e8e0d9;
  --border-light: #f3efeb;

  /* Shadows — layered system */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.04);
  --shadow-hover: 0 8px 28px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.04);

  /* Radius */
  --radius: 8px;
  --radius-lg: 12px;

  /* Layout */
  --nav-h: 64px;
}


/* ============================================================
   Reset & Base
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  letter-spacing: -0.011em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { transition: color 0.15s ease; }
button { transition: background 0.15s ease, color 0.15s ease; }


/* ============================================================
   Topbar
   ============================================================ */

.topbar {
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.78rem;
  padding: 6px 0;
  letter-spacing: 0.01em;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
}

.topbar a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.topbar a:hover { color: #fff; }


/* ============================================================
   Header & Navigation — White Frosted Glass
   ============================================================ */

header {
  background: rgba(255,255,255,0.95);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--primary-dark);
  flex-shrink: 0;
}

.logo img { height: 38px; width: auto; }

.logo-text {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-dark);
}

.logo-sub {
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
}

nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  overflow: visible;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

nav > ul > li > a {
  display: block;
  padding: 0.45rem 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

nav > ul > li.has-dropdown > a::after {
  content: ' \25BE';
  font-size: 0.6rem;
  opacity: 0.45;
  color: var(--text-muted);
}

nav > ul > li > a:hover,
nav > ul > li.active > a {
  background: var(--bg-subtle);
  color: var(--primary);
}

.has-dropdown { position: relative; }

.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  padding: 0.5rem;
  z-index: 200;
  animation: dropdownFadeIn 0.15s ease;
}

.dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown li a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: calc(var(--radius) - 2px);
  transition: background 0.12s ease, color 0.12s ease;
}

.dropdown li a:hover {
  background: var(--bg-subtle);
  color: var(--primary);
}

.has-dropdown:hover .dropdown { display: block; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  margin-left: auto;
}


/* ============================================================
   Mobile Navigation (≤960px)
   ============================================================ */

@media (max-width: 960px) {
  .nav-toggle { display: block; }

  nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border);
    overflow: visible;
  }

  nav.open { display: block; }

  nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0 0.75rem;
    flex-wrap: wrap;
  }

  nav > ul > li > a {
    width: 100%;
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
  }

  .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--bg-subtle);
    border-radius: var(--radius);
    min-width: 0;
    padding: 0.25rem 0;
    margin: 0.25rem 0 0.5rem;
    display: none;
    animation: none;
  }

  .dropdown::before {
    display: none;
  }

  .dropdown li a {
    color: var(--text-muted);
    padding-left: 1.25rem;
    font-size: 0.88rem;
  }

  .dropdown li a:hover { color: var(--primary); }

  .has-dropdown.open .dropdown { display: block; }
}


/* ============================================================
   Page Hero
   ============================================================ */

.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 3rem 2rem;
  text-align: center;
}

.page-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.page-hero p {
  font-size: 1.05rem;
  opacity: 0.92;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}


/* ============================================================
   Main & Container
   ============================================================ */

main { flex: 1; }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem;
}


/* ============================================================
   Content Typography
   ============================================================ */

.content h1,
.content h2,
.content h3,
.content h4 {
  color: var(--primary-dark);
  line-height: 1.3;
}

.content h1 {
  font-size: 1.875rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.content h3 {
  font-size: 1.175rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
  font-weight: 600;
}

.content h4 {
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.content p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.content ul, .content ol {
  margin: 1rem 0 1.5rem 1.75rem;
}

.content li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(155,107,74,0.3);
  text-underline-offset: 2px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.content a:hover {
  color: var(--primary-dark);
  text-decoration-color: var(--primary-dark);
}

.content strong {
  color: var(--text);
  font-weight: 600;
}

.content blockquote {
  border-left: 4px solid var(--accent);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
}

.content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.content th, .content td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.content th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.content tr:nth-child(even) td {
  background: var(--bg-subtle);
}


/* ============================================================
   Buttons
   ============================================================ */

.btn-link {
  display: inline-block;
  background: var(--primary);
  color: #fff !important;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  margin: 0.3rem 0;
  box-shadow: var(--shadow-sm);
}

.btn-link:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}


/* ============================================================
   Meetings
   ============================================================ */

.meetings-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.meetings-controls input,
.meetings-controls select {
  flex: 1;
  min-width: 160px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-family: inherit;
  background: #ffffff;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.meetings-controls input:focus,
.meetings-controls select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(155,107,74,0.12);
}

#meetings-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.meeting-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.meeting-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.meeting-card h3 {
  font-size: 1rem;
  color: var(--primary-dark);
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.meeting-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(155,107,74,0.08);
  color: var(--primary-dark);
  letter-spacing: 0.02em;
}

.badge.online { background: rgba(184,135,106,0.1); color: var(--primary); }
.badge.open   { background: rgba(39,174,96,0.1);  color: #1a7a3a; }
.badge.closed { background: rgba(192,57,43,0.08); color: #a93226; }

.meeting-location {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.meeting-link {
  font-size: 0.83rem;
  margin-top: 0.3rem;
}

.meeting-link a { color: var(--primary); }

.meeting-hidden { display: none !important; }


/* ============================================================
   Footer
   ============================================================ */

footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 3rem 2rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2.25rem;
  margin-bottom: 2.25rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  transition: color 0.15s ease;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}


/* ============================================================
   Home Hero
   ============================================================ */

.home-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: #fff;
  padding: 5.5rem 2rem;
  text-align: center;
}

.home-hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.home-hero .tagline {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 660px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

.home-hero .hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s ease, transform 0.15s ease;
  box-shadow: 0 2px 8px rgba(196,145,62,0.3);
}

.hero-btn-primary:hover {
  background: #a87a33;
  transform: translateY(-1px);
}

.hero-btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 1.5px solid rgba(255,255,255,0.45);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-btn-secondary:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.7);
}


/* ============================================================
   Home Section Cards
   ============================================================ */

.home-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.home-section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: block;
}

.home-section-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.home-section-card .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.home-section-card h3 {
  font-size: 1.05rem;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.home-section-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}


/* ============================================================
   Tablet Adjustments (≤960px)
   ============================================================ */

@media (max-width: 960px) {
  .home-hero { padding: 3.5rem 1.5rem; }
  .home-hero h1 { font-size: 2.1rem; }
  .home-hero .tagline { font-size: 1rem; }

  .page-hero { padding: 2rem 1.5rem; }
  .page-hero h1 { font-size: 1.75rem; }

  .home-sections {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1.5rem;
    margin: 2rem auto;
  }

  .container { padding: 2rem 1.5rem; }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ============================================================
   Mobile (≤768px)
   ============================================================ */

@media (max-width: 767px) {
  html { font-size: 15px; }

  .topbar { font-size: 0.72rem; padding: 4px 0; }
  .topbar-inner { gap: 1rem; }

  .header-inner { padding: 0 1rem; }
  .logo-text { font-size: 0.8rem; }
  .logo img { height: 30px; }

  .home-hero { padding: 2.5rem 1.25rem; }
  .home-hero h1 { font-size: 1.75rem; }
  .home-hero .tagline { font-size: 0.95rem; margin-bottom: 1.5rem; }

  .hero-btns { flex-direction: column; align-items: center; gap: 0.75rem; }
  .hero-btn-primary,
  .hero-btn-secondary { width: 100%; max-width: 280px; text-align: center; }

  .page-hero { padding: 1.5rem 1.25rem; }
  .page-hero h1 { font-size: 1.4rem; }

  .home-sections {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0 1.25rem;
    margin: 2rem auto;
  }

  .container { padding: 1.5rem 1.25rem; max-width: 100%; }

  .content h1 { font-size: 1.5rem; }
  .content h2 { font-size: 1.25rem; margin-top: 2rem; }
  .content h3 { font-size: 1.05rem; }

  .meetings-controls { flex-direction: column; }
  .meetings-controls input,
  .meetings-controls select { min-width: 100%; }

  .meeting-meta { flex-direction: column; gap: 0.3rem; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.25rem;
  }

  .content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}


/* ============================================================
   Accessibility
   ============================================================ */

*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

.meetings-controls input:focus-visible,
.meetings-controls select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
  box-shadow: 0 0 0 3px rgba(155,107,74,0.15);
}


/* ============================================================
   PDF Embed Viewer
   ============================================================ */

.pdf-embed {
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-subtle);
}

.pdf-embed iframe {
  display: block;
  width: 100%;
  height: 75vh;
  min-height: 500px;
  border: none;
}

.pdf-embed-fallback {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.pdf-embed-fallback a {
  color: var(--primary) !important;
  font-weight: 500;
  text-decoration: none !important;
}

.pdf-embed-fallback a:hover {
  color: var(--primary-dark) !important;
}

@media (max-width: 767px) {
  .pdf-embed iframe {
    height: 60vh;
    min-height: 400px;
  }

  .pdf-embed-fallback {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}


/* ============================================================
   Reduced Motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .home-section-card:hover { transform: none; }
  .btn-link:hover { transform: none; }
  .hero-btn-primary:hover { transform: none; }
}


/* ============================================================
   Print
   ============================================================ */

@media print {
  .topbar, header, footer, .nav-toggle, .hero-btns, .meetings-controls { display: none; }
  .page-hero, .home-hero { background: none; color: var(--text); padding: 1rem 0; }
  .container { max-width: 100%; padding: 0; }
  body { font-size: 12pt; line-height: 1.5; }
}
