/* ==========================================================================
   Netsafe IT - site stylesheet
   Plain CSS, no frameworks. Colours are defined once as variables below,
   so the whole site's colour scheme can be changed in one place.
   ========================================================================== */

:root {
  --colour-navy: #0d172b;        /* headings, dark sections */
  --colour-navy-deep: #000619;   /* header and footer */
  --colour-accent: #00c0ff;      /* buttons and highlights */
  --colour-accent-dark: #008bb8; /* links and button hover */
  --colour-text: #212529;
  --colour-muted: #536072;
  --colour-background: #ffffff;
  --colour-background-alt: #f3f6f9;
  --colour-border: #dde3ea;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 10px;
  --max-width: 1100px;
}

/* ----- Basic reset and typography ----- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* stop the sticky header covering section titles */
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--colour-text);
  background: var(--colour-background);
}

h1, h2, h3 {
  color: var(--colour-navy);
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a { color: var(--colour-accent-dark); }

img { max-width: 100%; height: auto; }

/* ----- Layout helpers ----- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.narrow { max-width: 760px; }
.center { text-align: center; }

.section { padding: 80px 0; }
.section-alt { background: var(--colour-background-alt); }

.section-intro {
  color: var(--colour-muted);
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.lead { font-size: 1.2rem; color: var(--colour-muted); }

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

.button {
  display: inline-block;
  padding: 0.8em 1.5em;
  border-radius: var(--radius);
  background: var(--colour-accent);
  color: var(--colour-navy-deep);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--colour-accent);
  transition: background 0.15s, border-color 0.15s;
}

.button:hover,
.button:focus-visible {
  background: var(--colour-accent-dark);
  border-color: var(--colour-accent-dark);
}

.button-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.button-ghost:hover,
.button-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.button-small { padding: 0.45em 1.1em; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--colour-navy-deep);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand img { display: block; width: 150px; height: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a:not(.button) {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.nav-links a:not(.button):hover { color: var(--colour-accent); }

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

.hero {
  padding: 100px 0 90px;
  background: var(--colour-navy);
  color: #fff;
}

.hero h1 { color: #fff; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--colour-accent-dark);
}

.hero .lead { max-width: 620px; color: #d7deea; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}

/* ----- Service cards ----- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

.card {
  padding: 28px;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius);
  border-top: 4px solid var(--colour-accent);
  background: #fff;
}

.card p { color: var(--colour-muted); margin: 0; }

/* ----- "How we work" numbered steps ----- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  counter-reset: step;
}

.steps li { counter-increment: step; }

/* Draws the large step number above each heading */
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--colour-accent);
  color: var(--colour-navy-deep);
  font-weight: 700;
}

.steps p { color: var(--colour-muted); }

/* ----- Contact (dark section) ----- */

.section-dark {
  background: var(--colour-navy);
  color: #fff;
}

.section-dark h2 { color: #fff; }
.section-dark .lead { color: #c5d2e0; }

.contact-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 2rem;
}

.contact-option {
  display: flex;
  flex-direction: column;
  min-width: 260px;
  padding: 22px 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  transition: background 0.15s;
}

.contact-option:hover,
.contact-option:focus-visible { background: rgba(255, 255, 255, 0.14); }

.contact-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--colour-accent);
}

.contact-value {
  font-size: 1.25rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

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

.site-footer {
  background: var(--colour-navy-deep);
  color: #9fb0c3;
  font-size: 0.9rem;
  padding: 32px 0 24px;
}

.site-footer a { color: #fff; }

.footer-inner {
  display: grid;
  gap: 24px;
}

.footer-primary,
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 28px;
}

.footer-primary { padding-bottom: 22px; }

.footer-logo { display: block; width: 150px; height: auto; }

.social-links,
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-links a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
}

.social-links a:hover,
.social-links a:focus-visible { color: var(--colour-accent); }

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 18px;
}

.footer-bottom p { margin: 0; }

/* ----- Error page ----- */

.error-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
}

/* ----- Policy pages (privacy, cookies) ----- */

.policy h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 0.2em; }

.policy h2 {
  font-size: 1.3rem;
  margin-top: 2em;
}

.policy-updated {
  color: var(--colour-muted);
  font-size: 0.95rem;
  margin-bottom: 2em;
}

.policy ul { padding-left: 1.3em; margin: 0 0 1em; }
.policy li { margin-bottom: 0.4em; }

/* ----- Cookie policy notice ----- */

.cookie-notice {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--colour-navy-deep);
  color: #fff;
  box-shadow: 0 -4px 18px rgba(0, 6, 25, 0.2);
}

.cookie-notice[hidden] { display: none; }

.cookie-notice-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 20px;
}

.cookie-notice p { margin: 0; }
.cookie-notice a { color: var(--colour-accent); }

.cookie-notice-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

/* ----- Small screens (phones) ----- */

@media (max-width: 640px) {
  .nav-links { gap: 14px; font-size: 0.95rem; }
  .header-inner { min-height: 76px; }
  .brand img { width: 124px; }
  /* Hide the text links on very small screens; keep the Contact button */
  .nav-links li:not(:last-child) { display: none; }
  .section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .contact-option { min-width: 0; width: 100%; }
  .footer-primary,
  .footer-bottom { justify-content: center; text-align: center; }
  .footer-links { justify-content: center; }
  .cookie-notice-inner { align-items: stretch; flex-direction: column; gap: 14px; }
  .cookie-notice-actions { justify-content: flex-end; }
}
