/* IPAControls site styles
   Colors carried over from the placeholder site; logo colors live in the SVG files. */
:root {
  /* Softer than the placeholder: grey-green page instead of near-white,
     slate text instead of near-black. Swap these six to re-theme the site. */
  --paper: #E9EBE7;      /* page background */
  --enclosure: #DCDFDA;  /* grey bands */
  --ink: #26333C;        /* text */
  --muted: #4B5861;      /* secondary text */
  --dark: #222E36;       /* dark bands, alert bar, footer */
  --line: #2F5F7E;       /* process-line blue: links, accents */
  --pilot: #E2A23B;      /* amber pilot light: calls to action */
  --rule: #C3C8C2;       /* borders and dividers */
  --field: #F4F5F2;      /* form field background */
  --on-dark: #C9D3DA;    /* secondary text on dark bands */

  --body: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
img, svg { max-width: 100%; }
a { color: var(--line); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--pilot); outline-offset: 3px; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--dark); color: #fff; padding: .6rem 1rem; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -.015em; }
h1 { font-weight: 700; font-size: clamp(2.3rem, 5vw, 3.8rem); letter-spacing: -.025em; }
h2 { font-weight: 600; font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h3 { font-weight: 600; font-size: 1.25rem; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 58ch; }

/* Emergency strip */
.alert {
  background: var(--dark); color: var(--on-dark);
  font-size: .95rem; padding: .5rem 0;
}
.alert .wrap { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.alert a { color: #fff; font-weight: 600; }
.lamp {
  width: 10px; height: 10px; border-radius: 50%; background: var(--pilot); flex: none;
  box-shadow: 0 0 0 3px rgba(226, 162, 59, .25);
}

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); position: relative; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand { display: block; line-height: 0; }
.brand .full { height: 44px; width: auto; }
.brand .mark { display: none; height: 42px; width: 42px; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: .5rem 0; }
.nav a:hover { color: var(--line); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--line); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--rule); border-radius: var(--radius);
  width: 46px; height: 46px; padding: 0; color: var(--ink); cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.4rem;
  background: var(--ink); color: var(--paper);
  font: 600 1rem/1.2 var(--body); text-decoration: none;
  border: 0; border-radius: var(--radius); border-left: 6px solid var(--pilot);
  cursor: pointer;
}
.btn:hover { background: var(--line); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); border-left-width: 1.5px; }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.nav .btn { color: var(--paper); padding: .55rem 1.1rem; min-height: 44px; }
.nav .btn:hover { color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* Sections */
section { padding: 4.5rem 0; }
.band { background: var(--enclosure); }
.dark { background: var(--dark); color: #fff; }
.dark .lead, .dark p { color: var(--on-dark); }
.dark a { color: #fff; }
.section-head { margin-bottom: 2.5rem; }
.section-head h2 { margin-bottom: .75rem; }

/* Home hero */
.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3rem; align-items: center; padding: 4.5rem 0 4rem; }
.hero h1 { margin-bottom: 1.25rem; }
.hero .lead { margin-bottom: 2rem; max-width: 34ch; }
.pid { width: 100%; height: auto; }
.pid .proc { stroke: var(--ink); stroke-width: 2.2; fill: none; }
.pid .vessel { stroke: var(--ink); stroke-width: 2.5; fill: var(--enclosure); }
.pid .sig { stroke: var(--line); stroke-width: 1.6; fill: none; stroke-dasharray: 6 5; }
.pid .bubble { stroke: var(--line); stroke-width: 2; fill: var(--paper); }
.pid text { font-family: var(--display); font-weight: 600; fill: var(--ink); }
.pid .ink-fill { fill: var(--ink); }
.pid .paper-fill { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.pid .ink-line { stroke: var(--ink); stroke-width: 2; }
.pid .ctl { fill: var(--paper); stroke: var(--line); stroke-width: 2; }
.pid .tag { font-size: 15px; text-anchor: middle; }
.pid .note { font-family: var(--body); font-weight: 500; font-size: 13px; fill: var(--muted); }
.pid .pilot { fill: var(--pilot); }
@media (prefers-reduced-motion: no-preference) {
  .pid .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s ease-out forwards; }
  .pid .fade { opacity: 0; animation: fade .6s ease-out 1.1s forwards; }
  .pid .pilot { animation: blink 2.4s ease-in-out 1.8s infinite; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes fade { to { opacity: 1; } }
  @keyframes blink { 50% { opacity: .35; } }
}

/* Inner page title */
.page-title { padding: 3.5rem 0 3rem; border-bottom: 1px solid var(--rule); }
.page-title h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 1rem; }
.page-title .lead { margin: 0; }

/* Lists of work: rung style (a rail on the left, like a ladder rung) */
.rungs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.25rem 2.5rem; }
.rungs li { border-left: 3px solid var(--line); padding-left: 1rem; }
.rungs h3 { margin-bottom: .4rem; }
.rungs p { margin: 0; color: var(--muted); font-size: 1rem; }
.rungs a { color: inherit; text-decoration: none; }
.rungs a:hover h3 { color: var(--line); }
.dark .rungs li { border-left-color: var(--pilot); }
.dark .rungs p { color: var(--on-dark); }

/* Two-column feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.checks { list-style: none; margin: 0 0 1.75rem; padding: 0; }
.checks li { position: relative; padding: .55rem 0 .55rem 1.75rem; border-bottom: 1px solid var(--rule); }
.checks li:last-child { border-bottom: 0; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 1.05rem;
  width: 10px; height: 10px; border: 2px solid var(--line); border-radius: 50%;
}

/* Platforms */
.platforms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.platforms div { padding: 1.1rem 1.25rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.platforms dt { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.platforms dd { margin: 0; color: var(--muted); font-size: .95rem; }

/* Service detail blocks */
.detail { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; padding: 3rem 0; border-bottom: 1px solid var(--rule); }
.detail:last-child { border-bottom: 0; }
.detail h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: .75rem; }
.detail .intro { color: var(--muted); }
.detail ul { margin: 0; padding-left: 1.2rem; }
.detail li { margin-bottom: .45rem; }
.detail li::marker { color: var(--line); }
.featured-tag {
  display: inline-block; margin-bottom: .75rem; padding: .15rem .6rem;
  background: var(--pilot); color: var(--ink); font-weight: 600; font-size: .9rem; border-radius: 3px;
}

/* Facts list */
.facts { margin: 0; padding: 1.5rem; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--rule); }
.facts div { padding: .65rem 0; border-bottom: 1px solid var(--rule); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--muted); }

/* CTA band */
.cta { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta h2 { margin-bottom: .5rem; }
.cta p { margin: 0; }
.dark .btn { background: var(--pilot); color: var(--ink); border-left-color: var(--pilot); }
.dark .btn:hover { background: var(--field); color: var(--ink); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3.5rem; align-items: start; }
form { display: grid; gap: 1.1rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
label { display: block; font-weight: 600; margin-bottom: .35rem; }
label .opt { font-weight: 400; color: var(--muted); }
.hint { font-size: .95rem; color: var(--muted); margin: -.4rem 0 0; }
input[aria-invalid="true"] { border-color: #B5552B; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--field); border: 1.5px solid #9AA29F; border-radius: var(--radius);
  padding: .7rem .8rem; min-height: 48px;
}
textarea { min-height: 170px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--pilot); outline-offset: 1px; border-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .95rem; color: var(--muted); margin: 0; }
.status { padding: 1rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-weight: 500; }
.status.ok { background: #E3EEE6; border-left: 6px solid #3D7A50; }
.status.err { background: #F6E6DC; border-left: 6px solid #B5552B; }
.status[hidden] { display: none; }
.side h3 { margin: 0 0 .5rem; }
.side .block { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--rule); }
.side .block:last-child { border-bottom: 0; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: .2rem 0; }
.plain .who { color: var(--muted); }

/* Team (unlisted page) */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.person .photo {
  aspect-ratio: 4 / 5; margin-bottom: 1rem; border-radius: var(--radius);
  border: 1.5px dashed #9AA3A8; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-weight: 500; text-align: center; padding: 1rem;
  background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(47,95,126,.08) 10px 11px), var(--paper);
}
.person .photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.person h2 { font-size: 1.5rem; margin-bottom: .2rem; }
.person .role { color: var(--muted); margin-bottom: .6rem; }
.person p { font-size: 1rem; }

/* Footer */
.site-footer { background: var(--dark); color: var(--on-dark); padding: 3.5rem 0 2rem; font-size: .98rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid #34434D; }
.foot-grid img { width: 260px; height: auto; }
.foot-grid h2 { font-size: 1.1rem; color: #fff; margin-bottom: .75rem; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { padding: .2rem 0; }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-top: 1.5rem; font-size: .9rem; }

/* 404 */
.notfound { padding: 6rem 0; }

/* Responsive */
@media (max-width: 900px) {
  .hero, .split, .contact-grid, .detail { grid-template-columns: 1fr; gap: 2rem; }
  .hero { padding: 3rem 0; }
  .rungs { grid-template-columns: 1fr 1fr; }
  .platforms { grid-template-columns: 1fr 1fr; }
  .team { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .brand .full { display: none; }
  .brand .mark { display: block; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule); padding: .5rem 1.25rem 1.25rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .85rem 0; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--line); }
  .nav .btn { margin-top: 1rem; border-bottom: 0; }
}
@media (max-width: 560px) {
  section { padding: 3.25rem 0; }
  .rungs, .platforms, .team, .row, .foot-grid { grid-template-columns: 1fr; }
  .alert { font-size: .9rem; }
}

/* Spacing fixes */
.split h2 { margin-bottom: .9rem; }
section.dark + .site-footer, .site-footer { border-top: 1px solid #34434D; }
