/* Maidstone Networking — site styles */

:root {
  --navy-900: #001d4b;   /* brand navy (from original Wix palette) */
  --navy-700: #003a96;   /* brand blue */
  --navy-500: #2f5fc4;
  --sky-100:  #e5f0fe;   /* brand light blue */
  --sky-50:   #f4f8ff;
  --tile:     #8aa8fb;   /* icon tile blue */
  --alert:    #ff937f;   /* on-call tile salmon */
  --alert-ink:#7a1408;
  --ink:      #15233d;
  --ink-soft: #4a5873;
  --line:     #d7e2f5;
  --white:    #ffffff;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 29, 75, .06), 0 6px 20px rgba(0, 29, 75, .08);
  --max: 1120px;
  --font-head: "Jost", "Futura", "Trebuchet MS", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  /* Theme tokens: everything that changes between light and dark mode */
  --bg:          #ffffff;
  --surface:     #ffffff;   /* cards, pills, callout */
  --surface-alt: var(--sky-50);
  --band:        var(--sky-100);
  --text:        var(--ink);
  --text-soft:   var(--ink-soft);
  --heading:     var(--navy-900);
  --link:        var(--navy-700);
  --link-hover:  var(--navy-900);
  --accent:      var(--navy-500);
  --border:      var(--line);
  --header-bg:   rgba(255,255,255,.96);
  --nav-hover:   var(--sky-50);
  --nav-active:  var(--sky-100);
  --btn:         var(--navy-700);
  --btn-hover:   var(--navy-900);
  --pricing-bg:  var(--navy-900);
  --tile-bg:     linear-gradient(145deg, #e8f0ff, #c9daff);
  --tile-alert:  linear-gradient(145deg, #fff0ec, #ffd3c9);
  --callout-line:#ffd2c9;
  color-scheme: light;
}

/* Dark mode: follows the visitor's device setting unless they pick one with the toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0b1424;
    --surface:     #121e33;
    --surface-alt: #0e192c;
    --band:        #13213a;
    --text:        #d5deee;
    --text-soft:   #9cadc9;
    --heading:     #f1f5fc;
    --link:        #8db4ff;
    --link-hover:  #b9d0ff;
    --accent:      #8db4ff;
    --border:      #24344f;
    --header-bg:   rgba(11,20,36,.93);
    --nav-hover:   #16243d;
    --nav-active:  #1b2d4c;
    --btn:         #2f62d0;
    --btn-hover:   #3d72e6;
    --pricing-bg:  #0f2550;
    --tile-bg:     linear-gradient(145deg, #d3e0fb, #a7bff0);
    --tile-alert:  linear-gradient(145deg, #ffe4dd, #f6b9ab);
    --callout-line:#5b2c24;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:          #0b1424;
  --surface:     #121e33;
  --surface-alt: #0e192c;
  --band:        #13213a;
  --text:        #d5deee;
  --text-soft:   #9cadc9;
  --heading:     #f1f5fc;
  --link:        #8db4ff;
  --link-hover:  #b9d0ff;
  --accent:      #8db4ff;
  --border:      #24344f;
  --header-bg:   rgba(11,20,36,.93);
  --nav-hover:   #16243d;
  --nav-active:  #1b2d4c;
  --btn:         #2f62d0;
  --btn-hover:   #3d72e6;
  --pricing-bg:  #0f2550;
  --tile-bg:     linear-gradient(145deg, #d3e0fb, #a7bff0);
  --tile-alert:  linear-gradient(145deg, #ffe4dd, #f6b9ab);
  --callout-line:#5b2c24;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--link); }
a:hover { color: var(--link-hover); }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.2;
  color: var(--heading);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 400; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

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

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: .6em;
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--navy-900); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-head); font-weight: 500; font-size: 1rem;
  padding: .75em 1.3em; border-radius: 999px;
  text-decoration: none; border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-primary { background: var(--btn); color: #fff; }
.btn-primary:hover { background: var(--btn-hover); color: #fff; }
.btn-light { background: #fff; color: var(--navy-900); }
.btn-light:hover { background: var(--sky-100); color: var(--navy-900); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 72px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--heading);
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; background: var(--navy-900);
  display: grid; place-items: center; flex: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.brand-mark img { width: 15px; }
.brand-name { font-family: var(--font-head); font-size: 1.2rem; font-weight: 500; line-height: 1.1; }
.brand-tag  { display: block; font-size: .78rem; color: var(--text-soft); font-family: var(--font-body); font-weight: 400; }

.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a {
  font-family: var(--font-head); text-decoration: none; color: var(--text);
  padding: .45em .8em; border-radius: 8px; font-size: .98rem;
}
.nav a:hover { background: var(--nav-hover); color: var(--link); }
.nav a[aria-current="page"] { color: var(--link); background: var(--nav-active); }
.nav .btn { padding: .55em 1.1em; margin-left: 6px; color: #fff; }
.nav .btn:hover { background: var(--btn-hover); color: #fff; }

/* Light/dark toggle */
.theme-toggle {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; margin-left: 4px; padding: 0; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text);
}
.theme-toggle:hover { background: var(--nav-hover); color: var(--link); }
.theme-toggle:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--navy-900) url("../img/banner-top.jpg") center / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(0,29,75,.97) 0%, rgba(0,29,75,.88) 45%, rgba(0,29,75,.45) 100%);
}
.hero .wrap { position: relative; padding-top: clamp(56px, 9vw, 110px); padding-bottom: clamp(56px, 9vw, 110px); }
.hero h1 { color: #fff; max-width: 14ch; }
.hero .eyebrow { color: #9fc0ff; }
.hero .lede { font-size: 1.2rem; max-width: 58ch; color: #dbe7ff; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.page-hero { background: var(--navy-900) url("../img/banner-bottom.jpg") center / cover no-repeat; }
.page-hero::before { background: linear-gradient(100deg, rgba(0,29,75,.96) 0%, rgba(0,29,75,.82) 60%, rgba(0,29,75,.6) 100%); }
.page-hero .wrap { padding-top: clamp(44px, 6vw, 72px); padding-bottom: clamp(44px, 6vw, 72px); }
.page-hero h1 { max-width: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--surface-alt); }
.section-head { max-width: 60ch; margin-bottom: 36px; }
.section-head p { color: var(--text-soft); }

.split { display: grid; gap: 48px; align-items: center; grid-template-columns: 1.1fr .9fr; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Icon tiles ---------- */
.tile {
  display: grid; place-items: center; flex: none;
  width: 84px; height: 84px; border-radius: 18px;
  background: var(--tile-bg);
}
.tile img { width: 72%; height: 72%; border-radius: 0; box-shadow: none; }
.tile.alert { background: var(--tile-alert); }

/* ---------- On-call callout ---------- */
.callout {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--callout-line); border-left: 6px solid var(--alert);
  border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow);
  margin-top: -44px; position: relative;
}
.callout .tile { width: 72px; height: 72px; border-radius: 16px; }
.callout .text { flex: 1 1 260px; }
.callout h2 { font-size: 1.4rem; margin: 0 0 .2em; }
.callout p { margin: 0; color: var(--text-soft); }

/* ---------- Service grid ---------- */
.service-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.service-grid a {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  height: 100%; padding: 22px 14px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--heading);
  font-family: var(--font-head); font-size: 1.02rem; line-height: 1.3;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.service-grid a:hover { border-color: var(--tile); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--link); }
.service-grid .tile { width: 84px; height: 84px; }

/* ---------- Pricing ---------- */
.pricing-card {
  background: var(--pricing-bg); color: #dbe7ff; border-radius: 20px;
  border: 1px solid rgba(255,255,255,.06);
  padding: clamp(28px, 5vw, 52px); display: grid; gap: 32px;
  grid-template-columns: 1.4fr 1fr; align-items: center;
}
.pricing-card h2 { color: #fff; }
.pricing-card .eyebrow { color: #9fc0ff; }
.pricing-card .badge {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius); padding: 26px; text-align: center;
}
.badge .big { font-family: var(--font-head); font-size: 3rem; color: #fff; line-height: 1; }
.badge .small { font-size: .95rem; margin: .4em 0 1.2em; }
@media (max-width: 820px) { .pricing-card { grid-template-columns: 1fr; } }

/* ---------- Service detail page ---------- */
.services-list { padding-top: clamp(36px, 5vw, 56px); }
.jump-nav { margin-bottom: 16px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.jump {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0;
}
.jump a {
  display: inline-block; font-size: .92rem; text-decoration: none;
  padding: .35em .85em; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--heading);
}
.jump a:hover { border-color: var(--accent); color: var(--link); }

.service {
  display: grid; grid-template-columns: 96px 1fr; gap: 28px;
  padding: 40px 0; border-top: 1px solid var(--border);
}
.service:first-of-type { border-top: 0; }
.service > .tile { width: 96px; height: 96px; }
.service > div { min-width: 0; max-width: 78ch; }
.service .q { font-size: 1.12rem; color: var(--link); font-style: italic; }
.service ul { padding-left: 1.2em; margin: 0 0 1em; }
.service li { margin-bottom: .3em; }
.service .note { font-size: .92rem; color: var(--text-soft); }
.service .more { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--font-head); font-size: .95rem; }
.service .more a { text-decoration: none; }
.service .more a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .service { grid-template-columns: 1fr; gap: 14px; }
  .service > .tile { width: 72px; height: 72px; border-radius: 16px; }
  .jump { gap: 6px; }
  .jump a { font-size: .85rem; padding: .3em .7em; }
}

/* ---------- About ---------- */
.owner figure { margin: 0; }
.owner figcaption { font-family: var(--font-head); color: var(--text-soft); margin-top: 10px; text-align: center; }
.owner .text p:first-of-type::first-letter {
  font-family: var(--font-head); float: left; font-size: 3.4em; line-height: .9; padding: 6px 10px 0 0; color: var(--link);
}

/* ---------- Contact band ---------- */
.contact-band { background: var(--band); }
.contact-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: 44px; padding-bottom: 44px; }
.contact-band h2 { margin: 0; font-size: 1.6rem; }
.contact-band p { margin: 0; color: var(--text-soft); }
.contact-band .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.contact-band .btn-light { border-color: var(--border); background: var(--surface); color: var(--heading); }
.contact-band .btn-light:hover { background: var(--nav-active); color: var(--heading); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; color: #b9cbf0;
  background: var(--navy-900) url("../img/banner-bottom.jpg") center / cover no-repeat;
}
.site-footer::before { content: ""; position: absolute; inset: 0; background: rgba(0, 20, 54, .93); }
.site-footer .wrap { position: relative; padding-top: 48px; padding-bottom: 32px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr; }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4em; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer .brand-tag { color: #b9cbf0; }
.site-footer .fine { border-top: 1px solid rgba(255,255,255,.14); margin-top: 36px; padding-top: 18px; font-size: .88rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .site-header { position: static; }
  /* Two rows: brand + round call button, then the page links. */
  .site-header .wrap { padding-top: 10px; padding-bottom: 8px; gap: 6px 12px; min-height: 0; }
  .site-header .brand { flex: 1 0 calc(100% - 112px); min-width: 0; }
  .theme-toggle { order: 1; width: 44px; height: 44px; margin-left: 0; }
  .nav { display: contents; }
  .nav a { order: 2; flex: 1 1 auto; text-align: center; padding: .35em .4em; font-size: .95rem; }
  .nav .nav-call {
    order: 1; flex: none; margin-left: 0; width: 44px; height: 44px; padding: 0;
    justify-content: center;
  }
  .nav-call .btn-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .callout { margin-top: -28px; }
}
@media (max-width: 480px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .service-grid a { padding: 18px 10px 16px; font-size: .95rem; gap: 10px; }
  .service-grid .tile { width: 72px; height: 72px; border-radius: 16px; }
  .hero .actions .btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .service-grid a { transition: none; }
  .btn:hover, .service-grid a:hover { transform: none; }
}

/* Image protection: no drag, no text-style selection, no iOS long-press "Save Image" menu */
img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
