/* Keystone DataWorks homepage */

.page-home {
  --home-max: 1200px;
  --brand-orange: #ff8727;
  --brand-navy: #12344d;
  --brand-blue: #78a6ff;
  background:
    radial-gradient(ellipse at 88% 4%, rgba(43, 88, 124, 0.20), transparent 34rem),
    linear-gradient(180deg, #0a1020 0, #0c1124 44rem);
}

.page-home main {
  overflow: hidden;
}

.page-home section {
  border: 0;
}

.home-header,
.home-shell,
.footer-inner,
.footer-bottom {
  width: min(var(--home-max), calc(100% - 48px));
  max-width: none;
  margin-inline: auto;
}

.page-home .site-header {
  background: rgba(9, 14, 30, 0.94);
  border-color: rgba(120, 166, 255, 0.16);
}

.page-home .header-logo {
  height: 60px;
  padding: 5px 9px;
  border-radius: 5px;
}

.page-home nav a {
  font-size: 13px;
  padding: 8px 10px;
}

.page-home nav a.active {
  background: rgba(120, 166, 255, 0.12);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 13px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 2px;
  background: var(--brand-orange);
  box-shadow: 0 0 0 4px rgba(255, 135, 39, 0.08);
  content: "";
}

.text-link,
.card-link {
  color: var(--accent);
  font-size: 14px;
  font-weight: 650;
}

.text-link span,
.card-link span {
  display: inline-block;
  transition: transform 160ms ease;
}

.text-link:hover span,
.service-card:hover .card-link span {
  transform: translateX(4px);
}

/* Hero */
.hero {
  position: relative;
  padding: 68px 0 58px;
  text-align: left;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120, 166, 255, 0.22), transparent);
  content: "";
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(520px, 0.98fr);
  gap: 38px;
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-bottom: 8px;
}

.hero h1 {
  max-width: 690px;
  margin: 0 0 22px;
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-lead {
  max-width: 660px;
  margin: 0 0 17px;
  color: var(--fg);
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.55;
}

.hero-support {
  max-width: 650px;
  margin: 0;
  color: #aeb9cc;
  font-size: 15.5px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-top: 31px;
  flex-wrap: wrap;
}

.hero .btn {
  padding: 13px 22px;
}

/* Network visual */
.keystone-visual {
  position: relative;
  isolation: isolate;
  width: calc(100% + 30px);
  margin-left: -8px;
}

.keystone-visual::before {
  position: absolute;
  inset: -28px -54px;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 51% 51%, rgba(31, 79, 111, 0.22), transparent 55%),
    linear-gradient(148deg, transparent 25%, rgba(35, 72, 99, 0.055) 25.2% 26%, transparent 26.2%),
    linear-gradient(32deg, transparent 73%, rgba(35, 72, 99, 0.045) 73.2% 74%, transparent 74.2%);
  content: "";
  pointer-events: none;
}

.keystone-visual svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.keystone-network-image {
  display: block;
  width: 100%;
  height: auto;
}

.hero-flow-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-static-corrections .overlay-mask {
  fill: none;
  stroke: rgba(7, 22, 44, 0.98);
  stroke-width: 4.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-static-corrections .overlay-mask-box {
  fill: rgba(7, 22, 44, 0.94);
}

.hero-static-corrections .overlay-line {
  fill: none;
  stroke: #7eb3ee;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgba(100, 159, 214, 0.35));
}

.hero-static-corrections .overlay-line.secondary {
  stroke: #72a6dc;
  stroke-width: 2.4;
}

.hero-static-corrections .overlay-marker {
  fill: var(--brand-orange);
  filter: drop-shadow(0 0 4px rgba(255, 135, 39, 0.45));
}

.hero-flow-events .flow-event {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0 5px rgba(122, 171, 220, 0.42));
}

.hero-flow-events .flow-event.flow-swap {
  will-change: opacity;
}

.hero-flow-events .flow-event.orange,
.hero-flow-events .flow-event.blue,
.hero-flow-events .flow-event.blue-to-orange,
.hero-flow-events .flow-event.orange-to-blue {
  fill: #63b5ff;
}

.visual-halo {
  fill: url("#visualGlow");
}

.brand-mark .mark-rail {
  fill: url("#networkRail");
  stroke: rgba(113, 166, 197, 0.34);
  stroke-width: 1;
  opacity: 0.96;
}

.brand-mark .mark-short {
  opacity: 0.90;
}

.brand-mark .mark-return {
  fill: #173d57;
  opacity: 0.92;
}

.brand-mark .mark-return-two {
  opacity: 0.78;
}

.brand-mark .mark-square {
  fill: url("#coreOrange");
  stroke: rgba(255, 192, 136, 0.72);
  stroke-width: 1;
  filter: url("#coreGlow");
}

.network-side-label {
  fill: #7394aa;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 8px;
  font-weight: 760;
  letter-spacing: 0.15em;
}

.network-side-label.solution-label {
  fill: #d58c50;
}

.network-routes path {
  fill: none;
  stroke: #5e91b0;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.72;
}

.network-routes .route-primary,
.network-routes .route-solution {
  filter: drop-shadow(0 0 4px rgba(71, 120, 152, 0.12));
}

.network-routes .route-solution {
  stroke: #6b9dbb;
  opacity: 0.82;
}

.network-routes .route-secondary {
  stroke: #426f8b;
  stroke-width: 1.05;
  stroke-dasharray: 3 8;
  opacity: 0.28;
}

.node-card {
  fill: rgba(9, 18, 34, 0.94);
  stroke: #284c66;
  stroke-width: 1;
}

.solution-node .node-card {
  stroke: #526879;
  fill: rgba(13, 22, 36, 0.96);
}

.node-marker {
  fill: var(--brand-orange);
}

.node-marker.muted {
  fill: #5687a6;
}

.node-marker.solution {
  fill: var(--brand-orange);
}

.node-name,
.node-detail,
.core-label,
.core-detail {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.node-name {
  fill: #edf4fa;
  font-size: 9.1px;
  font-weight: 760;
  letter-spacing: 0.045em;
}

.node-name.compact-name {
  font-size: 8.2px;
  letter-spacing: 0.025em;
}


.node-detail {
  fill: #748ba0;
  font-size: 7.5px;
  font-weight: 620;
  letter-spacing: 0.055em;
}

.junctions rect {
  fill: #1b4863;
  stroke: #78a2bb;
  stroke-width: 1;
}

.core-bracket {
  fill: none;
  stroke: #6f9ab3;
  stroke-width: 1.6;
  stroke-linecap: square;
}

.core-square {
  fill: url("#coreOrange");
  stroke: rgba(255, 184, 122, 0.72);
  stroke-width: 1;
}

.core-cut {
  fill: #12344d;
  opacity: 0.95;
}

.core-label {
  fill: #eaf0f8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.core-detail {
  fill: #7394aa;
  font-size: 6.7px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.data-events circle {
  fill: var(--brand-orange);
}

/* Shared homepage sections */
.home-section {
  padding: 92px 0;
}

.services-section {
  padding-top: 82px;
}

.section-heading {
  max-width: 740px;
  margin-bottom: 39px;
}

.section-heading h2,
.split-heading h2,
.legacy-copy h2,
.home-cta h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.028em;
}

.section-heading > p:last-child,
.split-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 318px;
  padding: 29px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(18, 25, 53, 0.98), rgba(13, 20, 42, 0.98));
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.service-card::after {
  position: absolute;
  right: -8px;
  bottom: 13px;
  width: 76px;
  height: 42px;
  background:
    linear-gradient(151deg, transparent 0 36%, rgba(49, 95, 125, 0.23) 37% 43%, transparent 44%),
    linear-gradient(151deg, transparent 0 55%, rgba(49, 95, 125, 0.16) 56% 62%, transparent 63%);
  content: "";
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 166, 255, 0.44);
  box-shadow: 0 18px 45px rgba(1, 5, 18, 0.32);
  text-decoration: none;
}

.card-number {
  position: absolute;
  top: 25px;
  right: 27px;
  color: #576682;
  font-size: 11px;
  font-weight: 750;
}

.service-icon {
  position: relative;
  width: 46px;
  height: 46px;
  margin-bottom: 27px;
  border: 1px solid rgba(120, 166, 255, 0.28);
  border-radius: 10px;
  background: rgba(120, 166, 255, 0.08);
}

.service-icon::before,
.service-icon::after {
  position: absolute;
  content: "";
}

.link-icon::before {
  inset: 14px 10px;
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}

.link-icon::after {
  inset: 10px 14px;
  border-right: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.automation-icon::before {
  inset: 11px;
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.automation-icon::after {
  top: 7px;
  left: 21px;
  width: 2px;
  height: 32px;
  background: var(--accent);
  transform: rotate(45deg);
}

.screen-icon::before {
  inset: 11px 9px 14px;
  border: 2px solid var(--accent);
  border-radius: 3px;
}

.screen-icon::after {
  bottom: 8px;
  left: 16px;
  width: 14px;
  height: 2px;
  background: var(--accent);
}

.service-card h3 {
  margin: 0 0 12px;
  color: var(--fg);
  font-size: 20px;
}

.service-card p {
  flex: 1;
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.65;
}

/* Operational friction */
.problem-section {
  background: #0e152b;
}

.split-heading {
  display: grid;
  grid-template-columns: 1fr 0.94fr;
  gap: 78px;
  align-items: end;
  margin-bottom: 42px;
}

.problem-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 15px;
  background: var(--stroke);
}

.problem-list article {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 17px;
  min-height: 174px;
  padding: 29px;
  background: var(--card);
}

.problem-list article > span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.problem-list h3 {
  margin: 0 0 8px;
  color: var(--fg);
  font-size: 17px;
}

.problem-list p {
  margin: 0;
  font-size: 14px;
  line-height: 1.62;
}

/* Integration methods */
.legacy-section {
  padding: 92px 0;
}

.legacy-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 72px;
  align-items: center;
  padding: 49px;
  overflow: hidden;
  border: 1px solid rgba(120, 166, 255, 0.24);
  border-radius: 19px;
  background:
    radial-gradient(circle at 88% 18%, rgba(120, 166, 255, 0.13), transparent 18rem),
    var(--card);
}

.legacy-panel::after {
  position: absolute;
  right: -64px;
  bottom: -42px;
  width: 230px;
  height: 140px;
  background:
    linear-gradient(151deg, transparent 0 40%, rgba(49, 95, 125, 0.17) 40.5% 44%, transparent 44.5%),
    linear-gradient(151deg, transparent 0 53%, rgba(49, 95, 125, 0.11) 53.5% 57%, transparent 57.5%);
  content: "";
  pointer-events: none;
}

.legacy-copy > p:not(.eyebrow) {
  margin-bottom: 22px;
  font-size: 16px;
  line-height: 1.68;
}

.method-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.method-list span {
  padding: 13px 15px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(7, 12, 28, 0.45);
  color: #cbd5e5;
  font-size: 13px;
}

.method-list span::before {
  margin-right: 8px;
  color: var(--brand-orange);
  content: "▪";
}

/* Experience */
.experience-section {
  background: #0e152b;
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.experience-grid article {
  min-height: 214px;
  padding: 27px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--card);
}

.experience-tag {
  display: inline-block;
  margin-bottom: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(120, 166, 255, 0.09);
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.experience-grid h3 {
  margin: 0 0 9px;
  color: var(--fg);
  font-size: 18px;
}

.experience-grid p {
  margin: 0;
  font-size: 14px;
  line-height: 1.62;
}

.credibility-note {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  margin-top: 18px;
  padding: 20px 24px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
}

.credibility-note strong {
  color: var(--fg);
}

/* CTA */
.home-cta {
  padding: 84px 0;
}

.cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
  padding: 52px;
  border: 1px solid rgba(120, 166, 255, 0.08);
  border-radius: 19px;
  background:
    linear-gradient(120deg, rgba(29, 48, 87, 0.96), rgba(15, 26, 51, 0.98)),
    #101a34;
  box-shadow: 0 24px 60px rgba(2, 7, 20, 0.32);
}

.cta-inner p:last-child {
  max-width: 720px;
  margin: 0;
  color: #b8c4d8;
  font-size: 15px;
  line-height: 1.65;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 13px;
  align-items: center;
  min-width: 220px;
}

.cta-actions > a:last-child {
  color: #bdc9db;
  font-size: 13px;
}

/* Footer */
.site-footer {
  padding: 44px 0 28px;
  border-top: 1px solid var(--stroke);
  background: #080d1c;
  text-align: left;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
}

.footer-brand strong {
  display: block;
  margin-bottom: 8px;
  color: var(--fg);
  font-size: 16px;
}

.footer-brand p {
  margin: 0 0 5px;
  font-size: 13px;
}

.footer-col h4 {
  margin: 0 0 12px;
  color: #7f8ba3;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin-bottom: 7px;
}

.footer-col a {
  color: var(--muted);
  font-size: 13px;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--stroke);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 12px;
}

@media (max-width: 1120px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(470px, 0.92fr);
    gap: 28px;
  }

  .hero h1 {
    font-size: clamp(42px, 5.1vw, 58px);
  }
}

@media (max-width: 960px) {
  .hero {
    padding-top: 56px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero-copy {
    max-width: 780px;
  }

  .keystone-visual {
    width: min(100%, 720px);
    margin: 0 auto;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 0;
  }

  .legacy-panel {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .cta-inner {
    grid-template-columns: 1fr;
    gap: 31px;
  }

  .cta-actions {
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .home-header,
  .home-shell,
  .footer-inner,
  .footer-bottom {
    width: min(calc(100% - 32px), var(--home-max));
  }

  .home-header {
    justify-content: center;
    padding: 11px 0 9px;
  }

  .page-home .header-logo {
    height: 52px;
  }

  .page-home nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 2px 0 3px;
  }

  .page-home nav a {
    flex: 0 0 auto;
    padding: 6px 8px;
    font-size: 11.5px;
  }

  .hero {
    padding: 42px 0 36px;
  }

  .hero h1 {
    font-size: clamp(40px, 12vw, 54px);
    line-height: 1.01;
  }

  .hero-lead {
    font-size: 18px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .keystone-visual {
    width: 108%;
    margin-left: -4%;
  }

  .keystone-visual::before {
    inset: -14px -12px;
  }

  .node-detail {
    display: none;
  }

  .node-name {
    font-size: 12px;
  }

    .existing-nodes .network-node:nth-child(4) .node-name,
  .node-name.compact-name {
    font-size: 10.1px;
  }

  .network-side-label {
    font-size: 9px;
  }

  .network-routes .route-secondary {
    opacity: 0.16;
  }

  .brand-mark {
    opacity: 0.86;
  }

  .home-section,
  .legacy-section {
    padding: 70px 0;
  }

  .services-section {
    padding-top: 58px;
  }

  .problem-list,
  .experience-grid,
  .split-heading {
    grid-template-columns: 1fr;
  }

  .split-heading {
    gap: 8px;
  }

  .problem-list article {
    min-height: 0;
    padding: 24px 20px;
  }

  .legacy-panel,
  .cta-inner {
    padding: 30px 22px;
  }

  .method-list {
    grid-template-columns: 1fr;
  }

  .credibility-note {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 26px;
    text-align: center;
  }

  .site-footer {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 42px;
  }

  .hero-lead {
    font-size: 17px;
  }

  .hero-support {
    font-size: 15px;
  }

  .keystone-visual {
    width: 108%;
    margin-left: -4%;
  }

  .node-name {
    font-size: 12.5px;
  }

    .existing-nodes .network-node:nth-child(4) .node-name,
  .node-name.compact-name {
    font-size: 10.4px;
  }

  .node-card {
    fill: rgba(9, 18, 34, 0.96);
  }

  .service-card {
    padding: 25px 23px;
  }

  .home-cta {
    padding: 68px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .data-events,
  .hero-flow-overlay {
    display: none;
  }

  .service-card,
  .text-link span,
  .card-link span {
    transition: none;
  }
}


