/* =========================================================
   HOME PAGE SPECIFIC STYLES (MICA Index)
   ========================================================= */

/* ---------- Hero Band ---------- */
.hero-band {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(ellipse 50% 60% at 85% 30%, #EEF2FF 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 10% 100%, #E9F8FA 0%, transparent 70%),
    #fff;
  border-bottom: 1px solid var(--line);
}
.hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 75%);
}

.hero-band .hero {
  position: relative;
  min-height: calc(100vh - 76px);
  padding-top: clamp(14px, 2.5vh, 28px);
  padding-bottom: clamp(18px, 3vh, 32px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-areas: "copy board" "readout board";
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: clamp(28px, 4.5vw, 60px);
}
.hero-band .copy { grid-area: copy; padding-top: 0; }
.hero-band h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.4vw, 3.05rem);
  line-height: 1.05;
  font-weight: 800;
  max-width: 17ch;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.hero-band .lede {
  margin: 0 0 20px;
  max-width: 46ch;
  color: var(--slate);
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  line-height: 1.55;
}
.hero-band .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Readout */
.readout {
  grid-area: readout;
  margin-top: 18px;
  padding: 14px 18px;
  max-width: 30rem;
  min-height: 6.5rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 0 14px 14px 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px -16px rgba(15, 23, 42, 0.14);
}
.readout-name { margin: 0 0 4px; font-size: 1.12rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.readout-desc { margin: 0 0 8px; color: var(--slate); font-size: 0.9rem; line-height: 1.45; }
.readout-link { font-weight: 700; font-size: 0.9rem; color: var(--brand); text-underline-offset: 3px; }
.readout-name, .readout-desc, .readout-link { transition: opacity 0.25s ease; }
.readout.swap .readout-name, .readout.swap .readout-desc, .readout.swap .readout-link { opacity: 0; }

/* Circuit Board */
.board-wrap { grid-area: board; container-type: inline-size; }
.board { position: relative; width: 100%; max-width: min(510px, calc(100vh - 120px)); aspect-ratio: 1 / 1; margin-left: auto; }
.board > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trace { fill: none; stroke: #CBD5E1; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.trace-hot {
  fill: none; stroke: var(--brand); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  filter: drop-shadow(0 0 6px rgba(47, 91, 255, 0.45));
}
.via { fill: #fff; stroke: #94A3B8; stroke-width: 2; }
.core-pin { stroke: rgba(47, 91, 255, 0.6); stroke-width: 4; stroke-linecap: round; }
.intro .trace { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.9s cubic-bezier(.6,0,.2,1) forwards; }
.intro .board .chip { opacity: 0; animation: pop 0.4s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.core-glow { animation: breathe 3.2s ease-in-out infinite; transform-origin: 300px 300px; }
@keyframes breathe { 50% { opacity: 0.55; } }

.core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 26.6%; aspect-ratio: 1; display: grid; place-content: center;
  text-align: center; color: #fff; pointer-events: none;
}
.core-mark { font-weight: 800; font-size: clamp(1.3rem, 6cqi, 2.3rem); letter-spacing: -0.04em; line-height: 1; }
.core-sub { font-size: clamp(0.6rem, 2cqi, 0.8rem); opacity: 0.85; margin-top: 4px; }

/* Interactive Board Chips */
.board .chip {
  position: absolute; transform: translate(-50%, -50%); width: 21%;
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 10px 24px -14px rgba(15, 23, 42, 0.16);
  font: inherit; font-weight: 700; font-size: clamp(0.72rem, 2.3cqi, 0.9rem); line-height: 1.15; text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.board .chip svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.board .chip:hover {
  border-color: var(--brand);
  transform: translate(-50%, -50%) scale(1.05);
}
.board .chip:active {
  transform: translate(-50%, -50%) scale(0.97);
}
.board .chip[aria-pressed="true"] {
  border-color: var(--brand);
  background: #EEF2FF;
  box-shadow: 0 0 0 4px rgba(47, 91, 255, 0.14), 0 14px 30px -10px rgba(47, 91, 255, 0.35);
}
@keyframes chipPulse {
  0% { transform: translate(-50%, -50%) scale(1); }
  45% { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 0 6px rgba(47, 91, 255, 0.22), 0 18px 34px -8px rgba(47, 91, 255, 0.5); }
  100% { transform: translate(-50%, -50%) scale(1.03); }
}
.board .chip.pulse-out {
  animation: chipPulse 0.5s ease forwards;
}
@container (max-width: 470px) {
  .board .chip { width: auto; padding: 10px; }
  .board .chip-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Shared Section Styles ---------- */
section { padding: clamp(72px, 9vw, 120px) 0; }
.night { background: var(--night); color: var(--night-ink); }
.sec-head { max-width: 42rem; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head h2 { margin: 0 0 14px; font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1.1; font-weight: 800; }
.sec-head p { margin: 0; color: var(--slate); font-size: 1.1rem; }
.night .sec-head p { color: var(--night-slate); }

/* ---------- Services Grouped ---------- */
.families { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.family-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.family-head h3 { margin: 0; font-size: 1.3rem; }
.family-head span { color: var(--slate); font-size: 0.95rem; margin-left: auto; }
.svc { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: background-color 0.3s ease, padding 0.3s ease; }
.svc:target { background: rgba(47, 91, 255, 0.08); border-radius: 12px; padding: 18px 14px; }
.svc-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(47, 91, 255, 0.12); color: var(--brand); }
.svc-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svc h4 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.svc p { margin: 0; color: var(--slate); font-size: 0.95rem; line-height: 1.5; }
.svc:hover h4 { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- One Partner Comparison ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 32px); }
.panel { border-radius: 20px; padding: clamp(24px, 3.5vw, 40px); background: #fff; border: 1px solid var(--line); }
.panel h3 { margin: 0 0 6px; font-size: 1.35rem; }
.panel > p { margin: 0 0 28px; color: var(--slate); }
.vendors { display: flex; flex-wrap: wrap; gap: 10px; }
.vendor { padding: 10px 14px; border-radius: 10px; border: 1.5px dashed var(--line); color: var(--slate); font-weight: 600; font-size: 0.95rem; }
.vendors.scattered .vendor:nth-child(2) { transform: translateY(10px); }
.vendors.scattered .vendor:nth-child(4) { transform: translateY(-6px) rotate(-1.5deg); }
.panel-mica { background: var(--night); color: var(--night-ink); border-color: var(--night-line); position: relative; overflow: hidden; }
.panel-mica::after { content: ""; position: absolute; width: 60%; aspect-ratio: 1; right: -15%; top: -25%; background: radial-gradient(circle, rgba(47, 91, 255, 0.4), transparent 65%); pointer-events: none; }
.panel-mica > p { color: var(--night-slate); }
.hub { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr; gap: 0 18px; align-items: center; }
.hub-node { grid-row: span 5; padding: 18px 20px; border-radius: 16px; font-weight: 800; font-size: 1.3rem; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 0 34px rgba(47, 91, 255, 0.6); }
.hub-item { position: relative; padding: 7px 0 7px 22px; font-weight: 600; font-size: 0.95rem; }
.hub-item::before { content: ""; position: absolute; left: -18px; top: 50%; width: 32px; height: 2px; background: var(--signal); box-shadow: 0 0 8px var(--signal); }
.hub-item::after { content: ""; position: absolute; left: 12px; top: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.tally { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; gap: 28px; flex-wrap: wrap; font-weight: 700; }
.panel-mica .tally { border-top-color: var(--night-line); position: relative; z-index: 1; }
.tally span { display: block; font-weight: 500; font-size: 0.9rem; color: var(--slate); }
.panel-mica .tally span { color: var(--night-slate); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.timeline li { position: relative; padding: 44px 24px 0 0; }
.timeline li::before { content: ""; position: absolute; top: 3px; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--night); border: 3px solid var(--brand); }
.timeline li:last-child::before { background: var(--brand); box-shadow: 0 0 0 6px rgba(47, 91, 255, 0.3); }
.year { font-weight: 800; font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -0.04em; line-height: 1; margin-bottom: 10px; color: var(--night-ink); }
.timeline h3 { margin: 0 0 6px; font-size: 1.05rem; }
.timeline p { margin: 0; color: var(--night-slate); font-size: 0.95rem; max-width: 28ch; }

/* ---------- Talent Search ---------- */
.talent { position: relative; overflow: hidden; background: radial-gradient(ellipse 60% 80% at 15% 50%, rgba(123, 97, 255, 0.28), transparent 70%), var(--night); }
.talent-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.talent blockquote { margin: 0; font-weight: 700; font-size: clamp(1.9rem, 3.8vw, 3.2rem); line-height: 1.1; letter-spacing: -0.03em; }
.talent cite { display: block; margin-top: 18px; font-style: normal; color: var(--night-slate); font-size: 1rem; font-weight: 500; }
.talent-copy p { color: var(--night-slate); margin: 0 0 24px; }
.talent-copy h2 { margin: 0 0 12px; font-size: 1.5rem; }

/* ---------- Trust & Certifications ---------- */
.certs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 56px; }
.cert { padding: 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.cert strong { display: block; font-size: 1rem; margin-bottom: 4px; color: var(--ink); }
.cert span { color: var(--slate); font-size: 0.9rem; line-height: 1.4; display: block; }
.clients-label { color: var(--slate); font-weight: 600; margin: 0 0 18px; }
.clients { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 36px; }
.clients img { height: 52px; width: auto; object-fit: contain; filter: grayscale(1); opacity: 0.75; transition: filter 0.2s, opacity 0.2s; }
.clients img:hover { filter: none; opacity: 1; }

/* ---------- Contact Form ---------- */
.contact { background: radial-gradient(ellipse 50% 60% at 85% 20%, rgba(47, 91, 255, 0.26), transparent 70%), var(--night); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 5vw, 72px); }
.details { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; }
.details li span { display: block; color: var(--night-slate); font-size: 0.9rem; }
.details a, .details strong { font-weight: 700; font-size: 1.05rem; text-decoration: none; color: var(--night-ink); }
.contact .form {
  padding: clamp(22px, 3vw, 34px); border-radius: 20px;
  background: rgba(11, 21, 54, 0.85); border: 1px solid var(--night-line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.contact .field { display: grid; gap: 6px; }
.contact .field.full { grid-column: 1 / -1; }
.contact .field label { font-weight: 600; font-size: 0.92rem; color: var(--night-ink); }
.contact .field input, .contact .field select, .contact .field textarea {
  font: inherit; font-size: 1rem; color: var(--night-ink);
  background: var(--night); border: 1px solid #263A78; border-radius: 10px;
  padding: 12px 14px; width: 100%; box-sizing: border-box;
}
.contact .field textarea { min-height: 110px; resize: vertical; }
.contact .field input:focus, .contact .field select:focus, .contact .field textarea:focus {
  outline: none; border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(15, 184, 207, 0.25);
}
.contact .form .btn { justify-self: start; }
.form-note { grid-column: 1 / -1; margin: 0; color: var(--signal); font-weight: 600; min-height: 1.6em; }

/* ---------- Responsive Breakpoints for Home ---------- */
@media (max-width: 1000px) {
  .families { grid-template-columns: 1fr 1fr; }
  .certs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero-band .hero { grid-template-columns: 1fr; grid-template-areas: "copy" "board" "readout"; grid-template-rows: auto; }
  .board { margin: 32px auto 0; max-width: 520px; }
  .readout { margin: 24px auto 0; max-width: 520px; width: 100%; }
  .compare, .talent-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .families { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 32px; }
  .timeline::before { left: 8px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(180deg, var(--brand), var(--brand-2)); }
  .timeline li { padding: 0 0 0 44px; }
  .certs { grid-template-columns: 1fr 1fr; }
  .contact .form { grid-template-columns: 1fr; }
  .clients img { height: 40px; }
}
