:root{
  /* Global */
  --page-bg: #ffffff;
  --text: #202121;
  --text-muted: rgba(32,33,33,.78);
  --border: rgba(32,33,33,.16);
  --shadow: 0 10px 25px rgba(0,0,0,.08);
  --radius: 18px;
  --max: 1120px;

  /* Brand accents */
  --accent: #103545;
  --accent-2: #1a2a33;

  /* Card (dark boxes) */
  --card-bg: #103545;
  --card-border: rgba(255,255,255,.10);
  --card-text: #ffffff;
  --card-muted: rgba(255,255,255,.82);

  /* Buttons */
  --btn-bg: #103545;
  --btn-text: #ffffff;
  --btn-border: rgba(11,18,32,.18);

  /* Typography */
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  /* Header sizing */
  --header-pad-y: 12px;
  --header-pad-x: 0px;
  --logo-height: 140px;          /* adjust logo size here */
  --header-height-est: 110px;   /* used for scroll offset */
}

/* Base reset */
*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--page-bg);
  line-height:1.55;
}
img{ max-width:100%; height:auto; display:block; }

a{ color: var(--text); text-decoration:none; }
a:hover,
a:focus{
  text-decoration:underline;
  text-underline-offset: 3px;
}

p{ margin:0 0 12px; }
ul{ margin:0; padding-left: 18px; }
li{ margin: 6px 0; }

/* Layout helpers */
.container{
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.rule{ display:none; }

.section{ padding: 54px 0; }
.section-sm{ padding: 36px 0; }

.grid-2{
  display:grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3{
  display:grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Typography scale */
.h1{
  font-family: var(--serif);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.12;
  margin: 0 0 12px;
  color: var(--text);
}
.h2{
  font-family: var(--serif);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.18;
  margin: 0 0 10px;
  color: var(--text);
}
.h3{
  font-family: var(--serif);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--text);
}
.small{ font-size: 13px; color: var(--text-muted); }
.muted{ color: var(--text-muted); }

/* Skip link */
.skip-link{
  position:absolute;
  left:-9999px;
  top: 12px;
  background:#ffffff;
  color: var(--text);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 9999;
}
.skip-link:focus{ left: 12px; }

/* Header + nav (logo left, menu right, stays on screen) */
.site-header{
  position: sticky;
  top:0;
  z-index: 999;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header{
  position: sticky;
}

/* Add this line */
.site-header{
  position: sticky;
}

/* IMPORTANT: this is what keeps nav to the right of the logo */
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 24px;
  padding: 14px 0;
}

/* Brand: logo + (optional) text block */
.brand{
  display:flex;
  align-items:center;
  gap: 14px;
  flex: 0 0 auto;
  min-width: 0;
  text-decoration:none;
  color: var(--text);
}

/* Logo sizing lives here */
.brand{
  display:block;
}

.brand-logo{
  height: var(--logo-height);
  width: auto;
  display:block;
   line-height: 0;
}


/* If you show the text name/tagline next to the logo */
.brand > div{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width: 0;
}

.brand-mark{
  width: 88px;
  height: 88px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
}

.brand-name{
  font-family: var(--serif);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}

.brand-tag{
  display:block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.2;
}

/* Desktop nav */
.nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 14px;
  margin: 0;
}

.nav a{
  padding: 10px 10px;
  border-radius: 12px;
  color: var(--text);
  text-decoration:none;
}
.nav a:hover{
  background: rgba(32,33,33,.06);
  text-decoration:none;
}
.nav a.active{
  background: rgba(32,33,33,.10);
  font-weight: 700;
}

/* Mobile menu button */
.menu-btn{
  display:none;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  cursor:pointer;
}
.menu-btn:hover{ background: rgba(32,33,33,.06); }

/* Mobile menu panel */
.menu-panel{
  display:none;
  border-top: 1px solid var(--border);
  background: #ffffff;
}
.menu-panel[data-open="true"]{ display:block; }
.menu-panel .container{
  padding: 10px 0 16px;
  display:flex;
  flex-direction:column;
  gap: 6px;
}
.menu-panel a{
  padding: 12px 12px;
  border-radius: 12px;
  color: var(--text);
  text-decoration:none;
}
.menu-panel a:hover{
  background: rgba(32,33,33,.06);
  text-decoration:none;
}
.menu-panel a.active{
  background: rgba(32,33,33,.10);
  font-weight: 700;
}
/* Mobile menu defaults */
.menu-btn {
  display: none;
}

.menu-panel {
  display: none;
}

/* Mobile behavior */
@media (max-width: 899px) {
  .nav {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1001;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .menu-panel {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
  }

  .menu-panel[data-open="true"] {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s;
  }

  /* Optional: prevent background scroll when menu open */
  html.menu-open,
  html.menu-open body {
    overflow: hidden;
  }
}

/* Prevent anchor links from hiding behind sticky header */
html{ scroll-padding-top: var(--header-height-est); }

/* Hero */
.hero{ padding: 54px 0 30px; }
.hero-grid{
  display:grid;
  gap: 18px;
  grid-template-columns: 1.2fr .8fr;
  align-items:start;
}
.kicker{
  display:inline-block;
  font-weight: 700;
  color: var(--text);
  background: rgba(32,33,33,.06);
  padding: 8px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* Badges */
.badge{
  display:inline-block;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(32,33,33,.06);
  border: 1px solid rgba(32,33,33,.10);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  text-decoration:none;
  font-weight: 700;
  cursor:pointer;
}
.btn:hover{
  background: rgba(32,33,33,.06);
  text-decoration:none;
}
.btn.primary{
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: rgba(11,18,32,.18);
}
.btn.primary:hover{ filter: brightness(1.05); }
.btn.ghost{ background: transparent; }

/* Forms */
label{
  display:block;
  font-weight: 700;
  margin: 12px 0 6px;
  color: var(--text);
}
input, select, textarea{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px;
  font: inherit;
  color: var(--text);
  background: #ffffff;
}
textarea{
  min-height: 120px;
  resize: vertical;
}

/* Page head */
.pagehead{
  padding: 18px 0 6px;         /* tighter */
}
.breadcrumb{
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Tighten spacing under pagehead on pages using section-sm */
.pagehead p{ margin-bottom: 4px; }
.section-sm{
  padding-top: 6px;            /* tighter */
  padding-bottom: 28px;
}

/* CARDS: keep these dark with light text across all pages */
.card{
  background: var(--card-bg);
  color: var(--card-text);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad{ padding: 20px; }

/* Ensure typical text elements inside cards stay light */
.card .h1,
.card .h2,
.card .h3,
.card h1,
.card h2,
.card h3{ color: var(--card-text); }

.card p,
.card li,
.card label{ color: var(--card-muted); }

.card .muted,
.card .small{ color: rgba(255,255,255,.72); }

.card a{ color: var(--card-text); }

.card a.btn{
  background: transparent;
  border-color: rgba(255,255,255,.18);
  color: var(--card-text);
}
.card a.btn:hover{
  background: rgba(255,255,255,.08);
  text-decoration:none;
}

/* Lists used in cards */
.mini-list{
  margin: 10px 0 0;
  padding-left: 18px;
}
.mini-list li{ margin: 8px 0; }

/* Stat blocks (home page aside) */
.stat{
  display:grid;
  gap: 10px;
  margin-top: 10px;
}
.stat .item{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}
.stat .label{
  color: rgba(255,255,255,.82);
  font-weight: 700;
}
.stat .value{
  color: #ffffff;
  font-weight: 800;
}

/* Footer */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 30px 0;
  background: #ffffff;
}
.footer-grid{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 20px;
}
.footer-links{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.footer-links a{
  color: var(--text);
  text-decoration:none;
}
.footer-links a:hover{
  text-decoration:underline;
  text-underline-offset: 3px;
}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .grid-3{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
}

/* Mobile: hide desktop nav, show menu button, reduce logo */
@media (max-width: 820px){
  .nav{ display:none; }
  .menu-btn{ display:inline-flex; }
  .footer-grid{ flex-direction:column; }

  :root{
    --logo-height: 96px;
    --header-height-est: 92px;
  }
}

/* Safety */
main, header, footer{ color: var(--text); }
