/* ============================================================
   CFHTW — components.css
   Nav, footer, cards, timeline, news items, email signup
   ============================================================ */

/* ── Navigation ───────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--nav-bg);
  border-bottom: none;
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-logo-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: #fff;
  letter-spacing: 0;
  flex-shrink: 0;
}

.nav-site-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--nav-text);
  line-height: 1;
}

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

.nav-links a {
  padding: 0.4em 0.8em;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.65);
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.nav-links .nav-cta {
  margin-left: 0.5rem;
  padding: 0.4em 1em;
  background: var(--accent);
  color: #fff !important;
  border-radius: var(--radius);
}
.nav-links .nav-cta:hover {
  background: var(--accent-hover) !important;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 1.5rem;
    gap: 0.25rem;
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }
  .nav-links .nav-cta { margin-left: 0; }
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--nav-bg);
  border-top: none;
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  max-width: 320px;
}

.footer-brand .nav-site-name {
  color: #fff;
}

.footer-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
}

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

.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
}
.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.35);
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  font-style: italic;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ── Project Cards ────────────────────────────────────────── */
.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  color: inherit;
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card h3 {
  font-size: 1.5rem;
  color: var(--text);
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.project-card-footer .link-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Blog Post Cards ──────────────────────────────────────── */
.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.post-card:hover {
  border-color: var(--accent);
}

.post-card a {
  color: inherit;
  text-decoration: none;
}

.post-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-raised);
}

.post-card-image-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.post-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-card h4 {
  font-size: 1rem;
  line-height: 1.35;
}

.post-card h4 a:hover { color: var(--accent); }

.post-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.post-card-link {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── News Items ───────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.news-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s;
}

.news-item:hover { border-color: var(--accent); }

.news-item-meta {
  font-size: 0.775rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-item-source {
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.news-item h4 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.news-item h4 a { color: var(--text); }
.news-item h4 a:hover { color: var(--accent); }

.news-item p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-loading, .news-error, .news-empty {
  grid-column: 1 / -1;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.news-refresh {
  font-size: 0.775rem;
  color: var(--text-dim);
  margin-top: 1rem;
  text-align: right;
}

@media (max-width: 700px) {
  .news-grid { grid-template-columns: 1fr; }
}

/* ── Timeline ─────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.375rem;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-cat {
  font-size: 0.7rem;
  padding: 0.15em 0.5em;
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.timeline-item h4 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.timeline-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.timeline-item img {
  margin-top: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-height: 300px;
  object-fit: cover;
}

/* ── Key Players / Documents Sidebar ─────────────────────── */
.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-player {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-player:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.sidebar-player strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.sidebar-player .role {
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.sidebar-player p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.sidebar-doc {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.sidebar-doc:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.sidebar-doc-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-glow);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.sidebar-doc strong {
  display: block;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.15rem;
}
.sidebar-doc:hover strong { color: var(--accent); }

.sidebar-doc span {
  font-size: 0.775rem;
  color: var(--text-dim);
}

/* ── Email Signup ─────────────────────────────────────────── */
.signup-strip {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4rem 0;
}

.signup-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.signup-copy h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

.signup-copy p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.signup-form input {
  padding: 0.7em 1em;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  transition: border-color 0.2s;
}

.signup-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.signup-form input::placeholder { color: var(--text-dim); }

.signup-project-select {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.signup-project-select label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  display: block;
}

.signup-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
}

.signup-checkbox input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}

.signup-form .btn { align-self: flex-start; }

.signup-success {
  display: none;
  padding: 1rem;
  background: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.3);
  border-radius: var(--radius);
  color: var(--success);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .signup-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
  gap: 0;
}

.tab-btn {
  padding: 0.6em 1.25em;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Hero ─────────────────────────────────────────────────── */
.site-hero {
  padding: 7rem 0 6rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.hero-logo {
  display: block;
  width: 135px;
  height: 135px;
  margin: 0 auto 1.75rem;
  border-radius: 50%;
  object-fit: cover;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.site-hero h1 {
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--text);
}

.site-hero .tagline {
  font-size: clamp(1rem, 2.5vw, 1.375rem);
  color: var(--accent);
  max-width: 540px;
  margin: 0 auto 2rem;
}

.hero-latest {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4em 1em;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.hero-latest strong { color: var(--text); }
.hero-latest .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); flex-shrink: 0; animation: pulse 2s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

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

/* ── Project Hero ─────────────────────────────────────────── */
.project-hero {
  padding: 4rem 0 3rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.project-hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
}

.project-hero .badge { margin-bottom: 1rem; }

.project-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.project-hero .tagline {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 540px;
}

@media (max-width: 600px) {
  .project-hero-inner { grid-template-columns: 1fr; }
}

/* ── Page Layout: Project ─────────────────────────────────── */
.project-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0 5rem;
}

@media (max-width: 960px) {
  .project-layout { grid-template-columns: 1fr; }
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
  font-size: 0.8125rem;
  color: var(--text-dim);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { margin: 0 0.4em; }
