:root {
  --primary: #0f3a5f;
  --primary-dark: #0b2c47;
  --accent: #1b6ca8;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #1a2433;
  --muted: #4d5b6c;
  --border: #dbe3ec;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

.container { width: min(92%, var(--max-width)); margin: 0 auto; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  height: 46px;
  width: auto;
  display: block;
}

.nav-toggle {
  display: none;
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  font-weight: 600;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.site-nav a, .site-nav summary {
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}


.site-nav summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.site-nav summary a {
  color: inherit;
  text-decoration: none;
}

.site-nav summary a:hover,
.site-nav summary a:focus {
  text-decoration: none;
}

.site-nav summary::-webkit-details-marker { display: none; }
.site-nav summary::marker { content: ""; }
.site-nav details {
  position: relative;
  padding-bottom: 0.35rem;
  margin-bottom: -0.35rem;
}

.site-nav details::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 0.35rem;
}

.site-nav details ul {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(9, 33, 59, 0.12);
  min-width: 220px;
  padding: 0.45rem;
  border-radius: 8px;
  display: grid;
  gap: 0.25rem;
}

.site-nav details ul a {
  display: block;
  padding: 0.5rem;
  border-radius: 6px;
}

.site-nav details ul a:hover,
.site-nav details ul a:focus {
  background: #eef4fb;
  text-decoration: none;
}

.site-nav details:hover > ul,
.site-nav details:focus-within > ul {
  display: grid;
}

.hero {
  background: linear-gradient(145deg, var(--primary) 10%, var(--primary-dark) 100%);
  color: #fff;
  padding: clamp(4rem, 8vw, 5.5rem) 0 clamp(3.25rem, 6vw, 4.5rem);
}

.hero h1 {
  margin: 0;
  max-width: 18ch;
  line-height: 1.14;
  letter-spacing: -0.01em;
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  text-wrap: balance;
}

.hero p {
  margin-top: 1rem;
  max-width: 65ch;
  color: #d9e7f7;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.button-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.35rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1rem;
  border-radius: 7px;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-primary { background: #fff; color: var(--primary); }
.btn-secondary { border-color: #9cb7d3; color: #fff; }

main { padding: 2.5rem 0 1.35rem; }

.home-page main { padding-bottom: 0; }

.standard-page main {
  padding: clamp(2.3rem, 5vw, 3.2rem) 0 clamp(2rem, 4vw, 2.7rem);
}

.standard-page main .container {
  display: grid;
  gap: clamp(1rem, 2vw, 1.35rem);
}

.page-header {
  display: grid;
  gap: 0.65rem;
}

.page-header .section-intro {
  margin: 0;
}

.service-detail-page .section-intro {
  max-width: 72ch;
}

.service-detail-page .card ul {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
}

.legal-page .container {
  width: min(92%, 900px);
}

.legal-document {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: clamp(1.15rem, 2.8vw, 2rem);
  box-shadow: 0 2px 10px rgba(18, 35, 58, 0.04);
  display: grid;
  gap: 0.85rem;
}

.legal-document h2 {
  margin: 0.85rem 0 0.15rem;
  color: var(--primary);
}

.legal-document p,
.legal-document ul {
  margin: 0;
}

.legal-document ul {
  padding-left: 1.2rem;
  display: grid;
  gap: 0.3rem;
}

.legal-document ul ul {
  margin-top: 0.35rem;
}

main .container > * + * {
  margin-top: 1.35rem;
}

main .container > .grid + .grid,
main .container > .card + .card {
  margin-top: 1.6rem;
}

.grid { display: grid; gap: 1.35rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem;
  box-shadow: 0 2px 10px rgba(18, 35, 58, 0.04);
}

.card h2, .card h3 { margin-top: 0; margin-bottom: 0.4rem; color: var(--primary); }

.services-grid .card {
  display: flex;
  flex-direction: column;
}

.services-grid .btn {
  margin-top: auto;
  align-self: flex-start;
  background: #1b6ca8;
  color: #ffffff;
  border-color: #1b6ca8;
  border-radius: 999px;
  padding: 0.6rem 1.35rem;
  line-height: 1.2;
}

.services-grid .btn:hover,
.services-grid .btn:focus {
  background: #155584;
  border-color: #155584;
  text-decoration: none;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--primary);
  margin: 0;
  line-height: 1.2;
}

.section-intro {
  margin-top: 0;
  color: var(--muted);
  max-width: 72ch;
  font-size: clamp(1.02rem, 1.4vw, 1.24rem);
  line-height: 1.7;
  margin-bottom: 0;
}

.home-hero h1 {
  text-align: center;
  margin-inline: auto;
}

.home-hero .container {
  text-align: center;
}

.home-hero p {
  margin-inline: auto;
}

.home-hero .button-row {
  justify-content: center;
}

.interconnect-section {
  background: linear-gradient(145deg, #135893 0%, #0f3a5f 100%);
  border-radius: 14px;
  color: #f2f7fe;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1.4fr minmax(220px, 0.9fr);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid #2f6ca3;
  box-shadow: 0 10px 28px rgba(11, 44, 71, 0.2);
}

.interconnect-content h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3.1vw, 2.1rem);
  line-height: 1.2;
  color: #ffffff;
}

.interconnect-content p {
  margin: 0.65rem 0 0;
  color: #dceafa;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  max-width: 60ch;
}

.interconnect-content .interconnect-lead {
  color: #ffffff;
  font-weight: 700;
}

.interconnect-content .interconnect-offer {
  margin-top: 0.95rem;
  color: #ffffff;
  font-weight: 600;
}

.interconnect-image {
  width: 100%;
  min-height: 220px;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.testimonials-band {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(2.2rem, 6vw, 3.4rem) 0 clamp(3.25rem, 8vw, 4.8rem);
  background: linear-gradient(150deg, #0b2c47 0%, #0f3a5f 60%, #155c95 100%);
  color: #e3effc;
}

.testimonials-header {
  text-align: center;
  max-width: 76ch;
  margin: 0 auto;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #c5dcf6;
  font-size: 0.85rem;
}

.testimonials-band .section-title {
  color: #ffffff;
  margin-top: 0.35rem;
}

.testimonials-intro {
  margin: 0.65rem auto 0;
  color: #d4e6f8;
}

.testimonial-slider {
  margin: 1.4rem auto 0;
  max-width: 860px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #c7d8ea;
  box-shadow: 0 16px 34px rgba(8, 30, 49, 0.3);
  padding: clamp(1.1rem, 2.6vw, 1.75rem);
}

.testimonial-slide {
  display: none;
}

.testimonial-slide.is-active {
  display: block;
}

.testimonial-quote {
  margin: 0;
  color: #102338;
  font-size: clamp(1.03rem, 1.8vw, 1.22rem);
  line-height: 1.7;
}

.testimonial-author {
  margin: 0.9rem 0 0;
  font-weight: 700;
  color: var(--primary);
}

.testimonial-outcome {
  margin: 0.25rem 0 0;
  color: #304559;
}


.testimonial-more {
  margin-top: 0.8rem;
  color: #304559;
}

.testimonial-more summary {
  cursor: pointer;
  color: #0f3a5f;
  font-weight: 700;
}

.testimonial-more p {
  margin: 0.7rem 0 0;
  line-height: 1.6;
}

.testimonial-controls {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
}

.testimonial-control {
  appearance: none;
  border: 1px solid #1f4f76;
  background: #0f3a5f;
  color: #ffffff;
  border-radius: 999px;
  padding: 0.5rem 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.testimonial-control:hover,
.testimonial-control:focus {
  background: #155a8f;
}

.testimonial-indicators {
  margin-top: 1rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
}

.testimonial-dot {
  appearance: none;
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #6988a6;
  background: #d9e2ee;
  cursor: pointer;
}

.testimonial-dot.is-active {
  background: #0f3a5f;
  border-color: #0f3a5f;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


.about-page {
  display: grid;
  gap: 1.25rem;
}



.about-intro-followup {
  margin-top: 0.2rem;
  color: var(--muted);
}

.about-origin {
  display: grid;
  gap: 1rem;
}

.about-origin-card {
  display: grid;
  gap: 1rem;
}

.about-origin-copy {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.about-origin-heading {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

.about-origin-copy p {
  margin: 0;
}


.about-origin-figure {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.about-origin-figure img {
  width: min(100%, 340px);
  display: block;
  justify-self: end;
  border-radius: 8px;
  border: 1px solid var(--border);
  max-height: 300px;
  object-fit: contain;
  background: #eef4fb;
}

.about-origin-figure figcaption {
  width: min(100%, 340px);
  justify-self: end;
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.4;
}

.team-grid {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-title {
  margin: 0.5rem 0 0;
}

.staff-photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  border: 1px dashed #adc2d9;
  background: #f3f8fd;
  margin-bottom: 0.75rem;
}


.staff-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
  margin-bottom: 0.75rem;
}


.contact-list { padding-left: 1rem; }


.contact-page {
  display: grid;
  gap: 1.1rem;
}

.contact-details-card {
  padding: 1.4rem;
}

.contact-details-list {
  margin: 0.5rem 0 0;
  display: grid;
  gap: 1rem;
}

.contact-details-item {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.contact-details-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.contact-details-item dt {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.contact-details-item dd {
  margin: 0;
  font-size: 1.08rem;
}

.contact-meta {
  margin-top: 0.25rem;
  font-size: 0.97rem;
  color: var(--muted);
}

.contact-grid {
  align-items: stretch;
}

.contact-grid .card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.contact-grid .card address {
  font-style: normal;
}

.contact-social-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.15rem;
}

.map-embed {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.map-embed iframe {
  width: 100%;
  min-height: 320px;
  border: 0;
}

footer {
  background: var(--primary-dark);
  color: #d6e7f8;
  margin-top: 0;
  border-top: 1px solid rgba(228, 239, 251, 0.14);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 1rem 1.5rem;
  padding: 1.25rem 0;
}

.footer-links, .social-links {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.footer-left,
.footer-right {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-left {
  align-items: flex-start;
}

.footer-right {
  align-items: flex-end;
}

.footer-trading-name {
  margin: 0;
  max-width: 26rem;
  color: #c4d9ee;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: left;
}

.footer-company {
  margin: 0;
  max-width: 28rem;
  color: #c4d9ee;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: right;
}

@media (max-width: 1024px) {
  .footer-inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
  }

  .footer-links,
  .social-links {
    justify-content: center;
  }

  .footer-left,
  .footer-right {
    width: 100%;
    align-items: center;
    display: flex;
  }

  .footer-links {
    order: 1;
  }

  .social-links {
    order: 2;
  }

  .footer-company,
  .footer-trading-name {
    text-align: center;
    justify-self: center;
  }

  .footer-trading-name {
    order: 3;
  }

  .footer-company {
    order: 4;
  }
}

footer a { color: #e4effb; }

@media (max-width: 800px) {
  .nav-toggle { display: inline-block; }

  .site-nav {
    display: none;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 0.5rem;
    padding: 0.35rem;
    box-shadow: 0 12px 24px rgba(9, 33, 59, 0.08);
  }

  .site-nav.open { display: block; }

  .topbar { flex-wrap: wrap; }

  .nav-toggle {
    margin-left: auto;
    padding: 0.6rem 0.95rem;
    border-radius: 10px;
    font-size: 1.04rem;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 0.2rem;
    padding: 0.25rem;
  }

  .site-nav li {
    width: 100%;
  }

  .site-nav a,
  .site-nav summary {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0.75rem;
    border-radius: 8px;
  }

  .site-nav a:hover,
  .site-nav a:focus,
  .site-nav summary:hover,
  .site-nav summary:focus {
    background: #eef4fb;
    text-decoration: none;
  }

  .site-nav details { width: 100%; }

  .site-nav summary {
    justify-content: space-between;
  }

  .site-nav summary > a {
    display: block;
    width: auto;
    padding: 0;
    border-radius: 0;
  }

  .site-nav details ul {
    position: static;
    box-shadow: none;
    border: 0;
    background: transparent;
    margin: 0;
    padding: 0.15rem 0 0.2rem 0.9rem;
    justify-items: stretch;
    min-width: 0;
    gap: 0.12rem;
  }

  .site-nav details ul a {
    padding: 0.58rem 0.7rem;
    font-size: 0.97rem;
  }


  .footer-inner {
    grid-template-columns: 1fr;
    align-items: center;
    gap: 0.85rem;
    text-align: center;
  }

  .footer-links,
  .social-links {
    width: 100%;
    gap: 0.65rem 1rem;
    justify-content: center;
  }

  .footer-left,
  .footer-right {
    width: 100%;
    align-items: center;
    gap: 0.5rem;
  }

  .footer-trading-name {
    max-width: 32rem;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .footer-company {
    font-size: 0.8rem;
    line-height: 1.45;
    text-align: center;
  }

  .footer-trading-name,
  .footer-company {
    display: none;
  }

  .footer-inner::after {
    content: "Bletchley Networks is a trading name of Bletchley Networks Limited (Company No: 12091863)";
    display: block;
    width: 100%;
    color: #c4d9ee;
    font-size: 0.8rem;
    line-height: 1.45;
    text-align: center;
    order: 3;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .interconnect-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .interconnect-image {
    height: auto;
    min-height: 0;
    max-height: 280px;
  }

  .testimonial-slider {
    padding: 1rem;
  }

.testimonial-controls {
    justify-content: center;
  }

  .testimonial-indicators {
    justify-content: center;
  }

  .logo img { height: 40px; }
}

@media (min-width: 900px) {
  .about-origin-card {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
    gap: 1.35rem 1.75rem;
    align-items: start;
  }

  .team-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .about-origin-copy {
    grid-column: 1;
  }

  .about-origin-figure {
    grid-column: 2;
    align-self: start;
  }
}
