/* Convergency Studios — site styles (dark, onyx-gold) */
:root {
  --bg: #0D0C0A;
  --surface: #15130F;
  --line: rgba(237, 231, 220, 0.12);
  --line-strong: rgba(237, 231, 220, 0.16);
  --field-line: #3A342B;
  --text: #EDE7DC;
  --text-2: #D6CFC2;
  --text-3: #C9C1B3;
  --muted: #A69E90;
  --accent: #D4A35A;
  --accent-light: #F3DDA8;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--text); }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 10px 16px; background: var(--accent); color: var(--bg); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Header / footer ---------- */
.site-header { position: relative; z-index: 3; border-bottom: 1px solid var(--line); background: rgba(13, 12, 10, 0.72); }
.site-header .wrap { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.brand-mark {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 1.5px solid var(--accent); font-weight: 600; font-size: 17px; letter-spacing: 0.04em;
}
.brand-name { font-size: 15px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 15px; }
.nav a { text-decoration: none; padding: 10px 0; }
.nav .back { color: var(--text-3); }

.btn-outline {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px !important;
  border: 1px solid var(--accent); color: var(--text); text-decoration: none; font-size: 15px;
}
.btn-outline:hover { background: rgba(212, 163, 90, 0.12); color: #fff; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
  background: var(--accent); color: var(--bg); border: 0; text-decoration: none;
  font: inherit; font-weight: 600; font-size: 16px; letter-spacing: 0.02em; cursor: pointer;
}
.btn:hover { background: #E2B46C; color: var(--bg); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.note { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--text-3); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; font-size: 14px; color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-mark { width: 32px; height: 32px; font-size: 13px; border-width: 1px; color: var(--text); }

/* ---------- Type helpers ---------- */
.eyebrow { margin: 0 0 18px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.h-display { margin: 0; font-size: clamp(34px, 4vw, 56px); line-height: 1.05; font-weight: 300; letter-spacing: -0.02em; }
.h-section { margin: 0; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.05; font-weight: 300; letter-spacing: -0.02em; }
.lede { margin: 24px 0 0; max-width: 520px; font-size: 19px; line-height: 1.6; color: var(--text-2); }
.section { padding-top: 160px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 760px; display: flex; align-items: flex-end; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,12,10,0.55) 0%, rgba(13,12,10,0.15) 38%, rgba(13,12,10,0.88) 82%, var(--bg) 100%);
}
.hero .wrap { position: relative; width: 100%; padding-top: 160px; padding-bottom: 72px; }
.hero-tag {
  display: inline-block; margin: 0 0 24px; padding: 8px 14px;
  background: rgba(13, 12, 10, 0.72); border: 1px solid rgba(212, 163, 90, 0.35);
  font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-light);
}
.hero h1 {
  margin: 0; max-width: 980px; font-size: clamp(38px, 5.6vw, 76px); line-height: 1.04; font-weight: 300; letter-spacing: -0.02em;
  text-shadow: -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px 1.5px 0 #000, 0 0 4px #000, 0 3px 12px rgba(0,0,0,0.8);
}
.hero-sub {
  margin: 28px 0 0; max-width: 640px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: #F0EBE2;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 3px #000, 0 2px 8px rgba(0,0,0,0.85);
}
.hero .cta-row { margin-top: 40px; }
.hero .note {
  color: #F0EBE2;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 3px #000, 0 2px 8px rgba(0,0,0,0.85);
}

/* ---------- Convergence graphic ---------- */
.converge { padding-top: 120px; display: flex; flex-direction: column; gap: 28px; }
.converge-head { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.converge-head .eyebrow { margin: 0; }
.converge h2 { margin: 12px 0 0; max-width: 760px; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.1; font-weight: 600; letter-spacing: -0.01em; }
.phases { display: flex; flex-wrap: wrap; gap: 8px; }
.phase {
  min-height: 44px; padding: 0 18px; border-radius: 2px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  cursor: pointer; background: transparent; color: #CFCCC5; border: 1px solid #3A3C42;
  transition: background .3s, color .3s, border-color .3s;
}
.phase[aria-pressed="true"] { background: #C9A55A; color: var(--bg); border-color: #C9A55A; }
.net-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.net-box { width: 100%; max-width: 1200px; margin: 0 auto; }

/* Phone version of the graphic: stacked tags around the CS square */
.netm { display: none; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.netm-k { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #8F8C84; }
.netm-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.netm .node { padding: 8px 12px; border: 1px solid #34363C; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: #CFCCC5; }
.netm .node.sys { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text); }
.netm .node.person::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: #C9A55A; vertical-align: middle; }
.netm-cs { padding: 0 !important; border: 0 !important; }
.netm-cs .ring { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border: 1.5px solid #C9A55A; font-family: var(--mono); font-size: 16px; color: #C9A55A; }
.netm-line { display: block; overflow: visible; }
.netm .wire { stroke: #5E5034; stroke-width: 1.2; }
.netm .flow { stroke: #D4B26A; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 0.1 14; animation: cs-flow 1.6s linear infinite; }
.netm .flow.back { stroke: #E8E4DA; animation-direction: reverse; }
.netm .node { transition: opacity .5s; }
.netm.mode-result .netm-cs .ring { border-style: dashed; }
@media (prefers-reduced-motion: reduce) { .netm .flow { animation: none; } }
@media (max-width: 759px) {
  .net-scroll { display: none; }
  .netm { display: flex; }
}
.net { display: block; width: 100%; height: auto; }
.converge-caption { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; align-items: start; border-top: 1px solid #24262B; padding-top: 28px; }
.converge-caption .label { font-family: var(--mono); font-size: 13px; color: #C9A55A; letter-spacing: .04em; }
.converge-caption p { margin: 0; font-size: 19px; line-height: 1.55; color: #CFCCC5; grid-column: span 2; }
@media (max-width: 640px) { .converge-caption p { grid-column: auto; } }

.net .wire{stroke:#34363C;stroke-width:1.2;opacity:.8;transition:stroke .6s,opacity .6s}
.net .flow{stroke:#D4B26A;stroke-width:2.6;stroke-linecap:round;stroke-dasharray:0.1 22;opacity:0;transition:opacity .6s;animation:cs-flow 2s linear infinite}
.net .wg:nth-child(3n) .flow{animation-duration:2.7s}
.net .wg:nth-child(3n+1) .flow{animation-duration:1.7s}
.net .flow.back{stroke:#E8E4DA;animation-direction:reverse}
@keyframes cs-flow{to{stroke-dashoffset:-44}}
.net .node{transition:opacity .5s;cursor:default}
.net .person{pointer-events:none}
.net .node:focus{outline:none}
.net .node:focus .ring{stroke:#E9CF92;stroke-width:2}
.net .halo{transform-box:fill-box;transform-origin:center;animation:cs-halo 3.2s ease-out infinite}
@keyframes cs-halo{0%{transform:scale(1);opacity:.55}100%{transform:scale(1.9);opacity:0}}
.mode-dream .p-dream .flow,.mode-exec .p-exec .flow,.mode-tune .p-tune .flow,.mode-result .p-result .flow{opacity:1}
.mode-dream .wg.p-dream .wire,.mode-exec .wg.p-exec .wire,.mode-tune .wg.p-tune .wire,.mode-result .wg.p-result .wire{stroke:#5E5034}
.mode-dream .wg:not(.p-dream) .wire,.mode-exec .wg:not(.p-exec) .wire,.mode-tune .wg:not(.p-tune) .wire,.mode-result .wg:not(.p-result) .wire{opacity:.25}
.mode-dream .node:not(.p-dream),.mode-exec .node:not(.p-exec),.mode-tune .node:not(.p-tune),.mode-result .node:not(.p-result){opacity:.28}
.net .bridge .wire,.net .bridge .flow{opacity:0}
.mode-result .bridge .wire{opacity:1;stroke:#5E5034}
.mode-result .bridge .flow{opacity:1}
.mode-result .n-cs{opacity:.4}
.mode-result .n-cs .ring{stroke-dasharray:3 5}
.mode-result .halo{animation:cs-standby 4s ease-in-out infinite}
@keyframes cs-standby{0%,100%{transform:scale(1);opacity:.1}50%{transform:scale(1.18);opacity:.7}}
.net:has(.node:not(.person):hover,.node:not(.person):focus) .flow{opacity:0!important}
.net:has(.node:not(.person):hover,.node:not(.person):focus) .wire{opacity:.2!important;stroke:#34363C!important}
.net:has(.node:not(.person):hover,.node:not(.person):focus) .node{opacity:.25!important}
.net:has(.n-cs:hover,.n-cs:focus) .w-cs .flow,.net:has(.n-lighting:hover,.n-lighting:focus) .w-lighting .flow,.net:has(.n-av:hover,.n-av:focus) .w-av .flow,.net:has(.n-it:hover,.n-it:focus) .w-it .flow,.net:has(.n-software:hover,.n-software:focus) .w-software .flow,.net:has(.n-automation:hover,.n-automation:focus) .w-automation .flow{opacity:1!important}
.net:has(.n-cs:hover,.n-cs:focus) .w-cs .wire,.net:has(.n-lighting:hover,.n-lighting:focus) .w-lighting .wire,.net:has(.n-av:hover,.n-av:focus) .w-av .wire,.net:has(.n-it:hover,.n-it:focus) .w-it .wire,.net:has(.n-software:hover,.n-software:focus) .w-software .wire,.net:has(.n-automation:hover,.n-automation:focus) .w-automation .wire{opacity:1!important;stroke:#7A6538!important}
.net:has(.n-cs:hover,.n-cs:focus) .c-cs,.net:has(.n-lighting:hover,.n-lighting:focus) .c-lighting,.net:has(.n-av:hover,.n-av:focus) .c-av,.net:has(.n-it:hover,.n-it:focus) .c-it,.net:has(.n-software:hover,.n-software:focus) .c-software,.net:has(.n-automation:hover,.n-automation:focus) .c-automation{opacity:1!important}
@media (prefers-reduced-motion: reduce){
  .net .flow,.net .halo{animation:none}
  .net.mode-result .halo{opacity:.3}
}

/* ---------- Stages ---------- */
.stages-title { margin: 24px 0 0; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; font-weight: 300; letter-spacing: -0.01em; }
.stages { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 40px 24px; }
.stage img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.stage .k { margin: 20px 0 6px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.stage h4 { margin: 0; font-size: 20px; font-weight: 500; }
.stage p { margin: 10px 0 0; font-size: 16px; color: var(--text-3); }

/* ---------- Projects ---------- */
.project-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 48px 64px; align-items: end; }
.tags { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.tag { padding: 8px 14px; border: 1px solid rgba(237,231,220,0.22); font-family: var(--mono); font-size: 13px; color: var(--text-2); }
figure { margin: 0; }
.fig-main img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.fig-main figcaption { margin-top: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.strip { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.strip img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.strip figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- Vision session ---------- */
.panel { border: 1px solid var(--line-strong); background: var(--surface); }
.vision { padding: clamp(32px, 5vw, 72px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 48px 72px; }
.vision p.body { margin: 24px 0 0; font-size: 18px; color: var(--text-2); }
.vision .cta-row { margin-top: 36px; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 28px; }
.steps li { display: flex; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.steps li:last-child { padding-bottom: 0; border-bottom: 0; }
.steps .n { font-family: var(--mono); font-size: 14px; color: var(--accent); padding-top: 4px; }
.steps b { display: block; font-size: 19px; font-weight: 500; }
.steps span.d { color: var(--text-3); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 40px 72px; align-items: start; }
.about .statement { margin: 0; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.35; font-weight: 300; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-top: 40px; }
.stat { border-top: 1px solid var(--accent); padding-top: 20px; }
.stat .v { margin: 0; font-size: clamp(40px, 4vw, 56px); line-height: 1; font-weight: 300; }
.stat .l { margin: 10px 0 0; font-size: 15px; color: var(--text-3); }

/* ---------- Forms ---------- */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 48px 72px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px; }
.form-grid.tight { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-3); }
.field.full, .full { grid-column: 1 / -1; }
.input {
  min-height: 48px; padding: 0 14px; background: var(--surface); border: 1px solid var(--field-line);
  color: var(--text); font: inherit; font-size: 16px; border-radius: 0; width: 100%;
}
.panel .input { background: var(--bg); }
select.input { padding: 0 12px; }
textarea.input { padding: 12px 14px; resize: vertical; min-height: 120px; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0; font-size: 15px; color: #F2A48A; }
.form-error:empty { display: none; }
.done { display: flex; flex-direction: column; gap: 12px; }
.done .t { margin: 0; font-size: 20px; font-weight: 500; }
.done .s { margin: 0; font-size: 15px; color: var(--text-3); }
[hidden] { display: none !important; }

/* ---------- Account pages ---------- */
.page-col { min-height: 100vh; display: flex; flex-direction: column; }
.page-main { flex-grow: 1; }
.login-main { display: flex; align-items: center; justify-content: center; padding: 80px var(--gutter); }
.login-col { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 32px; }
.login-card { padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; gap: 24px; }
.login-card h1 { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 300; letter-spacing: -0.02em; }
.login-card .intro { display: flex; flex-direction: column; gap: 10px; }
.login-card .intro .eyebrow { margin: 0; }
.login-card .intro p.s { margin: 0; font-size: 16px; color: var(--text-3); }
.small { margin: 0; font-size: 14px; color: var(--muted); }
.link-accent { font-size: 14px; color: var(--accent); text-decoration: none; padding: 10px 0; display: inline-block; }
.link-accent:hover { color: #E9CF92; }
.textbtn { align-self: flex-start; min-height: 44px; padding: 0; background: none; border: 0; color: var(--accent); font: inherit; font-size: 15px; cursor: pointer; }
.start-main { padding-top: 96px; padding-bottom: 96px; }
.start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 56px 80px; align-items: start; }
.start-copy { display: flex; flex-direction: column; gap: 28px; padding-top: 8px; }
.start-copy .eyebrow { margin: 0; }
.start-copy p { margin: 0; max-width: 520px; font-size: 18px; color: var(--text-2); }
.start-copy p.small { font-size: 15px; color: var(--muted); }
.book-card { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 24px; }
.book-card h2 { margin: 0; font-size: 32px; line-height: 1.1; font-weight: 300; letter-spacing: -0.02em; }
.book-card .intro { display: flex; flex-direction: column; gap: 10px; }
.book-card .intro .eyebrow { margin: 0; }
.book-card .intro p { margin: 0; font-size: 16px; color: var(--text-3); }
.start-copy .eyebrow, .book-card .intro .eyebrow, .login-card .intro .eyebrow {
  margin: 0; max-width: none; font-size: 13px; color: var(--accent);
}

@media (max-width: 640px) {
  .hero { min-height: 640px; }
  .hero .wrap { padding-top: 120px; padding-bottom: 56px; }
  .section { padding-top: 112px; }
  .converge { padding-top: 88px; }
  .brand-name { font-size: 13px; letter-spacing: 0.1em; }
}

/* Privacy / text pages */
.prose-main { padding-top: 96px; padding-bottom: 96px; }
.prose { max-width: 680px; }
.prose .eyebrow { margin: 0 0 20px; }
.prose .h-section { margin: 0 0 12px; }
.prose .updated { margin: 0 0 40px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.prose h2 { margin: 40px 0 12px; font-size: 20px; font-weight: 500; color: var(--text); }
.prose p { margin: 0 0 16px; color: var(--text-2); }
.prose a { color: var(--accent-light); }
.footer-link { color: var(--muted); text-decoration: none; }
.footer-link:hover { color: var(--text); }
@media (max-width: 640px) { .prose-main { padding-top: 64px; padding-bottom: 64px; } }
.footer-links { display: flex; align-items: center; gap: 24px; }
.prose p.eyebrow { color: var(--accent); }
