:root {
  /* Page background/text are now fixed light-theme colors (see body below)
     rather than following the OS scheme, so declare "light" only - avoids
     the same white-on-light invisible-text bug just fixed for .team-card. */
  color-scheme: light;
  --gap: 1rem;
  --brand-navy: #0f2540;
  --brand-navy-dark: #081625;
  --brand-gold: #c9a227;
  --brand-gold-light: #e6c55c;
  --text-on-brand: #f5f7fa;
  --card-bg: #ffffff;
  --card-border: #8883;
  --page-bg: #e7e9ec;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  line-height: 1.4;
  background: var(--page-bg);
  color: var(--brand-navy-dark);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

.container.narrow {
  max-width: 360px;
}

h1 { margin-top: 0; }

.team-list {
  list-style: none;
  padding: 0;
}

.team-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #8883;
}

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

.album-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  color: inherit;
}

.album-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 480px;
}

form.inline {
  display: inline-flex;
  max-width: none;
}

label { display: flex; flex-direction: column; gap: 0.25rem; }
label.checkbox { flex-direction: row; align-items: center; gap: 0.5rem; }

fieldset { border: 1px solid #8883; border-radius: 6px; }

.error { color: #c0392b; }
.notice { color: #1e7e34; }

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--card-border);
  margin: 1rem 0 1.5rem;
}

.admin-tab {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: inherit;
  opacity: 0.65;
  border-bottom: 2px solid transparent;
}

.admin-tab:hover {
  opacity: 1;
}

.admin-tab.active {
  opacity: 1;
  font-weight: 600;
  border-bottom-color: var(--brand-gold);
}

/* --- Branding: hero (index.html) and compact header (team.html) --- */

.hero {
  background: linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
  color: var(--text-on-brand);
  /* Logo-left/text-right layout is more compact vertically than the old
     stacked/centered layout, so this can be considerably shorter. */
  padding: 1.5rem 1.5rem;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: left;
}

.hero-logo {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brand-gold);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.hero-title {
  margin: 0;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-on-brand);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.hero-tagline {
  margin: 0;
  font-size: 1.05rem;
  color: var(--brand-gold-light);
  max-width: 32rem;
}

@media (max-width: 480px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-logo {
    width: 110px;
    height: 110px;
  }
}

.site-header {
  background: var(--brand-navy);
  padding: 0.9rem 1.5rem;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 960px;
  margin: 0 auto;
  text-decoration: none;
  color: var(--text-on-brand);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand-gold);
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.back-link {
  margin-top: 0;
}

.back-link a {
  color: inherit;
  text-decoration: none;
  opacity: 0.75;
}

.back-link a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* --- Team grid (index.html) --- */

.section-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-navy);
  margin-bottom: 1rem;
}

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

.team-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  text-decoration: none;
  /* --card-bg is always white regardless of light/dark mode, so the text
     color must be explicit here rather than "inherit" (body's canvastext),
     which turns white on phones with dark mode enabled - invisible on the
     white card. */
  color: var(--brand-navy-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.team-card:hover,
.team-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--brand-gold);
}

.team-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.team-card-icon {
  flex: 0 0 25%;
  font-size: 1.5rem;
  text-align: center;
}

.team-card-logo {
  flex: 0 0 25%;
  width: 25%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 6px;
}

.team-card-name {
  flex: 1 1 75%;
  font-size: 1.1rem;
  font-weight: 600;
}

.team-card-cta {
  font-size: 0.85rem;
  color: var(--brand-gold);
}

.empty-state {
  color: #8883;
}

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer a {
  color: inherit;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: 0.75;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.social-icon:hover,
.social-icon:focus-visible {
  opacity: 1;
  color: var(--brand-gold);
}
