/* ---------- Theme ---------- */
:root {
  --navy-950: #050b18;
  --navy-900: #08122a;
  --navy-800: #0d1c3f;
  --navy-700: #142a5c;
  --navy-100: #dbe4f7;
  --navy-50: #f2f5fc;

  --accent-500: #2dd4bf;
  --accent-600: #14b8a6;

  --text: rgba(242, 245, 252, 0.8);
  --text-dim: rgba(242, 245, 252, 0.6);
  --text-faint: rgba(242, 245, 252, 0.5);

  --max-width: 1152px;
  --font-sans: system-ui, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--navy-50);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--accent-600);
  color: var(--navy-950);
}
.btn-primary:hover {
  background: var(--accent-500);
}

.btn-outline {
  border-color: var(--navy-700);
  color: var(--navy-50);
}
.btn-outline:hover {
  border-color: var(--accent-500);
  color: var(--accent-500);
}

/* ---------- Logo frame ---------- */
/* Square frame for the RG Infosec logo. The logo artwork already has its
   own blue background baked in, so this is just a clean square boundary.
   Drop your logo file into assets/logo/ and set it as the background image
   below (or swap the placeholder <span> for an <img>) everywhere
   .logo-frame is used, in the header and footer of every page. */
.logo-frame {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  border: 2px solid rgba(219, 228, 247, 0.4);
  background: var(--navy-800);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logo-frame span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  user-select: none;
}
.logo-frame.size-176 {
  width: 176px;
  height: 176px;
}
.logo-frame.size-160 {
  width: 160px;
  height: 160px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--navy-800);
  background: rgba(5, 11, 24, 0.95);
  backdrop-filter: blur(8px);
}
.site-header .wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 12px;
  padding-bottom: 12px;
  min-height: 44px;
}

/* The header logo is deliberately oversized and floats out of the normal
   nav row: it's pinned to the top-left of the (slim) navbar, and since it's
   taller than the navbar itself, the lower portion naturally overlaps the
   page content below. The header's z-index keeps it painted on top. */
.site-header .brand {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent-500);
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--navy-800);
  background: transparent;
  color: var(--navy-50);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.mobile-nav {
  position: relative;
  z-index: 2;
  display: none;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--navy-800);
  background: var(--navy-950);
  padding: 16px 24px;
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav a {
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
}
.mobile-nav a[aria-current="page"] {
  color: var(--accent-500);
}
.mobile-nav .btn {
  margin-top: 8px;
  text-align: center;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .mobile-nav {
    display: none !important;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--navy-800);
  background: var(--navy-900);
}
.footer-grid {
  display: grid;
  gap: 40px;
  padding: 48px 0;
  grid-template-columns: 1fr;
}
.footer-brand p {
  margin-top: 12px;
  max-width: 320px;
  font-size: 14px;
  color: var(--text-dim);
}
.footer-heading {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin: 0 0 12px;
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.footer-list a {
  color: var(--text);
}
.footer-list a:hover {
  color: var(--accent-500);
}
.footer-list li {
  color: var(--text);
}
.footer-bottom {
  border-top: 1px solid var(--navy-800);
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Hero ---------- */
.hero {
  border-bottom: 1px solid var(--navy-800);
  background: linear-gradient(to bottom, var(--navy-900), var(--navy-950));
}
.hero .wrap {
  padding: 96px 24px 40px;
  text-align: center;
}
.hero + section {
  padding-top: 48px;
}
.eyebrow {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-500);
  margin: 0;
}
.hero h1 {
  margin: 16px auto 0;
  max-width: 700px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 20px auto 0;
  max-width: 640px;
  font-size: 18px;
  color: var(--text);
}
.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 48px;
  }
}

/* ---------- Page hero (non-home) ---------- */
.page-hero {
  border-bottom: 1px solid var(--navy-800);
  background: var(--navy-900);
}
.page-hero .wrap {
  padding: 64px 24px;
  text-align: center;
}
.page-hero h1 {
  font-size: 32px;
  font-weight: 700;
}
.page-hero p {
  margin: 16px auto 0;
  max-width: 640px;
  color: var(--text-dim);
}

@media (min-width: 640px) {
  .page-hero h1 {
    font-size: 36px;
  }
}

/* ---------- Sections ---------- */
section {
  padding: 80px 0;
}
.section-heading {
  text-align: center;
  margin-bottom: 48px;
}
.section-heading h2 {
  font-size: 28px;
  font-weight: 700;
}
.section-heading p {
  margin: 12px auto 0;
  max-width: 560px;
  color: var(--text-dim);
}

@media (min-width: 640px) {
  .section-heading h2 {
    font-size: 30px;
  }
}

.section-alt {
  border-top: 1px solid var(--navy-800);
  background: var(--navy-900);
}

.cta-section {
  text-align: center;
}
.cta-section h2 {
  font-size: 28px;
  font-weight: 700;
}
.cta-section p {
  margin: 12px auto 0;
  max-width: 480px;
  color: var(--text-dim);
}
.cta-section .btn {
  margin-top: 32px;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  display: block;
  border-radius: 12px;
  border: 1px solid var(--navy-800);
  background: var(--navy-900);
  padding: 32px;
  transition: border-color 0.15s ease;
}
.card:hover {
  border-color: var(--accent-500);
}
.card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}
.card:hover h3 {
  color: var(--accent-500);
}
.card p {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}
.card .card-link {
  margin-top: 20px;
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-500);
}

/* ---------- Reasons list ---------- */
.reasons-grid {
  display: grid;
  gap: 48px;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .reasons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.reasons-grid h2 {
  font-size: 28px;
  font-weight: 700;
}
.reasons-grid > div > p {
  margin-top: 12px;
  color: var(--text-dim);
}
.bullet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text);
}
.bullet-list .dot {
  margin-top: 6px;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--accent-500);
}

/* ---------- Service blocks ---------- */
.service-block {
  display: grid;
  gap: 32px;
  scroll-margin-top: 96px;
  border-radius: 12px;
  border: 1px solid var(--navy-800);
  background: var(--navy-900);
  padding: 32px;
  grid-template-columns: 1fr;
}
.service-block + .service-block {
  margin-top: 64px;
}
.service-block h2 {
  font-size: 24px;
  font-weight: 600;
}
.service-block .summary {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}
.service-block .btn {
  margin-top: 24px;
}
.service-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.service-items li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
}
.service-items .dot {
  margin-top: 6px;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--accent-500);
}

@media (min-width: 640px) {
  .service-block {
    grid-template-columns: 2fr 3fr;
    padding: 40px;
  }
}

/* ---------- Values grid ---------- */
.values-grid {
  display: grid;
  gap: 24px;
  margin-top: 48px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .values-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.value-card {
  border-radius: 12px;
  border: 1px solid var(--navy-800);
  background: var(--navy-950);
  padding: 24px;
}
.value-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.value-card p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* ---------- Prose ---------- */
.prose {
  max-width: 720px;
  margin: 0 auto;
}
.prose h2 {
  font-size: 28px;
  font-weight: 700;
}
.prose p {
  margin-top: 16px;
  line-height: 1.7;
  color: var(--text);
}

/* ---------- Contact ---------- */
.contact-form-wrap {
  max-width: 560px;
  margin: 0 auto;
}

form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.field input,
.field textarea {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--navy-700);
  background: var(--navy-950);
  color: var(--navy-50);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--accent-500);
}

.form-status {
  display: none;
  margin: 0;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
}
.form-status.visible {
  display: block;
}
.form-status.success {
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid var(--accent-500);
  color: var(--accent-500);
}
.form-status.error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid #f87171;
  color: #f87171;
}
