/* =========================================
   Layer8 Operations – blue-grey theme
   Mobile-optimized, works with Pico.css
   ========================================= */

/* ---------- Design tokens ---------- */

:root {
  --layer8-bg: #050913;
  --layer8-surface: #0b131f;
  --layer8-surface-soft: #111d2c;
  --layer8-border: #1d2a3c;
  --layer8-text: #e5edf7;
  --layer8-muted: #9baac0;

  /* Blue-grey primary */
  --layer8-primary: #365772;        /* main steel blue */
  --layer8-primary-soft: #4a6c8e;   /* hover */
  --layer8-primary-subtle: #89a6c9; /* accents */
  --layer8-primary-glow: rgba(72, 115, 155, 0.42);
}

/* ---------- Global reset / base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  background: radial-gradient(circle at top, #10192a 0, #050913 55%);
  color: var(--layer8-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

/* Let Pico handle core container, we just soften it a bit */
.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Links inherit text color by default */
a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: none;
}

/* Headings */
h1,
h2,
h3 {
  color: #ffffff;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 2.7vw + 1.6rem, 3rem);
  margin-bottom: 0.9rem;
}

h2 {
  font-size: clamp(1.6rem, 1.4vw + 1.2rem, 2rem);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

/* Paragraphs */
p {
  margin-top: 0;
  margin-bottom: 0.7rem;
  color: var(--layer8-text);
}

.lead {
  font-size: 1.05rem;
  color: #f3f6fb;
}

/* ---------- Header / nav ---------- */

.site-header {
  background: linear-gradient(
    to bottom,
    rgba(5, 9, 19, 0.96),
    rgba(5, 9, 19, 0.9)
  );
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(24, 37, 54, 0.7);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  padding-block: 0.85rem;
}

/* ---------- Wordmark logo ---------- */

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  text-decoration: none;
}

.brand-name {
  font-size: 1rem;
  letter-spacing: 0.12em; /* subtle spacing */
  font-weight: 600;
  color: var(--layer8-text);
}

.brand-tagline {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--layer8-muted);
}

/* Let nav control brand colors on hover */

.nav .brand,
.nav .brand-name,
.nav .brand-tagline {
  color: var(--layer8-text);
}

.nav .brand:hover .brand-name,
.nav .brand:hover .brand-tagline {
  color: var(--layer8-primary-subtle);
}

/* Nav links */

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
}

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

.nav a:hover,
.nav a:focus-visible {
  color: var(--layer8-primary-subtle);
}

/* Nav button */

.btn-nav {
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  background: transparent;
  border: 1px solid rgba(138, 166, 201, 0.4);
  color: var(--layer8-text);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-nav:hover {
  background: rgba(74, 108, 142, 0.16);
  border-color: rgba(138, 166, 201, 0.7);
}

/* ---------- Sections / layout ---------- */

main {
  flex: 1;
}

section {
  padding-block: 3.5rem;
}

.section {
  background: transparent;
}

.section-alt {
  background: radial-gradient(circle at top left, #111d2c 0, #050913 55%);
}

.section-header {
  max-width: 640px;
  margin-bottom: 2rem;
}

.section-header p {
  color: var(--layer8-muted);
}

/* Eyebrow text */

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--layer8-primary-subtle);
  margin-bottom: 0.65rem;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 4.2rem;
  padding-bottom: 3.75rem;
}

.hero .container,
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: stretch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.3rem;
}

/* Cards / surfaces */

.card,
.hero-card,
.about-card,
.work-card {
  background: linear-gradient(135deg, #0b131f, #141f30);
  border-radius: 1.1rem;
  border: 1px solid var(--layer8-border);
  box-shadow: 0 16px 40px rgba(5, 9, 19, 0.7);
  padding: 1.4rem 1.5rem;
}

.hero-card {
  align-self: flex-start;
}

.hero-card-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--layer8-muted);
  margin-bottom: 0.75rem;
}

/* Service, work, about grids */

.service-grid,
.work-grid,
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
}

/* Section icon used in Incident Response & DR */
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  margin-right: 0.45rem;
  border-radius: 0.9rem;
  font-size: 1.05rem;
  background: radial-gradient(circle at 30% 20%, #89a6c9, #365772 55%, #050913);
  box-shadow: 0 0 16px var(--layer8-primary-glow);
}

/* Work tagline under h3 */

.tagline {
  font-size: 0.86rem;
  color: var(--layer8-primary-subtle);
  margin-bottom: 0.4rem;
}

/* About aside */

.about-card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.about-card li {
  margin-bottom: 0.25rem;
}

/* Process list */

.process-list {
  margin: 0;
  padding-left: 1.25rem;
}

.process-list li {
  margin-bottom: 1.25rem;
}

.process-list h3 {
  margin-bottom: 0.25rem;
}

/* ---------- Buttons ---------- */

.btn-primary,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;

  background: linear-gradient(90deg, #365772, #4a6c8e);
  color: #ffffff;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  border: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 0.95rem;
  box-shadow:
    0 10px 26px var(--layer8-primary-glow),
    0 0 0 1px rgba(137, 166, 201, 0.12);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  cursor: pointer;
}

.btn-primary:hover,
button[type="submit"]:hover {
  background: linear-gradient(90deg, #3f6685, #567899);
  box-shadow:
    0 14px 32px rgba(72, 115, 155, 0.58),
    0 0 0 1px rgba(137, 166, 201, 0.2);
  transform: translateY(-1px);
}

.btn-primary:active,
button[type="submit"]:active {
  transform: translateY(0);
  box-shadow:
    0 6px 16px rgba(72, 115, 155, 0.45),
    0 0 0 1px rgba(137, 166, 201, 0.26);
}

.btn-ghost {
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  background: transparent;
  border: 1px solid rgba(138, 166, 201, 0.4);
  color: var(--layer8-text);
  font-weight: 500;
  font-size: 0.92rem;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  cursor: pointer;
}

.btn-ghost:hover {
  background: rgba(74, 108, 142, 0.16);
  border-color: rgba(138, 166, 201, 0.75);
}

/* ---------- Lists / utilities ---------- */

.eyebrow-tight {
  margin-bottom: 0.25rem;
}

.compact-list {
  margin-top: 0;
}

/* Make all images safe on mobile */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Contact form ---------- */

.contact-form {
  max-width: 680px;
}

.contact-form .grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.contact-form label {
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  font-size: 0.9rem;
}

.form-note {
  font-size: 0.85rem;
  color: var(--layer8-muted);
  margin-top: 0.75rem;
}

.form-note a {
  color: var(--layer8-primary-subtle);
}

/* Success & error message styling */
#form-status {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.8rem;
  font-size: 0.95rem;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#form-status.success {
  background: rgba(65, 135, 90, 0.2);
  border: 1px solid rgba(65, 135, 90, 0.6);
  color: #c9f7d4;
}

#form-status.error {
  background: rgba(160, 65, 65, 0.2);
  border: 1px solid rgba(160, 65, 65, 0.6);
  color: #ffd1d1;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid rgba(24, 37, 54, 0.7);
  background: #050913;
  color: var(--layer8-muted);
  padding-block: 1.5rem;
  font-size: 0.86rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.footer-meta {
  color: var(--layer8-primary-subtle);
}

/* ---------- Mobile layout polish ---------- */

@media (max-width: 900px) {
  .service-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .hero .container,
  .hero-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  }
}

@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem 1rem;
    font-size: 0.86rem;
  }

  .brand {
    flex-wrap: wrap;
    row-gap: 0.15rem;
  }

  section {
    padding-block: 2.6rem;
  }

  .hero {
    padding-top: 3.4rem;
  }

  .hero .container,
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .about-card {
    margin-top: 1.3rem;
  }

  .service-grid,
  .work-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .contact-form .grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .card,
  .hero-card,
  .about-card,
  .work-card {
    padding: 1.15rem 1.1rem;
  }

  .brand-divider {
    height: 0.9rem;
  }
}
