/* ============================================================
   Coreline Fibre — design system
   Light, clean theme with a dark hero/footer and navy + cyan accents.
   ============================================================ */

:root {
  --navy-900: #0a1430;   /* hero / footer / deepest */
  --navy-800: #0d1838;   /* dark section */
  --navy-700: #111f44;   /* dark cards */
  --navy-600: #16264f;   /* dark card hover */
  --line:     #1c2747;   /* hairline borders on dark */
  --line-2:   #354063;   /* stronger border on dark */

  --blue:     #27479e;   /* brand primary */
  --blue-400: #5b8def;   /* light accent */
  --cyan:     #36c5f0;   /* energy accent */

  --grey:     #656567;   /* brand secondary */
  --ink:      #14213a;   /* headings on light */
  --muted-d:  #aeb6c7;   /* body text on dark */
  --muted-d2: #8a93a6;   /* dim text on dark */
  --muted-l:  #5a6275;   /* body text on light */

  --bg-light: #ffffff;   /* page background */
  --bg-soft:  #f4f6fb;   /* alt light section */
  --border-l: #e4e8f0;   /* hairline borders on light */
  --border-l2:#cfd6e4;   /* stronger border on light */

  --maxw: 1140px;
  --radius: 12px;
  --radius-sm: 8px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-light);
  color: var(--muted-l);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { color: var(--ink); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }

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

.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}

.lead { font-size: 1.1rem; color: var(--muted-l); max-width: 60ch; }

/* ---------- dark contexts (hero, page hero, CTA, dark sections) ---------- */
.hero, .page-hero { background: var(--navy-900); }
.section-dark { background: var(--navy-800); color: var(--muted-d); }
.hero :is(h1,h2,h3,h4), .page-hero :is(h1,h2,h3,h4), .cta-band :is(h1,h2,h3,h4), .section-dark :is(h1,h2,h3,h4) { color: #fff; }
.hero .eyebrow, .page-hero .eyebrow, .section-dark .eyebrow { color: var(--cyan); }
.hero .lead, .page-hero .lead, .page-hero p, .section-dark .lead, .section-dark p, .section-dark .section-head p { color: var(--muted-d); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600;
  padding: 13px 26px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer; transition: transform .18s var(--ease), background .2s, border-color .2s;
  white-space: nowrap;
}
.btn svg, .btn i { transition: transform .25s var(--ease); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #2d54bd; transform: translateY(-2px); }
.btn-primary:hover i { transform: translateX(3px); }
.btn-ghost { border-color: var(--border-l2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
/* ghost button on dark backgrounds */
.hero .btn-ghost, .page-hero .btn-ghost, .section-dark .btn-ghost { border-color: var(--line-2); color: #cdd4e3; }
.hero .btn-ghost:hover, .page-hero .btn-ghost:hover, .section-dark .btn-ghost:hover { border-color: var(--cyan); color: #fff; }
.btn-light { background: #fff; color: var(--blue); }
.btn-light:hover { background: #eef2fb; transform: translateY(-2px); }

/* ---------- header / nav (stays dark) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,20,48,.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { background: rgba(10,20,48,.95); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; display: block; }
.footer-brand .brand img { height: 38px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 15px; color: var(--muted-d); font-weight: 500; transition: color .2s; position: relative; }
.nav-links a:not(.btn):hover { color: #fff; }
.nav-links a.active:not(.btn) { color: #fff; }
.nav-links a.active:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--cyan); border-radius: 2px;
}
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 0; }
.hero-strands { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 700; }
.hero h1 .accent { color: var(--cyan); }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); margin: 22px 0 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* stats strip (within dark hero) */
.stats {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  margin-top: 80px;
}
.stat { padding: 30px 12px; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .num { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; color: var(--cyan); letter-spacing: -.02em; line-height: 1; }
.stat .label { font-size: 13px; color: var(--muted-d2); margin-top: 8px; letter-spacing: .01em; }

/* ---------- sections ---------- */
section { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.section-head p { margin-top: 16px; font-size: 1.08rem; color: var(--muted-l); }
.bg-alt { background: var(--bg-soft); }

/* service / feature cards (light by default) */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border-l);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 1px 3px rgba(20,33,58,.04);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-l2); box-shadow: 0 12px 30px rgba(20,33,58,.10); }
.card .ic {
  width: 50px; height: 50px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(39,71,158,.09); color: var(--blue); font-size: 24px;
  margin-bottom: 20px;
}
.card h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--ink); }
.card p { font-size: .97rem; color: var(--muted-l); }

/* dark-section card variant */
.section-dark .card { background: var(--navy-700); border-color: var(--line); box-shadow: none; }
.section-dark .card:hover { background: var(--navy-600); border-color: var(--line-2); box-shadow: none; }
.section-dark .card h3 { color: #fff; }
.section-dark .card p { color: var(--muted-d); }
.section-dark .card .ic { background: rgba(54,197,240,.1); color: var(--cyan); }

/* split / feature row */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.feature-list { list-style: none; margin-top: 26px; display: grid; gap: 16px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list .ck {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(39,71,158,.1); color: var(--blue);
  display: flex; align-items: center; justify-content: center; font-size: 15px; margin-top: 2px;
}
.feature-list strong { color: var(--ink); font-weight: 600; display: block; }
.feature-list span { font-size: .95rem; color: var(--muted-l); }
.section-dark .feature-list strong { color: #fff; }
.section-dark .feature-list span { color: var(--muted-d); }
.section-dark .feature-list .ck { background: rgba(54,197,240,.12); color: var(--cyan); }

/* media panel — dark framed graphic / photo (works on light bg) */
.media-panel {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #16264f, #0d1838);
  border: 1px solid var(--border-l); aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
}
.media-panel img { width: 100%; height: 100%; object-fit: cover; }
.media-panel .ph-mark { font-size: 64px; color: var(--blue-400); opacity: .9; position: relative; z-index: 2; }
.media-panel svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(120deg, #27479e 0%, #2f6fc4 55%, #1fa3d6 100%); }
.cta-band .wrap { position: relative; z-index: 2; text-align: center; padding: 30px 28px; }
.cta-band h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.cta-band p { color: #e2ebfa; margin: 16px auto 30px; max-width: 54ch; font-size: 1.1rem; }
.cta-band svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .22; }

/* page hero (interior pages, dark) */
.page-hero { padding: 80px 0 60px; position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.page-hero p { margin-top: 16px; max-width: 64ch; }
.crumbs { font-size: 13px; color: var(--muted-d2); margin-bottom: 18px; }
.crumbs a:hover { color: var(--cyan); }

/* ---------- forms (light) ---------- */
.form-card {
  background: #fff; border: 1px solid var(--border-l);
  border-radius: var(--radius); padding: 36px;
  box-shadow: 0 1px 3px rgba(20,33,58,.05);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 15px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--border-l2); border-radius: var(--radius-sm);
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: #9aa3b5; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(39,71,158,.14);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: 13px; color: var(--muted-l); margin-top: 14px; }

/* contact info list */
.info-list { list-style: none; display: grid; gap: 22px; }
.info-list li { display: flex; gap: 16px; align-items: flex-start; }
.info-list .ic { flex: none; width: 44px; height: 44px; border-radius: 11px; background: rgba(39,71,158,.09); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 21px; }
.info-list strong { color: var(--ink); display: block; font-weight: 600; margin-bottom: 2px; }
.info-list a { color: var(--blue); }
.info-list a:hover { text-decoration: underline; }

.map-embed { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-l); margin-top: 56px; }
.map-embed iframe { width: 100%; height: 360px; border: 0; display: block; }

/* ---------- footer (stays dark) ---------- */
.site-footer { background: #070e22; border-top: 1px solid var(--line); padding: 64px 0 30px; color: var(--muted-d); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { font-size: .95rem; max-width: 34ch; color: var(--muted-d); }
.social { display: flex; gap: 12px; margin-top: 20px; }
.social a { width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--muted-d); font-size: 21px; transition: transform .2s var(--ease), color .2s, border-color .2s, background .2s; }
.social a:hover { color: #fff; border-color: var(--cyan); background: rgba(54,197,240,.08); transform: translateY(-2px); }
.footer-col h4 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-d2); margin-bottom: 16px; font-weight: 600; }
.footer-col a, .footer-col p { display: block; font-size: .95rem; color: var(--muted-d); margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; font-size: 13px; color: var(--muted-d2); }
.footer-legal { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-legal a { color: var(--muted-d2); transition: color .2s; }
.footer-legal a:hover { color: var(--cyan); }
.footer-legal .sep { color: var(--line-2); }

/* ---------- areas / coverage map ---------- */
#areamap { width: 100%; height: 540px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-l); }
.leaflet-container { background: var(--bg-soft) !important; font-family: inherit; }
.leaflet-control-attribution { background: rgba(255,255,255,.85) !important; }
.cf-marker { background: none; border: 0; }
.cf-dot { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--cyan); border: 2px solid #fff; box-shadow: 0 0 0 5px rgba(54,197,240,.25), 0 0 14px rgba(54,197,240,.6); }
.region-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.region-chips span { font-size: .92rem; color: var(--ink); background: #fff; border: 1px solid var(--border-l); border-radius: 22px; padding: 8px 18px; }

/* ---------- case study stats ---------- */
.cs-stats { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border-l); }
.cs-stats .num { font-size: 1.7rem; font-weight: 700; color: var(--blue); line-height: 1; letter-spacing: -.02em; }
.cs-stats .label { font-size: 13px; color: var(--muted-l); margin-top: 6px; }
.section-dark .cs-stats { border-top-color: var(--line); }
.section-dark .cs-stats .num { color: var(--cyan); }
.section-dark .cs-stats .label { color: var(--muted-d2); }

/* ---------- legal / long-form content ---------- */
.legal { max-width: 820px; margin: 0 auto; }
.legal .updated { font-size: .9rem; color: var(--muted-l); margin-bottom: 2rem; }
.legal h2 { font-size: 1.4rem; margin: 2.4rem 0 .8rem; }
.legal h3 { font-size: 1.08rem; color: var(--ink); font-weight: 600; margin: 1.6rem 0 .5rem; }
.legal p { margin-bottom: 1rem; }
.legal ul, .legal ol { margin: 0 0 1rem 1.4rem; }
.legal li { margin-bottom: .55rem; }
.legal ol ol { margin-top: .55rem; list-style: lower-roman; }
.legal a { color: var(--blue); word-break: break-word; }
.legal a:hover { text-decoration: underline; }
.legal dl { margin: 0 0 1rem; }
.legal dt { color: var(--ink); font-weight: 600; margin-top: 1rem; }
.legal dd { margin: .2rem 0 .6rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .95rem; }
.legal th, .legal td { border: 1px solid var(--border-l); padding: 10px 14px; text-align: left; vertical-align: top; }
.legal th { color: var(--ink); font-weight: 600; background: var(--bg-soft); }

/* ---------- accreditation / certificate cards ---------- */
.cert-card { display: flex; flex-direction: column; }
.cert-meta { font-size: 13px; color: var(--muted-l); margin: 4px 0 0; }
.cert-link { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 18px; font-weight: 600; font-size: .95rem; color: var(--blue); }
.cert-link:hover { text-decoration: underline; }
.section-dark .cert-link { color: var(--cyan); }

/* ---------- cookie consent banner ---------- */
.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 2000;
  max-width: 680px; margin: 0 auto;
  background: #fff; border: 1px solid var(--border-l); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(20,33,58,.18);
  padding: 18px 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.cookie-banner p { margin: 0; flex: 1; min-width: 240px; font-size: .92rem; color: var(--muted-l); }
.cookie-banner a { color: var(--blue); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-banner .btn { padding: 9px 18px; font-size: 14px; }
@media (max-width: 520px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 16px; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(odd) { border-left: 0; }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(1), .stat:nth-child(2) { border-top: 0; }
}
@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: 74px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-800); border-bottom: 1px solid var(--line);
    padding: 12px 28px 24px; transform: translateY(-130%); transition: transform .35s var(--ease);
  }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav-links a.btn { margin-top: 14px; justify-content: center; border-bottom: 0; }
  .nav-toggle { display: block; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
}
