/* ============================================================
   XIT GLOBAL — Infrastructure Design (service detail) page
   loads AFTER xit-styles.css + services-styles.css
   ============================================================ */

/* ---------- Detail hero ---------- */
.detail-hero {
  position: relative; overflow: hidden;
  padding-top: 56px; padding-bottom: 56px;
  background:
    radial-gradient(760px 420px at 88% -20%, rgba(46,168,255,.12), transparent 60%),
    radial-gradient(620px 420px at -5% 0%, rgba(48,73,184,.09), transparent 55%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.detail-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(31,43,108,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,43,108,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(820px 360px at 25% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(820px 360px at 25% 0%, #000 30%, transparent 80%);
}
.detail-hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; }
.detail-hero .eyebrow { display: inline-flex; align-items: center; gap: 9px; }
.detail-hero .eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--royal); box-shadow: 0 0 0 4px rgba(48,73,184,.16); }
.detail-hero h1 { font-size: clamp(36px, 5.2vw, 58px); font-weight: 800; letter-spacing: -.03em; margin-top: 15px; }
.detail-hero p { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); margin-top: 15px; max-width: 500px; }

/* hero visual: matches the Services page featured visual exactly */
.infra-visual { position: relative; height: 420px; }
.infra-visual .svc-orb { right: 7%; bottom: 5%; width: 120px; height: 120px; }
.infra-card {
  position: absolute; left: 4%; top: 2%; width: 82%;
  background: rgba(255,255,255,.84); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.9); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 18px; z-index: 2;
}
.infra-card .ic-top { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.infra-card .ic-top .ic-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-cyan); flex-shrink: 0; }
.infra-card .ic-top b { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.2; }
.infra-card .ic-top span { display: block; margin-top: 3px; font-size: 11px; color: var(--ink-3); font-family: 'Roboto Mono', monospace; letter-spacing: .04em; }
.tier { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.tier:first-of-type { border-top: 0; }
.tier .tdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tier .tname { flex: 1; font-size: 13px; font-weight: 500; }
.tier .tval { font-family: 'Roboto Mono', monospace; font-size: 11.5px; color: var(--ink-3); }
.infra-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; box-shadow: var(--shadow-md);
}
.infra-chip .cr { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.infra-chip b { font-size: 13px; font-weight: 700; display: block; line-height: 1.1; white-space: nowrap; }
.infra-chip span { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.infra-chip.c1 { right: -1%; top: 0; }
.infra-chip.c2 { left: 1%; bottom: 4%; }

/* ---------- Detail layout: content + sidebar ---------- */
.detail-body { padding: 56px 0 72px; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 312px; gap: 56px; align-items: start; }

.article > section { scroll-margin-top: 110px; }
.article .lvl {
  display: inline-block; font-family: 'Roboto Mono', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--royal); margin-bottom: 12px;
}
.article h2 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 800; letter-spacing: -.025em; }
.article p { color: var(--ink-2); font-size: 16.5px; line-height: 1.66; margin-top: 16px; max-width: 62ch; }
.article p strong { color: var(--ink); font-weight: 600; }
.article .block { margin-bottom: 52px; }

/* "What makes us different" feature card */
.diff-card {
  margin-top: 26px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(48,73,184,.035), rgba(46,168,255,.02));
  padding: 28px 30px 30px;
}
.diff-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 26px; margin-top: 20px; }
.diff-item { display: flex; gap: 13px; align-items: flex-start; }
.diff-item .ck {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; color: #fff;
  background: var(--grad); box-shadow: 0 4px 10px rgba(48,73,184,.28);
}
.diff-item .ck svg { stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .5s var(--ease); }
.diff-item.in .ck svg { stroke-dashoffset: 0; }
.diff-item p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink); }

/* service-areas cards */
.areas-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.areas-head > div { flex: 1 1 auto; min-width: 0; }
.areas-head h2 { white-space: nowrap; }
.areas-head .count { flex-shrink: 0; font-family: 'Roboto Mono', monospace; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.area-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 22px; }
.area-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff;
  padding: 24px 24px 22px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.area-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); transform: scaleY(0); transform-origin: top; transition: transform .4s var(--ease); }
.area-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.area-card:hover::before { transform: scaleY(1); }
.area-card .anum { font-family: 'Roboto Mono', monospace; font-size: 12px; font-weight: 500; color: var(--royal); }
.area-card .atop { display: flex; align-items: center; gap: 11px; }
.area-card .aico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--c-services); box-shadow: 0 6px 14px rgba(48,73,184,.26); flex-shrink: 0; transition: transform .35s var(--ease); }
.area-card:hover .aico { transform: scale(1.07) rotate(-3deg); }
.area-card h3 { font-size: 18.5px; font-weight: 700; margin-top: 14px; }
.area-card p { color: var(--ink-2); font-size: 14px; line-height: 1.55; margin-top: 9px; }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 18px; }
.side-card { border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--shadow-sm); padding: 20px; }
.side-card .stitle { font-family: 'Roboto Mono', monospace; font-size: 10.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.toc { display: flex; flex-direction: column; gap: 2px; }
.toc a {
  position: relative; display: flex; gap: 10px; align-items: flex-start;
  font-size: 13.5px; line-height: 1.4; color: var(--ink-2); padding: 8px 10px; border-radius: 9px;
  transition: color .2s, background .2s;
}
.toc a .tn { font-family: 'Roboto Mono', monospace; font-size: 10.5px; color: var(--ink-3); margin-top: 1px; transition: color .2s; }
.toc a:hover { background: var(--paper); color: var(--ink); }
.toc a.active { background: rgba(48,73,184,.07); color: var(--navy); font-weight: 600; }
.toc a.active .tn { color: var(--royal); }

.more-links { display: flex; flex-direction: column; }
.more-links a {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  font-size: 14.5px; font-weight: 500; color: var(--ink); padding: 12px 4px; border-top: 1px solid var(--line-2);
  transition: padding .25s var(--ease), color .2s;
}
.more-links a:first-child { border-top: 0; }
.more-links a .arr { color: var(--royal); transition: transform .3s var(--ease); }
.more-links a:hover { color: var(--royal); padding-left: 10px; }
.more-links a:hover .arr { transform: translateX(4px); }

.talk-card { background: var(--navy); color: #fff; border: 0; }
.talk-card .stitle { color: rgba(255,255,255,.55); }
.talk-card .trow { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: rgba(255,255,255,.75); margin-bottom: 10px; line-height: 1.45; }
.talk-card .trow svg { color: var(--cyan); flex-shrink: 0; margin-top: 2px; }
.talk-card .trow a { color: rgba(255,255,255,.85); }
.talk-card .trow a:hover { color: #fff; }
.talk-card .btn { width: 100%; justify-content: center; margin-top: 8px; }

/* ---------- Prev / Next ---------- */
.prevnext { padding: 0 0 64px; }
.pn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pn-card {
  display: block; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff;
  padding: 22px 24px; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.pn-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--silver); }
.pn-card .pn-dir { display: flex; align-items: center; gap: 8px; font-family: 'Roboto Mono', monospace; font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.pn-card.next { text-align: right; }
.pn-card.next .pn-dir { justify-content: flex-end; }
.pn-card .pn-title { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin-top: 12px; color: var(--ink); }
.pn-card .pn-sub { display: block; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); margin-top: 6px; }
.pn-card .ic { color: var(--royal); transition: transform .3s var(--ease); }
.pn-card.prev:hover .ic { transform: translateX(-4px); }
.pn-card.next:hover .ic { transform: translateX(4px); }

/* ---------- CTA ---------- */
.cta { padding: 0 0 76px; }
.cta-inner {
  position: relative; overflow: hidden;
  background: var(--navy); color: #fff; border-radius: var(--r-xl);
  padding: clamp(34px, 5vw, 56px);
  display: grid; grid-template-columns: 1.3fr auto; gap: 32px; align-items: center;
}
.cta-inner::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(540px 280px at 8% -30%, rgba(46,168,255,.28), transparent 60%),
    radial-gradient(520px 360px at 102% 130%, rgba(48,73,184,.5), transparent 60%);
}
.cta-inner > * { position: relative; }
.cta h2 { color: #fff; font-size: clamp(24px, 2.9vw, 35px); font-weight: 800; letter-spacing: -.025em; white-space: nowrap; }
.cta .cta-contact { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14.5px; color: rgba(255,255,255,.72); }
.cta .cta-contact a { color: rgba(255,255,255,.85); }
.cta .cta-contact a:hover { color: #fff; }
.cta .cta-contact .ci { display: inline-flex; align-items: center; gap: 8px; }
.it-detail .talk-card .trow svg { color: #fff; }
.it-detail .cta .cta-contact svg { color: #fff; }
.cta-actions { display: flex; flex-direction: column; gap: 12px; min-width: 230px; }
.cta-actions .btn { width: 100%; justify-content: center; }
.btn-cyan { background: var(--cyan); color: var(--navy-900); font-weight: 700; }
.btn-cyan:hover { transform: translateY(-2px); box-shadow: var(--shadow-cyan); filter: brightness(1.05); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-outline:hover { transform: translateY(-2px); border-color: #fff; background: rgba(255,255,255,.06); }

/* ---------- White CTA buttons on IT detail pages ---------- */
.it-detail .talk-card .btn-primary,
.it-detail .cta .btn-cyan,
.it-detail .footer .f-contact .btn-primary {
  background: #fff; color: var(--navy); box-shadow: 0 8px 20px rgba(0,0,0,.18); filter: none;
}
.it-detail .talk-card .btn-primary:hover,
.it-detail .cta .btn-cyan:hover,
.it-detail .footer .f-contact .btn-primary:hover {
  background: #fff; color: var(--navy); transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0,0,0,.24); filter: none;
}
@media (max-width: 980px) {
  .detail-grid { grid-template-columns: 1fr; gap: 40px; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .sidebar .side-card { flex: 1 1 260px; }
  .sidebar .toc-card { order: 3; flex-basis: 100%; }
  .toc { flex-direction: row; flex-wrap: wrap; }
  .detail-hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .infra-visual { order: -1; max-width: 520px; height: 380px; }
}
@media (max-width: 900px) {
  .cta-inner { grid-template-columns: 1fr; }
  .cta-actions { min-width: 0; flex-direction: row; flex-wrap: wrap; }
  .cta-actions .btn { flex: 1 1 50px; }
  .cta h2 { white-space: normal; }
}
@media (max-width: 760px) {
  .cta-actions { flex-direction: column; }
}
@media (max-width: 640px) {
  .diff-grid { grid-template-columns: 1fr; }
  .area-grid { grid-template-columns: 1fr; }
  .pn-grid { grid-template-columns: 1fr; }
  .sidebar { flex-direction: column; align-items: stretch; }
  .sidebar .side-card { flex: 0 0 auto; }
  .toc { flex-direction: column; }
}
