@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=Syne:wght@700;800&display=swap");

:root {
  --ink: #08090c;
  --bg: #eef0ea;
  --paper: #ffffff;
  --muted: #5a5f66;
  --line: rgba(8, 9, 12, 0.12);
  --accent: #ff3314;
  --accent-dark: #c41f0a;
  --volt: #00e0c6;
  --shadow: 0 24px 50px rgba(8, 9, 12, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: "Instrument Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 17px;
  overflow-x: clip;
}
h1, h2, h3, .brand {
  font-family: Syne, "Instrument Sans", sans-serif;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
h1 { font-size: clamp(2rem, 6.4vw, 4.4rem); margin: 0 0 16px; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 40px 0 16px; }
h3 { font-size: 1.25rem; margin: 0 0 10px; line-height: 1.15; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
.skip { position: absolute; left: -999px; }
::selection { background: var(--accent); color: #fff; }

.topbar {
  background: var(--ink);
  color: #cfd3d8;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  letter-spacing: 0.02em;
}
.topbar a { color: var(--volt); text-decoration: none; font-weight: 700; }
.nav {
  background: var(--ink);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  outline: 2px solid var(--volt);
  outline-offset: 2px;
}
.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
  max-width: 100%;
}
.nav-links a {
  text-decoration: none;
  color: #e8eaee;
  padding: 8px 12px;
  border-radius: 999px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav-links a.active { background: #fff; color: var(--ink); }
.nav-links a.portal-link,
.nav-links a.portal-link:hover,
.nav-links a.portal-link.active {
  background: var(--accent);
  color: #fff !important;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 36px 20px 80px; }
body:not([data-page="home"]) .wrap > h1:first-of-type {
  padding-top: 8px;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--ink);
}
.hero img.hero-bg {
  width: 100%;
  height: 640px;
  object-fit: cover;
  filter: saturate(1.2) contrast(1.1);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 9, 12, 0.18) 0%, rgba(8, 9, 12, 0.42) 48%, rgba(8, 9, 12, 0.94) 100%),
    linear-gradient(115deg, rgba(255, 51, 20, 0.5) 0%, transparent 46%);
}
.hero-copy {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px clamp(20px, 6vw, 96px) 48px;
  color: #fff;
  max-width: 100%;
}
.hero-copy h1 {
  font-size: clamp(2rem, 6.5vw, 4.6rem);
  margin: 0 0 12px;
  max-width: 14ch;
}
.kicker {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: var(--volt);
  margin-bottom: 10px;
}
.hero-copy p { font-size: 1.2rem; max-width: 560px; color: #e8eaee; }

.stat-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--ink);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.stat-bar div {
  padding: 22px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.stat-bar div:last-child { border-right: 0; }
.stat-bar b {
  display: block;
  font-family: Syne, sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.04em;
  color: var(--volt);
  margin-bottom: 2px;
}

.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  padding: 13px 20px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font: 700 15px/1 "Instrument Sans", sans-serif;
  letter-spacing: -0.01em;
}
.btn.secondary { background: #fff; color: var(--ink) !important; }
.btn.ghost { background: transparent; border: 1.5px solid currentColor; }
.btn:hover { background: var(--accent-dark); }
.btn.secondary:hover { background: var(--volt); color: var(--ink) !important; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 10px; }
.card, .news-item, .muted, p, li { overflow-wrap: break-word; }
.muted { color: var(--muted); }

.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 22px; }
.photo-row img { height: 200px; width: 100%; object-fit: cover; border-radius: 16px; filter: saturate(1.1) contrast(1.05); }

.staff { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.staff article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.staff img { height: 200px; width: 100%; object-fit: cover; object-position: top; filter: contrast(1.05); }
.staff div { padding: 14px 16px; }

.table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 16px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.table th {
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-item {
  border-left: 6px solid var(--accent);
  background: var(--paper);
  padding: 14px 16px;
  margin: 0 0 12px;
  border-radius: 0 14px 14px 0;
}
.news-item strong { font-family: Syne, sans-serif; letter-spacing: -0.03em; }

form { display: grid; gap: 10px; }
label { font-size: 13px; font-weight: 600; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--volt);
  border-color: var(--ink);
}
.alert { padding: 12px 14px; border-radius: 12px; background: #d9fff7; font-weight: 600; }
.alert.err { background: #ffd8d0; }

footer {
  background: var(--ink);
  color: #cfd3d8;
  padding: 48px 20px;
  font-size: 15px;
  border-top: 4px solid var(--accent);
}
footer a { color: #fff; }
footer a:hover { color: var(--volt); }
.foot-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.foot-inner strong {
  font-family: Syne, sans-serif;
  color: #fff;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  display: block;
  margin-bottom: 8px;
}
.foot-credit {
  max-width: 1180px;
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #8b9098;
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .card, .nav-links a, .staff article { transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease; }
  .btn:hover { transform: translateY(-2px); }
  .card:hover, .staff article:hover { transform: translateY(-4px); box-shadow: 0 28px 60px rgba(8, 9, 12, 0.16); }
}

@media (max-width: 720px) {
  .photo-row { grid-template-columns: 1fr; }
  .hero { min-height: 520px; }
  .hero img.hero-bg { height: 520px; }
  .hero-copy { padding: 28px 20px 28px; }
  .hero-copy h1 { font-size: 2.05rem; max-width: none; }
  h1 { font-size: 2.05rem; }
  .stat-bar { grid-template-columns: 1fr 1fr; }
  .stat-bar div { font-size: 14px; }
  .stat-bar div:nth-child(1),
  .stat-bar div:nth-child(2) { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .table { display: block; overflow-x: auto; }
  .nav-inner { flex-direction: column; align-items: stretch; }
  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }
  .nav-links a { display: block; text-align: center; padding: 10px 8px; font-size: 13px; margin: 0; white-space: nowrap; }
  .nav-links a.portal-link { grid-column: 1 / -1; }
}
}
