/* ============================================================
   00 · Introduction
   Copy on the left; the portrait on the right, wrapped in
   drafting-style orbit rings. Tools orbit around the portrait —
   behind it on the far side, in front of it on the near side —
   so the rings read as real depth. Motion: js/intro.js.
   ============================================================ */

.intro {
  --light-88: rgba(244, 241, 234, 0.9);
  --light-64: rgba(244, 241, 234, 0.64);
  --light-40: rgba(244, 241, 234, 0.4);
  --light-12: rgba(244, 241, 234, 0.12);

  position: relative;
  z-index: 5;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(6rem, 14vh, 9rem) var(--pad-x) clamp(4rem, 10vh, 7rem);
  color: var(--text-light);
  /* Let the torus glow through at the edges; keep the copy side calm */
  background:
    radial-gradient(90% 80% at 72% 50%, rgba(7, 10, 9, 0.35) 0%, rgba(7, 10, 9, 0.88) 70%),
    linear-gradient(90deg, rgba(7, 10, 9, 0.9) 0%, rgba(7, 10, 9, 0.55) 55%, rgba(7, 10, 9, 0.3) 100%);
}

.intro-grid {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

/* ─── Copy ─── */
.intro-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(3.2rem, 7vw, 6.75rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--text-light);
}
.intro-title em {
  color: var(--accent-gold);
}
.intro-title .iw {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.04em 0.06em 0.14em;
  margin: -0.04em -0.06em -0.14em;
}
.intro-title .iw-in {
  display: inline-block;
  will-change: transform;
}
.intro-lede {
  max-width: 24ch;
  margin: clamp(1.25rem, 3vh, 1.9rem) 0 clamp(1rem, 2.2vh, 1.4rem);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.28;
  letter-spacing: -0.012em;
  color: var(--light-88);
}
.intro-body {
  max-width: 36rem;
  margin: 0;
  font-size: clamp(1rem, 1.1vw, 1.08rem);
  line-height: 1.68;
  color: var(--light-64);
}
.intro-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 34rem;
  margin: clamp(1.75rem, 4vh, 2.5rem) 0 0;
  border-top: 1px solid var(--light-12);
}
.if-row {
  padding: 0.85rem 1rem 0.9rem 0;
  border-bottom: 1px solid var(--light-12);
}
.if-row:nth-child(2n) {
  padding-left: 1rem;
  border-left: 1px solid var(--light-12);
}
.if-row dt {
  margin-bottom: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--light-40);
}
.if-row dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text-light);
}

/* Availability + action */
.intro-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  margin: clamp(1.5rem, 3.5vh, 2.25rem) 0 0;
  font-size: 0.92rem;
  color: var(--light-64);
}
.intro-cta .pulse {
  flex-shrink: 0;
}
.intro-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding-bottom: 0.18rem;
  border-bottom: 1px solid var(--accent-gold);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-light);
  transition: gap 0.3s cubic-bezier(0.23, 1, 0.32, 1), color 0.3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .intro-cta-link:hover {
    gap: 0.75rem;
    color: var(--accent-gold);
  }
}

/* ─── Portrait inside the orbits ─── */
.intro-portrait {
  margin: 0;
}
.ip-stage {
  position: relative;
  isolation: isolate;
  width: min(100%, 660px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.ip-stage::before {
  /* warm light behind the portrait */
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 70%;
  height: 70%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 168, 107, 0.2) 0%, rgba(201, 168, 107, 0.05) 45%, transparent 70%);
  pointer-events: none;
}
.ip-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.ip-rings-back {
  z-index: 1;
}
.ip-rings-front {
  z-index: 3;
}
.ip-ring {
  fill: none;
  stroke: rgba(201, 168, 107, 0.34);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.ip-ring-a {
  stroke-dasharray: 2 6;
}
.ip-ring-b {
  stroke: rgba(244, 241, 234, 0.2);
  stroke-dasharray: 1 4;
}
.ip-ticks {
  stroke: rgba(201, 168, 107, 0.22);
  stroke-width: 7;
  stroke-dasharray: 1 13;
}
.ip-photo {
  position: absolute;
  z-index: 2;
  left: 15%;
  top: 6%;
  width: 70%;
  height: 94%;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 98%);
  mask-image: linear-gradient(180deg, #000 70%, transparent 98%);
}
.ip-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45));
  will-change: transform;
}

/* No z-index here on purpose: each node joins the stage's stacking
   context and sets its own z-index by depth (1 = behind the photo,
   4 = in front of the photo and the front ring arcs). */
.ip-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ip-node {
  position: absolute;
  left: 0;
  top: 0;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 234, 0.14);
  background: rgba(14, 20, 18, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: auto;
  opacity: 0; /* js/intro.js places and reveals each node */
  will-change: transform, opacity;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.ip-node img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
/* AWS service icons are full-bleed coloured squares: the node *is* the
   icon, clipped to a circle (the glyph sits well inside the radius). */
.ip-node.ip-node-aws {
  border: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.ip-node.ip-node-aws img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
@media (hover: hover) and (pointer: fine) {
  .ip-node.ip-node-aws:hover {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35), 0 0 0 4px var(--glow), 0 0 26px var(--glow);
  }
  .ip-node.ip-node-aws:hover img {
    transform: scale(1.06);
  }
}
.ip-node::after {
  content: attr(data-name);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  padding: 0.28rem 0.55rem;
  border-radius: 99px;
  background: rgba(10, 14, 12, 0.92);
  border: 1px solid rgba(201, 168, 107, 0.3);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--accent-cream);
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .ip-node:hover {
    border-color: var(--glow, rgba(201, 168, 107, 0.6));
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.25), 0 0 26px var(--glow, rgba(201, 168, 107, 0.4));
  }
  .ip-node:hover img {
    transform: scale(1.14);
  }
  .ip-node:hover::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Static layout when motion is reduced or JS hasn't placed nodes */
.intro.is-static .ip-node {
  opacity: 1;
}

/* ─── Tablet & phone ─── */
@media (max-width: 900px) {
  .intro {
    min-height: auto;
    padding-top: clamp(5rem, 12vh, 7rem);
    background: linear-gradient(180deg, rgba(7, 10, 9, 0.9), rgba(7, 10, 9, 0.7) 60%, rgba(7, 10, 9, 0.85));
  }
  .intro-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
  }
  .ip-stage {
    width: min(100%, 460px);
  }
  .ip-node {
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
  }
  .ip-node img {
    width: 21px;
    height: 21px;
  }
}
@media (max-width: 420px) {
  .if-row:nth-child(2n) {
    padding-left: 0.75rem;
  }
  .if-row dd {
    font-size: 0.88rem;
  }
}
