/* One AiMega color system across the corporate story and both products. */
:root {
  --navy-900: #0d1b2a;
  --navy-800: #102a4d;
  --navy-700: #163a66;
  --mist-50: #f5f9fe;
  --mist-100: #eef5fc;
  --brand-flow: linear-gradient(105deg, #1b6ad2, #1cbaaf);
  --brand-cta: #246c95;
  --brand-cta-hover: #1b597e;
  --ink-soft: #44546a;
  --canvas-start: #f7fbfd;
  --canvas-middle: #f1f7fa;
  --canvas-end: #eaf4f8;
  --surface-radius: 4px;
  --inner-radius: 3px;
}

/* One continuous, low-contrast canvas removes all banner seams. */
main {
  background:
    radial-gradient(ellipse at 88% 14%, rgba(100,169,203,.1), transparent 27%),
    radial-gradient(ellipse at 14% 65%, rgba(100,184,176,.065), transparent 30%),
    linear-gradient(180deg, var(--canvas-start) 0%, #ebf4f8 29%, var(--canvas-middle) 55%, #e7f1f6 82%, var(--canvas-end) 100%);
}

.site-header {
  background: rgba(13, 27, 42, .96);
  border-bottom: 1px solid #254b68;
  box-shadow: 0 8px 22px rgba(13, 27, 42, .12);
  backdrop-filter: blur(14px);
  transition: background-color .25s ease, box-shadow .25s ease;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--brand-flow);
}
.site-header.is-scrolled {
  background: rgba(13, 27, 42, .985);
  box-shadow: 0 12px 28px rgba(13, 27, 42, .18);
}
.site-header.is-scrolled .header-inner { min-height: 70px; }
.header-inner { transition: min-height .25s ease; }
.primary-nav > a:not(.nav-cta) { color: #d9e7f0; }
.primary-nav > a:not(.nav-cta):hover { color: var(--green-light); }
.nav-cta { color: #fff; background: var(--brand-cta); border-color: transparent; }
.nav-cta:hover { color: #fff; background: var(--brand-cta-hover); }
.dropdown { border-radius: var(--inner-radius); background: var(--navy-800); border-color: #356184; }
.dropdown a { color: #e1edf4; }.dropdown a:hover { background: var(--navy-700); color: var(--green-light); }
.menu-toggle span { background: #fff; }
.button, .nav-cta { border-radius: 3px; }
.button-text { border-radius: 0; }

/* A light corporate entry with navy at the centre of the solution diagram. */
.hero {
  position: relative;
  isolation: isolate;
  background: transparent;
}
.hero::before {
  content: "";
  position: absolute;
  right: -85px;
  top: 70px;
  width: 310px;
  height: 340px;
  background: url("./assets/aimega-symbol.webp") center / contain no-repeat;
  opacity: .045;
  pointer-events: none;
  z-index: -1;
}
.hero-grid { position: relative; z-index: 1; }
.hero-grid { padding-bottom: 48px; }
.hero-copy h1 { color: #172b3d; }
.hero-highlight { background: var(--brand-flow); -webkit-background-clip: text; background-clip: text; }
.hero-visual { background: rgba(255,255,255,.84); border-color: #dce8ee; border-radius: var(--surface-radius); box-shadow: 0 12px 30px rgba(16,42,77,.055); }
.hero-visual::before { opacity: .14; }
.network-core { background: linear-gradient(145deg, var(--navy-800), var(--navy-900)); border-color: #3976a9; box-shadow: 0 0 0 12px rgba(232,244,255,.82), 0 13px 28px rgba(16,42,77,.18); }
.network-core small { color: var(--green-light); }.network-core strong { color: #fff; }
.network-node { border-color: #e1edf6; border-radius: var(--inner-radius); box-shadow: 0 11px 22px rgba(16,42,77,.06); }
.network-line { background: linear-gradient(90deg, rgba(27,106,210,.55), rgba(28,186,175,.43)); }

/* Light product overview; navy remains inside the two product visualisations. */
.products {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: 96px;
  padding-bottom: 88px;
  background: transparent;
}
.products::before { display: none; }
.products::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -48px;
  width: 290px;
  height: 310px;
  background: url("./assets/aimega-symbol.webp") center / contain no-repeat;
  opacity: .035;
  pointer-events: none;
  z-index: 0;
}
.products .container { position: relative; z-index: 1; }
.products .eyebrow { color: #246f7c; }
.products .section-intro h2 { color: var(--navy-800); }
.products .section-intro > p { color: #526b7b; }
.product-grid { gap: 20px; align-items: stretch; }
.product-card { min-height: 0; padding: clamp(24px, 2.6vw, 34px); border-radius: var(--surface-radius); box-shadow: 0 10px 28px rgba(16,42,77,.045); }
.product-card:hover { border-color: #91bdca; box-shadow: 0 16px 32px rgba(16,42,77,.075); }
.product-s { background: #fff; border-color: #dceaf3; }
.product-c { background: #f4f9fc; border-color: #d4e5ee; }
.product-card .card-icon { border-radius: 3px; }
.product-c::before, .product-c::after { display: none; }
.product-index, .product-c .product-index { color: #496b82; }
.product-c .card-icon { color: var(--blue); border-color: #a7cbe7; }
.product-c .card-bottom h3 { color: var(--navy-800); }
.product-s .product-subtitle, .product-c .product-subtitle { color: var(--blue); }
.product-c .card-bottom p:not(.product-subtitle) { color: #526879; }
.product-c .card-link { color: var(--blue); border-color: var(--blue); }
.mini-dashboard { background: var(--navy-800); border-color: #285782; border-radius: var(--inner-radius); box-shadow: 0 12px 26px rgba(16,42,77,.16); }
.mini-dashboard-head { color: #b7d9ef; }.mini-dashboard-foot { color: #b9d4df; }
.mini-system span { background: var(--green-pale); border-color: #bde6df; border-radius: var(--inner-radius); }
.card-c-visual span { background: var(--navy-800); border-color: #315f89; border-radius: var(--inner-radius); color: #d7eafb; }
.card-c-visual span:last-child { color: var(--green-light); border-color: #4d9eaa; }
.card-c-visual i { background: var(--blue); }.card-c-visual i::after { border-left-color: var(--blue); }

/* Mist and white around a navy data workspace. */
.s-detail {
  position: relative;
  padding-top: 86px;
  padding-bottom: 76px;
  background: transparent;
}
.s-detail::before { display: none; }
.s-detail .container { position: relative; }
.s-detail .detail-copy h2, .s-detail .detail-copy h2 em { color: var(--navy-800); }
.s-detail .detail-copy h2 em { color: var(--blue); }
.capabilities span { border-radius: var(--inner-radius); box-shadow: none; }
.value-block { position: relative; background: #fff; border: 1px solid #d4e7f3; border-left: 0; border-radius: var(--inner-radius); box-shadow: 0 12px 26px rgba(16,42,77,.055); }
.value-block::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--brand-flow); border-radius: 0; }
.value-label { color: var(--navy-700); }
.value-label::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 8px; }
.value-block p { color: var(--ink-soft); }
.data-board { background: linear-gradient(145deg, var(--navy-800), #143b5e); border-color: #275584; border-radius: var(--surface-radius); box-shadow: 0 18px 40px rgba(16,42,77,.11); }
.board-heading { color: var(--green-light); border-bottom-color: rgba(255,255,255,.16); }
.board-status { color: #b9d2e2; }
.source-row div { background: #fff; border-color: #cce1ed; border-top-color: var(--green); border-radius: var(--inner-radius); }
.source-row span { color: var(--blue); }.source-row small { color: #5f7788; }
.board-bridge { color: #a6e4e1; }.board-bridge span { background: rgba(122,247,232,.35); }
.board-bars { background: #fff; border-color: #cfdfec; border-radius: var(--inner-radius); }
.board-insights { background: var(--green-pale); border-color: #b9e7df; border-radius: var(--inner-radius); }
.board-insights span { color: #387987; }.board-insights b { color: #24536d; border-bottom-color: #c9e4e1; }
.bars-label { color: #627c8d; }

/* Light AiMega-C environment with the analysis workflow as the dark focal surface. */
.c-detail {
  color: var(--text);
  padding-top: 76px;
  padding-bottom: 90px;
  background: transparent;
}
.c-detail::before, .c-detail::after { display: none; }
.c-detail .eyebrow { color: var(--blue); }.c-detail .detail-copy h2 { color: var(--navy-800); }.c-detail .detail-copy h2 em { color: var(--blue); }
.c-detail .detail-copy > p:not(.eyebrow) { color: #526879; }
.c-detail .button-primary { background: var(--brand-cta); border-color: transparent; color: #fff; box-shadow: 0 12px 24px rgba(27,106,210,.12); }
.c-detail .button-primary:hover { background: var(--brand-cta-hover); border-color: transparent; }
.c-detail .button-text { color: var(--blue); }.c-detail .button-text:hover { border-bottom-color: var(--blue); }
.customs-flow { background: linear-gradient(145deg, var(--navy-800), #153e60); border-color: #2e597d; border-radius: var(--surface-radius); box-shadow: 0 18px 40px rgba(16,42,77,.11); }
.flow-inputs span, .flow-output, .flow-connector b, .flow-output > div span { border-radius: var(--inner-radius); }
.flow-connector span { background: linear-gradient(90deg, #438fb9, #62d8d0); }
.c-values { grid-template-columns: 1fr 1fr; gap: 10px; border: 0; }
.c-values > div { background: #fff; border: 1px solid #d8e7f2; border-radius: var(--inner-radius); padding: 15px; box-shadow: 0 8px 16px rgba(16,42,77,.035); }
.c-values b { color: var(--blue); }.c-values strong { color: var(--navy-800); }.c-values small { color: #5b7182; }
.c-values .ask-more { grid-column: 1 / -1; background: #eaf9f7; border: 1px solid #bce9e3; border-left: 3px solid var(--green); padding-left: 13px; }
.c-values .ask-more b { color: #13756e; }

/* The contact area stays on the same light canvas and darkens only at the footer. */
.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: 96px;
  padding-bottom: 110px;
  color: var(--navy-800);
  background: transparent;
}
.contact::before { display: none; }
.contact::after { content: ""; position: absolute; inset: auto 0 0; height: 88px; background: linear-gradient(180deg, rgba(41,72,97,0), #294861); pointer-events: none; z-index: 0; }
.contact-grid { position: relative; z-index: 1; }
.contact .eyebrow { color: #246f7c; }
.contact-copy h2 { color: var(--navy-800); }
.contact-copy h2 em { color: #246f7c; }
.contact-copy > p:not(.eyebrow) { color: #526b7b; }
.contact-link { color: #246c95; border-bottom-color: #a9cbd6; }
.contact-info { color: #526b7b; }
.contact-info strong { color: var(--navy-800); }
.contact-info a:hover { color: #246c95; }
.contact-form { border: 1px solid #d8e7ee; border-radius: var(--surface-radius); position: relative; box-shadow: 0 14px 34px rgba(16,42,77,.07); }
.contact-form::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--brand-flow); border-radius: 0; }
.contact-form input, .contact-form select, .contact-form textarea { border-radius: var(--inner-radius); background: #fbfdff; }
.contact-form .button-primary { background: var(--brand-cta); border-color: transparent; }
.contact-form .button-primary:hover { background: var(--brand-cta-hover); border-color: transparent; }

.footer { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(180deg, #294861, var(--navy-900) 240px); border-top-color: transparent; }
.footer::before { content: ""; position: absolute; right: -70px; bottom: -160px; width: 290px; height: 310px; background: url("./assets/aimega-symbol.webp") center / contain no-repeat; opacity: .035; pointer-events: none; z-index: -1; }
.footer-grid, .footer-bottom { position: relative; z-index: 1; }
.footer-brand { display: block; width: 166px; height: auto; overflow: visible; padding: 0; margin: 0 0 24px; border: 0; background: transparent; border-radius: 0; }
.footer-brand img { width: 100%; max-width: 100%; height: auto; }
.footer-column h2 { color: var(--green-light); }.footer-bottom { border-top-color: #2a4560; }

@media (max-width: 800px) {
  .site-header.is-scrolled .header-inner { min-height: 64px; }
  .site-header.is-scrolled .primary-nav { top: 64px; }
  .primary-nav { background: var(--navy-900); border-top-color: #30516b; }
  .primary-nav > a:not(.nav-cta) { color: #d9e7f0; border-bottom-color: #2a4861; }
  .dropdown { background: var(--navy-800); border-bottom-color: #2a4861; }
  .products { padding-top: 78px; padding-bottom: 72px; }
  .products::after { right: -155px; top: -42px; }
  .product-card { min-height: 0; }
  .s-detail { padding-top: 74px; padding-bottom: 64px; }
  .c-detail { padding-top: 64px; padding-bottom: 72px; }
  .contact { padding-top: 78px; padding-bottom: 90px; }
  .contact::after { height: 70px; }
  .c-values { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .hero::before { width: 180px; height: 190px; background-size: contain; right: -80px; top: 80px; opacity: .035; }
  .products::after { width: 190px; height: 205px; background-size: contain; right: -95px; top: -35px; opacity: .045; }
  .hero-grid { padding-bottom: 36px; }
  .products { padding-top: 72px; padding-bottom: 64px; }
  .product-grid { gap: 17px; }
  .product-card { min-height: 0; padding: 22px; box-shadow: 0 13px 30px rgba(16,42,77,.11); }
  .s-detail { padding-top: 68px; padding-bottom: 60px; }
  .c-detail { padding-top: 60px; padding-bottom: 66px; }
  .c-values { grid-template-columns: 1fr; }
  .c-values .ask-more { grid-column: auto; }
  .footer::before { width: 175px; height: 190px; background-size: contain; right: -65px; bottom: -80px; opacity: .025; }
  .contact { padding-top: 72px; padding-bottom: 84px; }
  .contact::after { height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header,.header-inner { transition: none; }
}
