/* ============================================================
   RSEV Consulting Ltd — Design System
   Palette: Ink Navy #0D1B2A | Harbour #14354F | Copper #C2703E
            Aegean #3E92B8 | Chalk #F4F2ED | Slate #41505E
   Type:    Archivo (display) / IBM Plex Sans (body) / IBM Plex Mono (data)
   ============================================================ */

:root {
  --ink: #0D1B2A;
  --harbour: #14354F;
  --copper: #C2703E;
  --copper-bright: #D98A52;
  --aegean: #3E92B8;
  --chalk: #F4F2ED;
  --paper: #FFFFFF;
  --slate: #41505E;
  --line: rgba(13, 27, 42, 0.12);
  --line-dark: rgba(244, 242, 237, 0.14);
  --max: 1140px;
  --radius: 6px;
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; 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 {
  font-family: var(--font-body);
  color: var(--slate);
  background: var(--chalk);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--copper); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--aegean);
  outline-offset: 2px;
}

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

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--copper);
}
.dark .eyebrow { color: var(--copper-bright); }
.dark .eyebrow::before { background: var(--copper-bright); }

.lede { font-size: 1.2rem; max-width: 46ch; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 27, 42, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-dark);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--chalk);
  display: flex; align-items: baseline; gap: 8px;
}
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--copper-bright); }
.brand small {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: var(--aegean);
  text-transform: uppercase;
}
.nav-links { display: flex; gap: 30px; list-style: none; align-items: center; }
.nav-links a {
  color: var(--chalk);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { text-decoration: none; border-bottom-color: var(--copper-bright); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--copper-bright); color: var(--copper-bright); }
.nav-cta {
  background: var(--copper);
  color: #fff !important;
  padding: 10px 20px !important;
  border-radius: var(--radius);
  border-bottom: none !important;
  font-weight: 600;
}
.nav-cta:hover { background: var(--copper-bright); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line-dark);
  color: var(--chalk);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
}

@media (max-width: 840px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--line-dark);
    padding: 12px 24px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; width: 100%; }
  .nav-cta { margin-top: 10px; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--ink) 0%, var(--harbour) 130%);
  color: var(--chalk);
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  position: relative;
  padding-top: 84px;
  padding-bottom: 96px;
  z-index: 2;
}
.hero h1 { color: #fff; max-width: 18ch; }
.hero h1 .accent { color: var(--copper-bright); }
.hero .lede { color: rgba(244, 242, 237, 0.82); margin-top: 20px; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

.route-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
}
.route-path {
  fill: none;
  stroke: var(--aegean);
  stroke-width: 2;
  stroke-dasharray: 6 8;
  stroke-linecap: round;
  animation: routeDraw 2.6s ease-out forwards;
}
@keyframes routeDraw {
  from { stroke-dashoffset: 900; }
  to { stroke-dashoffset: 0; }
}
.route-node { fill: var(--copper-bright); }
.route-node.pulse { animation: nodePulse 3s ease-in-out infinite; transform-origin: center; }
@keyframes nodePulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.4; }
}

/* Page banner (interior pages) */
.banner {
  background: linear-gradient(180deg, var(--ink) 0%, var(--harbour) 160%);
  color: var(--chalk);
  position: relative;
  overflow: hidden;
}
.banner .wrap { padding-top: 64px; padding-bottom: 64px; position: relative; z-index: 2; }
.banner h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3rem); }
.banner .lede { color: rgba(244, 242, 237, 0.82); margin-top: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--copper); color: #fff; }
.btn-primary:hover { background: var(--copper-bright); }
.btn-ghost { border-color: rgba(244, 242, 237, 0.4); color: var(--chalk); background: transparent; }
.btn-ghost:hover { border-color: var(--chalk); }
.btn-ghost-dark { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost-dark:hover { background: var(--ink); color: var(--chalk); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section.tint { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 44px; }
.section-head p { margin-top: 12px; }

/* ---------- Cards / grids ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  position: relative;
}
.section.tint .card { background: var(--chalk); }
.card .spec {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--aegean);
  display: block;
  margin-bottom: 14px;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.98rem; }
.card ul { margin: 12px 0 0 18px; font-size: 0.98rem; }
.card li { margin-bottom: 7px; }
.card.rule-top::before {
  content: "";
  position: absolute; top: 0; left: 26px; right: 26px;
  height: 3px; background: var(--copper);
  border-radius: 0 0 3px 3px;
}

/* ---------- Stat strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 36px; margin-top: 56px;
}
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }
.stat .num {
  font-family: var(--font-display);
  font-size: 2.1rem; font-weight: 800; color: var(--ink);
}
.stat .lbl {
  font-family: var(--font-mono);
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--slate);
}

/* ---------- Profile (About) ---------- */
.profile {
  display: grid; grid-template-columns: 300px 1fr; gap: 44px; align-items: start;
}
@media (max-width: 820px) { .profile { grid-template-columns: 1fr; } }
.profile-card {
  background: var(--ink);
  color: var(--chalk);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.profile-card h3 { color: #fff; font-size: 1.35rem; }
.profile-card .role {
  font-family: var(--font-mono);
  font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--copper-bright);
  margin: 6px 0 18px;
}
.profile-card dl { font-size: 0.92rem; }
.profile-card dt {
  font-family: var(--font-mono);
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--aegean);
  margin-top: 14px;
}
.profile-card dd { color: rgba(244, 242, 237, 0.88); }
.profile-body p { margin-bottom: 18px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.94rem;
  margin-bottom: 7px;
}
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--slate); margin-top: 14px; }

.reg-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.reg-panel h3 { margin-bottom: 6px; }
.reg-panel dl { margin-top: 16px; }
.reg-panel dt {
  font-family: var(--font-mono);
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--aegean);
  margin-top: 16px;
}
.reg-panel dd { color: var(--ink); font-size: 0.98rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--chalk);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: #fff; max-width: 24ch; }
.cta-band p { color: rgba(244, 242, 237, 0.8); margin: 14px 0 28px; max-width: 52ch; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(244, 242, 237, 0.75);
  border-top: 1px solid var(--line-dark);
  padding: 52px 0 34px;
  font-size: 0.9rem;
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--copper-bright);
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(244, 242, 237, 0.85); }
.footer-legal {
  border-top: 1px solid var(--line-dark);
  margin-top: 40px; padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: rgba(244, 242, 237, 0.55);
  line-height: 1.9;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Brand mark ---------- */
.brand { align-items: center; }
.brand-mark { width: 34px; height: 34px; margin-right: 2px; }

/* ---------- Full logo application ---------- */
.brand-logo { height: 44px; width: auto; }
.footer-mark { width: 42px; height: 42px; margin-bottom: 14px; }
@media (max-width: 480px) { .brand-logo { height: 38px; } }
