/* =====================================================================
   C7 Security — c7security.co.uk
   Single hand-written stylesheet. No external dependencies.
   Palette sampled from the C7S brand logo (light-blue on deep navy).
   ===================================================================== */

/* ---- Design tokens ---- */
:root {
  --navy-900: #0a1931;
  --navy-850: #0c1d3a;
  --navy-800: #102a4f;
  --navy-700: #16365f;

  --brand-600: #1f63c4;
  --brand-500: #2871d2;   /* primary action (AA with #fff text) */
  --brand-400: #2f80ed;
  --cyan-400:  #56ccf2;   /* highlight accent on dark */
  --cyan-200:  #9fdcf8;

  --ink:    #0a1931;      /* body text on light */
  --muted:  #4f6079;      /* secondary text */
  --link:   #1b5fc0;      /* AA link on white */

  --bg:      #ffffff;
  --bg-tint: #f5faff;
  --line:    #e2ecf7;
  --line-2:  #d4e2f3;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(10, 25, 49, .06), 0 2px 8px rgba(10, 25, 49, .05);
  --shadow-md: 0 10px 30px rgba(10, 25, 49, .10);
  --maxw: 1120px;
  --gutter: clamp(1.1rem, 4vw, 2rem);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", system-ui, sans-serif;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
h1, h2, h3, h4 { line-height: 1.18; color: var(--navy-900); margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.22rem; }
p  { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
strong { color: var(--navy-800); }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tint { background: var(--bg-tint); border-block: 1px solid var(--line); }
.section--navy { background: var(--navy-900); color: #d9e6f7; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section-head { max-width: 56ch; margin-bottom: 2.4rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand-500); margin-bottom: .7rem;
}
.section--navy .eyebrow { color: var(--cyan-400); }
.lead { font-size: 1.15rem; color: var(--muted); }
.section--navy .lead { color: #b8cae3; }

/* ---- Accessibility ---- */
.skip-link {
  position: absolute; left: .75rem; top: -3rem; z-index: 100;
  background: var(--navy-900); color: #fff; padding: .6rem 1rem; border-radius: 8px;
  transition: top .15s ease;
}
.skip-link:focus { top: .75rem; }
:focus-visible { outline: 3px solid var(--brand-400); outline-offset: 2px; border-radius: 4px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; line-height: 1; cursor: pointer;
  padding: .85rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand-500); color: #fff; }
.btn--primary:hover { background: var(--brand-600); }
.btn--ghost { background: transparent; color: var(--brand-500); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--brand-400); color: var(--brand-600); }
.btn--on-navy { background: #fff; color: var(--navy-900); }
.btn--on-navy:hover { background: var(--cyan-200); }
.btn--ghost-navy { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn--ghost-navy:hover { border-color: var(--cyan-400); color: var(--cyan-200); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 25, 49, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(86, 204, 242, .18);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; line-height: 0; border-radius: 8px; }
.brand-logo { height: 42px; width: auto; }
.primary-nav ul { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.primary-nav a {
  display: inline-block; padding: .55rem .85rem; border-radius: 8px;
  color: #cfe0f5; text-decoration: none; font-weight: 600; font-size: .98rem;
}
.primary-nav a:hover { color: #fff; background: rgba(86, 204, 242, .12); }
.primary-nav a[aria-current="page"] { color: #fff; }
.primary-nav a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 4px; border-radius: 2px;
  background: var(--cyan-400);
}
.primary-nav .nav-cta {
  margin-left: .4rem; background: var(--brand-500); color: #fff;
}
.primary-nav .nav-cta:hover { background: var(--brand-400); color: #fff; }
.primary-nav .nav-cta::after { content: none; }

/* mobile toggle */
.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0; cursor: pointer;
  background: transparent; border: 1px solid rgba(255,255,255,.25); border-radius: 10px;
  align-items: center; justify-content: center;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -6px; left: 0; }
.nav-toggle-bars::after  { position: absolute; top: 6px;  left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--navy-900); border-bottom: 1px solid rgba(86,204,242,.18);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .primary-nav.open { max-height: 70vh; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1rem; }
  .primary-nav a { padding: .8rem .6rem; font-size: 1.05rem; }
  .primary-nav a[aria-current="page"]::after { content: none; }
  .primary-nav a[aria-current="page"] { background: rgba(86,204,242,.12); }
  .primary-nav .nav-cta { margin: .6rem 0 0; text-align: center; }
}

/* ---- Hero ---- */
.hero {
  position: relative; color: #e8f1fc; isolation: isolate;
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(47,128,237,.30), transparent 60%),
    radial-gradient(800px 480px at 10% 110%, rgba(86,204,242,.16), transparent 55%),
    linear-gradient(180deg, var(--navy-900), var(--navy-850));
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    linear-gradient(rgba(86,204,242,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86,204,242,.06) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 0%, #000 35%, transparent 78%);
          mask-image: radial-gradient(120% 90% at 70% 0%, #000 35%, transparent 78%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center; padding-block: clamp(3.2rem, 8vw, 6rem);
}
.hero h1 { color: #fff; }
.hero .lead { color: #c4d6ee; max-width: 46ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.8rem; }
.hero-badge {
  font-size: .82rem; font-weight: 600; letter-spacing: .02em; color: #d7e6f8;
  padding: .4rem .8rem; border: 1px solid rgba(86,204,242,.28); border-radius: 999px;
  background: rgba(86,204,242,.07);
}
.hero-art { justify-self: center; width: 100%; max-width: 460px; }
.hero-art img {
  width: 100%; border-radius: var(--radius); border: 1px solid rgba(86,204,242,.22);
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-art { grid-row: 1; max-width: 360px; margin-bottom: .5rem; }
}

/* ---- Trust bar ---- */
.trustbar { background: var(--navy-800); color: #cfe0f5; }
.trustbar ul {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 2rem;
  list-style: none; margin: 0; padding: 1rem 0; font-weight: 600; font-size: .95rem;
}
.trustbar li { display: inline-flex; align-items: center; gap: .55rem; }
.trustbar li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan-400); }

/* ---- Card grid ---- */
.grid { display: grid; gap: 1.3rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.card h3 { margin-top: .25rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand-400), var(--cyan-400));
  color: #fff; margin-bottom: 1rem;
}
.card-icon svg { width: 24px; height: 24px; }
.card-link { font-weight: 600; text-decoration: none; color: var(--brand-500); }
.card-link:hover { color: var(--brand-600); }
.card-link::after { content: " \2192"; }

/* ---- Steps / approach ---- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 3.4rem; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0; font-weight: 700; color: var(--brand-500);
  font-size: 1.05rem; background: var(--bg-tint); border: 1px solid var(--line-2);
  width: 2.4rem; height: 2.4rem; border-radius: 10px; display: grid; place-items: center;
}
.step h3 { margin-bottom: .35rem; }

/* ---- Feature list (checks) ---- */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.checks li { position: relative; padding-left: 1.8rem; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 11px; height: 7px;
  border-left: 2px solid var(--brand-500); border-bottom: 2px solid var(--brand-500);
  transform: rotate(-45deg);
}
.section--navy .checks li::before { border-color: var(--cyan-400); }

/* ---- Split / detailed service ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3.2rem); align-items: center; }
.split + .split { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.split.reverse .split-media { order: 2; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split.reverse .split-media { order: 0; } }
.panel {
  background: linear-gradient(160deg, var(--navy-850), var(--navy-800));
  border: 1px solid rgba(86,204,242,.2); border-radius: var(--radius);
  padding: 1.6rem; color: #cfe0f5;
}
.panel h3 { color: #fff; }
.panel .checks li { color: #cfe0f5; }
.panel .checks li::before { border-color: var(--cyan-400); }

/* ---- Sectors ---- */
.tags { display: flex; flex-wrap: wrap; gap: .7rem; padding: 0; margin: 0; list-style: none; }
.tags li {
  padding: .55rem 1rem; border: 1px solid var(--line-2); border-radius: 999px;
  background: #fff; font-weight: 600; color: var(--navy-800); box-shadow: var(--shadow-sm);
}

/* ---- Highlight band (free assessment) ---- */
.highlight {
  background: linear-gradient(140deg, var(--brand-600), var(--navy-800));
  color: #eaf3ff; border-radius: var(--radius); padding: clamp(1.8rem, 4vw, 2.8rem);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center;
  box-shadow: var(--shadow-md);
}
.highlight h2 { color: #fff; }
.highlight .eyebrow { color: #fff; }
.highlight .lead { color: #d3e4fb; }
.highlight .btn-row { margin-top: 0; }
@media (max-width: 760px) { .highlight { grid-template-columns: 1fr; } }

/* ---- CTA band ---- */
.cta-band { text-align: center; }
.cta-band .btn-row { justify-content: center; }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-method {
  display: flex; gap: 1rem; align-items: flex-start; padding: 1.2rem 1.3rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; margin-bottom: 1rem;
}
.contact-method:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); }
.contact-method .card-icon { flex: none; margin: 0; }
.contact-method .label { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 .15rem; }
.contact-method .value { font-size: 1.15rem; font-weight: 700; color: var(--navy-900); margin: 0; word-break: break-word; }
.detail-box { background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.detail-box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; }
.detail-box dt { font-weight: 700; color: var(--navy-800); }
.detail-box dd { margin: 0; color: var(--muted); }

/* ---- Prose (legal pages) ---- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.muted-note { color: var(--muted); font-size: .95rem; }

/* ---- Footer ---- */
.site-footer { background: var(--navy-900); color: #aebfd8; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2rem;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; } }
.footer-logo { height: 40px; width: auto; margin-bottom: 1rem; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .9rem; }
.site-footer a { color: #cfe0f5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-contact p { margin: 0 0 .5rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem;
  padding-block: 1.2rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .9rem;
}
.footer-bottom nav { display: flex; gap: 1.2rem; }
.footer-meta { color: #8da3c4; font-size: .92rem; line-height: 1.6; }

/* ---- Small utilities (so no inline styles are needed; keeps CSP strict) ---- */
.center-x { justify-content: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.hero-compact { padding-block: clamp(2.6rem, 6vw, 4.2rem); }

/* ---- Motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
