/* Minimalist responsive styles with dark-mode support */
:root{
  --bg: #ffffff;
  --surface: #f7f7f8;
  --text: #0f1724;
  --muted: #6b7280;
  --accent: #2563eb;
  --footer-bg: #eaf2ff; /* mellow light blue */
  --footer-text: #07203b;
  --footer-muted: #334e66;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b1220;
    --surface: #0f1724;
    --text: #e6eef8;
    --muted: #9aa7b8;
    --accent: #60a5fa;
    --footer-bg: #05243a; /* deeper blue for dark */
    --footer-text: #e6eef8;
    --footer-muted: #9aa7b8;
  }
}

/* explicit class override for toggle */
.dark-mode{
  --bg: #0b1220;
  --surface: #0f1724;
  --text: #e6eef8;
  --muted: #9aa7b8;
  --accent: #60a5fa;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}

.container{max-width:1100px;margin:2.5rem auto;padding:0 1rem}

/* Header */
.site-header{
  display:flex;
  align-items:center;
  gap:1rem;
  padding:0.75rem 1rem;
  background:linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(6px);
}
.brand{display:flex;align-items:center}
.logo{display:flex;align-items:center;gap:0.6rem;color:var(--text);font-weight:600}
.logo svg{color:var(--accent)}
.company-name{font-size:1rem}

.menu-toggle{display:none;border:0;background:transparent;padding:0.5rem;border-radius:6px;cursor:pointer}
.menu-toggle:focus{outline:2px solid var(--accent);outline-offset:2px}
.hamburger{display:inline-block;width:22px;height:2px;background:var(--text);position:relative}
.hamburger:before,.hamburger:after{content:'';position:absolute;left:0;width:22px;height:2px;background:var(--text)}
.hamburger:before{top:-7px}
.hamburger:after{top:7px}

.primary-nav{margin-left:auto}
.primary-nav ul{list-style:none;margin:0;padding:0;display:flex;gap:1.1rem}
.primary-nav a{color:var(--text);padding:0.35rem 0.25rem;border-radius:6px}
.primary-nav a:hover{background:var(--surface)}

.controls{margin-left:auto}
.theme-toggle{border:0;background:transparent;padding:0.25rem 0.4rem;border-radius:6px;cursor:pointer}
.theme-toggle:focus{outline:2px solid var(--accent);outline-offset:2px}

/* Columns grid */
.columns{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;margin-bottom:1.5rem}
.col{background:var(--surface);padding:1.1rem;border-radius:10px;box-shadow:0 1px 0 rgba(0,0,0,0.04)}
.col h2{margin:0 0 0.5rem 0;font-size:1.05rem}
.col p{margin:0;color:var(--muted)}

/* Footer */
.site-footer{padding:1.2rem;text-align:center;color:var(--footer-text);background:var(--footer-bg)}

/* Footer layout */
.footer-grid{display:flex;gap:1.5rem;align-items:flex-start;justify-content:space-between}
.footer-contact{max-width:60%;text-align:left}
.footer-contact address{font-style:normal;color:var(--footer-muted);line-height:1.4;margin:0.5rem 0}
.footer-social{display:flex;gap:0.6rem;align-items:center}
.social-link{color:var(--footer-text);display:inline-flex;align-items:center;justify-content:center;padding:0.4rem;border-radius:6px}
.social-link svg{display:block;width:20px;height:20px}

@media (max-width:640px){
  .footer-grid{flex-direction:column;gap:0.75rem}
  .footer-contact{max-width:100%}
}

/* Ensure footer links are readable */
.footer-contact a{color:var(--footer-text)}
.footer-contact a:hover{text-decoration:underline;opacity:0.95}
.site-footer small{color:var(--footer-text)}

/* Responsive */
@media (max-width:980px){
  .columns{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:640px){
  .columns{grid-template-columns:1fr}
  .menu-toggle{display:inline-flex}
  .primary-nav{position:absolute;top:64px;left:0;right:0;background:var(--bg);padding:1rem;display:none;border-top:1px solid rgba(0,0,0,0.04)}
  .primary-nav.open{display:block}
  .primary-nav ul{flex-direction:column;gap:0.25rem}
  .controls{order:3;margin-left:0}
}

/* Purpose hero */
.purpose-hero{padding:2.25rem 0;background:linear-gradient(180deg, rgba(37,99,235,0.06), transparent)}
.purpose-title{margin:0 0 0.5rem 0;font-size:1.6rem;text-align:center}
.purpose-sub{margin:0 auto;max-width:760px;text-align:center;color:var(--muted)}

/* Hero grid */
.hero-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin:2rem 0}
.hero-card{background:var(--surface);border-radius:10px;overflow:hidden;display:flex;flex-direction:column}
.hero-card img{width:100%;height:220px;object-fit:cover;display:block}
.hero-body{padding:1rem}
.hero-body h3{margin:0 0 0.5rem 0}
.hero-body p{margin:0;color:var(--muted)}

@media (max-width:980px){
  .hero-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:640px){
  .hero-grid{grid-template-columns:1fr}
  .purpose-title{font-size:1.25rem}
}

/* small niceties */
button{font:inherit}

/* focus styles */
a:focus,button:focus{outline:2px solid var(--accent);outline-offset:2px}
