/* ============================================================
   EGP² — Design System · "Chesapeake"
   Canvas: light paper · Anchor: deep petrol · Action: boutique teal
   Display: Libre Caslon Text · UI: IBM Plex Sans · Data: IBM Plex Mono
   ============================================================ */

:root {
  --canvas: #F4F6F6;          /* light paper canvas */
  --surface: #FFFFFF;         /* raised light surfaces */
  --tint: #E9EFEF;            /* alternate section wash */
  --ink: #15262D;             /* primary text */
  --muted: #51646E;           /* secondary text */
  --line: rgba(11, 60, 73, 0.14);        /* hairlines on light */
  --line-strong: rgba(11, 60, 73, 0.28);

  --petrol: #0B3C49;          /* deep anchor: panels, footer, table head */
  --petrol-2: #0E4757;        /* panel gradient partner */
  --teal: #0E7C86;            /* primary action */
  --teal-deep: #0A616A;       /* hover */
  --cyan: #43C6D2;            /* signal accent on dark surfaces */
  --cyan-soft: #7FC5CC;       /* mono labels on dark */

  --on-dark: #E8F1F2;         /* text on petrol */
  --on-dark-muted: #A9C3C8;
  --dark-line: rgba(127, 197, 204, 0.22);

  --font-display: "Libre Caslon Text", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, Segoe UI, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --container: 1180px;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 28px;
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--teal); color: #fff;
  padding: 10px 16px; z-index: 100; font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.005em;
  color: var(--ink);
}

h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }
a { color: var(--teal); }
a:hover { color: var(--teal-deep); }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 14px;
}

.gold-text { color: var(--cyan); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 24px;
}

.brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--ink);
}

/* Signature: the squared bracket — open frame, teal top-right corner */
.brand-frame {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 12px;
  border: 1.5px solid var(--petrol);
  border-top-color: var(--teal);
  border-right-color: var(--teal);
  position: relative;
  background: var(--surface);
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--petrol);
  letter-spacing: 0.03em;
}
.brand-word sup { color: var(--teal); font-size: 0.7em; }

.brand-name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-menu {
  display: flex; align-items: center; gap: 28px;
  list-style: none; margin: 0; padding: 0;
}

.nav-menu a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}
.nav-menu a:hover { color: var(--petrol); }

.nav-cta {
  border: 1px solid var(--teal);
  color: var(--teal) !important;
  padding: 8px 16px;
  border-radius: var(--radius);
}
.nav-cta:hover { background: var(--teal); color: #fff !important; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line-strong);
  color: var(--ink); font-family: var(--font-mono);
  padding: 8px 14px; border-radius: var(--radius); cursor: pointer;
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn-gold {
  background: var(--teal);
  color: #FFFFFF;
}
.btn-gold:hover { background: var(--teal-deep); color: #FFFFFF; }

.btn-line {
  border-color: var(--line-strong);
  color: var(--petrol);
  background: transparent;
}
.btn-line:hover { border-color: var(--teal); color: var(--teal); }

.btn-full { width: 100%; text-align: center; }

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0;
  min-height: 640px;
  display: flex;
  align-items: center;
  background-image:
    linear-gradient(90deg,
      rgba(244, 246, 246, 0.97) 0%,
      rgba(244, 246, 246, 0.92) 30%,
      rgba(244, 246, 246, 0.55) 52%,
      rgba(244, 246, 246, 0.05) 74%,
      rgba(244, 246, 246, 0) 100%),
    url("../assets/img/hero-bg.jpg");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
}

.hero-copy { max-width: 580px; }

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 24px;
  color: var(--petrol);
}

.hero-title em {
  font-style: italic;
  color: var(--teal);
}

.gold-sup {
  font-size: 0.45em;
  vertical-align: super;
  color: var(--teal);
  font-style: normal;
}

.hero-sub {
  font-size: 1.13rem;
  color: var(--muted);
  max-width: 54ch;
  margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }

.hero-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  max-width: 52ch;
}

/* Relocated Advisory Readout in the Submission Portal */
.portal-readout { margin-top: 32px; }

/* ---------- Readout panels (dark terminal contrast) ---------- */

.hero-readout, .planner-output {
  background: linear-gradient(180deg, var(--petrol), var(--petrol-2));
  border: 1px solid var(--dark-line);
  border-top: 2px solid var(--cyan);
  border-radius: var(--radius);
  padding: 0 0 20px;
  color: var(--on-dark);
  box-shadow: 0 24px 50px rgba(11, 60, 73, 0.25);
}

.readout-head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--cyan-soft);
  padding: 14px 20px;
  border-bottom: 1px solid var(--dark-line);
}

.readout-id { margin-left: auto; color: var(--cyan); }

.readout-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(67, 198, 210, 0.8);
}

.readout-body { margin: 0; padding: 8px 20px; }

.readout-row {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--dark-line);
  font-size: 0.9rem;
}
.readout-row:last-child { border-bottom: 0; }

.readout-row dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan-soft);
  padding-top: 2px;
}
.readout-row dd { margin: 0; color: var(--on-dark); }

.readout-foot {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--on-dark-muted);
  padding: 14px 20px 0;
  border-top: 1px solid var(--dark-line);
}

/* ---------- Capability ledger ---------- */

.ledger {
  background: var(--petrol);
  overflow: hidden;
}

.ledger-track {
  display: flex; flex-wrap: wrap; gap: 12px 40px;
  justify-content: center;
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--cyan-soft);
}

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section-alt {
  background: var(--tint);
  border-block: 1px solid var(--line);
}

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-sub { color: var(--muted); font-size: 1.05rem; }

/* ---------- Service cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 0 10px 30px rgba(11, 60, 73, 0.06);
}

/* squared-bracket corner on cards */
.card::after {
  content: "";
  position: absolute;
  top: -1px; right: -1px;
  width: 34px; height: 34px;
  border-top: 2px solid var(--teal);
  border-right: 2px solid var(--teal);
  border-top-right-radius: var(--radius);
}

.card h3 { color: var(--petrol); margin-bottom: 14px; }
.card p { color: var(--muted); font-size: 0.97rem; }

.card-list {
  list-style: none; margin: 18px 0 0; padding: 0;
  font-size: 0.92rem;
}
.card-list li {
  padding: 8px 0 8px 22px;
  border-top: 1px dashed var(--line);
  position: relative;
  color: var(--ink);
}
.card-list li::before {
  content: "▸";
  position: absolute; left: 2px;
  color: var(--teal);
}

/* ---------- Split sections ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.split-copy p { color: var(--muted); }
.split-copy strong { color: var(--ink); }

/* Translation flow */
.flow { display: grid; gap: 14px; }

.flow-step {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--petrol);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(11, 60, 73, 0.05);
}

.flow-key {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--petrol);
}

.flow-gold { border-left-color: var(--teal); }
.flow-gold .flow-key { color: var(--teal); }

/* ---------- Decision Planner ---------- */

.planner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: start;
}

.pstep {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 0 0 20px;
  padding: 20px 22px 22px;
}

.pstep legend {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--petrol);
  padding: 0 10px;
  display: flex; align-items: center; gap: 10px;
}

.pnum {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border: 1px solid var(--teal);
  color: var(--teal);
  font-size: 0.72rem;
}

.opt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.opt {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.opt:hover { border-color: var(--teal); color: var(--ink); }

.opt input { accent-color: var(--teal); margin: 0; flex-shrink: 0; }

.opt:has(input:checked) {
  border-color: var(--teal);
  color: var(--ink);
  background: rgba(14, 124, 134, 0.07);
}

.planner-output { position: sticky; top: 96px; }

.blueprint-title {
  padding: 18px 20px 0;
  margin-bottom: 4px;
  color: var(--cyan);
}

.blueprint-sub {
  padding: 0 20px;
  color: var(--on-dark-muted);
  font-size: 0.92rem;
}

.blueprint-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-soft);
  padding: 10px 20px 0;
  margin: 0 0 6px;
}

.blueprint-list {
  list-style: none;
  margin: 0 0 18px; padding: 0 20px;
  font-size: 0.9rem;
}
.blueprint-list li {
  padding: 7px 0 7px 20px;
  position: relative;
  border-bottom: 1px dashed var(--dark-line);
}
.blueprint-list li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--cyan);
}

.planner-output .btn { width: calc(100% - 40px); margin: 4px 20px 0; }
.planner-output .btn-gold { background: var(--cyan); color: var(--petrol); }
.planner-output .btn-gold:hover { background: #5CD3DE; color: var(--petrol); }

/* ---------- SLA table ---------- */

.sla-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(11, 60, 73, 0.06);
}

.sla-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.92rem;
  min-width: 760px;
}

.sla-table th, .sla-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.sla-table thead th {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--petrol);
  border-bottom: 2px solid var(--teal);
}

.sla-table tbody th {
  font-weight: 500;
  color: var(--petrol);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.sla-table tbody td { color: var(--ink); }
.sla-table tbody tr:last-child th,
.sla-table tbody tr:last-child td { border-bottom: 0; }
.sla-table tbody tr:hover { background: rgba(14, 124, 134, 0.05); }

/* ---------- Portal form ---------- */

.portal-facts {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding-inline: 18px;
  background: var(--surface);
}
.portal-facts .readout-row { border-bottom-color: var(--line); }
.portal-facts dt { color: var(--teal) !important; }
.portal-facts dd { color: var(--ink) !important; }

.portal-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--teal);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 10px 30px rgba(11, 60, 73, 0.06);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--petrol);
  margin-bottom: 8px;
}

.req { color: var(--teal); }

.field input, .field select, .field textarea {
  width: 100%;
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}

.field textarea { resize: vertical; }

.hp-field { position: absolute; left: -9999px; }

.form-status {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  min-height: 1.4em;
}
.form-status.ok { color: var(--teal-deep); }
.form-status.err { color: #B4342E; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--petrol);
  color: var(--on-dark);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 48px;
  align-items: start;
}

.footer-brand img {
  border-radius: var(--radius);
  background: #FFFFFF;
  padding: 10px;
}
.footer-brand p {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--on-dark-muted);
  margin-top: 14px;
  max-width: 24ch;
}

.footer-nav { display: grid; gap: 10px; justify-content: center; }
.footer-nav a { text-decoration: none; color: var(--on-dark-muted); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--cyan); }

.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--on-dark-muted);
  text-align: right;
}
.footer-meta p { margin-bottom: 6px; }

.footer-legal {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--dark-line);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--on-dark-muted);
}

/* ---------- Blog ---------- */

.page-hero { padding: 80px 0 56px; border-bottom: 1px solid var(--line); }
.page-hero h1 { color: var(--petrol); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(11, 60, 73, 0.06);
}

.post-card::after {
  content: "";
  position: absolute; top: -1px; right: -1px;
  width: 30px; height: 30px;
  border-top: 2px solid var(--teal);
  border-right: 2px solid var(--teal);
  border-top-right-radius: var(--radius);
}

.post-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.post-card h2 { font-size: 1.3rem; }
.post-card h2 a { color: var(--petrol); text-decoration: none; }
.post-card h2 a:hover { color: var(--teal); }
.post-card p { color: var(--muted); font-size: 0.94rem; flex-grow: 1; }

.post-soon {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--teal-deep);
  text-transform: uppercase;
}

.article { max-width: 720px; margin-inline: auto; padding: 72px 28px 96px; }
.article h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 20px; color: var(--petrol); }
.article p, .article li { color: var(--muted); font-size: 1.03rem; }
.article h2 { font-size: 1.5rem; margin-top: 48px; color: var(--petrol); }
.article strong { color: var(--ink); }
.article blockquote {
  margin: 32px 0;
  padding: 20px 26px;
  border-left: 3px solid var(--teal);
  background: var(--surface);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(11, 60, 73, 0.05);
}

.crumb {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .planner, .split { grid-template-columns: 1fr; gap: 48px; }
  .planner-output { position: static; }
  .card-grid, .post-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-meta { text-align: left; }

  /* strengthen the wash so text stays readable as the image narrows */
  .hero {
    background-image:
      linear-gradient(90deg,
        rgba(244, 246, 246, 0.97) 0%,
        rgba(244, 246, 246, 0.90) 45%,
        rgba(244, 246, 246, 0.62) 70%,
        rgba(244, 246, 246, 0.30) 100%),
      url("../assets/img/hero-bg.jpg");
  }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .hero {
    padding: 64px 0 56px;
    min-height: 0;
    background-image:
      linear-gradient(rgba(244, 246, 246, 0.90), rgba(244, 246, 246, 0.90)),
      url("../assets/img/hero-bg.jpg");
    background-position: 70% center;
  }
  .card-grid, .post-grid, .form-row, .opt-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .brand-name { display: none; }

  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 20px 28px;
    gap: 16px;
  }
  .nav-menu.open { display: flex; }
  .nav-cta { text-align: center; }

  .hero-actions .btn { width: 100%; text-align: center; }
}
