/* =========================================================================
   FORESIGHT — Main Stylesheet
   Base typography, navigation, footer, animations
   Loaded on every page.
   Page-specific styles remain inline in each template.
   ========================================================================= */

:root {
  --bg: #FFFFFF;
  --bg-alt: #F4F4F2;
  --bg-dark: #0E0E10;
  --ink: #111113;
  --ink-soft: #3A3A3D;
  --muted: #6E6E73;
  --line: #E2E2DD;
  --line-soft: #EFEFEB;
  --accent: #C8102E;
  --max: 1440px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 48px; } }

/* =========================================================================
   NAVIGATION
   ========================================================================= */
nav.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
@media (min-width: 768px) { .nav-inner { padding: 22px 48px; } }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 44px; width: auto; display: block; }
@media (min-width: 768px) { .brand-logo { height: 52px; } }

.nav-links { display: none; gap: 32px; font-size: 14px; font-weight: 500; }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-link { padding: 8px 0; color: var(--ink); transition: color 0.2s; }
.nav-link:hover, .nav-link.active, .nav-link.current-menu-item { color: var(--accent); }

.nav-cta { display: none; }
@media (min-width: 768px) { .nav-cta { display: inline-flex; } }

/* Language switcher */
.nav-lang {
  display: none;
  align-items: center;
  gap: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
@media (min-width: 1024px) { .nav-lang { display: inline-flex; } }
.nav-lang-current {
  color: var(--ink);
  font-weight: 600;
  cursor: default;
  padding: 4px 6px;
  border-bottom: 1px solid var(--accent);
}
.nav-lang-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  padding: 4px 6px;
}
.nav-lang-divider {
  color: var(--line);
  font-weight: 300;
}

.btn-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 500; border-radius: 2px;
  transition: all 0.2s;
}
.btn-pill:hover { background: var(--accent); }

/* =========================================================================
   FOOTER
   ========================================================================= */
footer { background: var(--bg-dark); color: rgba(255,255,255,0.75); padding: 64px 0 32px; }
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 48px;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; } }

.footer-brand .brand-logo { filter: brightness(0) invert(1); }
.footer p { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.55); margin-top: 16px; max-width: 380px; }
.footer h4, footer h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.45); font-weight: 500; margin-bottom: 16px;
}
footer ul { list-style: none; }
footer ul li { margin-bottom: 10px; font-size: 14px; }
footer ul li a { color: rgba(255,255,255,0.75); transition: color 0.2s; }
footer ul li a:hover { color: var(--accent); }

.footer-data { font-family: 'IBM Plex Mono', monospace; font-size: 12px; line-height: 1.9; color: rgba(255,255,255,0.65); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex; flex-direction: column; gap: 12px;
  font-size: 12px; color: rgba(255,255,255,0.4);
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }

/* =========================================================================
   ANIMATIONS — scroll reveal
   ========================================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; }
.reveal.in { animation: fadeUp 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }

/* =========================================================================
   WORDPRESS-SPECIFIC HELPERS
   ========================================================================= */

/* WP admin bar offset */
body.admin-bar nav.top { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar nav.top { top: 46px; }
}

/* WP block editor compatibility */
.wp-block-image img { display: block; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.alignwide { max-width: 1280px; margin-left: auto; margin-right: auto; }

/* Screen reader only (used by WP) */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}
