/* ══════════════════════════════════════════════════════════════════════
   Figure — "four landlords, one deed": the four platforms that lend you
   reach, wired into the one address you own.

   This lives INSIDE the site, in the #digital-presence section, where a
   flat four-box graphic used to sit. Everything here is scoped under
   .presence-figure so the figure's palette and type never leak into the
   rest of the page — the site owns :root, this file owns the panel.

   Layout is driven by container queries, not viewport width, because the
   figure's column is narrower than the window. Base styles are the
   single-column stack; wider containers upgrade to the corner layout.
   ══════════════════════════════════════════════════════════════════ */

/* The old graphic sat in the right-hand column of a two-column section.
   This figure is a landscape diagram and needs the full measure, so the
   section stacks: copy first, figure below, manifesto last (as before). */
.section.presence {
  grid-template-columns: 1fr;
  /* the section's own 7vw gap was tuned for two columns side by side;
     stacked, it needs a tighter rhythm */
  row-gap: clamp(44px, 5vw, 72px);
}
.section.presence > .presence-copy {
  max-width: 820px;
}

/* ───────────────────────────── the panel ───────────────────────────── */

.presence-figure {
  /* scoped tokens — deliberately NOT on :root, the site uses those names */
  --cf-ink:       #070c17;
  --cf-ink-2:     #0a1020;
  --cf-slab:      #0d1424;
  --cf-slab-2:    #111a2d;
  --cf-line:      rgba(150, 178, 224, 0.10);
  --cf-line-2:    rgba(150, 178, 224, 0.18);
  --cf-gold:      #d8a83c;
  --cf-gold-lit:  #f0cd7c;
  --cf-gold-dim:  rgba(216, 168, 60, 0.34);
  --cf-parchment: #e8e2d3;
  --cf-muted:     #8d9bb4;
  --cf-muted-2:   #66738b;

  --cf-display: "Bodoni Moda", Didot, "Times New Roman", serif;
  --cf-ui:      var(--sans, "Segoe UI Variable", "Segoe UI", Helvetica, Arial, sans-serif);
  --cf-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  container-type: inline-size;
  container-name: presence-figure;

  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 60px) clamp(18px, 3.6vw, 54px) clamp(28px, 3.4vw, 46px);

  font-family: var(--cf-ui);
  color: var(--cf-parchment);
  background-color: var(--cf-ink);
  /* blueprint grid + pools of light behind the plate */
  background-image:
    radial-gradient(120% 80% at 50% 52%, rgba(216, 168, 60, 0.075), transparent 62%),
    radial-gradient(90% 70% at 88% 4%,  rgba(76, 95, 213, 0.10),  transparent 60%),
    radial-gradient(80% 60% at 6% 96%,  rgba(66, 133, 244, 0.07), transparent 60%),
    linear-gradient(to right,  var(--cf-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--cf-line) 1px, transparent 1px),
    linear-gradient(180deg, var(--cf-ink-2), var(--cf-ink) 70%);
  background-size: auto, auto, auto, 46px 46px, 46px 46px, auto;
}

/* the site resets headings to inherit; re-neutralise them here so the
   page-level h2 scale (clamp(3.1rem, …)) can never reach inside */
.presence-figure h2,
.presence-figure h3 {
  font: inherit;
  margin: 0;
  letter-spacing: normal;
  line-height: 1.2;
}

/* fine film grain + vignette, held inside the panel */
.presence-figure .grain {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.3;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.presence-figure .grain::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(115% 90% at 50% 45%, transparent 54%, rgba(3, 6, 12, 0.62));
}

.presence-figure .sprite {
  position: absolute;
  width: 0;
  height: 0;
}

/* ──────────────────────────── the diagram ──────────────────────────── */

/* base: single column — every node, then the rail, then the plate */
.presence-figure .diagram {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(6, auto);
  column-gap: 12px;
  row-gap: 14px;
  align-items: center;
}

.presence-figure .wires {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

/* ── platform nodes ── */

.presence-figure .node {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 100%;
  padding: 11px 15px 11px 12px;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--brand) 9%, var(--cf-slab)), var(--cf-slab-2) 78%);
  border: 1px solid var(--cf-line-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 18px 34px -22px rgba(0, 0, 0, 0.9);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.45s ease, box-shadow 0.45s ease;
  animation: cf-settle 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.presence-figure .node[data-corner="tl"] { grid-area: 1 / 1; animation-delay: 0.05s; }
.presence-figure .node[data-corner="tr"] { grid-area: 2 / 1; animation-delay: 0.14s; }
.presence-figure .node[data-corner="bl"] { grid-area: 3 / 1; animation-delay: 0.23s; }
.presence-figure .node[data-corner="br"] { grid-area: 4 / 1; animation-delay: 0.32s; }

.presence-figure .node:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 46%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 22px 42px -20px rgba(0, 0, 0, 0.95),
    0 0 0 1px color-mix(in srgb, var(--brand) 16%, transparent);
}

.presence-figure .node__chip {
  flex: none;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  box-shadow: inset 0 0 18px -6px color-mix(in srgb, var(--brand) 55%, transparent);
}
.presence-figure .node__glyph {
  width: 17px;
  height: 17px;
  filter: saturate(0.92) drop-shadow(0 0 9px color-mix(in srgb, var(--brand) 45%, transparent));
  transition: filter 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.presence-figure .node:hover .node__glyph {
  filter: saturate(1.12) drop-shadow(0 0 13px color-mix(in srgb, var(--brand) 72%, transparent));
  transform: scale(1.07);
}

.presence-figure .node__text h3 {
  margin: 0 0 3px;
  font-family: var(--cf-ui);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: #eae4d6;
}
.presence-figure .node__text p {
  margin: 0;
  font-family: var(--cf-mono);
  font-size: 9.5px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--cf-muted-2);
  transition: color 0.45s ease;
}
.presence-figure .node:hover .node__text p { color: var(--cf-muted); }

/* hairline tick where the wire leaves the card — corner layout only */
.presence-figure .node__tick {
  display: none;
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid color-mix(in srgb, var(--brand) 55%, transparent);
  background: var(--cf-ink);
  transform: rotate(45deg);
}

/* ── the rail: stand-in for the wires when they are hidden ── */

.presence-figure .rail {
  display: block;
  grid-area: 5 / 1;
  justify-self: center;
  width: 1px;
  height: clamp(38px, 9vw, 62px);
  background: repeating-linear-gradient(180deg, var(--cf-gold-dim) 0 4px, transparent 4px 9px);
}

/* ── the plate (hub) ── */

.presence-figure .hub {
  grid-area: 6 / 1;
  justify-self: center;
  width: 100%;
  max-width: 430px;
  z-index: 3;
  animation: cf-settle 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.42s both;
}

.presence-figure .plate {
  position: relative;
  padding: 11px 11px 15px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(216, 168, 60, 0.09), transparent 58%),
    repeating-conic-gradient(from 0deg at 50% 40%,
      rgba(216, 168, 60, 0.045) 0deg 1.2deg, transparent 1.2deg 6deg),
    linear-gradient(180deg, #0e1526, #0a101e);
  border: 1px solid var(--cf-gold-dim);
  box-shadow:
    inset 0 0 0 1px rgba(216, 168, 60, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 40px 80px -40px rgba(0, 0, 0, 1),
    0 0 90px -46px rgba(216, 168, 60, 0.5);
}

/* engraved corner ticks */
.presence-figure .plate__corner {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 1px solid var(--cf-gold);
  opacity: 0.75;
}
.presence-figure .plate__corner--tl { top: -1px;    left: -1px;  border-right: 0; border-bottom: 0; }
.presence-figure .plate__corner--tr { top: -1px;    right: -1px; border-left: 0;  border-bottom: 0; }
.presence-figure .plate__corner--bl { bottom: -1px; left: -1px;  border-right: 0; border-top: 0; }
.presence-figure .plate__corner--br { bottom: -1px; right: -1px; border-left: 0;  border-top: 0; }

/* ── the miniature website ── */

.presence-figure .browser {
  background: linear-gradient(180deg, #fbf8f1, #f4efe4);
  border: 1px solid rgba(216, 168, 60, 0.42);
  box-shadow: 0 18px 34px -20px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.presence-figure .browser__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  background: linear-gradient(180deg, #e7e0d1, #ded6c5);
  border-bottom: 1px solid rgba(24, 30, 45, 0.14);
}
.presence-figure .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.presence-figure .dot--a { background: #c96a5c; }
.presence-figure .dot--b { background: #cfa04e; }
.presence-figure .dot--c { background: #7f9a72; }

.presence-figure .browser__url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 5px;
  padding: 3px 8px;
  background: #f7f3ea;
  border: 1px solid rgba(24, 30, 45, 0.12);
  border-radius: 999px;
  font-family: var(--cf-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: #4d5566;
}
.presence-figure .lock { width: 7px; height: 7px; flex: none; color: #7f8a5f; }

.presence-figure .browser__live {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--cf-gold);
  box-shadow: 0 0 0 3px rgba(216, 168, 60, 0.2);
  animation: cf-beat 2.6s ease-in-out infinite;
}

.presence-figure .browser__page {
  padding: 10px 11px 11px;
  color: #22293a;
}

.presence-figure .mini-nav {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(24, 30, 45, 0.10);
}
.presence-figure .mini-mark {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  flex: none;
  background: #1d2434;
  color: var(--cf-gold-lit);
  font-family: var(--cf-display);
  font-size: 10px;
  line-height: 1;
  padding-top: 1px;
}
.presence-figure .mini-nav ul {
  display: flex;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5c6579;
}
.presence-figure .mini-cta {
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid rgba(216, 168, 60, 0.75);
  background: rgba(216, 168, 60, 0.14);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b5312;
}

/* hero + sidebar, so the little page reads like a real one */
.presence-figure .mini-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px 0 11px;
}

.presence-figure .mini-kicker {
  margin: 0 0 5px;
  font-family: var(--cf-mono);
  font-size: 7px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #97764f;
}
.presence-figure .mini-hero h3 {
  margin: 0 0 7px;
  font-family: var(--cf-display);
  font-weight: 500;
  font-size: 21px;
  line-height: 0.97;
  letter-spacing: -0.02em;
  color: #171d2b;
}
.presence-figure .mini-hero h3 em {
  font-style: italic;
  font-weight: 400;
  color: #8a6a24;
}
.presence-figure .mini-copy {
  margin: 0 0 10px;
  font-size: 7.5px;
  line-height: 1.6;
  color: #5b6479;
}
.presence-figure .mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  background: #1d2434;
  color: #f2ead8;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.presence-figure .mini-btn b { color: var(--cf-gold-lit); font-weight: 600; }

.presence-figure .mini-side {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  padding-top: 9px;
  border-left: 0;
  border-top: 1px solid rgba(24, 30, 45, 0.10);
}
.presence-figure .mini-side__label {
  margin: 0 0 6px;
  font-family: var(--cf-mono);
  font-size: 6.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #97764f;
}
.presence-figure .mini-side ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 7.5px;
  line-height: 1.35;
  color: #3d465a;
}
.presence-figure .mini-side li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(24, 30, 45, 0.08);
}
.presence-figure .mini-side li span {
  font-family: var(--cf-mono);
  font-size: 6px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8e97a9;
}
.presence-figure .mini-seal {
  display: none;
  margin-top: auto;
  padding-top: 9px;
  color: #b18f45;
  align-self: flex-end;
}
.presence-figure .mini-seal svg { display: block; width: 21px; height: 21px; }

.presence-figure .mini-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 0 9px;
  border-top: 1px solid rgba(24, 30, 45, 0.10);
}
.presence-figure .mini-card {
  margin: 0;
  padding: 6px 6px 5px;
  background: #1d2434;
  border: 1px solid rgba(216, 168, 60, 0.22);
}
.presence-figure .mini-card svg { display: block; width: 100%; height: 15px; }
.presence-figure .mini-card figcaption {
  margin-top: 5px;
  font-family: var(--cf-mono);
  font-size: 6.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #9aa4b8;
}

.presence-figure .mini-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid rgba(24, 30, 45, 0.10);
  font-family: var(--cf-mono);
  font-size: 6.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7b8496;
}
.presence-figure .mini-foot i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(216, 168, 60, 0.5), transparent);
}

/* ── plate caption ── */

.presence-figure .plate__caption {
  margin-top: 13px;
  padding-top: 12px;
  text-align: center;
  border-top: 1px solid rgba(216, 168, 60, 0.22);
}
.presence-figure .plate__caption h3 {
  margin: 0 0 5px;
  font-family: var(--cf-display);
  font-weight: 500;
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0.005em;
  text-transform: none;
  color: #f6f1e5;
}
.presence-figure .plate__caption p {
  margin: 0;
  font-family: var(--cf-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cf-gold);
}

/* ───────────────────────────── legend ───────────────────────────── */

.presence-figure .legend {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  margin-top: clamp(24px, 3vw, 34px);
  padding-top: clamp(16px, 2.2vw, 24px);
  border-top: 1px solid var(--cf-line);
}
.presence-figure .legend p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--cf-mono);
  font-size: 9.5px;
  line-height: 1.4;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cf-muted-2);
}
.presence-figure .key { width: 34px; height: 1px; flex: none; }
.presence-figure .key--dashed {
  background: repeating-linear-gradient(90deg, var(--cf-muted-2) 0 4px, transparent 4px 8px);
}
.presence-figure .key--solid {
  height: 2px;
  background: linear-gradient(90deg, var(--cf-gold), var(--cf-gold-lit));
}

/* ───────────────────────────── the wires ───────────────────────────── */

/* paths are injected by figure.js */
.presence-figure .wire {
  fill: none;
  stroke-width: 1;
  stroke-dasharray: 3 6;
  opacity: 0.6;
  transition: opacity 0.45s ease, stroke-width 0.45s ease;
}
.presence-figure .pulse {
  fill: none;
  stroke: var(--cf-gold-lit);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 5 195;
  animation: cf-flow 5.4s linear infinite;
  opacity: 0.85;
}
.presence-figure .wire-group[data-active="true"] .wire  { opacity: 1; stroke-width: 1.4; }
.presence-figure .wire-group[data-active="true"] .pulse { animation-duration: 1.9s; }

@keyframes cf-settle {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cf-beat {
  0%, 100% { opacity: 1;    box-shadow: 0 0 0 3px rgba(216, 168, 60, 0.2); }
  50%      { opacity: 0.55; box-shadow: 0 0 0 5px rgba(216, 168, 60, 0.05); }
}
@keyframes cf-flow {
  from { stroke-dashoffset: 200; }
  to   { stroke-dashoffset: 0; }
}

/* ──────────────────────── container upgrades ──────────────────────── */

/* two-up nodes above the plate */
@container presence-figure (min-width: 560px) {
  .presence-figure .diagram {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    row-gap: 14px;
  }
  .presence-figure .node[data-corner="tl"] { grid-area: 1 / 1; }
  .presence-figure .node[data-corner="tr"] { grid-area: 1 / 2; }
  .presence-figure .node[data-corner="bl"] { grid-area: 2 / 1; }
  .presence-figure .node[data-corner="br"] { grid-area: 2 / 2; }
  .presence-figure .rail { grid-area: 3 / 1 / span 1 / span 2; }
  .presence-figure .hub  { grid-area: 4 / 1 / span 1 / span 2; }

  .presence-figure .plate        { padding: 14px 14px 17px; }
  .presence-figure .browser__page { padding: 11px 14px 12px; }
  .presence-figure .mini-body {
    grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
    gap: 12px;
  }
  .presence-figure .mini-side {
    padding-left: 11px;
    padding-top: 0;
    border-left: 1px solid rgba(24, 30, 45, 0.10);
    border-top: 0;
  }
  .presence-figure .mini-seal { display: block; }
  .presence-figure .mini-hero h3 { font-size: 22px; }
}

/* the full plan: platforms at the corners, wires drawn to the plate */
@container presence-figure (min-width: 860px) {
  .presence-figure .diagram {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 1.1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: clamp(16px, 3.5cqi, 48px);
    row-gap: clamp(36px, 6cqi, 80px);
  }
  .presence-figure .wires { display: block; }
  .presence-figure .rail  { display: none; }

  .presence-figure .node { width: max-content; }
  .presence-figure .node[data-corner="tl"] { grid-area: 1 / 1; justify-self: start; }
  .presence-figure .node[data-corner="tr"] { grid-area: 1 / 3; justify-self: end; }
  .presence-figure .node[data-corner="bl"] { grid-area: 2 / 1; justify-self: start; }
  .presence-figure .node[data-corner="br"] { grid-area: 2 / 3; justify-self: end; }

  .presence-figure .node__tick { display: block; }
  .presence-figure .node[data-corner="tl"] .node__tick { right: -4px; bottom: -4px; }
  .presence-figure .node[data-corner="tr"] .node__tick { left: -4px;  bottom: -4px; }
  .presence-figure .node[data-corner="bl"] .node__tick { right: -4px; top: -4px; }
  .presence-figure .node[data-corner="br"] .node__tick { left: -4px;  top: -4px; }

  .presence-figure .hub { grid-area: 1 / 2 / span 2 / span 1; }
  .presence-figure .mini-hero h3 { font-size: 24px; }
}

/* room to breathe: the node cards at their designed size */
@container presence-figure (min-width: 1060px) {
  .presence-figure .node       { gap: 13px; padding: 13px 20px 13px 15px; }
  .presence-figure .node__chip { width: 38px; height: 38px; }
  .presence-figure .node__glyph { width: 19px; height: 19px; }
  .presence-figure .node__text p { font-size: 10.5px; }
  .presence-figure .plate__caption h3 { font-size: 28px; }
}

/* ───────────────────────────── motion ───────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .presence-figure .node,
  .presence-figure .hub { animation: none; }
  .presence-figure .pulse,
  .presence-figure .browser__live { animation: none; }
  .presence-figure .pulse { opacity: 0; }
  .presence-figure .node { transition: none; }
}
