/* Diginetics website styles
   Colours come from the Diginetics logo (slate) and the company profile (accent blue).
   Change them here and they update everywhere. */
:root {
  --slate: #777d8e;        /* logo colour */
  --slate-dark: #5d6272;   /* slate dark enough for text on white */
  --ink: #23262e;          /* headings, dark "N" mark */
  --text: #3a3e48;         /* body text */
  --accent: #2e5395;       /* buttons and links [TBC: confirm accent colour] */
  --accent-dark: #233f73;
  --bg: #ffffff;
  --soft: #f4f5f7;
  --line: #e2e4e9;
  --radius: 6px;
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

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

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

h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3, .h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

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

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Placeholder marker: anything still to be confirmed */
.tbc { background: #fff3c4; color: #6b5300; padding: 0 .25em; border-radius: 3px; font-weight: 600; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand img { width: 170px; }
@media (min-width: 768px) { .brand img { width: 200px; } }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .5rem .75rem; font: inherit; font-size: .95rem; color: var(--ink); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: var(--ink); position: relative; content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; text-decoration: none; color: var(--ink); font-weight: 500; padding: .75rem 0; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); }

/* Mobile: menu collapses under the header. Without JavaScript it stays open. */
@media (max-width: 767px) {
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { padding: .25rem 16px .75rem; }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .no-js .nav-toggle { display: none; }
}
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .site-nav ul { display: flex; gap: 1.75rem; }
  .site-nav a { padding: .5rem 0; border-bottom: 2px solid transparent; }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: .8rem 1.4rem; border-radius: var(--radius); border: 2px solid var(--accent);
  background: var(--accent); color: #fff; font-size: 1rem; line-height: 1.2; cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section-soft { background: var(--soft); }
.section-intro { max-width: 46rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--slate-dark); margin-bottom: .5rem; }
@media (min-width: 768px) { .section { padding: 5rem 0; } }

/* Hero, with the slate diagonal from the letterhead */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: 3.5rem 0 7rem; }
.hero::before {
  content: ""; position: absolute; right: 0; bottom: 0; width: 34%; max-width: 380px; aspect-ratio: 1.3 / 1;
  background: var(--slate); clip-path: polygon(100% 0, 100% 100%, 0 100%); z-index: -1;
}
.hero .lead { font-size: 1.2rem; max-width: 38rem; color: var(--text); margin-bottom: 1.75rem; }
@media (min-width: 768px) { .hero { padding: 6rem 0 8rem; } }

.page-header { padding: 3rem 0 2rem; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-header p { max-width: 44rem; font-size: 1.1rem; }

/* Key figures strip */
.figures { background: var(--ink); color: #fff; }
.figures ul { list-style: none; margin: 0; padding: 2rem 0; display: grid; gap: 1.5rem; grid-template-columns: 1fr; text-align: center; }
.figures strong { display: block; font-size: 2.25rem; line-height: 1; margin-bottom: .35rem; }
.figures span { color: #c9ccd4; }
@media (min-width: 600px) { .figures ul { grid-template-columns: repeat(3, 1fr); } }

/* Cards */
.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .4rem; }
.card p { margin-bottom: .75rem; }
.card .card-link { margin-top: auto; font-weight: 600; text-decoration: none; }
.card .card-link:hover { text-decoration: underline; }
.card-accent { border-top: 4px solid var(--slate); }

/* Coverage */
.regions { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
.regions li { border-left: 4px solid var(--slate); padding: .25rem 0 .25rem 1rem; }
.regions strong { display: block; color: var(--ink); font-size: 1.1rem; }
@media (min-width: 600px) { .regions { grid-template-columns: repeat(3, 1fr); } }

/* Call to action band */
.cta { background: var(--slate); color: #fff; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #fff; }
.cta .btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta .btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Services */
.service { padding: 2.5rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.service:last-child { border-bottom: 0; }
.service-members { font-size: .95rem; color: var(--slate-dark); }
.service-members strong { color: var(--ink); }
.tag-list { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-list li { background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .8rem; font-size: .9rem; }

/* Members */
.member-logo { height: 96px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.member-logo + h2 { text-align: center; }
.member-logo img { max-height: 96px; width: auto; max-width: 220px; object-fit: contain; }
.member-logo-text { height: 96px; display: flex; align-items: center; justify-content: center; background: var(--soft); border-radius: var(--radius); font-weight: 700; color: var(--slate-dark); margin-bottom: 1rem; text-align: center; padding: 0 1rem; }
.member-meta { color: var(--slate-dark); font-size: .95rem; margin-bottom: .75rem; }

/* Products list on About */
.products dt { font-weight: 700; color: var(--ink); margin-top: 1.25rem; }
.products dd { margin: .25rem 0 0; }

.prose { max-width: 46rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .35rem; }

/* Contact */
.contact-layout { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: 3fr 2fr; } }

.form-row { margin-bottom: 1.1rem; }
.form-row label { display: block; font-weight: 600; color: var(--ink); margin-bottom: .35rem; }
.form-row .optional { font-weight: 400; color: var(--slate-dark); }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1px solid #b9bdc7; border-radius: var(--radius); padding: .65rem .75rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
textarea { min-height: 9rem; resize: vertical; }
.form-2col { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form-2col { grid-template-columns: 1fr 1fr; } }
.consent { display: flex; gap: .6rem; align-items: flex-start; }
.consent input { margin-top: .35rem; width: 1.1rem; height: 1.1rem; flex: none; }
.consent label { font-weight: 400; margin: 0; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 1rem; padding: .85rem 1rem; border-radius: var(--radius); display: none; }
.form-status.is-success { display: block; background: #e7f4ec; color: #1d5a35; border: 1px solid #b8dcc5; }
.form-status.is-error { display: block; background: #fbeaea; color: #8a1f1f; border: 1px solid #efc2c2; }

.contact-box { background: var(--soft); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.contact-box h2 { font-size: 1.3rem; }
.region-group + .region-group { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.region-group h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--slate-dark); }
.region-contacts { list-style: none; margin: 0; padding: 0; }
.region-contacts li { margin-bottom: .9rem; }
.region-contacts li:last-child { margin-bottom: 0; }
.region-contacts strong { color: var(--ink); display: block; }
.region-contacts a { word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9ccd4; font-size: .95rem; padding: 2.5rem 0; }
.site-footer a { color: #fff; }
.footer-inner { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.footer-inner p { margin: 0 0 .35rem; }
.footer-name { color: #fff; font-weight: 700; }
.footer-inner .footer-partner { margin: .75rem 0; }
.footer-partner img { display: block; width: 140px; height: auto; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 2fr 1fr; align-items: end; } .footer-links { justify-content: flex-end; } }
