/* =========================================================
   PILLARS V2 — asymmetric bento
   ========================================================= */
.pillars-v2 {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(140px, auto);
  gap: 14px;
  position: relative;
}

.pv {
  position: relative;
  padding: 32px 30px;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  transition: border-color 200ms cubic-bezier(0.22,1,0.36,1), transform 200ms cubic-bezier(0.22,1,0.36,1);
}
.pv:hover {
  border-color: rgba(34,211,238,0.35);
  transform: translateY(-2px);
}

.pv-n {
  position: absolute;
  top: 18px; right: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-4);
}
.pv-icon {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(34,211,238,0.25);
  background: rgba(34,211,238,0.05);
  color: var(--accent-cyan);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px rgba(34,211,238,0.12), inset 0 1px 0 rgba(255,255,255,0.06);
  margin-bottom: 4px;
}
.pv h4 {
  font-family: var(--font-sans); font-weight: 500;
  color: var(--fg-1); margin: 0;
  letter-spacing: -0.02em; line-height: 1.1;
  font-size: 24px;
}
.pv p {
  margin: 0;
  color: var(--fg-3);
  line-height: 1.55;
  font-size: 15px;
  text-wrap: pretty;
}
.pv-tag {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--accent-cyan);
  padding-top: 16px;
  border-top: 1px solid var(--border-faint);
}

/* Layout placement: asymmetric bento
   row 1: [01 wide + tall] [02 tall]
   row 2: [01 cont.]         [03 very wide]
   row 3: [04]               [05 wide]
   row 4: [06 full-width featured] */

.pv.p-01 {
  grid-column: 1 / span 7;
  grid-row: span 2;
  background:
    radial-gradient(300px 200px at 85% 0%, rgba(34,211,238,0.10), transparent 70%),
    var(--bg-raised);
}
.pv.p-01 h4 { font-size: 36px; }
.pv.p-01 p { font-size: 17px; max-width: 440px; }

.pv.p-02 {
  grid-column: 8 / span 5;
  grid-row: span 2;
}

.pv.p-03 {
  grid-column: 1 / span 7;
}
.pv.p-03 .pv-code {
  margin-top: auto;
  padding: 14px 16px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-faint);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
}
.pv-code-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fg-2); }
.c-gray { color: var(--fg-4); }
.c-cyan { color: var(--accent-cyan); }
.c-violet { color: var(--accent-violet); }
.c-amber { color: #f59e0b; }

.pv.p-04 {
  grid-column: 8 / span 5;
}
.pv.p-04 .pv-chat {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pv.p-04 .msg {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 12px;
  max-width: 84%;
  line-height: 1.4;
}
.pv.p-04 .msg.you {
  align-self: flex-start;
  background: var(--bg-sunken);
  color: var(--fg-3);
  border: 1px solid var(--border-faint);
}
.pv.p-04 .msg.me {
  align-self: flex-end;
  background: rgba(34,211,238,0.08);
  color: var(--fg-1);
  border: 1px solid rgba(34,211,238,0.2);
}

.pv.p-05 {
  grid-column: 1 / span 5;
}

.pv.p-06 {
  grid-column: 6 / span 7;
  background:
    linear-gradient(135deg, rgba(34,211,238,0.06), rgba(167,139,250,0.03) 60%, transparent),
    var(--bg-raised);
  border-color: rgba(34,211,238,0.25);
}
.pv.p-06 h4 { font-size: 32px; }
.pv.p-06 p { font-size: 17px; max-width: 560px; }

/* Responsive */
@media (max-width: 1100px) {
  .pillars-v2 { grid-template-columns: repeat(6, 1fr); }
  .pv.p-01 { grid-column: 1 / span 6; grid-row: auto; }
  .pv.p-02 { grid-column: 1 / span 3; grid-row: auto; }
  .pv.p-03 { grid-column: 4 / span 3; }
  .pv.p-04 { grid-column: 1 / span 3; }
  .pv.p-05 { grid-column: 4 / span 3; }
  .pv.p-06 { grid-column: 1 / span 6; }
}
@media (max-width: 680px) {
  .pillars-v2 { grid-template-columns: 1fr; gap: 12px; }
  .pv, .pv.p-01, .pv.p-02, .pv.p-03, .pv.p-04, .pv.p-05, .pv.p-06 {
    grid-column: 1 / -1;
  }
  .pv.p-01 h4, .pv.p-06 h4 { font-size: 28px; }
}

/* =========================================================
   PROCESS ARC — interactive icon nav
   ========================================================= */
.process-arc {
  position: relative;
  margin-top: 40px;
  padding: 40px 0 0;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Expanded text panel — above the arc */
.arc-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: 180px;
  text-align: center;
  margin: 0 auto 40px;
  padding: 28px 28px 32px;
  background:
    radial-gradient(400px 160px at 50% 0%, rgba(34,211,238,0.10), transparent 70%),
    var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  backdrop-filter: var(--blur-md);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}
.arc-panel-inner {
  animation: arcFade 280ms cubic-bezier(0.22,1,0.36,1);
}
@keyframes arcFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.arc-dur {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent-cyan);
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.25);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.arc-title {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 34px;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--fg-1);
  margin: 0 0 12px;
}
.arc-desc {
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-3);
  margin: 0 auto;
  max-width: 440px;
  text-wrap: pretty;
}

/* SVG arc underlay */
.arc-path {
  position: absolute;
  left: 0; right: 0;
  bottom: 80px;
  width: 100%;
  height: 220px;
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(0 0 10px rgba(34,211,238,0.2));
}

/* Icon nodes distributed on an arc */
.arc-nodes {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: 220px;
  margin: 0 auto;
  z-index: 1;
}

/* Arc math:
   - 7 nodes at indices 0..6 → center at i=3
   - horizontal spread from 4% to 96%
   - vertical offset: sin curve, min at center (lowest point is rising towards center)
   Arc goes UP in the middle like the reference. */
.arc-node {
  position: absolute;
  --i: var(--arc-x);
  /* t goes from 0 (leftmost) to 1 (rightmost) */
  --t: calc(var(--i) / 6);
  /* horizontal: span 88% of width */
  left: calc(6% + (var(--t) * 88%));
  /* vertical: parabola: 4*(t-0.5)^2 → 0 at center, 1 at ends
     we want center higher (lower `bottom` value), ends lower
     so bottom = 0 at ends, peak at center */
  /* parabola: 4*(t-0.5)^2 → 0 at center, 1 at ends */
  --parabola: calc(4 * (var(--t) - 0.5) * (var(--t) - 0.5));
  /* ends UP, center DOWN (matches reference) */
  --lift: calc(var(--parabola) * 130px);
  bottom: var(--lift);
  transform: translate(-50%, 0);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 320ms cubic-bezier(0.22,1,0.36,1);
}

.arc-ico {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  color: var(--fg-3);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  transition:
    transform 320ms cubic-bezier(0.22,1,0.36,1),
    width 320ms cubic-bezier(0.22,1,0.36,1),
    height 320ms cubic-bezier(0.22,1,0.36,1),
    background 240ms cubic-bezier(0.22,1,0.36,1),
    border-color 240ms cubic-bezier(0.22,1,0.36,1),
    color 240ms cubic-bezier(0.22,1,0.36,1),
    box-shadow 320ms cubic-bezier(0.22,1,0.36,1);
}
.arc-ico i,
.arc-ico svg.lucide {
  width: 26px; height: 26px;
  stroke-width: 1.5;
  transition: width 320ms cubic-bezier(0.22,1,0.36,1), height 320ms cubic-bezier(0.22,1,0.36,1);
}

.arc-n {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg-4);
  transition: color 200ms cubic-bezier(0.22,1,0.36,1);
}

/* Hover / active state */
.arc-node:hover .arc-ico,
.arc-node:focus-visible .arc-ico {
  border-color: rgba(34,211,238,0.35);
  color: var(--fg-1);
  transform: translateY(-4px);
}
.arc-node:hover .arc-n,
.arc-node:focus-visible .arc-n {
  color: var(--fg-2);
}

.arc-node.is-active {
  transform: translate(-50%, -8px);
  z-index: 2;
}
.arc-node.is-active .arc-ico {
  width: 82px;
  height: 82px;
  border-radius: 22px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(34,211,238,0.22), rgba(34,211,238,0.04) 70%),
    var(--bg-raised);
  border-color: rgba(34,211,238,0.55);
  color: var(--accent-cyan);
  box-shadow:
    0 0 32px rgba(34,211,238,0.35),
    0 0 2px rgba(34,211,238,0.6),
    0 18px 40px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1);
}
.arc-node.is-active .arc-ico i,
.arc-node.is-active .arc-ico svg.lucide {
  width: 34px; height: 34px;
}
.arc-node.is-active .arc-n {
  color: var(--accent-cyan);
  font-weight: 500;
}

.arc-node:focus { outline: none; }
.arc-node:focus-visible .arc-ico {
  outline: 2px solid rgba(34,211,238,0.6);
  outline-offset: 4px;
}

/* Progress + CTA row */
.arc-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fg-4);
  text-transform: uppercase;
}
.arc-progress .p-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  background: var(--accent-cyan);
  color: var(--btn-primary-fg);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 0 24px rgba(34,211,238,0.35);
  transition: box-shadow 200ms cubic-bezier(0.22,1,0.36,1), transform 200ms cubic-bezier(0.22,1,0.36,1);
}
.arc-progress .p-cta:hover {
  box-shadow: 0 0 36px rgba(34,211,238,0.6);
  transform: translateY(-1px);
}

/* Tablet: flatter arc, smaller icons */
@media (max-width: 900px) {
  .process-arc { min-height: 500px; padding-top: 20px; }
  .arc-nodes { height: 180px; max-width: 700px; }
  .arc-node { --lift: calc(var(--parabola) * 90px); }
  .arc-ico { width: 52px; height: 52px; border-radius: 14px; }
  .arc-ico i, .arc-ico svg.lucide { width: 22px; height: 22px; }
  .arc-node.is-active .arc-ico { width: 64px; height: 64px; border-radius: 18px; }
  .arc-node.is-active .arc-ico i, .arc-node.is-active .arc-ico svg.lucide { width: 28px; height: 28px; }
  .arc-title { font-size: 26px; }
  .arc-desc { font-size: 15px; }
  .arc-path { bottom: 60px; height: 180px; }
}

/* Mobile: two-row grid, panel above */
@media (max-width: 640px) {
  .process-arc { min-height: auto; padding-top: 0; }
  .arc-path { display: none; }
  .arc-panel { min-height: 160px; padding: 22px 20px; margin-bottom: 28px; }
  .arc-title { font-size: 22px; }
  .arc-desc { font-size: 14px; }
  .arc-nodes {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 10px;
    height: auto;
    max-width: 420px;
    padding: 8px 4px;
  }
  .arc-node {
    position: static;
    transform: none !important;
    left: auto; bottom: auto;
  }
  .arc-node.is-active { transform: none !important; }
  .arc-progress { flex-direction: column; gap: 16px; margin-top: 24px; }
}
