/* ==========================================================================
   WIASC — style.css
   Tokens, reset, base type, page shell, header, hero, page header, footer.
   Component styling lives in components.css, breakpoints in responsive.css.
   Every colour, size and duration below is a variable. Change it here and the
   whole site follows; there is no build step.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand — both values sampled from the logo file, assets/images/brand/wnclogo.png */
  --primary-color:   #213F9A;   /* 9.38:1 on white — safe for type and fills   */
  --primary-deep:    #16296B;   /* hover / pressed                              */
  --primary-lift:    #93A8E8;   /* 7.69:1 on --dark-color — type on the ink     */
  --primary-wash:    #EDF1FC;   /* tinted plate behind marks and badges         */

  --accent-color:    #0BA14B;   /* logo green — 3.38:1, graphic use only        */
  --accent-deep:     #06803A;   /* 5.05:1 on white — green that carries words   */
  --accent-lift:     #3FD97F;   /* green on the ink ground                      */

  /* Surfaces */
  --dark-color:      #0D1533;   /* the ink ground: header, hero, page head, footer */
  --dark-raised:     #18224A;   /* a plate lifted off the ink                   */
  --light-color:     #F2F4FA;   /* alternating light band                       */
  --paper-color:     #FFFFFF;

  /* Text */
  --text-color:      #1B2233;   /* 15.5:1 — headings and body on light          */
  --text-muted:      #4C566E;   /* 7.34:1 — secondary text                      */
  --text-on-dark:    #EDF0F8;   /* 16.1:1 on the ink                            */
  --text-on-dark-mu: #A9B4D2;   /* 7.4:1 on the ink — secondary on dark         */

  /* Lines */
  --border-color:    #DBE0EE;
  --border-strong:   #C2CADF;
  --border-on-dark:  rgba(237, 240, 248, 0.16);

  /* Type */
  --font-display: "IBM Plex Sans Condensed", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --fs-fine:   0.75rem;   /* 12 — mono utility                                  */
  --fs-small:  0.8125rem; /* 13                                                 */
  --fs-meta:   0.9375rem; /* 15                                                 */
  --fs-body:   1.0625rem; /* 17                                                 */
  --fs-lead:   1.1875rem; /* 19                                                 */
  --fs-h4:     1.375rem;  /* 22                                                 */
  --fs-h3:     1.75rem;   /* 28                                                 */
  --fs-h2:     clamp(1.75rem, 1.25rem + 1.6vw, 2.375rem);   /* 28 → 38          */
  --fs-h1:     clamp(2rem, 1.3rem + 2.6vw, 3.25rem);        /* 32 → 52          */
  --fs-hero:   clamp(2.25rem, 1.2rem + 4vw, 4.25rem);       /* 36 → 68          */

  /* Layout */
  --shell:      1240px;
  --measure:    70ch;
  --gutter:     20px;
  --band-pad:   clamp(3.5rem, 2rem + 5vw, 6.5rem);
  --radius:     4px;
  --radius-sm:  2px;

  /* Depth */
  --shadow-card:  0 1px 2px rgba(13, 21, 51, 0.04), 0 6px 18px rgba(13, 21, 51, 0.05);
  --shadow-lift:  0 2px 4px rgba(13, 21, 51, 0.06), 0 14px 32px rgba(13, 21, 51, 0.10);
  --shadow-head:  0 1px 0 rgba(13, 21, 51, 0.10), 0 6px 20px rgba(13, 21, 51, 0.08);

  /* Motion */
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast:     180ms;
  --t-slow:     400ms;

  --header-h:     84px;
  --header-h-sm:  62px;
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--header-h-sm) + 16px);
}

body {
  margin: 0;
  background: var(--paper-color);
  color: var(--text-color);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg,
video { display: block; max-inline-size: 100%; }

img { block-size: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-color);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); letter-spacing: -0.01em; }

p  { margin: 0 0 1.15em; }
p:last-child { margin-block-end: 0; }

ul, ol { margin: 0; padding: 0; }

strong { font-weight: 600; }

a {
  color: var(--primary-color);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--primary-deep); }

:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: 12px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--primary-color);
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.skip-link:focus {
  inset-block-start: 0;
  color: #fff;
}

.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   3. Shell and bands
   Spacing is owned by .band alone, so no component can fight it.
   -------------------------------------------------------------------------- */

.shell {
  inline-size: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.band {
  padding-block: var(--band-pad);
}

.band-light { background: var(--light-color); }
.band-ink   { background: var(--dark-color); color: var(--text-on-dark); }

.band-ink h2,
.band-ink h3 { color: var(--text-on-dark); }

.band-tight { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem); }

.measure { max-inline-size: var(--measure); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   4. Utility type
   -------------------------------------------------------------------------- */

.eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-fine);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.eyebrow-on-dark { color: var(--primary-lift); }

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------------------
   5. The process line — the site's signature device
   A hairline with a P&ID valve symbol seated on it and a green flow segment.
   -------------------------------------------------------------------------- */

.process-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-block-end: 22px;
}

.process-line::after {
  content: "";
  flex: 1;
  block-size: 1px;
  background: linear-gradient(90deg, var(--border-strong) 0 64px, var(--border-color) 64px);
}

.process-line .valve-symbol { flex: none; }

.valve-symbol {
  --valve-body: var(--primary-color);
  --valve-stem: var(--accent-color);
  color: var(--valve-body);
}

.valve-symbol .stem { color: var(--valve-stem); }

.band-ink .process-line::after,
.page-head .process-line::after {
  background: linear-gradient(90deg, var(--primary-lift) 0 64px, var(--border-on-dark) 64px);
}

.band-ink .valve-symbol,
.page-head .valve-symbol {
  --valve-body: var(--primary-lift);
  --valve-stem: var(--accent-lift);
}

/* Section head: process line, eyebrow, title */

.section-head { margin-block-end: clamp(1.75rem, 1rem + 2vw, 2.75rem); }

.section-head h2 { margin-block-end: 14px; }

.section-head .lead { max-inline-size: var(--measure); }

/* --------------------------------------------------------------------------
   6. Site header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  background: var(--dark-color);
  border-block-end: 1px solid var(--border-on-dark);
  transition: background var(--t-fast) var(--ease);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  block-size: var(--header-h);
  transition: block-size var(--t-fast) var(--ease);
}

.site-header.is-condensed .header-inner { block-size: var(--header-h-sm); }

.site-header.is-condensed { box-shadow: 0 8px 24px rgba(13, 21, 51, 0.28); }

/* The logo is a blue-and-green mark. On the ink ground the blue falls to
   1.91:1 and the mark goes muddy, so it sits on its own white plate — the
   brand colours stay exactly as drawn rather than being recoloured. */

.brand {
  display: flex;
  align-items: center;
  flex: none;
  padding: 9px 16px;
  background: var(--paper-color);
  border-radius: var(--radius);
  text-decoration: none;
  transition: padding var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.brand:hover { box-shadow: 0 0 0 2px var(--accent-lift); }

.brand img {
  inline-size: auto;
  block-size: 34px;
  transition: block-size var(--t-fast) var(--ease);
}

.site-header.is-condensed .brand { padding: 7px 13px; }
.site-header.is-condensed .brand img { block-size: 28px; }

.main-nav { margin-inline-start: auto; }

.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  display: block;
  position: relative;
  padding: 10px 13px;
  font-size: var(--fs-meta);
  font-weight: 500;
  color: var(--text-on-dark);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  background: rgba(237, 240, 248, 0.08);
}

.nav-link::after {
  content: "";
  position: absolute;
  inset-block-end: 2px;
  inset-inline: 13px;
  block-size: 2px;
  background: var(--accent-lift);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast) var(--ease);
}

.nav-link:hover::after { transform: scaleX(1); }

.nav-link[aria-current="page"] {
  color: #fff;
  font-weight: 600;
}

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* Staff Logins dropdown */

.has-dropdown { position: relative; }

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--fs-meta);
  font-weight: 500;
  color: var(--text-on-dark);
  cursor: pointer;
}

.dropdown-toggle .chev {
  transition: transform var(--t-fast) var(--ease);
}

.dropdown-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  min-inline-size: 232px;
  padding: 6px;
  list-style: none;
  background: var(--paper-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}

.dropdown[hidden] { display: none; }

.dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font-size: var(--fs-meta);
  color: var(--text-color);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.dropdown a:hover,
.dropdown a:focus-visible {
  background: var(--primary-wash);
  color: var(--primary-deep);
}

.dropdown a svg { flex: none; opacity: 0.5; }

/* Mobile toggle + drawer */

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
  padding: 9px 13px;
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius);
  background: none;
  color: var(--text-on-dark);
  font-family: var(--font-mono);
  font-size: var(--fs-fine);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-toggle:hover { background: rgba(237, 240, 248, 0.08); }

.burger {
  position: relative;
  inline-size: 16px;
  block-size: 10px;
}

.burger span {
  position: absolute;
  inset-inline: 0;
  block-size: 2px;
  background: currentColor;
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}

.burger span:nth-child(1) { inset-block-start: 0; }
.burger span:nth-child(2) { inset-block-start: 4px; }
.burger span:nth-child(3) { inset-block-start: 8px; }

.nav-toggle[aria-expanded="true"] .burger span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .burger span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  grid-template-columns: 1fr min(86%, 380px);
}

.drawer[hidden] { display: none; }

.drawer-scrim {
  background: rgba(13, 21, 51, 0.55);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.drawer-panel {
  overflow-y: auto;
  padding: 20px 20px 40px;
  background: var(--dark-color);
  border-inline-start: 1px solid var(--border-on-dark);
}

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block-end: 18px;
  margin-block-end: 14px;
  border-block-end: 1px solid var(--border-on-dark);
}

.drawer-top img { block-size: 34px; inline-size: auto; }

.drawer-close {
  padding: 8px;
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius);
  background: none;
  color: var(--text-on-dark);
  cursor: pointer;
  line-height: 0;
}

.drawer-nav { list-style: none; }

.drawer-nav a {
  display: block;
  padding: 13px 4px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-on-dark);
  text-decoration: none;
  border-block-end: 1px solid var(--border-on-dark);
}

.drawer-nav a[aria-current="page"] {
  color: var(--accent-lift);
}

.drawer-group {
  margin-block-start: 26px;
}

.drawer-group p {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-fine);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-lift);
}

.drawer-group ul { list-style: none; }

.drawer-group a {
  display: block;
  padding: 9px 4px;
  font-size: var(--fs-meta);
  color: var(--text-on-dark-mu);
  text-decoration: none;
}

.drawer-group a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   7. Home hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--dark-color);
  isolation: isolate;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1200ms var(--ease);
}

.hero-slide.is-active { opacity: 1; }

.hero-slide img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, var(--dark-color) 4%, rgba(13, 21, 51, 0.86) 34%, rgba(13, 21, 51, 0.18) 82%),
    linear-gradient(0deg, rgba(13, 21, 51, 0.55), rgba(13, 21, 51, 0.06));
}

.hero-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-block-size: clamp(420px, 62vh, 620px);
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 20px;
  font-family: var(--font-mono);
  font-size: var(--fs-fine);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-lift);
}

.hero h1 {
  max-inline-size: 15ch;
  font-size: var(--fs-hero);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 0.96;
}

.hero-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-block-start: 30px;
}

.hero-rule .valve-symbol {
  --valve-body: var(--primary-lift);
  --valve-stem: var(--accent-lift);
  flex: none;
}

.hero-standards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: var(--fs-fine);
  letter-spacing: 0.08em;
  color: var(--text-on-dark-mu);
}

.hero-standards li { white-space: nowrap; }

.hero-standards li + li::before {
  content: "·";
  margin-inline-end: 14px;
  color: var(--accent-lift);
}

.hero-standards-label {
  margin: 26px 0 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-fine);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-lift);
}

/* Page-load stagger. Pure CSS, so it runs whether or not the script loads,
   and it does not run at all when reduced motion is asked for. */

@media (prefers-reduced-motion: no-preference) {
  .hero-tag,
  .hero h1,
  .hero-standards-label,
  .hero-rule {
    animation: hero-rise 500ms var(--ease) both;
  }

  .hero h1 { animation-delay: 70ms; }
  .hero-standards-label { animation-delay: 170ms; }
  .hero-rule { animation-delay: 230ms; }
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Slide dots */

.hero-dots {
  position: absolute;
  inset-block-end: 22px;
  inset-inline-start: 0;
  inline-size: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  z-index: 2;
}

.hero-dots .shell {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.hero-dot {
  inline-size: 30px;
  block-size: 3px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(237, 240, 248, 0.3);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}

.hero-dot.is-active { background: var(--accent-lift); }

.hero-dot:hover { background: rgba(237, 240, 248, 0.6); }

/* --------------------------------------------------------------------------
   8. Inner page header
   -------------------------------------------------------------------------- */

.page-head {
  position: relative;
  background: var(--dark-color);
  color: var(--text-on-dark);
  isolation: isolate;
  overflow: hidden;
}

.page-head-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.page-head-media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(96deg, var(--dark-color) 12%, rgba(13, 21, 51, 0.9) 52%, rgba(13, 21, 51, 0.62) 100%);
}

.page-head-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-block-size: 232px;
  padding-block: clamp(2rem, 1.4rem + 2.4vw, 3rem);
}

.page-head h1 {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.022em;
}

.breadcrumb {
  margin-block-end: 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-fine);
  letter-spacing: 0.06em;
  color: var(--text-on-dark-mu);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.breadcrumb a {
  color: var(--text-on-dark-mu);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-lift);
  text-decoration: underline;
}

.breadcrumb li + li::before {
  content: "/";
  margin-inline-end: 8px;
  color: var(--primary-lift);
}

.breadcrumb [aria-current="page"] { color: var(--text-on-dark); }

.page-head .process-line { margin-block: 20px 0; }

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-block: clamp(2.75rem, 2rem + 3vw, 4rem) 0;
  background: var(--dark-color);
  color: var(--text-on-dark-mu);
  font-size: var(--fs-meta);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  padding-block-end: 34px;
}

.footer-brand img {
  block-size: 40px;
  inline-size: auto;
  margin-block-end: 18px;
}

.footer-brand p { max-inline-size: 42ch; }

.footer-col p.eyebrow { color: var(--primary-lift); }

.footer-col ul { list-style: none; }

.footer-col li + li { margin-block-start: 7px; }

.footer-col a {
  color: var(--text-on-dark-mu);
  text-decoration: none;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-contact dt {
  font-family: var(--font-mono);
  font-size: var(--fs-fine);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-dark-mu);
  opacity: 0.72;
}

.footer-contact dd {
  margin: 2px 0 12px;
  color: var(--text-on-dark);
}

.footer-contact a { color: var(--text-on-dark); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  padding-block: 20px 26px;
  border-block-start: 1px solid var(--border-on-dark);
  font-size: var(--fs-small);
}

.footer-base p { margin: 0; }
