/* ── COO Roundtable · Members Shared Styles ──────────────────────── */
/* Derived from the homepage style guide (site/STYLE-GUIDE.md)        */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,400;0,700;1,100;1,400;1,700&family=Archivo:ital,wght@0,700;0,800;1,700;1,800&family=Epilogue:ital,wght@0,400;0,600&display=swap');

/* ── Resets ──────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Design Tokens ──────────────────────────────────────────────── */

:root {
  /* Brand palette */
  --accent:       hsl(194.25, 99.17%, 47.45%);
  --lightAccent:  hsl(240, 10.53%, 92.55%);
  --darkAccent:   hsl(199.44, 96.43%, 21.96%);
  --white:        #fff;
  --black:        #000;

  /* Semantic tokens */
  --page-bg:        var(--lightAccent);
  --surface:        var(--white);
  --surface-alt:    hsl(240, 8%, 96%);
  --border:         hsl(220, 8%, 85%);
  --border-hover:   hsl(220, 8%, 72%);
  --text-primary:   var(--black);
  --text-secondary: hsl(220, 5%, 40%);
  --text-tertiary:  hsl(220, 5%, 60%);
  --heading-color:  var(--darkAccent);
  --accent-soft-bg:   hsl(194, 60%, 93%);
  --accent-soft-text: hsl(199, 96%, 22%);
  --error-bg:       hsl(0, 80%, 96%);
  --error-text:     hsl(0, 70%, 35%);
  /* Editorial accent: text links, eyebrows, CTAs (cyan --accent is for buttons and decoration) */
  --story-teal:     hsl(194, 90%, 36%);
  --story-teal-ink: hsl(199, 96%, 24%);
  /* Cards: one radius, one shadow, one hover */
  --card-radius:       10px;
  --card-shadow:       0 10px 26px -20px hsla(199, 50%, 20%, 0.35);
  --card-shadow-hover: 0 22px 42px -22px hsla(199, 55%, 20%, 0.5);
  --card-border-hover: hsl(194, 70%, 72%);

  /* Layout */
  --site-max-width: 1400px;
  --site-gutter:    clamp(20px, 4vw, 40px);
  --content-max:    1120px;
}

/* ── Base Typography ────────────────────────────────────────────── */

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--page-bg);
  line-height: 1.6;
  font-size: calc(0.12vw + 1rem);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  color: var(--heading-color);
  line-height: 1.15;
  letter-spacing: 0;
}

a {
  color: var(--story-teal);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover { color: var(--story-teal-ink); }

/* ── Members Header (sticky, dark navy) ─────────────────────────── */

.members-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: hsl(199, 96%, 16%);
}

.members-header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0.75rem var(--site-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.members-header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.members-header-logo img {
  height: 42px;
  width: auto;
  display: block;
  filter: brightness(1.5);
}

.members-header-logo span {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.15;
}

.members-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.members-nav a {
  font-family: 'Epilogue', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: hsla(0, 0%, 100%, 0.7);
  text-decoration: none;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s;
}

.members-nav a:hover,
.members-nav a.active {
  color: var(--white);
}

.members-nav .nav-logout {
  margin-left: 0.75rem;
  opacity: 0.5;
}
.members-nav .nav-logout:hover {
  opacity: 1;
}

/* ── Buttons ────────────────────────────────────────────────────── */
/* Montserrat, sentence case. Primary = cyan; secondary = white with a border;
   quiet = grey utility. Add .btn-sm for compact rows. Epilogue stays in the nav. */

.btn-primary,
.btn-secondary,
.btn-small {
  font-family: 'Montserrat', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s, border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-primary svg, .btn-secondary svg, .btn-small svg { width: 15px; height: 15px; flex: 0 0 auto; }

.btn-primary {
  color: var(--white);
  background: var(--accent);
  border: none;
  padding: 11px 16px;
}
.btn-primary:hover { opacity: 0.85; color: var(--white); }

.btn-secondary {
  color: var(--story-teal-ink);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 15px;
}
.btn-secondary:hover { border-color: var(--card-border-hover); color: var(--story-teal-ink); }

/* Compact primary for dense rows (masterclass cards) */
.btn-small {
  color: var(--white);
  background: var(--accent);
  border: none;
  font-size: 13px;
  padding: 9px 13px;
}
.btn-small:hover { opacity: 0.85; color: var(--white); }

.btn-sm { font-size: 13px !important; padding: 9px 13px !important; }
.btn-sm svg { width: 13px !important; height: 13px !important; }

.btn-quiet {
  font-family: 'Montserrat', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-alt);
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-quiet:hover { color: var(--text-primary); }

/* Text CTA: teal, arrow or external icon after the label */
.readcta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--story-teal);
  text-decoration: none;
}
.readcta svg { width: 15px; height: 15px; flex: 0 0 auto; }
.readcta:hover { color: var(--story-teal-ink); }

/* Read-only labels (never clickable): grey by default, pale cyan for one emphasised fact */
.label {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text-secondary);
  font-family: 'Montserrat', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
}
.label--accent {
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
}
.label--lg { font-size: 13px; padding: 6px 12px; }

/* Eyebrow label */
.eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--story-teal);
}

/* ── Cards (base) ───────────────────────────────────────────────── */

.card-base {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.card-header {
  background: var(--darkAccent);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header h2 {
  font-family: 'Epilogue', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.card-header .section-icon {
  font-size: 1.1rem;
}

.card-header a {
  font-family: 'Epilogue', sans-serif;
  font-size: 0.75rem;
  color: hsla(0, 0%, 100%, 0.65);
  text-decoration: none;
  transition: color 0.2s;
}

.card-header a:hover { color: var(--white); opacity: 1; }

.card-body {
  padding: 1.25rem;
}

/* ── Filter Pills (shared) ──────────────────────────────────────── */

.pill {
  font-family: 'Montserrat', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}

.pill:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.pill--active,
.pill--active:hover {
  background: var(--darkAccent);
  color: var(--white);
  border-color: var(--darkAccent);
}

/* ── Search Input (shared) ──────────────────────────────────────── */

.search-input {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.search-input:focus {
  border-color: var(--accent);
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

/* ── Modals (shared) ────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 1.5rem 1rem;
}

.modal-overlay.open {
  display: block;
}

.modal-panel {
  position: relative;
  background: var(--surface);
  width: 100%;
  max-width: 48rem;
  margin: 1.5rem auto;
  border-radius: var(--card-radius);
  overflow: hidden;
}

.modal-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-panel-header h3 {
  font-size: 1rem;
  color: var(--heading-color);
}

.modal-panel-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  text-transform: none;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
  font-size: 1.5rem;
  line-height: 1;
  z-index: 1;
}

.modal-close:hover { color: var(--text-primary); }

.modal-panel-body {
  overflow-y: auto;
  padding: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.9375rem;
}

/* ── Page Hero (dark band, every page) ─────────────────────────── */

.page-hero {
  background: var(--darkAccent);
  padding: 44px var(--site-gutter) 38px;
  text-align: center;
}

.page-hero-content {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}


.page-hero h1 {
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
}

.page-hero p {
  font-size: 16px;
  max-width: 620px;
  color: hsla(0, 0%, 100%, 0.74);
  line-height: 1.6;
  margin: 0;
  /* Reserve two lines so every page's band is the same height regardless of subtitle length */
  min-height: 3.2em;
}

.page-hero-rule {
  height: 3px;
  width: 64px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 10px;
}

/* ── Sticky Filter Bar (shared across sub-pages) ───────────────── */

.sticky-filter {
  /* Inline filters under the band (no longer sticky, no white bar) */
  position: static;
  background: transparent;
  border: none;
  box-shadow: none;
}

.sticky-filter-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px var(--site-gutter) 4px;
}

.sticky-filter-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.filter-search-wrap {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.filter-search-wrap > svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--text-tertiary);
  pointer-events: none;
  z-index: 1;
}

.filter-search-wrap .search-input {
  padding-left: 2.4rem;
}

.filter-result-count {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.filter-pills-scroll {
  margin-top: 12px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.filter-pills-scroll::-webkit-scrollbar { display: none; }

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Page Footer (shared across sub-pages) ─────────────────────── */

.page-footer {
  text-align: center;
  padding: 1.5rem var(--site-gutter);
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border);
  max-width: var(--content-max);
  margin: 2rem auto 0;
}

.footer-terms-link {
  color: var(--text-tertiary);
  text-decoration: none;
}

.footer-terms-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Loading Skeleton ───────────────────────────────────────────── */

.skeleton {
  background: linear-gradient(90deg, var(--surface-alt) 25%, var(--border) 50%, var(--surface-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Utility ────────────────────────────────────────────────────── */

.hidden { display: none !important; }

.text-center { text-align: center; }

.space-y > * + * { margin-top: 1.5rem; }

.space-y-sm > * + * { margin-top: 0.75rem; }

/* ── Burger Toggle (hidden on desktop) ─────────────────────────── */

.burger-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  transition: opacity 0.2s;
}

.burger-toggle:hover { opacity: 0.8; }

/* ── Responsive (768px) ─────────────────────────────────────────── */

@media (max-width: 768px) {
  :root {
    --site-gutter: 1.25rem;
  }

  .members-header-logo span {
    font-size: 0.85rem;
  }

  .burger-toggle {
    display: flex;
  }

  .members-header-inner {
    position: relative;
  }

  .members-header .members-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--darkAccent);
    padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 50;
  }

  .members-header.nav-open .members-nav {
    display: flex;
  }

  .members-nav a {
    font-size: 0.9rem;
    padding: 0.65rem var(--site-gutter);
    border-radius: 0;
  }

  .members-nav .nav-logout {
    margin-left: 0;
    border-top: 1px solid hsla(0, 0%, 100%, 0.1);
    margin-top: 0.25rem;
    padding-top: 0.75rem;
  }

  .sticky-filter {
    position: static;
  }

  .btn-primary {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }

  .modal-panel {
    margin: 1rem 0.5rem;
    border-radius: 16px;
    max-width: calc(100vw - 1rem);
  }

  .page-hero {
    padding: 2.5rem var(--site-gutter) 2rem;
  }

  .sticky-filter-top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .filter-search-wrap {
    max-width: 100%;
  }

  .filter-result-count {
    text-align: center;
  }
}
