@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  /* Core palette */
  --bg: #0a0b0c;            /* page background */
  --panel: #111417;         /* section panel */
  --panel-2: #0e1113;       /* alternate panel */
  --text: #eef1f7;          /* primary text */
  --muted: #a3acb8;         /* secondary text */
  --border: rgba(238, 241, 247, 0.12);
  --border-strong: rgba(238, 241, 247, 0.22);
  --shadow: 0 18px 50px rgba(0,0,0,0.6);

  /* Accent (keep restrained) */
  --danger: #f04438;
  --signal: #f59e0b;
  --signal-soft: rgba(245, 158, 11, 0.18);

  /* Typography */
  --font: "Space Grotesk", "IBM Plex Sans", "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  /* Atmosphere */
  --glow: 0 0 0 1px rgba(245, 158, 11, 0.15), 0 0 40px rgba(245, 158, 11, 0.12);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg);
  background-image: none;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
  position: relative;
  overflow-x: hidden;
}

a { color: inherit; }

body::before {
  content: none;
}

header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(12, 15, 18, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 5vw;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.25rem 3vw;
  flex-wrap: wrap;
  position: relative;
}

.logo {
  font-weight: 650;
  letter-spacing: 0.32em;
  font-size: 1.5rem;
  text-transform: uppercase;
  text-align: center;
  color: var(--text);
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: none;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  justify-content: center;
}

nav a {
  text-decoration: none;
  font-weight: 520;
  color: var(--muted);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

nav a:hover {
  border-bottom-color: var(--border-strong);
  color: var(--text);
}

nav a.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

main { padding: 0; }

/* Sections */
.section {
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
  position: relative;
}

.section-tight {
  padding: clamp(2.75rem, 4.5vw, 4rem) 0;
}

.section + .section { border-top: none; }

/* Optional divider when you want it */
.section.section-divider {
  border-top: 1px solid var(--border);
}

.section-no-border { border-top: none !important; }

.section-image {
  padding: 0;
}

/* Keep your existing class names, map them to dark backgrounds */
.section-white { background-color: var(--bg); }
.section-mist  { background-color: var(--panel); }
.section-haze  { background-color: var(--panel-2); }

.section-mist::before,
.section-haze::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(120deg, rgba(255,255,255,0.04), rgba(255,255,255,0.00) 45%),
    radial-gradient(circle at 10% 20%, rgba(245, 158, 11, 0.08), transparent 50%);
  opacity: 0.7;
  pointer-events: none;
}

/* Headings & text */
h1, h2, h3 {
  font-weight: 520;
  color: var(--text);
  margin-top: 0;
}

h1 {
  font-size: clamp(2.6rem, 4.2vw, 3.7rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 650;
}

h2 {
  font-size: 1.8rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.005em;
}

p {
  margin: 0 0 1.3rem;
  color: var(--muted);
  max-width: 70ch;
}

.lead {
  font-size: 1.2rem;
  max-width: 55ch;
  color: rgba(238,241,247,0.9);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.grid article {
  padding: 1.25rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.grid article::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(245, 158, 11, 0.10), rgba(255,255,255,0.00) 45%);
  opacity: 0.0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.grid article:hover::after {
  opacity: 0.55;
}

.grid article h3 { margin-bottom: 0.5rem; }

.pull-quote {
  font-weight: 650;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text);
}

.pull-quote blockquote { margin: 0; }

.list-neutral {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-neutral li {
  padding: 0.35rem 0;
  color: var(--muted);
}

blockquote { margin: 0; font-style: normal; }

.micro-list {
  list-style: disc;
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.micro-list li { margin-bottom: 0.5rem; }

.statement {
  font-weight: 650;
  color: var(--text);
}

.statement-large {
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.4;
  color: var(--text);
}

.statement-large strong {
  color: var(--text);
  text-shadow: var(--glow);
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
  opacity: 0.9;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.divider {
  width: 60px;
  height: 2px;
  background-color: var(--border-strong);
}

/* Image bands */
.image-band {
  position: relative;
  min-height: 380px;
  width: 100%;
  background-color: var(--bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* neutral B&W */
  filter: grayscale(1);
}

.image-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

/* Home / Primary Hero — Moonshot energy */
.image-cat-a {
  background-image: url("https://pentamon.com/images/shooting_star_aurora.png");
}

/* Engineering in hostile environments */
.image-cat-b {
  background-image: url("https://pentamon.com/images/ship.png");
}

/* Systems under pressure / recovery */
.image-cat-b-alt {
  background-image: url("https://pentamon.com/images/ship.png");
}

/* Scale & complexity */
.image-cat-c {
  background-image: url("https://pentamon.com/images/valley_road.png");
}

/* Extreme environments = extreme delivery */
.image-cat-c-alt {
  background-image: url("https://pentamon.com/images/mountain_peak.png");
}

/* Mission-grade infrastructure */
.image-cat-d {
  background-image: url("https://pentamon.com/images/Energy.png");
}

/* Power, energy, industrial reality */
.image-cat-d-alt {
  background-image: url("https://pentamon.com/images/light_polution.png");
}

/* Texture / abstraction — controlled chaos */
.image-cat-texture {
  background-image: url("https://pentamon.com/images/circuitblue.png");
}

/* Infrastructure (real, not diagrams) */
.image-infrastructure {
  background-image: url("https://pentamon.com/images/Farming.png");
}

/* Architecture = physical systems, not boxes */
.image-architecture {
  background-image: url("https://pentamon.com/images/stone_circle.png");
}

/* Systems thinking */
.image-systems {
  background-image: url("https://pentamon.com/images/satelight.png");
}

/* Technology advisory — execution-first */
.image-ta-primary {
  background-image: url("https://pentamon.com/images/circuitblue.png");
}

.image-ta-secondary {
  background-image: url("https://pentamon.com/images/light_polution.png");
}

/* Transformation delivery — restart momentum */
.image-td-primary {
  background-image: url("https://pentamon.com/images/mountain_peak.png");
}

.image-td-secondary {
  background-image: url("https://pentamon.com/images/valley_road.png");
}

/* Platform / resilience */
.image-pr-primary {
  background-image: url("https://pentamon.com/images/circuit.png");
}

.image-pr-secondary {
  background-image: url("https://pentamon.com/images/ship.png");
}

/* Data & AI — planetary scale */
.image-data-primary {
  background-image: url("https://pentamon.com/images/satelight.png");
}

.image-data-secondary {
  background-image: url("https://pentamon.com/images/circuitblue.png");
}

/* Strategy applied, not theorised */
.image-sta-primary {
  background-image: url("https://pentamon.com/images/person.png");
}

.image-sta-secondary {
  background-image: url("https://pentamon.com/images/light_polution.png");
}

/* Business under stress / visible programs */
.image-bsd-primary {
  background-image: url("https://pentamon.com/images/circuitblue.png");
}

.image-bsd-secondary {
  background-image: url("https://pentamon.com/images/circuit.png");
}

/* Links */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-weight: 650;
  color: var(--text);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  padding-bottom: 0.1rem;
}

.link-arrow::after {
  content: "→";
  font-weight: 500;
  opacity: 0.9;
}

.email-link {
  font-weight: 650;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
}

.email-link:hover {
  border-bottom-color: rgba(231,233,238,0.6);
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: min(700px, 100%);
}

label {
  font-weight: 520;
  color: var(--text);
}

input, textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  background-color: rgba(14, 17, 19);
  
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

input::placeholder, textarea::placeholder {
  color: rgba(169,176,188,0.75);
}

input:focus, textarea:focus {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: var(--glow);
  background-color: rgba(12, 14, 16, 0.55);
}

textarea {
  min-height: 160px;
  resize: vertical;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  border: 1px solid rgba(245, 158, 11, 0.45);
  background-color: rgba(245, 158, 11, 0.08);
  color: var(--text);
  font-weight: 650;
  padding: 0.9rem 1.8rem;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.05s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary:hover {
  background-color: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.65);
}

.btn-primary:active { transform: translateY(1px); }

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-status {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Footer */
footer {
  padding: 3rem 5vw;
  font-size: 0.95rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

footer .container { padding: 0; }

.footer-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
}

.footer-meta-group { min-width: 180px; }

.footer-meta-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  color: rgba(231,233,238,0.9);
}

.legal {
  font-size: 0.85rem;
  color: rgba(169,176,188,0.9);
}

/* Social icons */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.75rem;
}

.social-links a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  background: rgba(255,255,255,0.02);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.social-links a:hover,
.social-links a:focus {
  outline: 2px solid rgba(231,233,238,0.25);
  outline-offset: 2px;
}

.social-links a:hover {
  color: var(--text);
  border-color: rgba(245, 158, 11, 0.65);
  background: rgba(245, 158, 11, 0.12);
}

.social-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Mobile */
@media (max-width: 640px) {
  .navbar {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
  .nav-toggle-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  nav {
    width: 100%;
  }
  nav ul {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 0.75rem;
  }
  .nav-toggle:checked + .nav-toggle-label + nav ul {
    display: flex;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .section,
  .grid article,
  .image-band {
    animation: rise 0.7s ease both;
  }

  .grid article:nth-child(2) { animation-delay: 0.08s; }
  .grid article:nth-child(3) { animation-delay: 0.16s; }
  .grid article:nth-child(4) { animation-delay: 0.24s; }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
