/* styles.css */

/* ===== Design tokens ===== */
:root{
  /* Brand */
  --accent:#E00013;
  --accent-hover:#FF4A4A;
  --highlight:#FFB000;

  /* Base */
  --bg:#0B0B0D;
  --text:#F2F2F3;
  --muted:#B8B8BD;

  /* Surfaces (neutral / warm, no blue) */
  --panel-solid:#141416;
  --panel-top:#1A1A1E;
  --panel-bottom:#111114;

  /* Lines / borders */
  --line:#2A2A30;

  /* Tints */
  --tint: rgba(224,0,19,.14);      /* red tint */
  --tint-2: rgba(224,0,19,.08);

  /* Effects */
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --radius: 14px;
  --max: 1100px;

  /* Typography */
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";

  /* Status */
  --good:#2bd576;
  --warn:#ffcc66;
  --bad:#ff6b6b;

  /* NEW: card gradient variable (easy adjust) */
  --card-bg: linear-gradient(180deg, var(--panel-top), var(--panel-bottom));

  /* NEW: header & table surface vars */
  --header-bg: rgba(11,11,13,.80);
  --table-head-bg: rgba(20,20,22,.80);
  --hover-row-bg: rgba(255,255,255,.03);
}

*{ box-sizing:border-box; }
html{ 
  scroll-behavior:smooth;
  scroll-padding-top: 92px;
 }

body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);

  /* Red-focused, subtle background glow (no blue/green) */
  background:
    radial-gradient(1100px 520px at 18% -12%, rgba(224,0,19,.26), transparent 60%),
    radial-gradient(900px 460px at 88% 0%, rgba(255,74,74,.14), transparent 58%),
    radial-gradient(900px 520px at 70% 120%, rgba(255,176,0,.08), transparent 60%),
    var(--bg);
}

a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

/* ===== Layout helpers ===== */
.wrap{
  max-width:var(--max);
  margin:0 auto;
  padding:0 18px;
}

.siteMain{ padding: 20px 0 40px; }
.siteFooter{ border-top:1px solid var(--line); padding:18px 0 30px; }

/* ===== Accessibility helpers ===== */
.srOnly{
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

.skipLink{
  position:absolute;
  left:10px;
  top:10px;
  z-index:999;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(20,20,22,.95);
  color: var(--text);
  transform: translateY(-150%);
  transition: transform .15s ease;
}
.skipLink:focus{
  transform: translateY(0);
  outline:2px solid rgba(224,0,19,.7);
  outline-offset:2px;
}

/* ===== Header / Nav ===== */
.siteHeader{
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter: blur(10px);
  background: var(--header-bg);
  border-bottom:1px solid var(--line);
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:14px;
  position:relative;
}

/* Brand */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:240px;
  color:var(--text);
  text-decoration:none;
}

.brandLogo{
  height:38px;
  width:auto;
  display:block;
}

.logo{
  width:38px;
  height:38px;
  border-radius:10px;
  /* Brand gradient (red) */
  background: linear-gradient(135deg, #e00013, #aa0024);
  box-shadow: var(--shadow);
  display:grid;
  place-items:center;
  font-weight:700;
  color:#fff;
}
#logoFallback{
  display:none; /* hidden unless image fails */
}

.brandText{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.brandName{
  font-size:16px;
  line-height:1.2;
  letter-spacing:.2px;
  font-weight:700;
}

.sub{
  font-size:12px;
  color:var(--muted);
}

/* Primary nav */
.navList{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:flex-end;
  list-style:none;
  margin:0;
  padding:0;
}

.navList a{
  font-size:13px;
  padding:8px 10px;
  border:1px solid transparent;
  border-radius:10px;
  color:var(--text);
  opacity:.9;
  text-decoration:none;
}
.navList a:hover{
  border-color: rgba(224,0,19,.25);
  background: rgba(224,0,19,.10);
  opacity:1;
}
.navList a:focus-visible{
  outline:2px solid rgba(224,0,19,.7);
  outline-offset:2px;
}

.navToggle{
  display:none; /* shown on mobile only */
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.25);
  color: var(--text);
  cursor:pointer;
  align-items:center;
  justify-content:center;
}

.navToggle:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

/* Hamburger icon */
.navToggleIcon{
  position:relative;
  width:18px;
  height:2px;
  background: currentColor;
  display:block;
  border-radius:999px;
}

.navToggleIcon::before,
.navToggleIcon::after{
  content:"";
  position:absolute;
  left:0;
  width:18px;
  height:2px;
  background: currentColor;
  border-radius:999px;
}

.navToggleIcon::before{ top:-6px; }
.navToggleIcon::after{ top:6px; }

/* Turn into X when open */
.navToggle[aria-expanded="true"] .navToggleIcon{
  background: transparent;
}

.navToggle[aria-expanded="true"] .navToggleIcon::before{
  top:0;
  transform: rotate(45deg);
}

.navToggle[aria-expanded="true"] .navToggleIcon::after{
  top:0;
  transform: rotate(-45deg);
}

/* ===== Card ===== */
.card{
  background: var(--card-bg);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;       
  overflow: hidden;
}

section.card{ margin-top:16px; }

/* Headings */
h1, h2, h3{ letter-spacing:.2px; }
h1{ margin:0 0 10px 0; font-size:26px; }
h2{ margin:0 0 10px 0; font-size:18px; }
h3{ margin:0 0 10px 0; font-size:16px; }

/* Text helpers */
.fine{
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
  margin: 8px 0 0 0;
}
.mono{ font-family:var(--mono); }
p{ margin:0 0 14px 0; }
.heroLead{ color:var(--muted); line-height:1.5; }

/* Lists */
.list{
  margin:0;
  padding-left:18px;
  color:var(--muted);
  line-height:1.55;
}
.list li{ margin:8px 0; }

/* ===== Hero ===== */
.hero{ padding: 26px 0 6px 0; }

.heroGrid{
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap:16px;
  align-items:stretch;
}

.heroHeader p{ margin-bottom: 10px; }

/* Pills */
.pillRow{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin: 10px 0 0 0;
  padding:0;
  list-style:none;
}

.pill{
  font-size:12px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  display:flex;
  gap:8px;
  align-items:center;
  white-space:nowrap;
}

.dot{
  width:7px;
  height:7px;
  border-radius:999px;
  background:var(--accent);
}

/* Buttons */
.btnRow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-size:13px;
  cursor:pointer;
  user-select:none;
}

.btn:hover{ filter:brightness(1.06); }
.btn:focus-visible{
  outline:2px solid rgba(224,0,19,.7);
  outline-offset:2px;
}

/* ===== At-a-glance DL ===== */
.kvList{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:0;
}

.kv{
  border:1px solid var(--line);
  border-radius: 12px;
  padding:12px;
  background: rgba(255,255,255,.03);
}

.kv .k{
  font-size:12px;
  color:var(--muted);
  margin:0;
}

.kv .v{
  margin-top:6px;
  font-size:14px;
  color: var(--text);
}
.kv dd{ margin:0; }
.kv .fine{ margin:6px 0 0 0; }

/* ===== Two-column grid ===== */
.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
  min-width: 0;
}

/* ===== Notices / asides ===== */
.notice{
  border-left:4px solid rgba(224,0,19,.65);
  background: rgba(121, 2, 12, 0.1);
  padding:12px 12px;
  border-radius: 12px;
  border:1px solid rgba(224,0,19,.22);
  color: var(--text);
}

.notice strong{ font-weight:650; }

/* ===== Rows and controls ===== */
.row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
}

.controls{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.field, select{
  background: rgba(255,255,255,.03);
  border:1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  padding:10px 12px;
  font-size:13px;
  outline:none;
  min-width: 220px;
}

.field::placeholder{ color: rgba(184,184,189,.85); }

.field:focus-visible, select:focus-visible{
  outline:2px solid rgba(224,0,19,.7);
  outline-offset:2px;
}

/* ===== Tables ===== */
.tableWrap{
  margin-top:12px;
  overflow:auto;
  max-height:420px;
}

table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}

thead th{
  text-align:left;
  font-size:12px;
  color: var(--muted);
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  background: var(--table-head-bg);
  position:sticky;
  top:0;
}

tbody td{
  padding:10px 12px;
  border-bottom:1px solid rgba(42,42,48,.85);
  font-size:13px;
  vertical-align:top;
}

tbody tr:hover{ background: var(--hover-row-bg); }
tbody tr:last-child td{ border-bottom:none; }

/* ===== Status pills (used by tools table) ===== */
.status{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--line);
  border-radius:999px;
  padding:4px 8px;
  font-size:12px;
  background: rgba(255,255,255,.03);
  color: var(--text);
}
.sDot{ width:7px; height:7px; border-radius:999px; }
.s-ok{ background: var(--good); }
.s-warn{ background: var(--warn); }
.s-bad{ background: var(--bad); }

/* ===== Map ===== */
.mapEmbed{
  margin: 0;
  display: block;
  max-width: 100%;
  width:100%;
  border-radius:12px;
  overflow:hidden;
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
  box-shadow: var(--shadow);
}

.mapEmbed iframe{
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 320px; /* keep your preferred height */
  border: 0;
}

/* ===== Participation grid (DL) ===== */
.infoGrid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:16px;
  margin: 0;
}

.infoBlock{
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.infoBlock dt{
  font-size:13px;
  font-weight:600;
  color:var(--muted);
  margin-bottom:8px;
}

.infoBlock dd{ margin:0; }

/* ===== FAQ (details/summary) ===== */
.faqList{
  display:grid;
  gap:12px;
}

.faqItem{
  border:1px solid var(--line);
  border-radius:12px;
  background: rgba(255,255,255,.03);
  padding:12px;
}

.faqItem summary{
  cursor:pointer;
  font-weight:650;
}

.faqItem summary:focus-visible{
  outline:2px solid rgba(224,0,19,.7);
  outline-offset:2px;
}

.faqItem p{ margin:10px 0 0 0; }

/* ===== Social (Lucide) ===== */
.socialRow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
  align-items:center;
}

.socialIconBtn{
  width:36px;
  height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  text-decoration:none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, filter .15s ease;
}

.socialIconBtn:hover{
  border-color: rgba(224,0,19,.55);
  background: rgba(224,0,19,.14);
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.socialIconBtn:focus-visible{
  outline:2px solid rgba(224,0,19,.7);
  outline-offset:2px;
}

.socialIconBtn i{
  display:inline-flex;
  width:18px;
  height:18px;
}

.socialIconBtn svg{
  width:18px;
  height:18px;
  stroke: currentColor;
  stroke-width:2;
  fill:none;
}

/* ===== Footer ===== */
.siteFooter .fine{ margin: 0 0 6px 0; }

/* ===== Responsive ===== */
@media (max-width: 900px){
  html{ scroll-padding-top: 110px; }
  .heroGrid{ grid-template-columns: 1fr; }
  .grid2{ grid-template-columns: 1fr; }
  .brand{ min-width:auto; }
  .field, select{ min-width: 180px; }
  .infoGrid{ grid-template-columns: 1fr; }
    .navList{
    justify-content:flex-start;
    gap:6px;
    flex-direction:column;
  }

  .navList a{
    display:block;
    padding:10px 12px;
    border-radius:12px;
    border:1px solid transparent;
  }

  .navList a:hover{
    border-color: var(--line);
    background: rgba(0,0,0,.25);
  }
}

@media (min-width: 900px){
  .mapEmbed iframe{ height:360px; }
}

@media (max-width: 480px){
  .socialIconBtn{
    width:34px;
    height:34px;
    border-radius:10px;
  }
  .socialIconBtn i,
  .socialIconBtn svg{
    width:17px;
    height:17px;
  }
}

@media (max-width: 900px){
  .navToggle{
    display:inline-flex;
  }

  .primaryNav{
    position:absolute;
    left:0;
    right:0;
    top: calc(100% + 10px);

    /* Solid background for readability */
    background: #121214; /* deep neutral black */

    border:1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px rgba(0,0,0,.65);

    padding:12px;
    display:none;
  }

  .primaryNav[data-open="true"]{
    display:block;
  }

    .navList{
    flex-direction:column;
    gap:6px;
  }

  .navList a{
    display:block;
    padding:12px;
    border-radius:12px;
    background:#18181C;      /* solid background */
    border:1px solid var(--line);
    font-weight:500;
  }

  .navList a:hover{
    background: rgba(224,0,19,.15);   /* subtle red hover */
    border-color: var(--accent);
  }
}


.contactEmail{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;          /* lets buttons wrap on narrow screens */
}

.contactEmail strong{
  margin-right:4px;        /* tiny breathing room after label */
}


#about .grid2{
  align-items: center;           /* vertically center image with text */
}

/* Control figure spacing */
#about figure{
  margin: 0;                     /* remove default figure margin */
  padding: 14px;                 /* space around image */
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Image styling */
#about figure img{
  width: 100%;
  height: auto;
  display: block;

  border-radius: 12px;           /* rounded corners */
  object-fit: cover;

  /* subtle card-within-card look */
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}

/* Optional: slightly reduce image height so text balances */
@media (min-width: 900px){
  #about figure img{
    max-height: 420px;           /* prevents image dominating */
  }
}