/* =========================================================================
   Alphaiota Solution — the engineering lane

   Diagram-led. The words label the picture; they do not repeat it.

   Every component here is built on the design tokens (--bg, --text, --line…),
   never on hard-coded colours, so dropping a section into .band-light flips
   the whole diagram to the light palette with no extra rules.
   ========================================================================= */

/* Pre-animation states apply only once the driver script is alive. Without it
   every diagram renders finished rather than blank. */
.eng-ready [data-eng] .pstep,
.eng-ready [data-eng] .elayer,
.eng-ready [data-eng] .fnode,
.eng-ready [data-eng] .gitem { opacity: 0; transform: translateY(14px); }
[data-eng] .pstep, [data-eng] .elayer, [data-eng] .fnode, [data-eng] .gitem {
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
[data-eng] .pstep.on, [data-eng] .elayer.on,
[data-eng] .fnode.on, [data-eng] .gitem.on { opacity: 1; transform: none; }

/* Shared caption under a diagram — the only prose most sections get. */
.dcap {
  margin-top: 22px; font-size: 13.5px; color: var(--text-faint);
  display: flex; align-items: flex-start; gap: 10px; max-width: 70ch;
}
.dcap::before {
  content: ""; flex-shrink: 0; margin-top: 7px;
  width: 16px; height: 2px; border-radius: 2px; background: var(--grad-brand);
}

/* Small monospace label used throughout the diagrams */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint);
}

/* ------------------------------------------------------------------ hero */
.eng-hero {
  position: relative; overflow: hidden;
  padding: clamp(132px, 19vh, 200px) 0 clamp(56px, 8vh, 92px);
  background:
    radial-gradient(90% 70% at 78% 0%, rgba(36,107,253,.15), transparent 62%),
    radial-gradient(70% 60% at 12% 18%, rgba(122,92,255,.10), transparent 66%),
    linear-gradient(180deg, var(--bg), #060A13);
}
.eng-hero__veil {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(148,163,194,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,194,.04) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000, transparent 80%);
}
.eng-hero__inner { position: relative; z-index: 1; }
.eng-hero h1 {
  font-size: clamp(34px, 5.4vw, 64px); letter-spacing: -.035em;
  margin: 18px 0 20px; max-width: 16ch;
}
.eng-hero .lead { max-width: 46ch; font-size: clamp(15px, 1.55vw, 18px); }

/* ------------------------------------------------------------- blueprint */
.blueprint {
  margin-top: clamp(34px, 6vh, 58px);
  border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(180deg, rgba(9,14,26,.55), rgba(6,10,19,.75));
  padding: clamp(14px, 2vw, 22px);
  overflow: hidden;
}
.band-light .blueprint {
  background: linear-gradient(180deg, #FFFFFF, #F7FAFE);
  box-shadow: 0 20px 44px -34px rgba(11,23,45,.5);
}
.blueprint svg { display: block; width: 100%; height: auto; }
.bp-line   { stroke: var(--line-strong); stroke-width: 1.4; fill: none; }
.bp-flow   { stroke: url(#bpGrad); stroke-width: 2; fill: none; stroke-linecap: round; }
.bp-box    { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.2; }
.bp-box--a { fill: rgba(36,107,253,.10); stroke: rgba(36,107,253,.42); }
.band-light .bp-box { fill: #FFFFFF; }
.bp-t      { fill: var(--text); font-size: 12.5px; font-weight: 600;
             font-family: var(--font-display); }
.bp-s      { fill: var(--text-faint); font-size: 10.5px; letter-spacing: .05em;
             font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
/* The pulse rides the request path. A plain translate keyframe is used rather
   than offset-path: it renders identically here and is supported everywhere. */
.bp-pulse { fill: #7A5CFF; opacity: 0; }
@keyframes bpRun {
  0%   { transform: translateX(0);     opacity: 0; }
  10%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(515px); opacity: 0; }
}
.blueprint.run .bp-pulse { animation: bpRun 3.2s var(--ease-in-out) infinite; }
@media (prefers-reduced-motion: reduce) {
  .blueprint.run .bp-pulse { animation: none; opacity: 1; }
}

/* ------------------------------------------------------------ principles */
.pcards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px; margin-top: clamp(30px, 5vh, 46px);
}
.pcard {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: 18px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  padding: clamp(22px, 2.4vw, 28px);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .45s var(--ease), border-color .35s var(--ease);
}
.band-light .pcard { box-shadow: 0 16px 38px -30px rgba(11,23,45,.55); }
.pcard:hover { transform: translateY(-4px); border-color: rgba(122,92,255,.45); }
.pcard__n {
  font-family: var(--font-display); font-size: 11.5px; font-weight: 700;
  letter-spacing: .16em; color: var(--violet);
}
.pcard h3 {
  font-size: clamp(17px, 1.9vw, 20px); letter-spacing: -.022em; margin: 0;
}
.pcard p { color: var(--text-dim); font-size: 14px; margin: 0; }

/* the little proof drawing at the top of each principle card */
.pvis { height: 74px; display: block; width: 100%; }
.pv-l  { stroke: var(--line-strong); stroke-width: 1.3; fill: none; }
.pv-a  { stroke: #246BFD; stroke-width: 1.8; fill: none; stroke-linecap: round; }
.pv-v  { stroke: #7A5CFF; stroke-width: 1.8; fill: none; stroke-linecap: round; }
.pv-bad  { fill: #E25A6A; }
.pv-good { fill: #35C08A; }
.pv-box  { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.1; }
.pv-t    { fill: var(--text-faint); font-size: 9.5px;
           font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
@keyframes pvPulse { 0%,100% { opacity: .35 } 50% { opacity: 1 } }
.pcard:hover .pv-a, .pcard:hover .pv-v { animation: pvPulse 1.5s var(--ease-in-out) infinite; }

/* --------------------------------------------------- measured bars (7/670) */
.bars {
  margin-top: 18px; display: grid; gap: 14px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); padding: clamp(20px, 2.4vw, 26px);
}
.band-light .bars { box-shadow: 0 16px 38px -30px rgba(11,23,45,.5); }
.bar__h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.bar__l { font-size: 13.5px; color: var(--text); font-weight: 600; }
.bar__n { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--text); }
.bar__n small { font-weight: 600; font-size: 11.5px; color: var(--text-faint); margin-left: 2px; }
.bar__t { height: 10px; border-radius: 99px; background: var(--bg-2);
          border: 1px solid var(--line); overflow: hidden; }
.bar__f { height: 100%; border-radius: 99px; width: 0;
          transition: width 1.1s var(--ease); }
.bar--code .bar__f { background: linear-gradient(90deg, #35C08A, #2FA7C4); }
.bar--net  .bar__f { background: var(--grad-brand); }

/* ---------------------------------------------------------- process pipe */
.pipe {
  margin-top: clamp(30px, 5vh, 46px);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0; position: relative;
}
.pipe::before {
  content: ""; position: absolute; left: 6%; right: 6%; top: 21px; height: 2px;
  background: linear-gradient(90deg, var(--line-strong), rgba(122,92,255,.5), var(--line-strong));
  border-radius: 2px;
}
.pstep { position: relative; padding: 0 8px; text-align: center; }
.pstep__d {
  width: 44px; height: 44px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; position: relative; z-index: 1;
  background: var(--surface); border: 1px solid var(--line-strong);
  font-family: var(--font-display); font-weight: 800; font-size: 13px; color: var(--text);
}
.pstep.on .pstep__d {
  border-color: rgba(122,92,255,.6);
  box-shadow: 0 0 0 5px rgba(122,92,255,.10);
}
.pstep h3 { font-size: 15px; margin: 0 0 6px; letter-spacing: -.02em; }
.pstep p { font-size: 13px; color: var(--text-dim); margin: 0 0 12px; }
.pstep__a {
  display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .05em;
  color: #9FC0FF; background: rgba(36,107,253,.10);
  border: 1px solid rgba(36,107,253,.26); border-radius: 7px; padding: 4px 9px;
}
.band-light .pstep__a { color: #2A55C8; background: rgba(36,107,253,.07); }

/* --------------------------------------------------------- layer stack */
.estack { margin-top: clamp(30px, 5vh, 46px); display: flex; flex-direction: column; gap: 8px; }
.elayer {
  display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px);
  padding: clamp(16px, 2vw, 22px) clamp(16px, 2.2vw, 26px);
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: linear-gradient(90deg, rgba(36,107,253,.06), transparent 60%), var(--surface);
  transition: transform .4s var(--ease), border-color .35s var(--ease),
              opacity .6s var(--ease), background .4s var(--ease);
}
.band-light .elayer { box-shadow: 0 14px 32px -28px rgba(11,23,45,.5); }
.elayer:hover { transform: translateX(6px); border-color: rgba(122,92,255,.45); }
.elayer__n {
  font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 30px); font-weight: 800;
  color: rgba(122,92,255,.36); line-height: 1; flex-shrink: 0; min-width: 2.2ch;
}
.elayer__b { flex: 1; min-width: 0; }
.elayer h3 { font-size: 16.5px; margin: 0 0 4px; letter-spacing: -.02em; }
.elayer p { font-size: 13.5px; color: var(--text-dim); margin: 0; }
.elayer__c {
  flex-shrink: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px; color: var(--text-faint);
  border: 1px dashed var(--line-strong); border-radius: 7px; padding: 4px 9px;
}

/* --------------------------------------------------- reliability flows */
.fails { margin-top: clamp(30px, 5vh, 46px); display: grid; gap: 12px; }
.fail {
  border: 1px solid var(--line-strong); border-radius: 16px;
  background: var(--surface); padding: clamp(18px, 2.2vw, 24px);
  display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(14px, 2.4vw, 32px); align-items: center;
}
.band-light .fail { box-shadow: 0 14px 34px -30px rgba(11,23,45,.5); }
.fail h3 { font-size: 15.5px; margin: 0; letter-spacing: -.02em; }
.fail h3 span { display: block; margin-top: 5px; font-size: 12.5px;
                font-weight: 500; color: var(--text-faint); letter-spacing: 0; }

/* problem -> handling -> outcome, as three chips with drawn connectors */
.fflow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fnode {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; border-radius: 9px;
  padding: 8px 12px; border: 1px solid var(--line-strong);
  background: var(--bg-2); color: var(--text-dim); white-space: nowrap;
}
.fnode i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; font-style: normal; }
.fnode--bad { color: #E2707E; border-color: rgba(226,90,106,.34); background: rgba(226,90,106,.07); }
.fnode--act { color: var(--text); }
.fnode--ok  { color: #35C08A; border-color: rgba(53,192,138,.34); background: rgba(53,192,138,.07); }
.farr { flex-shrink: 0; width: 16px; height: 8px; opacity: .55; }
.farr svg { width: 100%; height: 100%; display: block; }
.farr path { stroke: var(--text-faint); stroke-width: 1.5; fill: none; stroke-linecap: round; }

/* ------------------------------------------------------------- security */
.shield-grid {
  margin-top: clamp(30px, 5vh, 46px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.gitem {
  border: 1px solid var(--line); border-radius: 15px; padding: 20px;
  background: var(--surface); display: flex; flex-direction: column; gap: 10px;
  transition: border-color .35s var(--ease), transform .4s var(--ease),
              opacity .6s var(--ease);
}
.band-light .gitem { box-shadow: 0 14px 32px -30px rgba(11,23,45,.45); }
.gitem:hover { border-color: rgba(36,107,253,.4); transform: translateY(-3px); }
.gitem__ic {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  color: #9FC0FF; background: rgba(36,107,253,.10); border: 1px solid rgba(36,107,253,.24);
}
.band-light .gitem__ic { color: #2A55C8; background: rgba(36,107,253,.07); }
.gitem__ic svg { width: 17px; height: 17px; }
.gitem h3 { font-size: 14.5px; margin: 0; letter-spacing: -.015em; }
.gitem p { font-size: 13px; color: var(--text-dim); margin: 0; }
.gitem code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86em; color: var(--violet);
  background: rgba(122,92,255,.11); border: 1px solid rgba(122,92,255,.2);
  border-radius: 5px; padding: 1px 5px;
}

/* --------------------------------------------------- what we will not do */
.nots { list-style: none; margin: clamp(26px, 4vh, 38px) 0 0; padding: 0;
        display: grid; gap: 10px; max-width: 78ch; }
.nots li {
  position: relative; padding: 15px 20px 15px 48px;
  border: 1px solid var(--line); border-radius: 13px;
  background: var(--surface); color: var(--text); font-size: 14.5px; font-weight: 600;
}
.nots li::before {
  content: ""; position: absolute; left: 20px; top: 22px;
  width: 14px; height: 2px; border-radius: 2px; background: #E25A6A;
}

/* ------------------------------------------------------------------ CTA */
.eng-cta {
  background:
    radial-gradient(60% 60% at 50% 10%, rgba(36,107,253,.14), transparent 70%),
    linear-gradient(180deg, #060A13, var(--bg));
  text-align: center;
  padding-bottom: clamp(96px, 12vh, 150px);
}
.eng-cta__inner { max-width: 760px; margin-inline: auto; }
.eng-cta h2 { font-size: clamp(30px, 4.6vw, 54px); letter-spacing: -.035em; }
.eng-cta .lead { margin: 20px auto 0; max-width: 46ch; }
.eng-cta__row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 32px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1024px) {
  .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shield-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 30px; }
  .pipe::before { display: none; }
}
@media (max-width: 760px) {
  .fail { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 620px) {
  .eng-hero { padding-top: 118px; }
  .pcards, .shield-grid { grid-template-columns: 1fr; }
  /* Wrapping the chips left arrows stranded at the end of a line. Stack the
     flow instead and turn the arrows to point down. */
  .fflow { flex-direction: column; align-items: flex-start; gap: 6px; }
  .fnode { white-space: normal; }
  /* Rotate the whole 16x8 box so the arrow keeps its aspect ratio. */
  .farr { margin-left: 16px; transform: rotate(90deg); }
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .elayer { flex-wrap: wrap; gap: 10px; }
  .elayer__c { order: 3; }
  .nots li { padding: 14px 16px 14px 42px; }
  .nots li::before { left: 16px; }
}
