/* South Coast Digital Systems: shared styles for the core site and all division pages */

@font-face { font-family: "Archivo"; font-weight: 500; font-display: swap; src: url("../fonts/archivo-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 600; font-display: swap; src: url("../fonts/archivo-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 700; font-display: swap; src: url("../fonts/archivo-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }

:root {
  --abyss: #050F22;      /* deepest navy, hero and footer */
  --navy: #0A1F44;       /* panels on dark */
  --royal: #1466D8;      /* primary blue from the logo */
  --royal-deep: #0D4CA8;
  --cyan: #22C9C5;       /* teal from the logo */
  --sky: #8FCBFF;
  --paper: #F3F7FC;      /* light section background */
  --white: #FFFFFF;
  --ink: #0B1E3A;        /* text on light */
  --slate: #4A5D7A;      /* secondary text on light */
  --mist: #B7C7DF;       /* secondary text on dark */
  --line: #D5E0EE;
  --line-dark: rgba(143, 203, 255, .18);
  --display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--white); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--royal-deep); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--white); color: var(--ink); padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(5, 15, 34, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-dark); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--white); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -.01em; }
.brand svg { width: 40px; height: 36px; flex: none; }
.site-nav ul { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--mist); text-decoration: none; font-size: .9688rem; font-weight: 500; }
.site-nav a:hover { color: var(--white); }
.site-nav a.nav-cta { color: var(--abyss); background: var(--cyan); padding: .55rem 1rem; border-radius: 6px; font-weight: 600; }
.site-nav a.nav-cta:hover { background: #4FDDD9; color: var(--abyss); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-dark); color: var(--white); font: 500 .9375rem var(--body); padding: .5rem .85rem; border-radius: 6px; cursor: pointer; }

/* Buttons */
.btn { display: inline-block; font: 600 1rem var(--body); text-decoration: none; padding: .85rem 1.4rem; border-radius: 6px; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--cyan); color: var(--abyss); }
.btn-primary:hover { background: #4FDDD9; }
.btn-ghost { color: var(--white); border-color: rgba(143, 203, 255, .45); }
.btn-ghost:hover { border-color: var(--white); }
.btn-solid { background: var(--royal); color: var(--white); }
.btn-solid:hover { background: var(--royal-deep); }

/* Hero */
.hero { position: relative; background: var(--abyss) url("../img/hero-network.jpg") center / cover no-repeat; color: var(--white); overflow: hidden; isolation: isolate; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5,15,34,.88) 0%, rgba(5,15,34,.66) 40%, rgba(5,15,34,.12) 78%, rgba(5,15,34,0) 100%); }
.hero .wrap { padding-block: clamp(5rem, 13vw, 9.5rem) clamp(4.5rem, 11vw, 8.5rem); }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 600; max-width: 15ch; }
.hero h1 span { display: block; color: var(--sky); }
.hero p { margin-top: 1.75rem; max-width: 56ch; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--mist); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.5rem; }

/* Facts strip */
.facts { background: var(--navy); color: var(--white); border-top: 1px solid var(--line-dark); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.facts li { padding: 1.6rem 1.75rem 1.6rem 0; }
.facts li + li { padding-left: 1.75rem; border-left: 1px solid var(--line-dark); }
.facts strong { display: block; font-family: var(--display); font-weight: 600; font-size: 1.1875rem; letter-spacing: -.01em; }
.facts span { color: var(--mist); font-size: .9688rem; }

/* Sections */
.band { padding-block: clamp(4rem, 9vw, 7rem); }
.band-paper { background: var(--paper); }
.band-dark { background: var(--abyss); color: var(--white); }
.band-head { max-width: 46rem; margin-bottom: clamp(2.25rem, 5vw, 3.5rem); }
.band-head h2 { font-size: clamp(1.9rem, 3.8vw, 2.875rem); }
.band-head p { margin-top: 1.1rem; font-size: 1.125rem; color: var(--slate); max-width: 60ch; }
.band-dark .band-head p { color: var(--mist); }

/* Services */
.practice { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
.practice h3 { font-size: 1.5rem; padding-bottom: 1rem; border-bottom: 3px solid var(--royal); }
.practice section:last-child h3 { border-bottom-color: var(--cyan); }
.practice dl { margin: 0; }
.practice dl div { padding: 1.35rem 0; border-bottom: 1px solid var(--line); }
.practice dt { font-family: var(--display); font-weight: 600; font-size: 1.125rem; }
.practice dd { margin: .35rem 0 0; color: var(--slate); }

/* Approach */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 2.5rem 1.75rem 0 0; }
.steps li::before { content: counter(step); position: absolute; top: -19px; left: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--royal); color: var(--white); font: 600 1rem var(--display); box-shadow: 0 0 0 6px var(--paper); }
.steps li:last-child::before { background: var(--cyan); color: var(--abyss); }
.steps { border-top: 4px double var(--royal); }
.steps h3 { font-size: 1.25rem; }
.steps p { margin-top: .5rem; color: var(--slate); font-size: 1rem; }

/* Divisions */
.divisions { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.div-map svg { width: 100%; height: auto; }
.div-map text { font-family: var(--display); font-weight: 500; fill: var(--white); }
.div-list { list-style: none; margin: 0; padding: 0; }
.div-list li { padding: 1.15rem 0; border-bottom: 1px solid var(--line-dark); display: grid; grid-template-columns: 1fr auto; gap: .25rem 1.25rem; align-items: baseline; }
.div-list li:first-child { border-top: 1px solid var(--line-dark); }
.div-list h3 { font-size: 1.125rem; }
.div-list p { grid-column: 1; color: var(--mist); font-size: .9688rem; }
.div-list a { grid-row: 1; grid-column: 2; color: var(--cyan); font-size: .9375rem; font-weight: 500; white-space: nowrap; }
.div-note { margin-top: 1.5rem; color: var(--mist); font-size: .9375rem; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); }
.about-copy p + p { margin-top: 1.1rem; }
.about-copy p { color: var(--slate); font-size: 1.125rem; max-width: 58ch; }
.commit { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.commit li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.commit strong { display: block; font-family: var(--display); font-weight: 600; font-size: 1.125rem; }
.commit span { color: var(--slate); }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); }
.contact-info h2 { font-size: clamp(1.9rem, 3.8vw, 2.875rem); }
.contact-info p { margin-top: 1.1rem; color: var(--slate); font-size: 1.125rem; max-width: 44ch; }
.contact-info .mail { margin-top: 2rem; font-family: var(--display); font-weight: 600; font-size: 1.25rem; }
.contact-info .mail a { color: var(--royal-deep); }
.contact-info .where { margin-top: .5rem; font-size: 1rem; }
.form { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: clamp(1.5rem, 3vw, 2.25rem); display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-weight: 500; font-size: .9375rem; margin-bottom: .35rem; }
.form input, .form select, .form textarea { width: 100%; font: 400 1rem var(--body); color: var(--ink); background: var(--white); border: 1px solid #A9B9CF; border-radius: 6px; padding: .7rem .8rem; }
.form textarea { min-height: 8.5rem; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid rgba(34, 201, 197, .55); outline-offset: 1px; border-color: var(--royal); }
.form .hp { position: absolute; left: -9999px; }
.form-status { font-size: .9688rem; color: var(--slate); min-height: 1.5em; }
.form-status.ok { color: #0A6B4F; font-weight: 500; }
.form-status.err { color: #A3261B; font-weight: 500; }

/* Division page (template) */
.page-hero { background: var(--abyss); color: var(--white); padding-block: clamp(3.5rem, 8vw, 6rem); }
.page-hero .crumb { color: var(--mist); font-size: .9375rem; }
.page-hero .crumb a { color: var(--sky); }
.page-hero h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); margin-top: 1rem; }
.page-hero p.lede { margin-top: 1.25rem; color: var(--mist); font-size: 1.1875rem; max-width: 58ch; }
.prose { max-width: 44rem; }
.prose h2 { font-size: 1.75rem; margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin-top: 1rem; color: var(--slate); }

/* Footer */
.site-footer { background: var(--abyss); color: var(--mist); border-top: 1px solid var(--line-dark); font-size: .9375rem; }
.site-footer .wrap { padding-block: 3rem 2rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.site-footer .brand { margin-bottom: .9rem; }
.site-footer h2 { font-size: 1rem; color: var(--white); margin-bottom: .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--mist); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line-dark); font-size: .875rem; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--abyss); border-bottom: 1px solid var(--line-dark); padding: 1rem 1.5rem 1.5rem; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .practice, .divisions, .about, .contact { grid-template-columns: 1fr; }
  .facts ul { grid-template-columns: 1fr; }
  .facts li, .facts li + li { padding: 1.1rem 0; border-left: 0; }
  .facts li + li { border-top: 1px solid var(--line-dark); }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; border-top: 0; }
  .steps li { border-top: 4px double var(--royal); }
  .foot-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero::after { background: linear-gradient(180deg, rgba(5,15,34,.78) 0%, rgba(5,15,34,.62) 100%); }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .brand span { font-size: .9688rem; }
  .div-list li { grid-template-columns: 1fr; }
  .div-list a { grid-row: auto; grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
