/* =============================================================================
   erenbostan.com — STYLES
   Dark ink ground, Talivio blue accent, mono annotations, display headlines.
   ========================================================================== */
:root {
  --ink-950: #0b0c0e;
  --ink-900: #101214;
  --ink-850: #1b1d22;
  --ink-800: #24262c;
  --ink-700: #424959;
  --line: #1c1f24;
  --line-2: #2a2e36;
  --text: #e8eaef;
  --text-2: #b1b8c5;
  --muted: #8791a3;
  --muted-2: #677085;
  --acc: #49a6ea;
  --acc-2: #3087ce;
  --acc-3: #7dc4f5;
  --acc-dim: rgba(73, 166, 234, .12);
  --acc-line: rgba(73, 166, 234, .35);
  --rail: 74px;
  --topbar: 62px;
  --gutter: clamp(20px, 6vw, 96px);
  --font-display: "Outfit", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, .9, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 24px); background: var(--ink-950); }
body {
  font-family: var(--font-body);
  background: var(--ink-950);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: var(--acc-2); color: #fff; }

.mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mono.acc { color: var(--acc); }
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.02; }
em { font-style: normal; }
h1 em { color: var(--acc); }
h1 em.mute { color: var(--muted); }
p.lead { color: var(--text-2); font-size: 17px; line-height: 1.7; max-width: 60ch; }
p.body { color: var(--muted); line-height: 1.75; max-width: 62ch; }

/* ---------------------------------------------------------------- reveal */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv[data-d="1"] { transition-delay: .08s; }
.rv[data-d="2"] { transition-delay: .16s; }
.rv[data-d="3"] { transition-delay: .24s; }

/* ------------------------------------------------------------------ links */
.arrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); display: inline-flex; gap: 8px; align-items: center; transition: color .2s, transform .2s; }
.arrow:hover { color: var(--acc-3); transform: translateX(3px); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: 14px 20px; border: 1px solid var(--line-2); color: var(--text);
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.btn:hover { border-color: var(--acc-line); color: var(--acc-3); transform: translateY(-1px); }
.btn.primary { background: var(--acc); border-color: var(--acc); color: var(--ink-950); }
.btn.primary:hover { background: var(--acc-3); border-color: var(--acc-3); color: var(--ink-950); }
.btn .dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; box-shadow: 0 0 0 3px rgba(73,166,234,.25); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(73,166,234,.25); } 50% { box-shadow: 0 0 0 6px rgba(73,166,234,.08); } }

/* ------------------------------------------------------------------- rail */
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 30;
  display: none; flex-direction: column; align-items: center; justify-content: space-between;
  border-right: 1px solid var(--line); background: var(--ink-950); padding: 22px 0;
}
.rail-name { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-mono); font-size: 10px; letter-spacing: .28em; color: var(--muted); }
.rail-dots { list-style: none; display: flex; flex-direction: column; gap: 34px; position: relative; }
.rail-dots::before { content: ""; position: absolute; left: 50%; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); transform: translateX(-50%); }
.rail-dots a { position: relative; display: block; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--ink-950); transition: border-color .2s, background .2s, box-shadow .2s; }
.rail-dots a:hover { border-color: var(--acc); }
.rail-dots a.on { border-color: var(--acc); background: var(--acc); box-shadow: 0 0 0 4px var(--acc-dim); }
.rail-count { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-mono); font-size: 10px; letter-spacing: .24em; color: var(--muted-2); }
.rail-count b { color: var(--acc); font-weight: 400; }

/* ----------------------------------------------------------------- topbar */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 25; height: var(--topbar);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter) 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 12, 14, .82); backdrop-filter: blur(10px);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
}
.tb-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text-2); white-space: nowrap; }
.tb-brand .mark { width: 18px; height: 18px; color: var(--acc); flex: none; }
.tb-brand .sep { color: var(--muted-2); }
.tb-brand .role { color: var(--muted); }
.tb-nav { display: flex; gap: 26px; }
.tb-nav a { color: var(--muted); transition: color .2s; }
.tb-nav a:hover, .tb-nav a.on { color: var(--text); }
.tb-actions { display: flex; align-items: center; gap: 10px; }
.tb-lang { padding: 7px 10px; border: 1px solid var(--line-2); color: var(--muted); letter-spacing: .16em; transition: border-color .2s, color .2s; }
.tb-lang:hover { border-color: var(--acc-line); color: var(--acc-3); }
.tb-cta { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; background: var(--acc); color: var(--ink-950); transition: background .2s; }
.tb-cta:hover { background: var(--acc-3); }
.tb-cta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-950); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.tb-menu { display: none; width: 36px; height: 36px; border: 1px solid var(--line-2); color: var(--text); font-size: 16px; }
.tb-mobile { display: none; position: fixed; top: var(--topbar); left: 0; right: 0; z-index: 24; background: var(--ink-950); border-bottom: 1px solid var(--line); padding: 10px var(--gutter) 18px; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.tb-mobile a { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.tb-mobile.open { display: flex; }

/* ------------------------------------------------------------------ spine */
#spine { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: .55; }
#spine path { fill: none; stroke: var(--acc-2); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 100; stroke-dashoffset: 100; }
#spine circle { fill: var(--ink-950); stroke: var(--acc-2); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ------------------------------------------------------------------ shell */
.shell { position: relative; z-index: 1; padding-top: var(--topbar); }
.sec { position: relative; padding: clamp(80px, 10vw, 140px) var(--gutter); border-bottom: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.sec-head .mono { display: inline-flex; gap: 10px; align-items: center; }
.sec-head .mono::before { content: ""; width: 22px; height: 1px; background: var(--acc-line); }
.sec h2 { font-size: clamp(30px, 4.2vw, 54px); max-width: 20ch; margin-bottom: 22px; }
.sec .after { margin-top: 26px; }

/* ------------------------------------------------------------------- hero */
.sec-hero { min-height: calc(100vh - var(--topbar)); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 80px); align-items: center; padding-top: clamp(64px, 8vw, 110px); }
.sec-hero h1 { font-size: clamp(44px, 7.2vw, 104px); margin: 24px 0 30px; max-width: 11ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.hero-cta .btn::after, .btn.arr::after { content: "→"; }

.fig { border: 1px solid var(--line); background: var(--ink-900); position: relative; }
.fig-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.fig-live { display: inline-flex; align-items: center; gap: 8px; color: var(--acc); }
.fig-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); animation: blink 1.6s ease-in-out infinite; }
.fig-body { padding: 24px; position: relative; overflow: hidden; }
.fig-body::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(ellipse at center, #000 40%, transparent 80%); pointer-events: none; }
.fig-foot { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.fig-foot span::before { content: "// "; color: var(--acc-2); }
.fig-hero .fig-body { padding: 8px 24px 0; }
.hero-build { display: block; width: 100%; max-width: 420px; margin: 0 auto; height: auto; overflow: visible; position: relative; touch-action: none; user-select: none; -webkit-user-select: none; }

/* ------------------------------------------------------------------- work */
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { display: flex; flex-direction: column; gap: 14px; padding: 26px 24px 22px; background: var(--ink-950); position: relative; transition: background .25s; min-height: 250px; }
.card:hover { background: var(--ink-900); }
.card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--acc); transform: scaleY(0); transform-origin: top; transition: transform .35s var(--ease); }
.card:hover::after { transform: scaleY(1); }
.card-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }
.card-top .n { color: var(--acc); }
.card h3 { font-size: 24px; font-weight: 600; }
.card p { color: var(--muted); font-size: 14px; line-height: 1.65; flex: 1; }
.card .lane { display: inline-flex; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card .lane::before { content: ""; width: 5px; height: 5px; background: var(--acc-2); }
.card .arrow { margin-top: 6px; }
.status { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; padding: 3px 7px; border: 1px solid var(--line-2); color: var(--muted); }
.status.live { border-color: rgba(73,166,234,.45); color: var(--acc); }
.status.beta { border-color: rgba(251,191,36,.45); color: #fbbf24; }
.status.dev { color: var(--text-2); }
.status.frozen { color: var(--muted-2); border-style: dashed; }

.work-index { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 18px; }
.index-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 8px 0; }
.index-table { display: none; margin-top: 14px; border: 1px solid var(--line); overflow-x: auto; }
.index-table.open { display: block; }
.index-table table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 13.5px; }
.index-table th { text-align: left; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); font-weight: 400; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--ink-900); }
.index-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); }
.index-table tr:last-child td { border-bottom: 0; }
.index-table td.name { color: var(--text); font-weight: 500; white-space: nowrap; }
.index-table td.n { font-family: var(--font-mono); font-size: 10.5px; color: var(--acc); }
.index-table td.lane { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.index-table tr:hover td { background: var(--ink-900); }
.index-table a.name-link:hover { color: var(--acc-3); }

/* ---------------------------------------------------------------- systems */
.sys-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.sys-text p + p { margin-top: 16px; }
.sys-fig .fig-body { padding: 12px; }
#sys-diagram { display: block; width: 100%; height: auto; }
#sys-diagram .lnk { fill: none; stroke: var(--acc-2); stroke-width: 1.2; stroke-dasharray: 400; stroke-dashoffset: 400; opacity: .9; }
#sys-diagram .node { opacity: 0; transition: opacity .5s var(--ease); cursor: default; }
#sys-diagram .node.on { opacity: 1; }
#sys-diagram .node rect { fill: var(--ink-950); stroke: var(--line-2); stroke-width: 1; transition: stroke .25s, fill .25s; }
#sys-diagram .node.hot rect, #sys-diagram .node:hover rect { stroke: var(--acc); fill: #0e1a26; }
#sys-diagram .node text { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .14em; fill: var(--text); font-size: 11px; }
#sys-diagram .node text.sub { fill: var(--muted-2); font-size: 8.5px; letter-spacing: .1em; text-transform: lowercase; }
#sys-diagram .node.hot text, #sys-diagram .node:hover text { fill: var(--acc-3); }
#sys-diagram .node .k { font-size: 8px; fill: var(--acc); }
#sys-diagram .pkt { fill: var(--acc-3); opacity: 0; }
.sys-legend { margin-top: 28px; }
.legend-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.legend-head b { font-weight: 400; color: var(--acc); }
.legend { list-style: none; }
.legend li { display: grid; grid-template-columns: 34px 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; transition: background .2s; }
.legend li:hover, .legend li.hot { background: var(--ink-900); }
.legend .n { font-family: var(--font-mono); font-size: 10.5px; color: var(--acc); letter-spacing: .12em; }
.legend .nm { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.legend .ds { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* --------------------------------------------------------------- services */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.svc { padding: 26px 24px; background: var(--ink-950); transition: background .25s; }
.svc:hover { background: var(--ink-900); }
.svc .n { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; color: var(--acc); display: block; margin-bottom: 40px; }
.svc h3 { font-size: 22px; margin-bottom: 8px; }
.svc p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.agencies { margin-top: 1px; display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 26px 24px; border: 1px solid var(--line); border-top: 0; background: var(--ink-900); align-items: baseline; }
.agencies h3 { font-size: 22px; margin-bottom: 6px; }
.agencies p { color: var(--muted); font-size: 14px; line-height: 1.65; max-width: 70ch; }

/* ------------------------------------------------------------------ about */
.about-grid { display: grid; grid-template-columns: minmax(240px, 380px) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.about-fig .fig-body { padding: 0; }
.about-fig img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; filter: grayscale(.25) contrast(1.05); }
.about-fig .fig-body::before { display: none; }
.about-fig.pending img { opacity: 0; }
.about-fig .fig-body { cursor: pointer; }
.about-fig canvas.reveal { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.about-fig .fig-body::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(11,12,14,.65)); pointer-events: none; }
.about-fig .corner { position: absolute; width: 14px; height: 14px; border: 1px solid var(--acc); pointer-events: none; z-index: 2; }
.about-fig .corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.about-fig .corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.about-fig .corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.about-fig .corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 34px; }
.stat { background: var(--ink-950); padding: 18px 18px 16px; }
.stat b { display: block; font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -.02em; color: var(--text); line-height: 1; }
.stat span { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.timeline { margin-top: 48px; }
.timeline .mono { display: block; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.timeline ol { list-style: none; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.timeline .per { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--acc); padding-top: 4px; }
.timeline .role { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.timeline .org { color: var(--text-2); font-size: 13.5px; }
.timeline .note { color: var(--muted); font-size: 13.5px; margin-top: 4px; line-height: 1.6; }
.clients { margin-top: 44px; }
.clients .mono { display: block; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.clients ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 28px; padding-top: 14px; }
.clients li { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--muted); padding: 6px 0; transition: color .2s; }
.clients li:hover { color: var(--text); }

/* ---------------------------------------------------------------- contact */
.sec-contact { border-bottom: 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact-mail { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 3vw, 34px); letter-spacing: -.02em; color: var(--text); transition: color .2s; }
.contact-mail:hover { color: var(--acc-3); }
.contact-mail span { font-family: var(--font-mono); font-size: 14px; color: var(--acc); }
.contact-links { list-style: none; }
.contact-links a { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); transition: color .2s; }
.contact-links a:hover { color: var(--acc-3); }
.contact-links a span { color: var(--acc); }

/* ----------------------------------------------------------------- footer */
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px var(--gutter) 40px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }
.foot .l { display: flex; flex-direction: column; gap: 6px; }
.foot .l b { color: var(--muted); font-weight: 400; }
.foot .l small { font-size: 9px; letter-spacing: .1em; text-transform: none; }
.foot nav { display: flex; gap: 22px; }
.foot nav a { color: var(--muted); transition: color .2s; }
.foot nav a:hover { color: var(--acc-3); }

/* ------------------------------------------------------------------- boot */
#boot { position: fixed; inset: 0; z-index: 100; background: var(--ink-950); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px; transition: opacity .5s var(--ease), visibility .5s; }
#boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
#boot svg { width: min(440px, 80vw); height: auto; overflow: visible; }
#boot .cross { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw .6s var(--ease) forwards; }
#boot .cross.v { animation-delay: .1s; }
#boot .wire { fill: none; stroke: var(--acc); stroke-width: 1.2; stroke-linejoin: round; stroke-dasharray: 560; stroke-dashoffset: 560; animation: draw .8s var(--ease) forwards; animation-delay: .5s; }
#boot .face { opacity: 0; animation: fillin .5s var(--ease) forwards; }
#boot .face.r { fill: #2470b4; animation-delay: 1.25s; }
#boot .face.l { fill: #1d5a92; animation-delay: 1.35s; }
#boot .face.t { fill: #49a6ea; animation-delay: 1.45s; }
#boot .lab { font-family: var(--font-mono); font-size: 9px; letter-spacing: .16em; fill: var(--muted); opacity: 0; animation: fillin .4s var(--ease) forwards; }
#boot .lab.a { animation-delay: .9s; }
#boot .lab.b { animation-delay: 1.1s; }
#boot .lab.c { animation-delay: 1.3s; }
#boot .lab.acc { fill: var(--acc); }
#boot .name { font-family: var(--font-mono); font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--text-2); opacity: 0; animation: fillin .5s var(--ease) forwards; animation-delay: 1.7s; }
#boot .skip { position: absolute; bottom: 26px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-2); opacity: 0; animation: fillin .5s var(--ease) forwards; animation-delay: 1.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { opacity: 1; } }

/* ------------------------------------------------------------------ cursor */
#cur-box, #cur-lab { position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none; display: none; }
#cur-box { opacity: 0; width: 14px; height: 14px; border: 1px solid var(--acc); transform: translate(-50%, -50%); transition: width .18s var(--ease), height .18s var(--ease), border-color .18s, background .18s; mix-blend-mode: screen; }
#cur-box.live { opacity: 1; }
#cur-box.link { width: 30px; height: 30px; background: rgba(73,166,234,.12); }
#cur-box.grab { width: 22px; height: 22px; border-style: dashed; }
#cur-lab { font-family: var(--font-mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--acc); background: var(--ink-950); border: 1px solid var(--acc-line); padding: 4px 7px; transform: translate(18px, 14px); white-space: nowrap; opacity: 0; transition: opacity .15s; }
#cur-lab.show { opacity: 1; }
@media (pointer: fine) { #cur-box, #cur-lab { display: block; } }

/* ============================================================ BLOCK GAME
   Ported from talivio.com (hero.blade.php + talivio-design.css), full version:
   tap two blocks to swap, or drag any block onto any other. No gate here.
   ======================================================================== */
.hero-build {
  --blk0-top: #64748b; --blk0-left: #3f4d5f; --blk0-right: #55647a;
  --blk1-top: #49a6ea; --blk1-left: #1d5a92; --blk1-right: #2470b4;
  --blk2-top: #7dc4f5; --blk2-left: #2470b4; --blk2-right: #3087ce;
}
.hero-grid-line, .hero-blk__wire {
  stroke-dasharray: var(--len, 500); stroke-dashoffset: var(--len, 500);
  animation: hero-draw .5s ease-out forwards; animation-delay: var(--d, 0s); pointer-events: none;
}
@keyframes hero-draw { to { stroke-dashoffset: 0; } }
.hero-blk__faces { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; filter: url(#hero-grain); animation: hero-fill .42s cubic-bezier(.22,.9,.36,1) forwards; animation-delay: calc(var(--d, 0s) + .22s); }
@keyframes hero-fill { 0% { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
.hero-blk { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .3s cubic-bezier(.34,1.4,.64,1); cursor: grab; }
.hero-blk:hover { transform: translate(0, -12px); }
.hero-blk__top { transition: filter .3s ease; }
.hero-blk:hover .hero-blk__top { filter: brightness(1.18); }
.hero-blk[data-z="0"] { --t: var(--blk0-top); --l: var(--blk0-left); --r: var(--blk0-right); }
.hero-blk[data-z="1"] { --t: var(--blk1-top); --l: var(--blk1-left); --r: var(--blk1-right); }
.hero-blk[data-z="2"] { --t: var(--blk2-top); --l: var(--blk2-left); --r: var(--blk2-right); }
.hero-blk__faces polygon { transition: fill .25s ease; }
.hero-blk.is-marked { --t: #fbbf24; --l: #a16207; --r: #d97706; }
.hero-blk.is-marked .hero-blk__wire { stroke: #78350f; opacity: .55; }
.hero-blk.is-marked { transform: translate(0, -7px); }
.hero-blk.is-marked:hover { transform: translate(0, -15px); }
.hero-blk.is-lifted { transform: translate(0, -7px); }
.hero-blk.is-hover-lifted { transform: translate(0, -12px); }
.hero-blk.is-invalid { --t: #f87171; --l: #b91c1c; --r: #dc2626; }
.hero-blk.is-invalid .hero-blk__wire { stroke: #7f1d1d; opacity: .6; }
#hero-blocks.is-built .hero-blk__faces { animation: none; opacity: 1; }
#hero-blocks.is-built .hero-blk__wire { animation: none; stroke-dashoffset: 0; }
.hero-build.is-built .hero-grid-line { animation: none; stroke-dashoffset: 0; }
.hero-blk.is-target .hero-blk__top { animation: hero-target 1.3s ease-in-out infinite; }
@keyframes hero-target { 0%, 100% { filter: none; } 50% { filter: brightness(1.24); } }
.hero-build.is-dragging, .hero-build.is-dragging .hero-blk { cursor: grabbing; }
.hero-ghost { pointer-events: none; opacity: .88; filter: drop-shadow(0 12px 14px rgba(0,0,0,.45)); }
.hero-ghost .hero-blk { transition: none; }
.hero-ghost.is-away { opacity: .6; }
.hero-ghost.is-away .hero-blk { --t: #cbd5e1; --l: #8b98a8; --r: #a5b1c0; }
.hero-ghost.is-away .hero-blk__wire { stroke: #b91c1c; stroke-dasharray: 5 4; opacity: .7; }
.hero-pos.is-dragged .hero-blk { opacity: .35; transform: none; }
.hero-blk.is-drop { --t: #34d399; --l: #047857; --r: #059669; }
.hero-blk.is-drop .hero-blk__wire { stroke: #064e3b; opacity: .45; }
.hero-blk.is-drop .hero-blk__top { stroke: #ecfdf5; stroke-width: 2.4; stroke-dasharray: 7 5; stroke-linejoin: round; filter: brightness(1.1) drop-shadow(0 0 7px rgba(16,185,129,.95)); animation: hero-ants .55s linear infinite; }
@keyframes hero-ants { to { stroke-dashoffset: -24; } }
.hero-ghost.is-snapped { opacity: .72; filter: drop-shadow(0 0 8px rgba(16,185,129,.9)) drop-shadow(0 10px 12px rgba(0,0,0,.4)); }
.hero-build.is-built .hero-blk__faces { animation: none; opacity: 1; }
.hero-build.is-built .hero-blk__wire { animation: none; stroke-dashoffset: 0; }
.hero-wire-color { color: rgba(125, 196, 245, .32); }
.hero-grid-color { color: rgba(73, 166, 234, .38); }

/* -------------------------------------------------------------- responsive */
@media (min-width: 1024px) {
  .rail { display: flex; }
  #topbar { left: var(--rail); }
  .shell { margin-left: var(--rail); }
}
@media (max-width: 1100px) {
  .work-grid, .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .tb-nav { display: none; }
  .tb-menu { display: inline-flex; align-items: center; justify-content: center; }
  .tb-brand .role, .tb-brand .sep { display: none; }
  .sec-hero { grid-template-columns: 1fr; min-height: 0; }
  .sys-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agencies { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 640px) {
  .work-grid, .svc-grid { grid-template-columns: 1fr; }
  .tb-cta span { display: none; }
  .tb-cta { padding: 10px; }
  .sec-hero h1 { font-size: clamp(38px, 12vw, 56px); }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .legend li { grid-template-columns: 30px 1fr; }
  .legend .ds { grid-column: 2; }
}

/* ---------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .hero-grid-line, .hero-blk__wire { animation: none; stroke-dashoffset: 0; }
  .hero-blk__faces { animation: none; opacity: 1; }
  .hero-blk { transition: none; }
  .hero-blk.is-target .hero-blk__top { animation: none; filter: brightness(1.2); }
  .hero-ghost, .hero-ghost .hero-blk { transition: none; }
  .hero-blk.is-drop .hero-blk__top { animation: none; }
  #boot { display: none; }
  .btn .dot, .tb-cta .dot, .fig-live i { animation: none; }
}
