/* XIAPROJECTS theme
   Local and dependency-free: system fonts, no frameworks, no web fonts.
   Corporate: navy brand bands, one blue accent, square corners, flat bordered surfaces.
   Light/dark follows the OS; every component reads the tokens below. */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --surface: #ffffff;
  --ink: #0f1b2d;
  --ink-2: #3d4a5c;
  --ink-3: #566273;
  --line: #dde3ea;
  --accent: #0a58ca;
  --accent-hover: #0847a6;
  --on-accent: #ffffff;

  --brand: #0b1f3a;
  --brand-2: #07162b;
  --on-brand: #ffffff;
  --on-brand-2: #b8c4d6;
  --brand-accent: #8fb8ff;
  --brand-line: rgba(255, 255, 255, 0.14);

  --header-bg: #ffffff;
  --shadow-hover: 0 12px 32px rgba(15, 27, 45, 0.1);
  --logo-filter: none;
  --map-filter: none;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 4px;
  --wrap: 1200px;
  --gutter: 32px;
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f16;
    --bg-alt: #111722;
    --surface: #151c28;
    --ink: #e8edf4;
    --ink-2: #c3ccd8;
    --ink-3: #98a4b5;
    --line: #263041;
    --accent: #4d94ff;
    --accent-hover: #7aafff;
    --on-accent: #0b0f16;

    --brand: #0f2240;
    --brand-2: #0a1830;

    --header-bg: #0b0f16;
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.4);
    --logo-filter: invert(1);
    --map-filter: invert(0.88);
  }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 64px; }
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

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

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; font-weight: 600; }

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

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 8px 16px;
}
.skip:focus { left: 8px; }

/* Eyebrow label with a short rule in front of it */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 16px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }

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

.btn {
  display: inline-block;
  padding: 13px 24px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); text-decoration: none; }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--on-accent); }
.btn-small { padding: 9px 18px; font-size: 15px; }

/* Buttons on navy brand bands */
.on-brand .btn { background: var(--on-brand); border-color: var(--on-brand); color: var(--brand); }
.on-brand .btn:hover { background: var(--on-brand-2); border-color: var(--on-brand-2); }
.on-brand .btn-outline { background: transparent; color: var(--on-brand); border-color: var(--brand-line); }
.on-brand .btn-outline:hover { background: var(--brand-line); color: var(--on-brand); }

/* ---------- Top bar + header ---------- */

.topbar { background: var(--brand-2); color: var(--on-brand-2); font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 36px; gap: 16px; }
.topbar nav { display: flex; gap: 24px; }
.topbar a { color: var(--on-brand-2); }
.topbar a:hover { color: var(--on-brand); }

@media (max-width: 720px) {
  .topbar { display: none; }
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand img { height: 32px; width: auto; filter: var(--logo-filter); }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn) { color: var(--ink-2); }
.nav-links a:not(.btn):hover { color: var(--accent); text-decoration: none; }

@media (max-width: 900px) {
  .nav-links .nav-section { display: none; }
}
@media (max-width: 640px) {
  .brand img { height: 26px; }
}

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

section { padding: 96px 0; scroll-margin-top: var(--header-h); }
section.alt { background: var(--bg-alt); }
section.on-brand { background: var(--brand); color: var(--on-brand); }
section.on-brand .eyebrow { color: var(--brand-accent); }

.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.section-head h2 + p { margin: 16px 0 0; font-size: 18px; color: var(--ink-3); }
.on-brand .section-head h2 + p { color: var(--on-brand-2); }

@media (max-width: 640px) {
  section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
}

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

.hero { padding: 96px 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.6vw, 52px); letter-spacing: -0.02em; }
.hero .lead { margin: 24px 0 0; font-size: clamp(18px, 2vw, 20px); color: var(--on-brand-2); max-width: 600px; }
.actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px 16px; }
.hero-media img { width: 100%; border-radius: var(--radius); box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35); }

@media (max-width: 900px) {
  .hero { padding: 64px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ---------- Capabilities (who we are) ---------- */

.capabilities { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 32px 48px; }
.capability { border-top: 2px solid var(--line); padding-top: 24px; }
.capability-num { display: block; margin-bottom: 12px; color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: 0.08em; }
.capability h3 { font-size: 21px; margin-bottom: 10px; }
.capability p { margin: 0; color: var(--ink-3); }

/* ---------- Industry cards ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s, border-color 0.25s;
}
.card:hover { box-shadow: var(--shadow-hover); }
.card img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.card-body { padding: 24px 28px 28px; border-top: 3px solid var(--accent); }
.card h3 { font-size: 21px; margin-bottom: 12px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 16px; }
.list li:first-child { border-top: 0; }
.list a { color: var(--ink); font-weight: 500; }
.list a:hover { color: var(--accent); }
/* Chevron drawn in CSS so it renders the same with every system font */
.list a::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 8px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transform: translateY(-2px) rotate(45deg);
}

/* ---------- Split section (coaching): photo + link tiles ---------- */

.split { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: stretch; }
.split-media img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; border-radius: var(--radius); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tile {
  position: relative;
  display: block;
  padding: 20px 48px 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--ink);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.tile:hover { color: var(--ink); text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow-hover); }
.tile::after {
  content: "";
  position: absolute; right: 22px; top: 50%;
  width: 8px; height: 8px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
}
.tile-title { display: block; font-weight: 600; }
.tile-sub { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.tile:last-child:nth-child(odd) { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split-media img { min-height: 0; aspect-ratio: 2 / 1; }
}
@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; }
}

/* ---------- Numbers band ---------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 8px 32px; border-left: 1px solid var(--brand-line); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat-value { display: block; font-size: clamp(40px, 5vw, 56px); font-weight: 600; letter-spacing: -0.02em; line-height: 1; color: var(--on-brand); }
.stat-label { display: block; margin-top: 12px; font-size: 15px; color: var(--on-brand-2); }
.footnote { margin: 48px 0 0; font-size: 14px; color: var(--on-brand-2); }

@media (max-width: 800px) {
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
}

/* ---------- Offices ---------- */

.map { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.map img { width: 100%; filter: var(--map-filter); }

@media (max-width: 640px) {
  .map { padding: 16px; }
}

/* ---------- Contacts ---------- */

.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.panel h3 { font-size: 21px; margin-bottom: 12px; }
.panel p { margin: 0 0 24px; color: var(--ink-3); }
.email { display: inline-block; font-size: clamp(22px, 3vw, 30px); font-weight: 600; margin-bottom: 24px; overflow-wrap: anywhere; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .panel { padding: 28px 24px; }
}

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

.site-footer { background: var(--brand); color: var(--on-brand-2); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; padding: 72px 0 56px; }
.footer-brand img { height: 30px; width: auto; filter: invert(1); margin-bottom: 20px; }
.footer-brand p { margin: 0; max-width: 320px; }
.site-footer h2 { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-brand); margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--on-brand-2); }
.site-footer a:hover { color: var(--on-brand); }
.footer-bottom { border-top: 1px solid var(--brand-line); padding: 24px 0; font-size: 14px; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; padding: 56px 0 40px; }
}
