/* CoraX Technologies — main stylesheet */
@import url("fonts.css");

:root {
  --bg: #080b12;
  --surface: #111823;
  --text: #e8edf2;
  --muted: #7c8ca0;
  --teal: #2fd3c4;
  --orange: #d94f2b;
  --line: rgba(232, 237, 242, 0.55);
  --line-teal: rgba(47, 211, 196, 0.6);
  --line-soft: rgba(124, 140, 160, 0.25);
  --sans: "IBM Plex Sans", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 3.2vw, 46px);
  --header-h: 108px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 20.25px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, h5, p { margin: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--teal); color: var(--bg); padding: 8px 14px; font-family: var(--mono);
}
.skip-link:focus { left: 8px; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 13.5px; font-weight: 500;
  letter-spacing: 0.15em; line-height: 1.35; text-transform: uppercase;
}
.eyebrow--muted { color: var(--muted); }
.eyebrow--teal { color: var(--teal); }
.eyebrow--orange { color: var(--orange); }
.eyebrow--rule::before {
  content: ""; display: block; width: 46px; height: 1px; background: var(--teal); margin-bottom: 18px;
}
.h1 { font-size: clamp(42px, 5.6vw, 81px); font-weight: 700; line-height: 0.9; }
.h2 { font-size: clamp(32px, 3.45vw, 49.5px); font-weight: 700; line-height: 1; }
.h3 { font-size: clamp(26px, 2.5vw, 36px); font-weight: 700; line-height: 1.05; }
.upper { text-transform: uppercase; }
.lead { font-size: 20.25px; line-height: 1.65; }
.muted { color: var(--muted); }
.mono-sm { font-family: var(--mono); font-size: 13.5px; font-weight: 500; line-height: 1.35; color: var(--muted); }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 135px 0; }
.section--surface { background: var(--surface); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: linear-gradient(90deg, rgba(26, 34, 46, 0.92), rgba(13, 18, 26, 0.92));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.site-header .container {
  height: 100%; display: flex; align-items: center;
}
.logo img { width: 113px; height: auto; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(20px, 3.8vw, 56px); }
.lang {
  margin-left: clamp(20px, 3vw, 44px); padding: 5px 9px;
  border: 1px solid var(--line-soft); color: var(--muted); text-decoration: none;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .1em;
  transition: color .2s, border-color .2s;
}
.lang:hover { color: var(--teal); border-color: var(--teal); }
.nav a {
  font-family: var(--mono); font-size: 13.5px; font-weight: 500; text-transform: uppercase;
  text-decoration: none; color: var(--text); white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
.nav-toggle {
  display: none; background: none; border: 0; color: var(--text); cursor: pointer;
  width: 44px; height: 44px; padding: 10px;
}
.nav-toggle span { display: block; height: 2px; background: currentColor; margin: 6px 0; transition: transform .25s, opacity .25s; }

/* Home: header floats over hero */
.page-home .site-header { position: fixed; left: 0; right: 0; background: linear-gradient(180deg, rgba(8, 11, 18, 0.65), rgba(8, 11, 18, 0)); backdrop-filter: none; -webkit-backdrop-filter: none; transition: background .3s; }
.page-home .site-header.is-scrolled { background: linear-gradient(90deg, rgba(26, 34, 46, 0.92), rgba(13, 18, 26, 0.92)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* ---------- Home hero ---------- */
.hero {
  position: relative; min-height: 968px; display: flex; align-items: center;
  overflow: hidden; background: var(--bg);
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 21% 91%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,11,18,.55) 0%, rgba(8,11,18,.15) 60%, rgba(8,11,18,0) 100%); }
.hero .container { position: relative; z-index: 1; padding-left: calc(var(--gutter) + 44px); }
.hero .eyebrow { max-width: 420px; margin-bottom: 72px; }
.hero h1 { max-width: 900px; text-transform: uppercase; }
:lang(fr) .h1 { line-height: 1; }
.hero .lead { max-width: 420px; margin-top: 160px; }

/* Stat strip */
.strip { background: var(--surface); border-top: 1px solid var(--line-soft); }
.strip .container { display: grid; grid-template-columns: repeat(4, 1fr); padding-top: 45px; padding-bottom: 45px; }
.strip__item { padding-right: 45px; }
.strip__item + .strip__item { border-left: 1px solid var(--line-soft); padding-left: 45px; }
.strip__item h5 { font-weight: 400; font-size: 20.25px; line-height: 1.65; text-transform: uppercase; margin-top: 18px; }

/* Role cards */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 47px; margin-top: 70px; }
.card { border: 1px solid var(--line); padding: 36px; }
.card--teal { border-color: var(--line-teal); }
.card .eyebrow { margin-bottom: 18px; }

/* Three layers */
.layers { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 47px; margin-top: 90px; }
.layer-text {
  border: 1px solid var(--line-teal); padding: 45px; min-height: 511px;
  display: flex; flex-direction: column; justify-content: center;
}
.layer-text h4 { font-size: 27px; font-weight: 700; line-height: 1.1; text-transform: uppercase; margin-top: 18px; }
.layer-media {
  border: 1px solid var(--line-teal); border-right: 0; margin-right: calc(-1 * var(--gutter));
  display: flex; align-items: center; justify-content: center; padding: 45px; min-height: 511px;
}
.layer-media img, .layer-media video { width: 100%; max-width: 556px; }
.layer-media .framed { border: 1px solid var(--line-teal); }
.layer-media video { max-width: 489px; aspect-ratio: 4 / 3; object-fit: cover; }
.layer-media img.wide { max-width: 643px; border: 1px solid var(--line-soft); }

/* Independence */
.independence { text-align: center; }
.independence h3 { max-width: 864px; margin: 45px auto 0; }
.independence p { max-width: 756px; margin: 45px auto 0; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; }
.page-hero--image { min-height: 751px; display: flex; align-items: center; }
.page-hero--image img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 53% 62%; }
.page-hero--image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,11,18,.55), rgba(8,11,18,0) 70%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin-top: 20px; }
.page-hero .highlight { display: inline; background: rgba(8, 11, 18, 0.75); color: var(--muted); box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 4px; }

/* P1400 capabilities */
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 68px 47px; margin-top: 50px; }
.cap { border: 1px solid var(--line); padding: 45px; }
.cap h5 { font-size: 22.5px; font-weight: 700; line-height: 1.1; }
.cap .cap__num { color: var(--teal); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 30px; }
.cap h5 + .mono-sm { margin-top: 10px; }
.cap .mono-sm + h5 { margin-top: 20px; }
.cap .mono-sm + .mono-sm { margin-top: 18px; }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.feature + .feature { margin-top: 140px; }
.feature figure { margin: 0; }
.feature figcaption { font-family: var(--mono); font-size: 13.5px; font-weight: 500; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; text-align: center; margin-top: 10px; }
.feature h3 + p { margin-top: 27px; }
.feature .fig-3d img { width: 100%; aspect-ratio: 661 / 381; object-fit: cover; object-position: 38% 71%; }
.feature .fig-square img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.feature .fig-horus img { width: 100%; aspect-ratio: 712 / 661; object-fit: cover; object-position: 100% 50%; }
.feature--bleed-left figure { margin-left: calc(-1 * var(--gutter)); }
.btn {
  display: inline-block; margin-top: 40px; padding: 14px 26px;
  border: 1px solid var(--teal); color: var(--teal); text-decoration: none;
  font-family: var(--mono); font-size: 13.5px; font-weight: 500;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--teal); color: var(--bg); }

/* About timeline */
.timeline { list-style: none; margin: 90px auto 0; padding: 0; max-width: 1000px; }
.timeline li { display: grid; grid-template-columns: 300px 1fr; gap: 0; }
.timeline .date { text-align: right; padding: 56px 60px 0 0; }
.timeline .entry { border-left: 1px solid var(--line-soft); padding: 50px 0 60px 36px; max-width: 480px; }
.timeline li:first-child .entry { border-left-color: var(--orange); }
.timeline .entry a { word-break: break-all; }

/* Horus */
.horus-hero { min-height: 768px; display: flex; align-items: center; }
.horus-hero h1 { max-width: 1100px; margin-top: 60px; }
.horus-hero .lead { max-width: 560px; margin-top: 55px; }
.caps-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-top: 45px; }
.cap-c { border: 1px solid var(--line-teal); padding: 30px 30px 40px; text-align: center; }
.cap-c img { width: 55px; height: 55px; margin: 0 auto 30px; object-fit: cover; }
.cap-c h5 { font-size: 22.5px; font-weight: 700; line-height: 1.1; text-transform: uppercase; }
.cap-c p { font-family: var(--mono); font-size: 13.5px; font-weight: 500; line-height: 1.35; margin-top: 22px; }
.interface { display: grid; grid-template-columns: 856fr 538fr; gap: 28px; align-items: start; }
.interface img { margin-left: calc(-1 * var(--gutter) + 18px); width: calc(100% + var(--gutter) - 18px); max-width: none; }
.interface h2 { text-transform: uppercase; margin-top: 30px; }
.interface h2::after { content: ""; display: block; width: 92px; height: 1px; background: var(--teal); margin-top: 26px; }
.interface p { margin-top: 26px; }

/* CrossHair */
.xh-hero { text-align: center; padding-top: 45px; padding-bottom: 90px; }
.xh-hero h1 { max-width: 1020px; margin: 0 auto; }
.xh-hero .lead { max-width: 765px; margin: 45px auto 0; }
.xh-banner { position: relative; margin-top: 12px; border: 1px solid var(--line-teal); height: 357px; overflow: hidden; }
.xh-banner img { width: 100%; height: 100%; object-fit: cover; object-position: 53% 44%; transform: scale(1.45); }
.xh-banner::before, .xh-banner::after { content: ""; position: absolute; left: 27px; right: 27px; height: 1px; background: var(--line-teal); z-index: 1; }
.xh-banner::before { top: 27px; }
.xh-banner::after { bottom: 27px; }
.ecosystem { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-top: 70px; align-items: center; }
.ecosystem img { border: 1px solid var(--line-teal); width: 100%; aspect-ratio: 613 / 412; object-fit: cover; }
.ecosystem .card { padding: 27px; min-height: 375px; border-color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { padding: 0 var(--gutter) 60px; }
.site-footer .inner {
  max-width: 1350px; margin: 0 auto; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 30px; padding: 6px 20px 0;
  font-size: 15.75px; line-height: 1.35; color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .copy { margin-top: 21px; }
.socials { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 14px 21% 0 0; }
.socials svg { display: block; width: 42px; height: 42px; }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); filter: blur(6px); transition: opacity .8s ease, transform .8s ease, filter .8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .roles, .caps, .caps-3 { grid-template-columns: 1fr 1fr; }
  .strip .container { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .strip__item:nth-child(3) { border-left: 0; padding-left: 0; }
  .interface { grid-template-columns: 1fr; }
  .interface img { margin-left: 0; width: 100%; }
}

@media (max-width: 960px) {
  :root { --header-h: 76px; }
  body { font-size: 17px; }
  .lead { font-size: 17px; }
  .section { padding: 80px 0; }
  .nav-toggle { display: block; margin-left: 8px; }
  .lang { margin-left: auto; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: var(--bg);
    border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
    display: none;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .nav a { display: block; padding: 14px 0; font-size: 15px; }
  .site-header[data-open="true"] .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .site-header[data-open="true"] .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header[data-open="true"] .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .page-home .site-header[data-open="true"] { background: var(--bg); }

  .hero { min-height: 100svh; }
  .hero .container { padding-left: var(--gutter); padding-top: var(--header-h); }
  .hero .eyebrow { margin-bottom: 36px; }
  .hero .lead { margin-top: 60px; }
  .strip .container, .roles, .caps, .caps-3, .layers, .feature, .ecosystem { grid-template-columns: 1fr; }
  .strip__item, .strip__item + .strip__item { border-left: 0; padding-left: 0; padding-right: 0; }
  .roles { gap: 24px; text-align: center; }
  .layers { gap: 24px; }
  .layer-text, .layer-media { min-height: 0; padding: 24px; }
  .layer-media { margin-right: 0; border-right: 1px solid var(--line-teal); }
  .layer-text h4 { font-size: 20px; }
  .card, .cap { padding: 24px; }
  .caps { gap: 24px; }
  .feature { gap: 32px; }
  .feature + .feature { margin-top: 80px; }
  .feature--img-right figure { order: -1; }
  .feature--bleed-left figure { margin-left: 0; }
  .page-hero--image { min-height: 560px; }
  .horus-hero { min-height: 0; padding: 60px 0; }
  .horus-hero h1 { margin-top: 30px; }
  .timeline li { grid-template-columns: 1fr; }
  .timeline .date { text-align: left; padding: 0 0 8px 24px; }
  .timeline .entry { padding: 0 0 48px 24px; border-left-color: var(--line-soft); }
  .timeline li .date { border-left: 1px solid var(--line-soft); padding-top: 0; }
  .timeline li:first-child .date, .timeline li:first-child .entry { border-left-color: var(--orange); }
  .xh-banner { height: 220px; }
  .ecosystem .card { min-height: 0; }
  .site-footer .inner { flex-direction: column; padding: 16px 0 0; }
  .socials { flex-direction: row; margin: 0; }
}

/* Extra side inset on wide screens only */
.container--inset { padding-left: calc(var(--gutter) + 45px); padding-right: calc(var(--gutter) + 45px); }
.container--inset-left { padding-left: calc(var(--gutter) + 45px); }
@media (max-width: 960px) {
  .container--inset, .container--inset-left { padding-left: var(--gutter); padding-right: var(--gutter); }
}
