/* ==========================================================================
   TCEA Learning Hub — styles
   Brand: TCEA navy & gold. Edit tokens in :root to retune the whole page.
   ========================================================================== */

:root {
  /* Brand palette */
  --navy: #0A3476;
  --navy-dark: #071f4a;
  --navy-mid: #12428f;
  --gold: #FCB040;
  --gold-light: #fdd17a;
  --gold-pale: #FEF0D0;
  --pale-navy: #D0D8F0;
  --white: #ffffff;
  --off-white: #f7f8fc;
  --text: #1a1a2e;
  --text-muted: #5a6680;
  --border: #e2e7f5;
  --teal: #0e6b8a;

  /* Fonts */
  --font-head: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Scale */
  --maxw: 1140px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(7, 31, 74, .06), 0 8px 24px rgba(7, 31, 74, .08);
  --shadow-hover: 0 4px 10px rgba(7, 31, 74, .10), 0 18px 40px rgba(7, 31, 74, .16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 31, 74, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-weight: 700;
  letter-spacing: .01em;
}
.brand .mark {
  font-family: var(--font-head);
  font-size: 1.35rem;
  color: var(--white);
}
.brand .mark .dot { color: var(--gold); }
.brand .divider {
  width: 1px; height: 22px; background: rgba(255,255,255,.22);
}
.brand .sub { color: var(--pale-navy); font-weight: 500; font-size: .95rem; }
.topbar nav a {
  color: var(--pale-navy);
  font-weight: 500;
  font-size: .95rem;
  margin-left: 22px;
}
.topbar nav a:hover { color: var(--white); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(900px 400px at 15% -10%, rgba(252, 176, 64, .16), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(18, 66, 143, .55), transparent 55%),
    linear-gradient(160deg, var(--navy-dark), var(--navy) 70%);
  color: var(--white);
  padding: 74px 0 96px;
  overflow: hidden;
}
.hero .eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  background: rgba(252, 176, 64, .12);
  border: 1px solid rgba(252, 176, 64, .35);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 18px;
  max-width: 18ch;
}
.hero h1 em { color: var(--gold); font-style: italic; }
.hero p.lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--pale-navy);
  max-width: 54ch;
  margin: 0 0 32px;
}

/* Search */
.search {
  position: relative;
  max-width: 520px;
}
.search input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  border: 2px solid transparent;
  border-radius: 100px;
  padding: 15px 18px 15px 48px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease;
}
.search input:focus {
  outline: none;
  border-color: var(--gold);
}
.search .icon {
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ---------- Hub grid ---------- */
.hubs { padding: 56px 0 24px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--navy);
  font-size: 1.9rem;
  margin: 0;
}
.section-head .count { color: var(--text-muted); font-size: .95rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  overflow: hidden;
  height: 100%;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .18s ease;
}
.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--pale-navy);
}
.card:hover::before,
.card:focus-within::before { transform: scaleY(1); }

.card .badge {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.6rem;
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  margin-bottom: 18px;
}
.card h3 {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--navy);
  font-size: 1.35rem;
  margin: 0 0 8px;
}
.card h3 a {
  color: inherit;
}
.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;               /* makes the whole card clickable */
}
.card h3 a:hover { text-decoration: none; }
.card p { color: var(--text-muted); margin: 0 0 18px; font-size: .97rem; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tag {
  font-size: .75rem;
  font-weight: 600;
  color: var(--navy-mid);
  background: var(--pale-navy);
  border-radius: 100px;
  padding: 4px 11px;
}

.card .go {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy-mid);
}
.card .go svg { transition: transform .16s ease; }
.card:hover .go svg { transform: translateX(4px); }

/* Coming-soon variant */
.card.soon { opacity: .72; }
.card.soon .badge { background: var(--off-white); border-color: var(--border); }
.card.soon .go { color: var(--text-muted); }
.card.soon .status {
  position: absolute; top: 18px; right: 18px;
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--off-white);
  border: 1px solid var(--border);
  padding: 4px 9px; border-radius: 100px;
}

/* Collapsible groups (accordion) */
.group {
  margin-bottom: 18px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.group.hide { display: none; }

.group-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: background .14s ease;
}
.group-head:hover { background: var(--off-white); }
.group-head:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.group-head .chev {
  flex: 0 0 auto;
  color: var(--navy-mid);
  transition: transform .18s ease;
}
.group.open .group-head .chev { transform: rotate(90deg); }

.group-title {
  font-family: var(--font-head);
  font-weight: 400;
  color: var(--navy);
  font-size: 1.5rem;
  line-height: 1.1;
}
.group-count {
  flex: 0 0 auto;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--navy-mid);
  background: var(--pale-navy);
  padding: 4px 11px;
  border-radius: 100px;
}
.group-blurb {
  flex: 1 1 100%;
  color: var(--text-muted);
  font-size: .95rem;
  margin: 2px 0 0 32px;
}

.group .grid {
  padding: 2px 24px 26px;
}
.group .grid[hidden] { display: none; }

.card.hide { display: none; }

@media (max-width: 640px) {
  .group-head { padding: 16px 18px; }
  .group-title { font-size: 1.3rem; }
  .group-blurb { margin-left: 0; }
  .group .grid { padding: 2px 18px 20px; }
}

/* Empty state */
.empty {
  display: none;
  text-align: center;
  color: var(--text-muted);
  padding: 48px 0;
}
.empty.show { display: block; }

/* ---------- Footer ---------- */
footer {
  margin-top: 56px;
  background: var(--navy-dark);
  color: var(--pale-navy);
  padding: 40px 0;
  font-size: .92rem;
}
footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
footer a { color: var(--gold-light); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .hero { padding: 54px 0 68px; }
  .topbar nav { display: none; }
  .brand .sub { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
}
