/* ==========================================================================
   Hexa Group — Corporate website
   Design tokens, layout and components. No external dependencies.
   ========================================================================== */

:root {
  --blue: #155eef;
  --blue-dark: #0b4bd4;
  --blue-soft: #edf4ff;
  --ink: #0b1220;
  --text: #354052;
  --muted: #697386;
  --line: #dfe4eb;
  --line-dark: #cbd2dc;
  --surface: #ffffff;
  --surface-alt: #f6f8fb;
  --night: #0a101b;
  --success: #1b9a66;
  --container: 1240px;
  --radius: 16px;
  --shadow: 0 24px 64px rgba(15, 31, 54, .09);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
svg { display: block; }

::selection { background: #cfe0ff; color: var(--ink); }

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.section { padding: 144px 0; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  transition: transform .2s;
}
.skip-link:focus { transform: translateY(0); }

.eyebrow {
  margin: 0 0 24px;
  color: var(--blue);
  font-size: .73rem;
  font-weight: 750;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.035em; }

h2 {
  margin-bottom: 0;
  font-size: clamp(2.35rem, 4.2vw, 4.3rem);
  font-weight: 620;
  line-height: 1.02;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: .91rem;
  font-weight: 650;
  transition: transform .25s var(--ease), border-color .25s, background-color .25s, color .25s, box-shadow .25s;
}
.button:hover { transform: translateY(-2px); }
.button:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(21, 94, 239, .28);
  outline-offset: 3px;
}
.button-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 24px rgba(21, 94, 239, .2);
}
.button-primary:hover { background: var(--blue-dark); box-shadow: 0 12px 30px rgba(21, 94, 239, .28); }
.button-secondary { border-color: var(--line-dark); background: #fff; }
.button-secondary:hover { border-color: #9aa5b5; }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px);
  transition: border-color .25s, box-shadow .25s;
}
.site-header.scrolled {
  border-color: rgba(213, 219, 227, .82);
  box-shadow: 0 8px 30px rgba(21, 36, 59, .04);
}
.header-inner { display: flex; height: 76px; align-items: center; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 720;
  letter-spacing: -.02em;
}
.brand-mark {
  width: 27px;
  height: 27px;
  overflow: visible;
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.brand-mark path:first-child { fill: var(--blue); stroke: var(--blue); }
.brand-mark path:last-child { stroke: #fff; }
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-left: auto;
}
.desktop-nav a {
  color: var(--text);
  font-size: .88rem;
  font-weight: 520;
  transition: color .2s;
}
.desktop-nav a:hover { color: var(--blue); }
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 650;
  transition: border-color .2s, background .2s;
}
.header-cta:hover { border-color: var(--line-dark); background: var(--surface-alt); }
.menu-toggle, .mobile-nav { display: none; }

/* Hero */
.hero {
  position: relative;
  min-height: 820px;
  padding-top: 178px;
  padding-bottom: 84px;
  overflow: hidden;
}
.hero::before {
  position: absolute;
  top: 76px;
  right: 0;
  width: 42%;
  height: calc(100% - 76px);
  border-left: 1px solid rgba(21, 94, 239, .09);
  background: linear-gradient(90deg, rgba(246, 248, 251, .2), rgba(246, 248, 251, .82));
  content: "";
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(470px, .9fr);
  align-items: center;
  gap: 84px;
}
.hero-copy h1 {
  max-width: 760px;
  margin-bottom: 30px;
  font-size: clamp(3.65rem, 6.1vw, 6.35rem);
  font-weight: 590;
  line-height: .95;
}
.hero-copy h1 span { color: var(--blue); }
.hero-lead {
  max-width: 650px;
  margin-bottom: 38px;
  color: var(--text);
  font-size: clamp(1.08rem, 1.5vw, 1.3rem);
  line-height: 1.55;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 44px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
}
.hero-proof span { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof i, .status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(27, 154, 102, .1);
}
.hero-visual {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}
.visual-topbar, .visual-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.visual-topbar { height: 50px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.status { display: flex; align-items: center; gap: 8px; color: var(--text); letter-spacing: .04em; text-transform: none; }
.system-map { width: 100%; color: var(--blue); }
.map-lines { stroke: #b5c9ee; stroke-dasharray: 4 5; stroke-width: 1.5; }
.data-pulse circle { fill: var(--blue); }
.map-node rect { fill: #fff; stroke: #d6dee9; }
.map-node text { fill: #4a5567; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.node-icon { fill: none; stroke: var(--blue); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.core-node rect { fill: var(--ink); stroke: var(--ink); filter: drop-shadow(0 12px 18px rgba(11, 18, 32, .16)); }
.core-node path { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.core-node path:first-of-type { fill: var(--blue); stroke: var(--blue); }
.core-node text { fill: #fff; font-size: 9px; }
.visual-footer {
  height: 52px;
  padding: 0 20px;
  border-top: 1px solid var(--line);
  letter-spacing: .07em;
}
.hero-index {
  position: absolute;
  right: 0;
  bottom: 34px;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9aa5b4;
  font-size: .62rem;
  font-weight: 700;
}
.hero-index i { width: 42px; height: 1px; background: var(--line-dark); }

/* Expertise strip */
.trust-strip { border-block: 1px solid var(--line); background: var(--surface-alt); }
.trust-inner {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.trust-inner i { width: 3px; height: 3px; border-radius: 50%; background: var(--blue); }

/* Product portfolio */
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  align-items: end;
  gap: 80px;
  margin-bottom: 72px;
}
.section-heading > p {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
}
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.product-card {
  display: flex;
  min-height: 410px;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: #bac9df;
  box-shadow: 0 24px 60px rgba(20, 36, 60, .08);
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.product-number { color: #97a2b2; font-size: .68rem; font-weight: 700; letter-spacing: .12em; }
.product-icon {
  width: 52px;
  height: 52px;
  padding: 11px;
  border: 1px solid #dbe5f5;
  border-radius: 12px;
  background: var(--blue-soft);
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  transition: transform .35s var(--ease), background .35s;
}
.product-card:hover .product-icon { transform: rotate(-4deg) scale(1.05); background: #e2edff; }
.product-sector {
  margin-bottom: 12px;
  color: var(--blue);
  font-size: .69rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.product-card h3 { margin-bottom: 15px; font-size: 2rem; font-weight: 620; }
.product-card div > p:last-child { max-width: 500px; margin-bottom: 0; color: var(--text); }
.product-card > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: .83rem;
  font-weight: 680;
  transition: color .2s;
}
.product-card > a:hover { color: var(--blue); }

/* Technology */
.technology { background: var(--night); color: #fff; }
.technology-layout { display: grid; grid-template-columns: .78fr 1.22fr; gap: 110px; }
.technology-copy { position: sticky; top: 120px; align-self: start; }
.technology-copy h2 { margin-bottom: 32px; }
.technology-copy > p:not(.eyebrow) { max-width: 500px; margin-bottom: 30px; color: #aab5c6; font-size: 1.04rem; }
.text-link { display: inline-flex; gap: 28px; color: #fff; font-size: .85rem; font-weight: 650; }
.technology-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid #263143; border-left: 1px solid #263143; }
.technology-grid > div {
  min-height: 170px;
  padding: 28px;
  border-right: 1px solid #263143;
  border-bottom: 1px solid #263143;
  transition: background .3s;
}
.technology-grid > div:hover { background: #101a2a; }
.tech-glyph {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  color: #7eabff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
  font-weight: 700;
}
.tech-glyph.cloud { font-size: 2rem; }
.technology-grid p { margin-bottom: 2px; font-size: .95rem; font-weight: 650; }
.technology-grid small { color: #778398; font-size: .7rem; letter-spacing: .04em; }

/* Company */
.company { background: var(--surface-alt); }
.company-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 110px; }
.company-heading h2 { max-width: 550px; }
.company-content { padding-top: 52px; }
.company-lead {
  margin-bottom: 48px;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 440;
  letter-spacing: -.025em;
  line-height: 1.45;
}
.company-columns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 42px; color: var(--text); }
.company-columns p { margin-bottom: 0; }
.company-signature {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--line-dark);
}
.company-signature svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.company-signature svg path:first-child { fill: var(--blue); stroke: var(--blue); }
.company-signature svg path:last-child { stroke: #fff; }
.company-signature strong, .company-signature span { display: block; }
.company-signature strong { font-size: .72rem; letter-spacing: .08em; }
.company-signature span { margin-top: 3px; color: var(--muted); font-size: .7rem; }

/* Engineering principles */
.section-heading.compact { grid-template-columns: 1fr; max-width: 760px; }
.principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.principle-card {
  min-height: 270px;
  padding: 30px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background .3s;
}
.principle-card:hover { background: var(--surface-alt); }
.principle-card > span { color: var(--blue); font-size: .67rem; font-weight: 750; letter-spacing: .1em; }
.principle-card h3 { margin: 72px 0 13px; font-size: 1.25rem; font-weight: 650; }
.principle-card p { margin-bottom: 0; color: var(--text); font-size: .9rem; }

/* Contact */
.contact { padding: 120px 0; background: var(--blue-soft); }
.contact-shell {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 100px;
  padding: 72px;
  border: 1px solid #d7e4fa;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(25, 63, 122, .08);
}
.contact-copy h2 { margin-bottom: 30px; font-size: clamp(2.4rem, 4vw, 3.8rem); }
.contact-copy > p:not(.eyebrow) { max-width: 430px; color: var(--text); }
.contact-copy > a { display: inline-flex; gap: 18px; margin-top: 24px; color: var(--blue); font-size: .86rem; font-weight: 680; }
.contact-form { display: flex; flex-direction: column; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { color: var(--text); font-size: .75rem; font-weight: 680; }
.field input, .field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input { height: 46px; }
.field textarea { resize: vertical; padding: 12px 0; }
.field input::placeholder, .field textarea::placeholder { color: #9ba5b3; }
.field input:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 1px 0 var(--blue); }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 10px; }
.form-footer p { max-width: 200px; margin: 0; color: var(--muted); font-size: .67rem; }
.form-status { min-height: 22px; margin: -6px 0 0; color: var(--blue); font-size: .78rem; }

/* Footer */
.site-footer { padding-top: 84px; background: var(--night); color: #fff; }
.footer-main { display: grid; grid-template-columns: 1fr 1.1fr; gap: 100px; padding-bottom: 76px; }
.brand-light .brand-mark path:first-child { fill: var(--blue); }
.footer-brand > p { max-width: 330px; margin: 24px 0 0; color: #8c98ab; font-size: .91rem; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.footer-links div { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-links p { margin-bottom: 12px; color: #69778d; font-size: .65rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.footer-links a { color: #c0c8d4; font-size: .81rem; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: grid;
  min-height: 82px;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 48px;
  border-top: 1px solid #232e40;
  color: #6f7c91;
  font-size: .68rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom a {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #2e3a4d;
  border-radius: 8px;
  color: #b6c0ce;
}

/* Motion */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.product-card:nth-child(2), .principle-card:nth-child(2), .principle-card:nth-child(5) { transition-delay: .08s; }
.product-card:nth-child(3), .principle-card:nth-child(3), .principle-card:nth-child(6) { transition-delay: .16s; }
.product-card:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Notebook */
@media (max-width: 1180px) {
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(420px, .85fr); gap: 45px; }
  .hero-copy h1 { font-size: clamp(3.5rem, 5.8vw, 5rem); }
  .technology-layout, .company-grid { gap: 70px; }
  .contact-shell { gap: 60px; padding: 56px; }
}

/* Tablet */
@media (max-width: 900px) {
  .section { padding: 104px 0; }
  .desktop-nav, .header-cta { display: none; }
  .menu-toggle {
    display: flex;
    width: 42px;
    height: 42px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
  }
  .menu-toggle span { width: 18px; height: 1.5px; background: var(--ink); transition: transform .25s, opacity .25s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .mobile-nav {
    position: fixed;
    inset: 76px 0 auto;
    display: flex;
    max-height: 0;
    flex-direction: column;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transition: max-height .35s var(--ease), opacity .25s, visibility .25s;
  }
  .mobile-nav.open { max-height: 320px; padding: 12px 24px 24px; opacity: 1; visibility: visible; }
  .mobile-nav a { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; font-weight: 600; }
  .hero { padding-top: 150px; }
  .hero::before { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 68px; }
  .hero-copy { max-width: 760px; }
  .hero-visual { max-width: 680px; }
  .trust-inner { flex-wrap: wrap; justify-content: center; padding-block: 22px; }
  .section-heading { grid-template-columns: 1fr; gap: 28px; }
  .section-heading > p { max-width: 650px; }
  .technology-layout, .company-grid, .contact-shell { grid-template-columns: 1fr; }
  .technology-copy { position: static; }
  .principles-grid { grid-template-columns: repeat(2, 1fr); }
  .company-content { padding-top: 0; }
  .contact-shell { padding: 48px; }
  .footer-main { grid-template-columns: 1fr; gap: 56px; }
}

/* Mobile */
@media (max-width: 620px) {
  .container { width: min(calc(100% - 32px), var(--container)); }
  .section { padding: 82px 0; }
  .header-inner { height: 68px; }
  .mobile-nav { top: 68px; }
  .hero { padding-top: 126px; padding-bottom: 68px; }
  .hero-copy h1 { margin-bottom: 24px; font-size: clamp(3rem, 15vw, 4.15rem); }
  .hero-lead { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button { width: 100%; justify-content: space-between; }
  .hero-proof { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
  .hero-visual { border-radius: 13px; }
  .visual-topbar { height: 44px; }
  .visual-footer { display: none; }
  .system-map { min-width: 480px; transform: translateX(-10%); }
  .hero-index { display: none; }
  .trust-inner { justify-content: flex-start; gap: 13px 20px; }
  .trust-inner i:nth-of-type(2) { display: none; }
  h2 { font-size: clamp(2.25rem, 11vw, 3.15rem); }
  .section-heading { margin-bottom: 48px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 370px; padding: 26px; }
  .product-card h3 { font-size: 1.75rem; }
  .technology-layout { gap: 58px; }
  .technology-grid > div { min-height: 145px; padding: 21px; }
  .tech-glyph { margin-bottom: 22px; }
  .technology-grid p { font-size: .8rem; }
  .company-columns { grid-template-columns: 1fr; gap: 12px; }
  .company-lead { margin-bottom: 32px; font-size: 1.32rem; }
  .company-signature { align-items: flex-start; }
  .principles-grid { grid-template-columns: 1fr; }
  .principle-card { min-height: 230px; }
  .principle-card h3 { margin-top: 55px; }
  .contact { padding: 0; }
  .contact .container { width: 100%; }
  .contact-shell { gap: 56px; padding: 78px 24px; border: 0; border-radius: 0; }
  .form-row { grid-template-columns: 1fr; gap: 22px; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer p { max-width: none; }
  .footer-main { padding-bottom: 54px; }
  .footer-links { grid-template-columns: 1fr 1fr; gap: 42px 28px; }
  .footer-links div:last-child { grid-column: 1 / -1; }
  .footer-bottom { grid-template-columns: 1fr auto; gap: 20px; padding-block: 20px; }
  .footer-bottom p:nth-child(2) { display: none; }
}
