/* ============================================================
   ARIA Portfolio — diagrams, hero, mobile nav, page-specific
   ============================================================ */

/* ---------- Mobile nav panel ---------- */
.nav-toggle {
  display: none; margin-left: auto; width: 38px; height: 38px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer;
  flex-direction: column; gap: 4px; align-items: center; justify-content: center;
}
.nav-toggle span { width: 16px; height: 1.6px; background: var(--ink-2); transition: .2s; display: block; }
.nav-toggle.open span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }
.mobile-panel {
  display: none; position: fixed; inset: 62px 0 auto 0; z-index: 79;
  background: rgba(11,12,14,0.97); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); padding: 14px 24px 22px;
  flex-direction: column; gap: 2px;
  transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .22s var(--ease);
}
.mobile-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.mobile-panel a { padding: 12px 8px; color: var(--ink-2); font-size: 15px; border-bottom: 1px solid var(--line); }
.mobile-panel a:last-child { border-bottom: 0; }
@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .mobile-panel { display: flex; }
  .nav-cta.desk { display: none; }
}

/* ============================================================
   SIGNATURE FLOW DIAGRAM  (vertical box-and-arrow, animated)
   ============================================================ */
.flow {
  display: flex; flex-direction: column; align-items: stretch; gap: 0;
  position: relative; counter-reset: fl;
}
.fnode {
  position: relative; z-index: 2;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 16px 20px; transition: border-color .45s var(--ease), box-shadow .45s var(--ease), background .45s;
}
.fnode + .fnode { margin-top: 34px; }
/* connector line + arrowhead between nodes */
.fnode:not(:last-child)::after {
  content: ""; position: absolute; left: 50%; bottom: -34px; width: 1.5px; height: 34px;
  background: linear-gradient(var(--line-strong), var(--line)); transform: translateX(-50%); z-index: 1;
}
.fnode:not(:last-child)::before {
  content: ""; position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%) rotate(45deg);
  width: 7px; height: 7px; border-right: 1.5px solid var(--line-strong); border-bottom: 1.5px solid var(--line-strong);
  z-index: 3;
}
.fnode .ftop { display: flex; align-items: center; gap: 12px; }
.fnode .fidx {
  font-family: var(--mono); font-size: 11px; color: var(--ink-4); flex: none;
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line);
  display: grid; place-items: center; transition: .45s;
}
.fnode .ftitle { font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; }
.fnode .fsub { color: var(--ink-3); font-size: 13px; margin-top: 7px; padding-left: 34px; }
.fnode .fchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; padding-left: 34px; }
.fnode .fchips span {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px; background: var(--bg-2);
}
/* active pulse */
.fnode.pulse {
  border-color: var(--green-line);
  box-shadow: 0 0 0 1px var(--green-dim), 0 0 36px -8px rgba(62,207,142,0.45);
  background: linear-gradient(180deg, rgba(62,207,142,0.06), var(--panel));
}
.fnode.pulse .fidx { border-color: var(--green-line); color: var(--green); }
/* traveling dot on the connector */
.fnode.pulse:not(:last-child)::after {
  background: linear-gradient(var(--green), var(--line));
}
.fnode .accent { color: var(--green); }
.fnode .accent-b { color: var(--blue); }

/* layered / branching node (multiple boxes in a row) */
.frow { display: flex; gap: 12px; }
.frow .fnode { flex: 1; margin-top: 0; }
.frow .fnode::after, .frow .fnode::before { display: none; }
.flow .fbranch { position: relative; }
.flow .fbranch:not(:last-child) { margin-bottom: 34px; }
.flow .fbranch:not(:last-child)::after {
  content: ""; position: absolute; left: 50%; bottom: -34px; width: 1.5px; height: 34px;
  background: var(--line-strong); transform: translateX(-50%);
}

/* horizontal diagram (for wide layouts) */
.flow-h { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.flow-h .fnode { flex: 1; min-width: 150px; }
.flow-h .fnode + .fnode { margin-top: 0; margin-left: 30px; }
.flow-h .fnode:not(:last-child)::after { left: auto; right: -30px; bottom: 50%; top: 50%; width: 30px; height: 1.5px; transform: translateY(-50%); }
.flow-h .fnode:not(:last-child)::before { left: auto; right: -8px; bottom: 50%; transform: translateY(50%) rotate(-45deg); }
@media (max-width: 720px){ .flow-h { flex-direction: column; } .flow-h .fnode + .fnode { margin-left: 0; margin-top: 34px; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 64px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
@media (max-width: 940px){ .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.hero h1 {
  font-size: clamp(38px, 5vw, 62px); line-height: 1.04; letter-spacing: -0.02em; margin: 24px 0 0;
  font-weight: 400; font-family: var(--serif);
}
.hero h1 .hl { color: var(--lamp); font-style: italic; font-weight: 400; }
.hero .sub { color: var(--ink-2); font-size: 19px; line-height: 1.6; margin-top: 24px; max-width: 540px; }
.hero .cta-row { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero .chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; max-width: 560px; }
.hero .chips-row .pc {
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 7px; padding: 6px 11px; background: var(--panel);
  display: flex; align-items: center; gap: 7px; transition: .2s;
}
.hero .chips-row .pc:hover { border-color: var(--green-line); color: var(--ink); }
.hero .chips-row .pc::before { content:""; width:5px; height:5px; border-radius:50%; background: var(--green); }

/* hero side diagram card */
.hero-diagram {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 24px; box-shadow: var(--shadow-lg); position: relative;
}
.hero-diagram .hd-bar {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em;
}

/* ---------- Logo strip / thesis ---------- */
.thesis-band {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-2); padding: 40px 0;
}
.thesis-line {
  font-size: clamp(20px, 2.6vw, 28px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.4;
  color: var(--ink-2); max-width: 920px;
}
.thesis-line b { color: var(--ink); font-weight: 600; }
.thesis-line .g { color: var(--green); }
.thesis-line .b { color: var(--blue); }

/* ---------- Mock surface (screenshot placeholder) ---------- */
.surface {
  border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-2); box-shadow: var(--shadow-lg);
}
.surface-bar {
  display: flex; align-items: center; gap: 8px; padding: 11px 16px;
  background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.surface-bar .dots { display: flex; gap: 6px; }
.surface-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); display:block; }
.surface-bar .url {
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-4); margin: 0 auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 14px;
}
.surface-body { position: relative; }
.surface .placeholder-note {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--ink-4); font-family: var(--mono); font-size: 12px; text-align: center; padding: 24px;
  background: repeating-linear-gradient(135deg, transparent, transparent 12px, rgba(255,255,255,0.012) 12px, rgba(255,255,255,0.012) 24px);
}
.surface .placeholder-note svg { opacity: .5; }

/* callout label on screenshots */
.callout {
  position: absolute; font-family: var(--mono); font-size: 11px; color: var(--green);
  background: rgba(11,12,14,0.92); border: 1px solid var(--green-line); border-radius: 6px;
  padding: 5px 9px; display: flex; align-items: center; gap: 6px; box-shadow: var(--shadow);
}
.callout::before { content:""; width:5px; height:5px; border-radius:50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* ---------- Page hero (interior) ---------- */
.phero { padding: 64px 0 36px; border-bottom: 1px solid var(--line); position: relative; }
.phero .kicker { display:flex; align-items:center; gap:12px; flex-wrap: wrap; }
.phero h1 { font-size: clamp(34px, 5.2vw, 58px); margin-top: 22px; max-width: 940px; font-weight: 400; letter-spacing: -0.018em; }
.phero .sub { color: var(--ink-2); font-size: 18px; margin-top: 18px; max-width: 720px; line-height: 1.6; }
.crumbs { font-family: var(--mono); font-size: 12px; color: var(--ink-4); display:flex; gap:8px; align-items:center; }
.crumbs a:hover { color: var(--ink-2); }
.crumbs .sep { color: var(--line-strong); }

/* two-col case study layout */
.case-grid { display:grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; }
@media (max-width: 940px){ .case-grid { grid-template-columns: 1fr; } }
.case-aside { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.aside-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 18px; }
.aside-card h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; font-weight: 500; }
.aside-card .row { display:flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 7px 0; border-top: 1px solid var(--line); }
.aside-card .row:first-of-type { border-top: 0; }
.aside-card .row .k { color: var(--ink-3); }
.aside-card .row .v { color: var(--ink); text-align: right; font-family: var(--mono); font-size: 12px; }

.case-section { margin-bottom: 52px; }
.case-section > h3 { font-size: 22px; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.case-section > h3 .n { font-family: var(--mono); font-size: 13px; color: var(--green); }
.case-section p { color: var(--ink-2); font-size: 16px; line-height: 1.7; margin-bottom: 14px; }
.case-section p b { color: var(--ink); font-weight: 600; }

/* problem/solution pair */
.ps-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px){ .ps-pair { grid-template-columns: 1fr; } }
.ps-card { border:1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--bg-2); }
.ps-card.prob { border-left: 2px solid var(--amber-line); }
.ps-card.soln { border-left: 2px solid var(--green-line); }
.ps-card h5 { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 10px; }
.ps-card.prob h5 { color: var(--amber); }
.ps-card.soln h5 { color: var(--green); }
.ps-card p { font-size: 14.5px; color: var(--ink-2); margin: 0; line-height: 1.65; }

/* big section index number watermark */
.section-wm { position: relative; }

/* ============================================================
   PROOF MATRIX TABLE
   ============================================================ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 26px; }
.filter-bar .fb-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); margin-right: 6px; }
.fb-btn {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.04em;
  padding: 7px 13px; border-radius: 7px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink-2); cursor: pointer; transition: .16s; display:flex; align-items:center; gap:7px;
}
.fb-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.fb-btn.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fb-btn .swatch { width:7px; height:7px; border-radius:50%; }

.matrix-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); }
.matrix { width: 100%; border-collapse: collapse; font-size: 14px; }
.matrix thead th {
  text-align: left; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3); padding: 14px 18px; background: var(--panel-2);
  border-bottom: 1px solid var(--line-2); position: sticky; top: 62px; backdrop-filter: blur(8px);
}
.matrix tbody td { padding: 18px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.matrix tbody tr:last-child td { border-bottom: 0; }
.matrix tbody tr { transition: background .15s; }
.matrix tbody tr:hover { background: var(--panel-2); }
.matrix .sys { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.matrix .sys small { display:block; font-weight:400; color: var(--ink-4); font-family: var(--mono); font-size: 11px; margin-top: 4px; }
.matrix .proves { color: var(--ink-2); }
.matrix .locked { color: var(--ink-3); font-size: 13px; }
.matrix .locked .lk { display:inline-flex; align-items:center; gap:5px; color: var(--amber); font-family: var(--mono); font-size: 11px; margin-bottom: 3px; }
.matrix .art { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.matrix col.c-sys { width: 21%; }
.matrix col.c-tier { width: 13%; }
.matrix col.c-art { width: 15%; }
@media (max-width: 860px){
  .matrix, .matrix thead, .matrix tbody, .matrix th, .matrix td, .matrix tr { display:block; }
  .matrix thead { display:none; }
  .matrix tbody td { border-bottom:0; padding: 4px 18px; }
  .matrix tbody tr { border-bottom: 1px solid var(--line-2); padding: 12px 0; }
  .matrix tbody td:first-child { padding-top: 14px; }
  .matrix tbody td:last-child { padding-bottom: 14px; }
}

/* operator decision card */
.decision { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.decision .dhead { padding: 16px 18px; border-bottom: 1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.decision .dhead h4 { font-size: 16px; }
.decision .dbody { padding: 6px 18px 16px; }
.decision .drow { display:flex; gap:12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.decision .drow:first-child { border-top:0; }
.decision .drow .k { flex:none; width: 110px; color: var(--ink-3); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding-top:2px; }
.decision .drow .v { color: var(--ink-2); }

/* red-green QA card */
.rg { display:grid; grid-template-columns: 1fr 1fr; gap:0; border:1px solid var(--line); border-radius: var(--radius); overflow:hidden; }
.rg .cell { padding: 18px; }
.rg .cell.red { border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(226,80,80,0.05), transparent); }
.rg .cell.green { background: linear-gradient(180deg, rgba(62,207,142,0.05), transparent); }
.rg .cell h5 { font-family: var(--mono); font-size: 11px; letter-spacing:.08em; text-transform:uppercase; margin:0 0 10px; display:flex; align-items:center; gap:7px; }
.rg .cell.red h5 { color:#e57373; }
.rg .cell.green h5 { color: var(--green); }
.rg .cell p { font-size:13.5px; color:var(--ink-2); margin:0; line-height:1.6; }
.rg .cell .mono { display:block; margin-top:10px; font-size:12px; color:var(--ink-3); }
@media (max-width:560px){ .rg { grid-template-columns:1fr; } .rg .cell.red { border-right:0; border-bottom:1px solid var(--line); } }

/* source lane card */
.lane { border:1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 16px 18px; }
.lane .lhead { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.lane .lhead .dom { font-family: var(--mono); font-size:13px; color: var(--ink); }
.lane .lrow { display:flex; justify-content:space-between; font-size:13px; padding:6px 0; border-top:1px solid var(--line); }
.lane .lrow .k { color: var(--ink-4); font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
.lane .lrow .v { color: var(--ink-2); }

/* ============================================================
   FORMS (proof room)
   ============================================================ */
.field { margin-bottom: 18px; }
.field label { display:block; font-size:13px; color: var(--ink-2); margin-bottom: 7px; font-weight: 500; }
.field label .req { color: var(--green); }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--sans); font-size: 14.5px; color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 9px;
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s; outline: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--green-line); box-shadow: 0 0 0 3px var(--green-dim);
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.field.err input, .field.err textarea, .field.err select { border-color: #e57373; box-shadow: 0 0 0 3px rgba(229,115,115,.12); }
.field .errmsg { color: #e57373; font-size: 12px; margin-top: 6px; display:none; font-family: var(--mono); }
.field.err .errmsg { display: block; }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:560px){ .field-row { grid-template-columns:1fr; } }

.seg { display:flex; flex-wrap:wrap; gap:8px; }
.seg .opt {
  font-size: 13px; padding: 9px 13px; border-radius: 8px; border:1px solid var(--line-2);
  background: var(--bg-2); color: var(--ink-2); cursor:pointer; transition:.15s; user-select:none;
}
.seg .opt:hover { border-color: var(--line-strong); color: var(--ink); }
.seg .opt.sel { background: var(--green-dim); border-color: var(--green-line); color: var(--green); }

.check { display:flex; gap:10px; align-items:flex-start; cursor:pointer; font-size:13.5px; color:var(--ink-2); line-height:1.5; }
.check input { width:18px; height:18px; margin-top:1px; accent-color: var(--green); flex:none; }

.form-success {
  display:none; text-align:center; padding: 40px 24px;
}
.form-success.show { display:block; }
.form-success .ok-mark {
  width:56px; height:56px; border-radius:50%; background: var(--green-dim); border:1px solid var(--green-line);
  display:grid; place-items:center; margin: 0 auto 18px; color: var(--green); font-size: 26px;
}
.proofroom-card { border:1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); padding: 30px; }

.inside-item { display:flex; gap:14px; padding: 16px 0; border-top: 1px solid var(--line); }
.inside-item:first-child { border-top: 0; }
.inside-item .ico { flex:none; width:36px; height:36px; border-radius:9px; border:1px solid var(--line-2); background: var(--bg-2); display:grid; place-items:center; color: var(--green); }
.inside-item h4 { font-size:15px; margin-bottom:3px; }
.inside-item p { font-size:13px; color: var(--ink-3); line-height:1.55; }

/* Owner directive 2026-06-04: remove every status-dot / online-indicator tell */
.hero .chips-row .pc::before { display: none !important; }
.surface-bar .dots { display: none !important; }
.callout::before { display: none !important; }
.fb-btn .swatch { border-radius: 2px !important; }
.proofroom-card .ok-mark, .form-success .ok-mark { border-radius: 10px !important; }
