/* ============================================================
   PALADIO — Lattice positioning (umbrella concept)
   Sections: hero lattice, What is Lattice, Four Layers,
   Build Once, Why Lattice Matters. Architectural motif:
   restrained ink structure with layer-color accents.
   ============================================================ */

/* ---------- HERO additions ---------- */
.hero .hero-sub {
  margin-top: 16px;
  font-size: clamp(1.5rem, 3.3vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--ink-800);
  max-width: 18ch;
  text-wrap: balance;
}
.hero .lead { max-width: 50ch; }

/* ---------- Hero lattice assembly ---------- */
#heroLatticeSvg { width: 100%; height: auto; overflow: visible; }
#heroLatticeSvg .lx-line { stroke-linecap: round; }
#heroLatticeSvg .lx-node { transform-box: fill-box; transform-origin: center; }

/* Base state = fully assembled (so frozen/reduced-motion renders complete). */
@media (prefers-reduced-motion: no-preference) {
  #heroLatticeSvg.play .lx-line {
    stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
    animation: lxDraw .85s cubic-bezier(.45,0,.2,1) forwards;
    animation-delay: var(--d, 0s);
  }
  #heroLatticeSvg.play .lx-node {
    opacity: 0; transform: scale(0);
    animation: lxPop .5s cubic-bezier(.2,.85,.3,1.25) forwards;
    animation-delay: var(--d, 0s);
  }
  #heroLatticeSvg.play .lx-cap {
    opacity: 0;
    animation: lxFade .6s ease forwards;
    animation-delay: var(--d, 0s);
  }
}
@keyframes lxDraw { to { stroke-dashoffset: 0; } }
@keyframes lxPop  { to { opacity: 1; transform: scale(1); } }
@keyframes lxFade { to { opacity: 1; } }
@keyframes lxPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
#heroLatticeSvg .lx-pulse { animation: lxPulse 3.4s ease-in-out infinite; animation-delay: var(--pd, 0s); }
@media (prefers-reduced-motion: reduce) { #heroLatticeSvg .lx-pulse { animation: none; } }

/* ============================================================
   WHAT IS LATTICE — the "what is Stack?" moment
   ============================================================ */
.what-lattice { text-align: center; position: relative; overflow: hidden; }
.what-lattice .eyebrow { justify-content: center; }
.what-lattice .display { margin: 24px auto 0; max-width: 16ch; }
.what-lattice .lead { margin: 26px auto 0; max-width: 46ch; }
.what-lattice .wl-thesis {
  margin: 26px auto 0; max-width: 44ch;
  font-size: clamp(1.15rem, 1.9vw, 1.55rem);
  font-weight: 500; letter-spacing: -0.02em; line-height: 1.35;
  color: var(--ink-800); text-wrap: pretty;
}
.what-lattice .wl-thesis .dim { color: var(--ink-400); }

.wl-stage {
  margin: clamp(44px, 6vh, 80px) auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, rgba(255,255,255,.7), transparent 70%),
    var(--surface);
  box-shadow: 0 30px 80px -56px rgba(12,13,14,.4);
  overflow: hidden;
}
.wl-stage svg { width: 100%; height: auto; display: block; }
.wl-stage .lx-pulse { animation: lxPulse 3.6s ease-in-out infinite; animation-delay: var(--pd, 0s); }
@media (prefers-reduced-motion: reduce) { .wl-stage .lx-pulse { animation: none; } }

.wl-provides {
  margin-top: 18px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.wl-provides .wlp {
  padding: 24px clamp(16px, 2.2vw, 28px);
  border-right: 1px solid var(--line-soft);
  text-align: left;
  display: flex;
  flex-direction: column;
}
.wl-provides .wlp:last-child { border-right: none; }
.wl-provides .wlp .wlp-k {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; display: flex; align-items: center; gap: 8px;
  color: var(--ink-500);
}
.wl-provides .wlp .wlp-k i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.wl-provides .wlp .wlp-t {
  font-size: clamp(1.2rem, 1.8vw, 1.55rem); font-weight: 600;
  letter-spacing: -0.025em; margin-top: 12px;
}
.wl-provides .wlp .wlp-d { font-size: 13.5px; color: var(--ink-500); margin-top: auto; padding-top: 10px; line-height: 1.4; }
@media (max-width: 720px) {
  .wl-provides { grid-template-columns: repeat(2, 1fr); }
  .wl-provides .wlp:nth-child(2) { border-right: none; }
  .wl-provides .wlp { border-bottom: 1px solid var(--line-soft); }
}
.what-lattice .wl-foot {
  margin-top: clamp(36px, 5vh, 56px);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 500;
  letter-spacing: -0.02em; color: var(--ink); max-width: 40ch; margin-inline: auto;
}

/* ============================================================
   THINK TOGETHER — before / after transformation
   ============================================================ */
.think { background: var(--paper-2); }
.think-head { max-width: 64ch; }
.think-label {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-400); margin-bottom: 20px;
}
.think-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-300); }
.think-label.after { color: var(--accent); }
.think-label.after::before { background: var(--accent); }
.think-head h2 { margin-bottom: 22px; }
.think-stage {
  margin-top: clamp(28px, 4vh, 46px);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); overflow: hidden; position: relative;
  box-shadow: 0 30px 80px -60px rgba(12,13,14,.4);
}
.think-stage.before { background: linear-gradient(180deg, var(--paper), var(--surface)); }
.think-stage svg { width: 100%; height: auto; display: block; }
.ts-tag {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-400); padding: 16px 22px; border-bottom: 1px solid var(--line-soft);
}
.ts-chain {
  display: flex; flex-wrap: wrap; gap: 0 8px; align-items: center;
  padding: 16px 22px; border-top: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-400); letter-spacing: .02em;
}
.ts-chain span { position: relative; padding-right: 19px; transition: color .35s, text-shadow .35s; }
.ts-chain span:not(:last-child)::after { content: "→"; position: absolute; right: 3px; color: var(--ink-300); }
.ts-chain span.lit { color: var(--accent); }
.think-bridge {
  display: flex; align-items: center; gap: 18px; justify-content: center;
  margin: clamp(40px, 6vh, 76px) auto; max-width: 560px;
}
.think-bridge .tb-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.think-bridge .tb-word { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-400); white-space: nowrap; }
@media (max-width: 560px) { .think-bridge { gap: 12px; } }

/* ---- Think — single-section morph (isolated → connected) ---- */
.think-morph .think-title { margin: 0; }
.think-morph .think-title .tt-sing { color: var(--accent); }
#thinkMorphSvg .chip-g { transition: opacity .3s; }
#thinkMorphSvg .ed { transition: stroke .3s, stroke-width .3s, opacity .3s; }
#thinkMorphSvg .chip-box { transition: stroke .3s, fill .3s; }
#thinkMorphSvg.dimmed .ed:not(.on) { opacity: .25; }
#thinkMorphSvg.dimmed .chip-g:not(.on) { opacity: .42; }

/* hover-driven highlight state (set from JS) */
#afterSvg .ed { transition: stroke .3s, stroke-width .3s, opacity .3s; }
#afterSvg .chip-box { transition: stroke .3s, fill .3s; }
#afterSvg.dimmed .ed:not(.on) { opacity: .25; }
#afterSvg.dimmed .chip-g:not(.on) { opacity: .42; }
.intro-dark .lcard .lname { letter-spacing: .12em; }
.lattice-stratum {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 28px auto 0; padding: 9px 16px;
  border: 1px solid var(--dark-line); border-radius: 100px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  color: var(--dark-ink-300);
}
.lattice-stratum .ll { display: flex; gap: 5px; align-items: center; }
.lattice-stratum .ll i { width: 9px; height: 9px; border-radius: 2px; }

/* closing "Together they form Lattice." */
.lattice-unite { text-align: center; }
.lattice-unite .lu-mark {
  width: 64px; height: 64px; margin: 0 auto clamp(22px, 3vh, 32px);
}
.lattice-unite .lu-mark svg { width: 100%; height: 100%; overflow: visible; }
.lattice-unite h2 {
  font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.04em; line-height: 0.98;
  max-width: 18ch; margin-inline: auto;
}
.lattice-unite .lu-sub {
  margin: 22px auto 0; max-width: 46ch;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--dark-ink-300); line-height: 1.45;
}

/* ============================================================
   BUILD ONCE. BUILD ANYTHING.  (transition; apps emerge)
   ============================================================ */
.build-anything { background: var(--paper-2); text-align: center; }
.build-anything .eyebrow { justify-content: center; }
.build-anything .display { margin: 24px auto 0; max-width: 14ch; }
.build-anything .lead { margin: 24px auto 0; max-width: 48ch; }
.ba-stage {
  margin: clamp(40px, 5.5vh, 72px) auto 0;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 30px 80px -56px rgba(12,13,14,.42);
  overflow: hidden;
}
.ba-stage svg { width: 100%; height: auto; display: block; overflow: visible; }
.build-anything .ba-msg {
  margin-top: clamp(36px, 5vh, 56px); max-width: 50ch; margin-inline: auto;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 500; letter-spacing: -0.02em;
  line-height: 1.3; color: var(--ink);
}
.build-anything .ba-msg .alt { color: var(--ink-400); }

/* ---------- "Built on Lattice" product preludes ---------- */
.built-on {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-500); margin-bottom: 16px;
}
.built-on .bo-lattice {
  display: inline-flex; gap: 3px; align-items: center;
}
.built-on .bo-lattice i { width: 7px; height: 7px; border-radius: 2px; }
.acl .built-on { color: var(--dark-ink-300); }

/* ============================================================
   WHY LATTICE MATTERS — four outcome cards
   ============================================================ */
.why-lattice { border-top: 1px solid var(--line); }
.why-grid { margin-top: clamp(40px, 5vh, 64px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .why-grid { grid-template-columns: 1fr; } }
.why-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); padding: 28px 26px;
  display: flex; flex-direction: column; min-height: 240px;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.why-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--lc, var(--accent));
}
.why-card:hover { border-color: var(--line-strong); transform: translateY(-4px); box-shadow: 0 26px 56px -42px rgba(12,13,14,.5); }
.why-card .wc-layer {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; color: var(--ink-500);
}
.why-card .wc-layer i { width: 8px; height: 8px; border-radius: 2px; background: var(--lc); }
.why-card .wc-t {
  font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 600; letter-spacing: -0.03em;
  line-height: 1.06; margin-top: 18px;
}
.why-card .wc-d { font-size: 14.5px; color: var(--ink-500); line-height: 1.45; margin-top: auto; padding-top: 18px; }

/* ---------- Layer-section storytelling question ---------- */
.layer-q {
  font-size: clamp(1.3rem, 2.1vw, 1.8rem); font-weight: 600; letter-spacing: -0.03em;
  line-height: 1.12; color: var(--ink); margin-top: 18px; max-width: 22ch;
}

/* ---------- Architecture as Systems -> Lattice -> Applications ---------- */
.architecture .arch-lattice {
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--dark-line));
  border-radius: 16px; padding: 22px 24px; margin-bottom: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 11%, transparent), rgba(242,240,234,.02));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent) inset;
}
.architecture .arch-lattice .al-row { margin-bottom: 18px; }
.architecture .arch-lat-name { font-size: clamp(1.5rem, 2.4vw, 2.1rem) !important; letter-spacing: -0.03em; }
.arch-lat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 620px) { .arch-lat-grid { grid-template-columns: repeat(2, 1fr); } }
.arch-lat-grid .alg {
  position: relative; border: 1px solid var(--dark-line); border-radius: 12px;
  padding: 16px 16px; background: rgba(242,240,234,.03);
  display: flex; flex-direction: column; gap: 5px;
  transition: border-color .3s, background .3s, transform .3s;
}
.arch-lat-grid .alg:hover { border-color: rgba(242,240,234,.34); background: rgba(242,240,234,.06); transform: translateY(-2px); }
.arch-lat-grid .alg i { position: absolute; top: 15px; right: 15px; width: 9px; height: 9px; border-radius: 2px; background: var(--lc); }
.arch-lat-grid .alg b { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dark-ink-300); font-weight: 600; }
.arch-lat-grid .alg span { font-size: clamp(1.05rem, 1.5vw, 1.25rem); font-weight: 600; letter-spacing: -0.02em; color: var(--on-dark); }
.architecture .arch-caption .ac-dim { color: var(--dark-ink-300); }

/* ═══════════════════════════════════════════════════════════════════
   LATTICE REFINEMENT — New Sections & Components
   ═══════════════════════════════════════════════════════════════════ */

/* ── Nav Dropdown (Solutions) ─────────────────────────────────────── */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-drop-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  color: var(--ink-600); letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 4px;
  transition: color .2s;
}
.nav-drop-btn:hover { color: var(--ink-900); }
.drop-arrow { font-size: 10px; opacity: 0.6; transition: transform .2s; }
.nav-dropdown:hover .drop-arrow,
.nav-dropdown:focus-within .drop-arrow { transform: rotate(180deg); }
.nav-drop-menu {
  display: none; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px; padding-top: 22px; min-width: 260px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 200;
}
/* Invisible bridge fills the gap between button and menu so diagonal mouse movement doesn't dismiss it */
.nav-drop-menu::before {
  content: ''; position: absolute; top: -14px; left: 0; right: 0; height: 14px;
}
.nav-dropdown:hover .nav-drop-menu,
.nav-dropdown:focus-within .nav-drop-menu { display: flex; flex-direction: column; gap: 4px; }
.ndm-group { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.ndm-group:last-child { border-bottom: none; padding-bottom: 0; }
.ndm-label {
  display: block; font-family: var(--mono); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-400);
  padding: 4px 10px 6px; font-weight: 600;
}
.nav-drop-menu a {
  display: block; padding: 7px 10px; border-radius: 8px;
  font-size: 13.5px; color: var(--ink-700); font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-drop-menu a:hover { background: var(--surface-2, rgba(0,0,0,0.04)); color: var(--ink-900); }
.ndm-future-item {
  display: block; padding: 6px 10px; font-size: 13px;
  color: var(--ink-400); font-style: italic;
}

/* ── Convergence Section ──────────────────────────────────────────── */
.convergence-sec { padding-block: clamp(64px,8vh,100px); }
.convergence-grid { margin-top: clamp(40px,5vh,60px); display: flex; flex-direction: column; align-items: center; gap: 24px; }
.conv-apps { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.conv-app-item {
  padding: 10px 20px; border: 1px solid var(--line); border-radius: 100px;
  font-size: 14px; font-weight: 500; color: var(--ink-700);
  background: var(--surface); transition: border-color .2s, color .2s;
}
.conv-app-item:hover { border-color: var(--accent); color: var(--ink-900); }
.conv-future { border-style: dashed; color: var(--ink-400); }
.conv-arrow { font-size: 22px; color: var(--ink-400); text-align: center; }
.conv-lattice {
  width: 100%; max-width: 680px; border: 1px solid var(--line);
  border-radius: 20px; padding: 32px; background: var(--surface); text-align: center;
}
.conv-lat-title {
  font-size: clamp(24px,3.5vw,36px); font-weight: 800;
  letter-spacing: -0.04em; margin-bottom: 24px; color: var(--ink-900);
}
.conv-pillars { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
@media (max-width: 600px) { .conv-pillars { grid-template-columns: repeat(2,1fr); } }
.conv-pillar {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 12px;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  background: rgba(0,0,0,0.02); position: relative; overflow: hidden;
}
.conv-pillar::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--lc);
}
.cp-verb { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink-900); }
.cp-name { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-400); }
.conv-msg { font-size: clamp(17px,2.2vw,22px); font-weight: 500; color: var(--ink-700); }
.conv-msg .alt { color: var(--accent); font-weight: 600; }

/* ── Outcomes Section ─────────────────────────────────────────────── */
.outcomes-sec { padding-block: clamp(64px,8vh,100px); background: var(--surface); }
.outcomes-grid {
  margin-top: clamp(40px,5vh,60px);
  display: grid; grid-template-columns: repeat(3,1fr); gap: 20px;
}
@media (max-width: 900px) { .outcomes-grid { grid-template-columns: 1fr; } }
.outcome-card {
  border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px;
  background: var(--bg); display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.outcome-card:hover { border-color: var(--accent); box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.oc-vertical {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
}
.oc-headline { font-size: clamp(18px,2vw,22px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; color: var(--ink-900); margin: 0; }
.oc-body { font-size: 14.5px; color: var(--ink-500); line-height: 1.55; margin: 0; flex: 1; }
.oc-products { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.oc-tag {
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 100px;
  font-size: 12.5px; color: var(--ink-600); font-weight: 500;
  text-decoration: none; transition: border-color .2s, color .2s;
}
.oc-tag:hover { border-color: var(--accent); color: var(--accent); }
.oc-future { color: var(--ink-400); border-style: dashed; cursor: default; }
.oc-future:hover { border-color: var(--line); color: var(--ink-400); }

/* ── Industry Tree Section ────────────────────────────────────────── */
.industry-sec { padding-block: clamp(64px,8vh,100px); }
.industry-tree { margin-top: clamp(40px,5vh,60px); display: flex; flex-direction: column; align-items: center; gap: 0; }
.it-root {
  font-size: clamp(22px,3vw,32px); font-weight: 800; letter-spacing: -0.04em;
  padding: 16px 40px; border: 2px solid var(--accent); border-radius: 100px;
  color: var(--ink-900); background: var(--surface); position: relative; z-index: 1;
}
.it-root::after {
  content: ''; position: absolute; left: 50%; top: 100%;
  width: 2px; height: 32px; background: var(--line); transform: translateX(-50%);
}
.it-branches { display: flex; gap: 20px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }
.it-branch { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 160px; }
.it-vertical {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-500); font-weight: 600;
  padding: 6px 16px; border: 1px solid var(--line); border-radius: 100px;
  background: var(--surface);
}
.it-future .it-vertical { color: var(--ink-400); border-style: dashed; }
.it-leaves { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.it-leaf {
  padding: 8px 18px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 13.5px; color: var(--ink-700); font-weight: 500;
  text-decoration: none; background: var(--bg);
  transition: border-color .2s, color .2s;
}
.it-leaf:hover { border-color: var(--accent); color: var(--accent); }
.it-leaf-future { color: var(--ink-400); border-style: dashed; cursor: default; }
.it-leaf-future:hover { border-color: var(--line); color: var(--ink-400); }

/* ── Agent Commerce Message ───────────────────────────────────────── */
.agent-commerce-msg strong { color: var(--ink-900); }

/* ── Architecture Positioning Statement ──────────────────────────── */
.arch-positioning h3 { color: var(--on-dark); }
.arch-positioning p { color: var(--dark-ink-300); }
