/* ==========================================================================
   dipro.ai / dipro.uk — Design system
   Layout: left-aligned editorial grid strung on a thin "circuit rail" (the
   logo's trace) — full-bleed signal canvas in the hero, glass reserved for
   live/interactive surfaces (header, process console, stats, forms).
   Single deliberate dark theme taken from the brand render (gunmetal + the
   blue → violet loop). Blue = .ai / Türkiye, violet = .uk / London.
   ========================================================================== */

/* Self-hosted fonts (SIL Open Font License). Static instances, one file per weight,
   full Turkish coverage (ç ğ ı İ ö ş ü) with kerning and mark positioning. */
@font-face { font-family: 'Unbounded'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/unbounded-500.woff2) format('woff2'); }
@font-face { font-family: 'Unbounded'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/unbounded-600.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/instrument-sans-400.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/instrument-sans-500.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/instrument-sans-600.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/jetbrains-mono-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  color-scheme: dark;

  /* colour */
  --graphite: #12151c;          /* page ground — the logo's gunmetal backdrop */
  --gunmetal: #1a1f2a;          /* raised surfaces */
  --gunmetal-2: #222938;        /* hover / inset */
  --rim: #2b3344;               /* hairlines */
  --steel: #97a3b8;             /* secondary text, brushed metal */
  --frost: #e9eef7;             /* primary text */
  --signal: #2b9bff;            /* left loop, .ai */
  --ion: #62d8ff;               /* glowing trace */
  --violet: #a066ff;            /* right loop, .uk */
  --ok: #4fe0a8;
  --warn: #ffb547;
  --err: #ff6b81;

  --loop: linear-gradient(100deg, var(--signal) 0%, #4f8cff 48%, var(--violet) 100%);
  --glass: linear-gradient(180deg, rgba(233, 238, 247, .075), rgba(233, 238, 247, .025));
  --glass-line: rgba(233, 238, 247, .11);
  --shadow-deep: 0 30px 80px -30px rgba(0, 0, 0, .65);

  /* type */
  --font-display: "Unbounded", "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-code: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-h4: 1.1875rem;
  --fs-h3: clamp(1.25rem, 1.05rem + .7vw, 1.5rem);
  --fs-h2: clamp(1.625rem, 1.1rem + 2vw, 2.625rem);
  --fs-h1: clamp(1.875rem, 1rem + 3.3vw, 3.5rem);
  --fs-mega: clamp(2.5rem, 1rem + 6vw, 6rem);

  /* layout */
  --maxw: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --sec-pad: clamp(3rem, 2rem + 3vw, 5rem);
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --header-h: 76px;
  --rail-x: -44px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--graphite);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(160, 102, 255, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(43, 155, 255, .10), transparent 60%),
    var(--graphite);
  color: var(--frost);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration-color: rgba(98, 216, 255, .45); text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--ion); }

:focus-visible { outline: 2px solid var(--ion); outline-offset: 3px; border-radius: 6px; }

::selection { background: rgba(43, 155, 255, .45); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
h4 { font-size: var(--fs-h4); line-height: 1.25; letter-spacing: -.01em; }

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 200;
  background: var(--frost); color: var(--graphite); padding: .7rem 1rem; border-radius: var(--radius-s);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* cross-document page transitions (Chrome / Edge / Safari 18+) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .22s ease both; }
::view-transition-new(root) { animation: vt-in .32s ease both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.sec { position: relative; padding-block: var(--sec-pad); }
.sec--tight { padding-block: clamp(2.25rem, 1.5rem + 2.5vw, 3.5rem); }
/* Arka arkaya gelen, çizgisiz bölümlerde çift boşluğu daralt */
.sec:not(.sec--line):not(.sec--panel) + .sec:not(.sec--line):not(.sec--panel) { padding-top: calc(var(--sec-pad) * .35); }
.sec--tight + .sec--tight { padding-top: 0; }
main > .sec:last-child { padding-bottom: clamp(3rem, 2rem + 3vw, 4.5rem); }
.sec--line { border-top: 1px solid var(--rim); }
.sec--panel { background: linear-gradient(180deg, rgba(26, 31, 42, .55), rgba(26, 31, 42, .15)); border-block: 1px solid var(--rim); }

/* circuit rail — the logo's trace running down the page on wide screens */
@media (min-width: 1360px) {
  main { position: relative; }
  main::before {
    content: ""; position: absolute; top: 0; bottom: 0;
    left: calc(50% - var(--maxw) / 2 + var(--gutter) + var(--rail-x));
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--rim) 6%, var(--rim) 94%, transparent);
    pointer-events: none;
  }
  .node-head { position: relative; }
  .node-head::before {
    content: ""; position: absolute; top: .42em; left: calc(var(--rail-x) - 5px);
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--graphite); border: 2px solid var(--signal);
    box-shadow: 0 0 0 4px var(--graphite), 0 0 14px rgba(43, 155, 255, .55);
  }
  .is-en .node-head::before { border-color: var(--violet); box-shadow: 0 0 0 4px var(--graphite), 0 0 14px rgba(160, 102, 255, .55); }
}

.sec-head { display: grid; gap: 1rem; max-width: 50rem; margin-bottom: clamp(1.75rem, 1.25rem + 1.5vw, 2.75rem); }
.sec-head p { color: var(--steel); font-size: var(--fs-lg); max-width: 40rem; }
.kicker { color: var(--ion); font-weight: 600; font-size: var(--fs-sm); letter-spacing: .01em; }
.is-en .kicker { color: #c3a4ff; }

.lead { font-size: var(--fs-lg); color: var(--steel); max-width: 42rem; }
.prose { display: grid; gap: 1.1rem; max-width: 42rem; color: #cdd5e3; }
.prose strong { color: var(--frost); font-weight: 600; }

.split { display: grid; gap: clamp(2rem, 1rem + 4vw, 5rem); grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split > .sec-head { margin-bottom: 0; }
.split--rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.sticky { position: sticky; top: calc(var(--header-h) + 32px); }
@media (max-width: 960px) {
  .split, .split--even, .split--rev { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */
.btn {
  --b-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .75rem 1.35rem;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 var(--fs-sm)/1.2 var(--font-body); letter-spacing: .01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-position .5s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .3s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary {
  color: #fff;
  background: linear-gradient(100deg, var(--signal), #5b7dff 45%, var(--violet) 90%) 0 0 / 180% 100%;
  box-shadow: 0 10px 30px -12px rgba(43, 155, 255, .7);
}
.btn--primary:hover { background-position: 100% 0; box-shadow: 0 12px 36px -12px rgba(160, 102, 255, .8); }
.btn--ghost { color: var(--frost); border-color: var(--rim); background: rgba(233, 238, 247, .03); }
.btn--ghost:hover { border-color: rgba(98, 216, 255, .6); background: rgba(98, 216, 255, .06); }
.btn:active { transform: translateY(1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.textlink {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--frost); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(98, 216, 255, .4); padding-bottom: 2px;
}
.textlink:hover { border-bottom-color: var(--ion); color: #fff; }
.textlink svg { width: 16px; height: 16px; transition: transform .2s ease; }
.textlink:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 100;
  height: var(--header-h);
}
/* glass lives on a pseudo-element: a backdrop-filter on the header itself would
   become the containing block of the fixed mobile menu */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: rgba(18, 21, 28, .72);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid rgba(233, 238, 247, .07);
  transition: opacity .3s ease;
}
.site-header.is-scrolled::before, .site-header.is-open::before { opacity: 1; }
.site-header.is-open::before { background: rgba(14, 17, 23, .96); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 1.25rem; }

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--frost); flex: none; }
.brand img { width: 46px; height: auto; }
.brand__word { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -.02em; }
.brand__tld { color: var(--signal); }
.is-en .brand__tld { color: var(--violet); }

.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; align-items: center; gap: .15rem; }
.nav a {
  display: block; padding: .55rem .7rem; border-radius: 999px;
  color: var(--steel); text-decoration: none; font-size: var(--fs-sm); font-weight: 500;
  transition: color .2s ease, background .2s ease;
}
.nav a:hover { color: var(--frost); background: rgba(233, 238, 247, .05); }
.nav a[aria-current="page"] { color: var(--frost); background: rgba(43, 155, 255, .12); }
.is-en .nav a[aria-current="page"] { background: rgba(160, 102, 255, .14); }

.header-tools { display: flex; align-items: center; gap: .75rem; flex: none; }
.header-cta { min-height: 42px; padding: .55rem 1.1rem; }

/* language switch — sliding thumb, blue for TR, violet for EN */
.lang {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr;
  padding: 3px; border-radius: 999px; border: 1px solid var(--rim);
  background: rgba(233, 238, 247, .03);
  isolation: isolate;
}
.lang a {
  position: relative; z-index: 1;
  min-width: 42px; padding: .38rem .6rem; text-align: center;
  font: 600 .78rem/1.2 var(--font-body); letter-spacing: .06em;
  color: var(--steel); text-decoration: none; border-radius: 999px;
  transition: color .25s ease;
}
.lang a[aria-current="true"] { color: #fff; }
.lang a:not([aria-current="true"]):hover { color: var(--frost); }
.lang__thumb {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px;
  width: calc(50% - 3px); border-radius: 999px;
  background: linear-gradient(100deg, var(--signal), #4f8cff);
  box-shadow: 0 0 18px rgba(43, 155, 255, .45);
  transition: transform .38s cubic-bezier(.6, .1, .2, 1), background .38s ease, box-shadow .38s ease;
}
.lang[data-active="en"] .lang__thumb { transform: translateX(100%); background: linear-gradient(100deg, #7f6bff, var(--violet)); box-shadow: 0 0 18px rgba(160, 102, 255, .5); }

.menu-toggle {
  display: none; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--rim); background: rgba(233, 238, 247, .03); color: var(--frost);
  align-items: center; justify-content: center; cursor: pointer;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 18px; height: 1.6px; background: currentColor; border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease; position: relative;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.is-open .menu-toggle span { background: transparent; }
.is-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.is-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1180px) {
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .nav {
    position: fixed; inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 0 0;
    background: rgba(14, 17, 23, .96);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    padding: 1.5rem var(--gutter) 2.5rem;
    overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  .is-open .nav { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s ease; }
  .nav ul { flex-direction: column; align-items: stretch; gap: .25rem; }
  .nav a { font-family: var(--font-display); font-size: 1.35rem; color: var(--frost); padding: .85rem .25rem; border-radius: 0; border-bottom: 1px solid var(--rim); }
  .nav a[aria-current="page"] { background: none; color: var(--ion); }
  .is-en .nav a[aria-current="page"] { background: none; color: #c3a4ff; }
  .nav .nav__cta { margin-top: 1.5rem; display: flex; }
  .nav .nav__cta a { display: inline-flex; font-family: var(--font-body); font-weight: 600; font-size: var(--fs-sm); border: 0; color: #fff; padding: .75rem 1.35rem; border-radius: 999px; }
}
@media (min-width: 1181px) { .nav__cta { display: none !important; } }
@media (max-width: 420px) { .brand__word { font-size: 1rem; } .brand img { width: 40px; } .header-tools { gap: .5rem; } }
body.menu-locked { overflow: hidden; }

/* switching overlay */
.switch-veil {
  position: fixed; inset: 0; z-index: 300; pointer-events: none;
  background: linear-gradient(100deg, rgba(43, 155, 255, .0), rgba(43, 155, 255, .35) 40%, rgba(160, 102, 255, .45) 60%, rgba(160, 102, 255, 0));
  transform: translateX(-110%);
}
.switch-veil.is-run { animation: veil .55s cubic-bezier(.7, 0, .3, 1) forwards; }
.switch-veil.is-run.to-tr { animation-name: veil-rev; }
@keyframes veil { to { transform: translateX(110%); } }
@keyframes veil-rev { from { transform: translateX(110%); } to { transform: translateX(-110%); } }

/* language suggestion toast */
.lang-toast {
  position: fixed; z-index: 150; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: min(380px, calc(100vw - 32px));
  padding: 1rem 1.1rem; border-radius: var(--radius-m);
  background: rgba(26, 31, 42, .92); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: var(--shadow-deep);
  display: grid; gap: .75rem; font-size: var(--fs-sm);
}
.lang-toast p { color: #cfd7e5; }
.lang-toast .btn { min-height: 40px; padding: .5rem 1rem; }

/* --------------------------------------------------------------------------
   Glass surfaces
   -------------------------------------------------------------------------- */
.glass {
  background: var(--glass), rgba(18, 21, 28, .45);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */
.hero { position: relative; isolation: isolate; overflow: hidden; margin-top: calc(-1 * var(--header-h)); padding-top: calc(var(--header-h) + clamp(2.25rem, 1rem + 4vw, 4.75rem)); padding-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.hero__canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero__fade { position: absolute; inset: auto 0 0 0; height: 30%; z-index: -1; background: linear-gradient(180deg, transparent, var(--graphite)); pointer-events: none; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: center; }
.hero__copy { display: grid; gap: 1.5rem; }
.hero h1 { font-size: clamp(2rem, .9rem + 3.6vw, 3.9rem); line-height: 1.06; letter-spacing: -.035em; font-weight: 500; }
.hero__sub { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: #c3cbda; max-width: 38rem; }
.hero__sub strong { color: var(--frost); font-weight: 600; }
.hero__name { font-family: var(--font-display); font-weight: 500; color: var(--frost); }
.hero__name b { color: var(--ion); font-weight: 600; }
.is-en .hero__name b { color: #c3a4ff; }
@media (max-width: 960px) { .hero__grid { grid-template-columns: minmax(0, 1fr); } }

/* process console — the live "Digital Process" */
.console { padding: 1.1rem 1.1rem 1rem; font-size: var(--fs-sm); }
.console__bar { display: flex; align-items: center; gap: .6rem; padding: .25rem .35rem .9rem; border-bottom: 1px solid var(--glass-line); }
.console__file { font-family: var(--font-code); font-size: .8rem; color: #cfd7e5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.console__state { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; color: var(--ok); white-space: nowrap; }
.console__state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: pulse 1.6s ease-in-out infinite; }
.console[data-phase="done"] .console__state { color: var(--ion); }
.console[data-phase="done"] .console__state::before { animation: none; }
.console__label { font-size: .75rem; color: var(--steel); padding: .8rem .35rem .25rem; }
.console__steps { list-style: none; display: grid; gap: .15rem; padding: .25rem 0; position: relative; }
.console__steps li {
  position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: .7rem; align-items: start;
  padding: .5rem .35rem; border-radius: 10px; color: #cfd7e5; line-height: 1.4;
  transition: color .3s ease, background .3s ease, opacity .3s ease;
}
.console__steps li::after { content: ""; position: absolute; left: calc(.35rem + 10px); top: 1.55rem; bottom: -.55rem; width: 1.5px; background: var(--rim); }
.console__steps li:last-child::after { display: none; }
.console__node { width: 14px; height: 14px; margin: .2rem 4px 0; border-radius: 50%; border: 2px solid var(--steel); background: var(--graphite); position: relative; z-index: 1; transition: all .3s ease; }
.console__time { font-family: var(--font-code); font-size: .72rem; color: var(--steel); padding-top: .15rem; }
.console__steps li[data-s="wait"] { opacity: .42; }
.console__steps li[data-s="run"] { background: rgba(98, 216, 255, .07); color: var(--frost); }
.console__steps li[data-s="run"] .console__node { border-color: var(--ion); box-shadow: 0 0 0 4px rgba(98, 216, 255, .15); animation: pulse 1s ease-in-out infinite; }
.console__steps li[data-s="done"] .console__node { border-color: var(--signal); background: var(--signal); box-shadow: 0 0 10px rgba(43, 155, 255, .6); }
.console__steps li[data-s="done"].is-ai .console__node { border-color: var(--violet); background: var(--violet); box-shadow: 0 0 10px rgba(160, 102, 255, .6); }
.console__steps li.is-ai em { font-style: normal; color: #c9b0ff; }
.console__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; padding: .85rem .35rem .2rem; margin-top: .4rem; border-top: 1px solid var(--glass-line); color: var(--steel); font-size: .8rem; }
.console__foot b { color: var(--frost); font-weight: 600; }
@keyframes pulse { 50% { opacity: .45; } }

/* stats strip */
.stats { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: var(--radius-l); }
.stat { padding: 1.4rem 1.5rem; display: grid; gap: .35rem; align-content: start; }
.stat + .stat { border-left: 1px solid var(--glass-line); }
.stat__num { font-family: var(--font-display); font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 500; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__num small { font-size: .55em; color: var(--steel); margin-left: .1em; }
.stat__label { color: var(--steel); font-size: var(--fs-sm); line-height: 1.4; }
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--glass-line); }
}
@media (max-width: 420px) { .stat { padding: 1.1rem 1rem; } }

/* --------------------------------------------------------------------------
   Page hero (inner pages)
   -------------------------------------------------------------------------- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; margin-top: calc(-1 * var(--header-h)); padding-top: calc(var(--header-h) + clamp(2.5rem, 1.75rem + 3vw, 4.5rem)); padding-bottom: clamp(2.25rem, 1.5rem + 2.5vw, 3.75rem); }
.page-hero + .sec, .lon-hero + .sec { padding-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
.page-hero .hero__canvas { opacity: .55; }
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: end; }
.page-hero__copy { display: grid; gap: 1.35rem; }
.page-hero h1 { max-width: 20ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: var(--fs-xs); color: var(--steel); list-style: none; }
.crumbs a { color: var(--steel); text-decoration: none; }
.crumbs a:hover { color: var(--frost); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--rim); }
@media (max-width: 960px) { .page-hero__grid { grid-template-columns: minmax(0, 1fr); align-items: start; } }

/* --------------------------------------------------------------------------
   Glyph icons (circuit style)
   -------------------------------------------------------------------------- */
.glyph { width: 48px; height: 48px; flex: none; color: var(--ion); }
.is-en .glyph { color: #b993ff; }
.glyph svg { width: 100%; height: 100%; }

/* --------------------------------------------------------------------------
   Feature list (Why dipro)
   -------------------------------------------------------------------------- */
.features { display: grid; gap: 0; list-style: none; border-top: 1px solid var(--rim); }
.feature { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 1.4rem; padding: 1.75rem 0; border-bottom: 1px solid var(--rim); }
.feature h3 { font-size: var(--fs-h4); margin-bottom: .45rem; }
.feature p { color: var(--steel); }

/* --------------------------------------------------------------------------
   Service matrix (hairline grid, not floating cards)
   -------------------------------------------------------------------------- */
.matrix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rim); border-left: 1px solid var(--rim); }
.matrix > * { border-right: 1px solid var(--rim); border-bottom: 1px solid var(--rim); }
.cell { position: relative; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); display: grid; gap: 1rem; align-content: start; transition: background .3s ease; }
.cell:hover { background: rgba(233, 238, 247, .025); }
.cell h3 { font-size: var(--fs-h3); }
.cell p { color: var(--steel); }
.cell .textlink { justify-self: start; margin-top: .25rem; }
@media (max-width: 760px) { .matrix { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------------------
   Process path (a real sequence)
   -------------------------------------------------------------------------- */
.path { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; counter-reset: step; }
.path::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 2px; background: var(--loop); opacity: .7; }
.path li { position: relative; padding-right: 1.5rem; display: grid; gap: .7rem; align-content: start; counter-increment: step; }
.path__node {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--graphite); border: 2px solid var(--signal); position: relative; z-index: 1;
  font: 600 .85rem/1 var(--font-display); color: var(--frost);
  box-shadow: 0 0 0 6px var(--graphite), 0 0 22px rgba(43, 155, 255, .35);
}
.path li:nth-child(3) .path__node { border-color: #6f78ff; }
.path li:nth-child(4) .path__node { border-color: var(--violet); box-shadow: 0 0 0 6px var(--graphite), 0 0 22px rgba(160, 102, 255, .35); }
.path h3 { font-size: var(--fs-h4); margin-top: .6rem; }
.path p { color: var(--steel); font-size: var(--fs-sm); }
@media (max-width: 860px) {
  .path { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .path::before { left: 23px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(180deg, var(--signal), var(--violet)); }
  .path li { grid-template-columns: 48px minmax(0, 1fr); column-gap: 1.25rem; padding-right: 0; }
  .path li > :not(.path__node) { grid-column: 2; }
  .path__node { grid-row: 1 / span 2; }
  .path h3 { margin-top: .7rem; }
}

/* --------------------------------------------------------------------------
   London band (home + about)
   -------------------------------------------------------------------------- */
.london-band { position: relative; overflow: hidden; border-radius: var(--radius-l); border: 1px solid var(--rim); background: radial-gradient(120% 90% at 80% 0%, rgba(160, 102, 255, .28), transparent 55%), radial-gradient(80% 70% at 10% 100%, rgba(43, 155, 255, .18), transparent 60%), #10131b; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: end; min-height: 440px; }
.london-band__copy { padding: clamp(1.75rem, 1rem + 3vw, 3.25rem); display: grid; gap: 1.1rem; align-self: center; position: relative; z-index: 1; }
.london-band__copy p { color: #c3cbda; }
.london-band__addr { font-family: var(--font-display); font-size: var(--fs-sm); line-height: 1.5; color: var(--frost); letter-spacing: -.01em; }
.london-band__img { align-self: end; position: relative; }
.london-band__img img { width: 100%; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%); }
@media (max-width: 860px) { .london-band { grid-template-columns: minmax(0, 1fr); min-height: 0; } .london-band__img { margin-top: -1rem; } }

/* skyline glow behind cut-out photos */
.skyline { position: relative; }
.skyline::before { content: ""; position: absolute; inset: 15% 5% 30% 5%; background: radial-gradient(closest-side, rgba(160, 102, 255, .35), transparent); filter: blur(30px); z-index: -1; }

/* --------------------------------------------------------------------------
   Tech names strip
   -------------------------------------------------------------------------- */
.stack { display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; align-self: start; gap: .6rem; list-style: none; }
.stack a { color: inherit; text-decoration: none; display: block; margin: -.55rem -.95rem; padding: .55rem .95rem; border-radius: 999px; }
.stack a:hover { color: #fff; }
.stack li:has(a):hover { border-color: rgba(98, 216, 255, .55); }
.stack li { padding: .55rem .95rem; border: 1px solid var(--rim); border-radius: 999px; font-size: var(--fs-sm); color: #cdd5e3; background: rgba(233, 238, 247, .02); }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-l); padding: clamp(2rem, 1rem + 5vw, 5rem); display: grid; gap: 1.5rem; justify-items: start; background: #0f1219; border: 1px solid var(--rim); }
.cta-band::before { content: ""; position: absolute; z-index: -1; inset: -40% -10% auto auto; width: 70%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(160, 102, 255, .35), transparent); filter: blur(10px); }
.cta-band::after { content: ""; position: absolute; z-index: -1; inset: auto auto -50% -10%; width: 60%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(43, 155, 255, .28), transparent); }
.cta-band h2 { max-width: 22ch; }
.cta-band p { color: #c3cbda; max-width: 40rem; font-size: var(--fs-lg); }

/* --------------------------------------------------------------------------
   Photo panels (brand duotone; fall back to a designed gradient)
   -------------------------------------------------------------------------- */
.photo { position: relative; overflow: hidden; margin: 0; border-radius: var(--radius-l); border: 1px solid var(--rim); background: radial-gradient(120% 120% at 100% 0%, rgba(160, 102, 255, .35), transparent 55%), radial-gradient(100% 100% at 0% 100%, rgba(43, 155, 255, .35), transparent 60%), repeating-linear-gradient(90deg, rgba(233, 238, 247, .05) 0 1px, transparent 1px 28px), repeating-linear-gradient(0deg, rgba(233, 238, 247, .05) 0 1px, transparent 1px 28px), #121722; aspect-ratio: 4 / 3; max-width: 100%; }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) contrast(1.02); transition: opacity .4s ease, transform .6s ease; }
.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(12, 15, 21, .35)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04); border-radius: inherit; pointer-events: none; }
.photo img.is-broken { opacity: 0; }
/* remote photo unavailable (e.g. a host that blocks third-party images): drop the frame */
.photo.is-empty { display: none; }
.sec:has(> .wrap > .photo.is-empty:only-child) { display: none; }
.page-hero__grid:has(> .photo.is-empty) { grid-template-columns: minmax(0, 1fr); }
.photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 2.25rem 1rem .85rem; font-size: var(--fs-sm); font-weight: 600; color: #fff; background: linear-gradient(180deg, transparent, rgba(10, 13, 19, .78)); }
.photo--wide { aspect-ratio: 16 / 9; }
@media (min-width: 720px) { .sec > .wrap > .photo--wide:only-child { aspect-ratio: 21 / 9; } }
.photo--tall { aspect-ratio: 4 / 5; }

/* --------------------------------------------------------------------------
   Story / about
   -------------------------------------------------------------------------- */
.emblem { position: relative; border-radius: var(--radius-l); overflow: hidden; max-width: 100%; }
.emblem img { width: 100%; -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); mask-image: radial-gradient(closest-side, #000 62%, transparent 100%); }

.sec-head .name-anatomy, .name-anatomy { display: grid; gap: .25rem; font-family: var(--font-display); font-size: var(--fs-mega); font-weight: 500; line-height: .98; letter-spacing: -.05em; }
.name-anatomy span { display: block; color: rgba(233, 238, 247, .16); }
.name-anatomy b { font-weight: 600; background: var(--loop); -webkit-background-clip: text; background-clip: text; color: transparent; }
.name-anatomy span:first-child b { background: linear-gradient(100deg, var(--signal), #5d8bff); -webkit-background-clip: text; background-clip: text; }
.name-anatomy span:last-child b { background: linear-gradient(100deg, #7f6bff, var(--violet)); -webkit-background-clip: text; background-clip: text; }

.eras { list-style: none; display: grid; gap: 0; border-left: 2px solid transparent; border-image: linear-gradient(180deg, var(--signal), var(--violet)) 1; }
.era { position: relative; padding: 0 0 1.85rem 2rem; display: grid; gap: .45rem; }
.era:last-child { padding-bottom: 0; }
.era::before { content: ""; position: absolute; left: -8px; top: .35rem; width: 14px; height: 14px; border-radius: 50%; background: var(--graphite); border: 2px solid var(--signal); }
.era:nth-child(3)::before { border-color: #6f78ff; }
.era:nth-child(4)::before { border-color: var(--violet); background: var(--violet); box-shadow: 0 0 14px rgba(160, 102, 255, .7); }
.era__when { font-size: var(--fs-xs); color: var(--ion); font-weight: 600; }
.era h3 { font-size: var(--fs-h4); }
.era p { color: var(--steel); }

.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 1rem + 1vw, 2rem); list-style: none; }
.principle { padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); border-radius: var(--radius-m); border: 1px solid var(--rim); background: linear-gradient(180deg, rgba(26, 31, 42, .7), rgba(26, 31, 42, .25)); display: grid; gap: .8rem; align-content: start; }
.principle h3 { font-size: var(--fs-h4); }
.principle p { color: var(--steel); }
@media (max-width: 760px) { .principles { grid-template-columns: minmax(0, 1fr); } }

.offices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; list-style: none; border-top: 1px solid var(--rim); }
.offices { column-gap: 3rem; }
.office { position: relative; padding: 1.5rem 0 1.6rem; display: grid; gap: .6rem; align-content: start; }
.office + .office::before { content: ""; position: absolute; left: -1.5rem; top: 1.5rem; bottom: 1.5rem; width: 1px; background: var(--rim); }
.office h3 { font-size: var(--fs-h4); display: flex; align-items: center; gap: .55rem; }
.office h3::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px rgba(43, 155, 255, .8); flex: none; }
.office--uk h3::before { background: var(--violet); box-shadow: 0 0 10px rgba(160, 102, 255, .8); }
.office__role { font-size: var(--fs-xs); color: var(--ion); font-weight: 600; }
.office--uk .office__role { color: #c3a4ff; }
.office address { font-style: normal; color: var(--steel); font-size: var(--fs-sm); line-height: 1.55; }
.office .textlink { font-size: var(--fs-sm); justify-self: start; }
@media (max-width: 1000px) {
  .offices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .office:nth-child(3)::before { display: none; }
  .office:nth-child(n+3) { border-top: 1px solid var(--rim); }
}
@media (max-width: 560px) {
  .offices { grid-template-columns: minmax(0, 1fr); }
  .offices .office__photo { aspect-ratio: 16 / 9; }
  .office + .office::before { display: none; }
  .office + .office { border-top: 1px solid var(--rim); }
}

/* --------------------------------------------------------------------------
   Services page
   -------------------------------------------------------------------------- */
.svc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 1rem + 4vw, 5rem); padding-block: clamp(2rem, 1.5rem + 2vw, 3.25rem); border-top: 1px solid var(--rim); }
.svc:first-of-type { border-top: 0; padding-top: 0; }
.svc__head { display: grid; gap: 1.1rem; align-content: start; }
.svc__head h2 { font-size: clamp(1.4rem, 1.05rem + 1.1vw, 1.95rem); line-height: 1.16; }
.svc__body { display: grid; gap: 1.6rem; align-content: start; }
.svc__body > p { color: #cdd5e3; font-size: var(--fs-lg); }
.svc__tag { font-size: var(--fs-xs); color: var(--steel); font-weight: 600; }
@media (max-width: 960px) { .svc { grid-template-columns: minmax(0, 1fr); } }

.ticks { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1.5rem; }
.ticks li { position: relative; padding-left: 1.6rem; color: #cdd5e3; font-size: var(--fs-sm); line-height: 1.5; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ion); }
.is-en .ticks li::before { border-color: #b993ff; }
.ticks--one { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) { .ticks { grid-template-columns: minmax(0, 1fr); } }

.mini-label { font-size: var(--fs-xs); font-weight: 600; color: var(--steel); margin-bottom: .75rem; }

/* code/terminal window */
.term { border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--glass-line); background: #0d1017; box-shadow: var(--shadow-deep); }
.term__bar { display: flex; align-items: center; gap: .45rem; padding: .7rem .9rem; border-bottom: 1px solid var(--rim); background: #141924; }
.term__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--rim); }
.term__bar span { margin-left: .5rem; font-family: var(--font-code); font-size: .75rem; color: var(--steel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.term pre { margin: 0; padding: 1.1rem 1.2rem 1.3rem; overflow-x: auto; font-family: var(--font-code); font-size: .8rem; line-height: 1.75; color: #c8d1e0; }
.term .c { color: #66738a; }
.term .k { color: #9fb6ff; }
.term .s { color: #7fe3c2; }
.term .v { color: #d3a8ff; }
.term .ok { color: var(--ok); }

/* flow diagram (automation) */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; list-style: none; position: relative; }
.flow li { position: relative; padding: 1rem; border-radius: var(--radius-s); border: 1px solid var(--rim); background: rgba(26, 31, 42, .6); display: grid; gap: .35rem; align-content: start; }
.flow li b { font-size: var(--fs-sm); font-weight: 600; }
.flow li span { font-size: var(--fs-xs); color: var(--steel); line-height: 1.45; }
.flow li:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -.8rem; width: .8rem; height: 2px; background: var(--loop); }
.flow li.is-ai { border-color: rgba(160, 102, 255, .55); box-shadow: 0 0 24px -8px rgba(160, 102, 255, .55); }
@media (max-width: 760px) {
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow li:not(:last-child)::after { top: auto; bottom: -.8rem; right: auto; left: 1.5rem; width: 2px; height: .8rem; }
}

/* FAQ */
.faq { display: grid; border-top: 1px solid var(--rim); }
.faq details { border-bottom: 1px solid var(--rim); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.35rem 0; font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 500; letter-spacing: -.01em; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; flex: none; border-right: 2px solid var(--ion); border-bottom: 2px solid var(--ion); transform: rotate(45deg) translateY(-3px); transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details > div { padding: 0 0 1.5rem; color: var(--steel); max-width: 48rem; display: grid; gap: .8rem; }

/* --------------------------------------------------------------------------
   Ecosystem
   -------------------------------------------------------------------------- */
.layers { display: grid; gap: 0; list-style: none; border-top: 1px solid var(--rim); }
.layer { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1.5rem 3rem; padding: 1.75rem 0; border-bottom: 1px solid var(--rim); }
.layer__name { display: grid; gap: .4rem; align-content: start; }
.layer__name h3 { font-size: var(--fs-h4); }
.layer__name p { color: var(--steel); font-size: var(--fs-sm); }
@media (max-width: 760px) { .layer { grid-template-columns: minmax(0, 1fr); } }

.arch { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; }
.arch__col { display: grid; gap: .6rem; }
.arch__box { padding: .9rem 1rem; border-radius: var(--radius-s); border: 1px solid var(--rim); background: rgba(26, 31, 42, .7); font-size: var(--fs-sm); }
.arch__box small { display: block; color: var(--steel); font-size: var(--fs-xs); margin-top: .15rem; }
.arch__core { padding: 1.5rem; border-radius: var(--radius-m); text-align: left; display: grid; gap: .8rem; }
.arch__core h3 { font-size: var(--fs-h4); }
.arch__core ul { list-style: none; display: grid; gap: .45rem; font-size: var(--fs-sm); color: #cdd5e3; }
.arch__core li::before { content: "› "; color: var(--ion); }
.arch__wire { width: 46px; height: 2px; background: var(--loop); position: relative; }
.arch__wire::after { content: ""; position: absolute; right: -2px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 10px var(--violet); }
@media (max-width: 960px) {
  .arch { grid-template-columns: minmax(0, 1fr); }
  .arch__wire { width: 2px; height: 30px; justify-self: center; background: linear-gradient(180deg, var(--signal), var(--violet)); }
  .arch__wire::after { right: -4px; top: auto; bottom: -2px; }
}

.scenarios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, .5rem + 1.5vw, 1.75rem); list-style: none; }
.scenario { border-radius: var(--radius-m); border: 1px solid var(--rim); background: linear-gradient(160deg, rgba(43, 155, 255, .07), transparent 45%), rgba(26, 31, 42, .5); display: grid; gap: .9rem; align-content: start; }
.scenario:nth-child(even) { background: linear-gradient(160deg, rgba(160, 102, 255, .08), transparent 45%), rgba(26, 31, 42, .5); }
.scenario__sector { font-size: var(--fs-xs); font-weight: 600; color: var(--ion); }
.scenario:nth-child(even) .scenario__sector { color: #c3a4ff; }
.scenario h3 { font-size: var(--fs-h3); }
.scenario p { color: var(--steel); }
@media (max-width: 760px) { .scenarios { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------------------
   Portfolio
   -------------------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filters button {
  font: 500 var(--fs-sm)/1 var(--font-body); color: var(--steel);
  padding: .65rem 1rem; border-radius: 999px; border: 1px solid var(--rim); background: rgba(233, 238, 247, .02); cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.filters button:hover { color: var(--frost); border-color: #3c4760; }
.filters button[aria-pressed="true"] { color: #fff; border-color: transparent; background: var(--loop); }
.filters button span { margin-left: .35rem; opacity: .7; font-variant-numeric: tabular-nums; }

.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, .5rem + 1.2vw, 1.5rem); list-style: none; }
.work { display: grid; grid-template-rows: auto 1fr; border-radius: var(--radius-m); border: 1px solid var(--rim); background: rgba(26, 31, 42, .55); overflow: hidden; transition: border-color .25s ease, transform .25s ease; }
.work:hover { border-color: #3c4760; }
.work[hidden] { display: none !important; }
.work__viz { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(90% 120% at 100% 0%, rgba(160, 102, 255, .22), transparent 60%), radial-gradient(90% 120% at 0% 100%, rgba(43, 155, 255, .2), transparent 60%), radial-gradient(rgba(233, 238, 247, .09) 1px, transparent 1.2px) 0 0 / 16px 16px, #10141c; border-bottom: 1px solid var(--rim); }
.work__viz svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.work__body { padding: 1.35rem 1.4rem 1.5rem; display: grid; gap: .65rem; align-content: start; }
.work__meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { font-size: .75rem; font-weight: 600; padding: .28rem .6rem; border-radius: 999px; border: 1px solid var(--rim); color: #cdd5e3; }
.tag--c { border-color: rgba(98, 216, 255, .4); color: var(--ion); }
.work h3 { font-size: var(--fs-h4); }
.work p { color: var(--steel); font-size: var(--fs-sm); }
@media (max-width: 1060px) { .works { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .works { grid-template-columns: minmax(0, 1fr); } }

.sectors { display: flex; flex-wrap: wrap; gap: .6rem 2rem; list-style: none; font-family: var(--font-display); font-size: clamp(1.1rem, .9rem + .8vw, 1.6rem); font-weight: 500; letter-spacing: -.02em; color: rgba(233, 238, 247, .3); }
.sectors li { transition: color .2s ease; }
.sectors li:hover { color: var(--frost); }

/* --------------------------------------------------------------------------
   London page
   -------------------------------------------------------------------------- */
.lon-hero { position: relative; isolation: isolate; overflow: hidden; margin-top: calc(-1 * var(--header-h)); padding-top: calc(var(--header-h) + clamp(2.5rem, 1.5rem + 4vw, 5rem)); background: radial-gradient(80% 60% at 70% 30%, rgba(160, 102, 255, .26), transparent 60%), radial-gradient(60% 50% at 10% 20%, rgba(43, 155, 255, .16), transparent 60%), linear-gradient(180deg, #0c0f17, var(--graphite)); }
.lon-hero .hero__canvas { opacity: .5; }
.lon-hero__copy { display: grid; gap: 1.35rem; max-width: 46rem; position: relative; z-index: 1; }
.lon-hero h1 { font-size: clamp(2rem, .9rem + 4vw, 4.4rem); line-height: 1.04; letter-spacing: -.04em; }
.lon-hero__photo { position: relative; margin-top: clamp(-2rem, -4vw, -1rem); }
.lon-hero__photo img { width: 100%; max-width: 1240px; margin-inline: auto; -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, #000 78%, transparent 100%); }
.lon-hero__photo::before { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 60%; background: radial-gradient(closest-side, rgba(160, 102, 255, .45), transparent); filter: blur(40px); z-index: -1; }
.addr-card { position: absolute; right: max(var(--gutter), calc(50% - var(--maxw) / 2 + var(--gutter))); bottom: 18%; padding: 1.1rem 1.25rem; border-radius: var(--radius-m); max-width: 320px; display: grid; gap: .35rem; font-size: var(--fs-sm); }
.addr-card b { font-family: var(--font-display); font-weight: 500; font-size: 1rem; letter-spacing: -.01em; }
.addr-card span { color: var(--steel); }
.addr-pin { position: absolute; left: 33.5%; top: 18%; width: 18px; height: 18px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 6px rgba(160, 102, 255, .25), 0 0 26px var(--violet); }
.addr-pin::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 70px; background: linear-gradient(180deg, var(--violet), transparent); }
@media (max-width: 760px) {
  .addr-card { position: relative; right: auto; bottom: auto; margin: -1.5rem var(--gutter) 0; max-width: none; }
  .addr-pin { display: none; }
}

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rim); }
.fact { padding: 1.5rem 1.25rem 1.5rem 0; display: grid; gap: .5rem; align-content: start; }
.fact + .fact { padding-left: 1.25rem; border-left: 1px solid var(--rim); }
.fact b { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem); letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; background: linear-gradient(100deg, #b8d9ff, #d5bfff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fact span { color: var(--steel); font-size: var(--fs-sm); line-height: 1.45; }
.source { margin-top: 1rem; font-size: var(--fs-xs); color: var(--steel); }
@media (max-width: 860px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--rim); }
}

.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, .5rem + 1.5vw, 1.75rem); list-style: none; }
.role { border-radius: var(--radius-m); border: 1px solid var(--rim); background: rgba(26, 31, 42, .55); display: grid; gap: .85rem; align-content: start; }
.role h3 { font-size: var(--fs-h4); }
.role p { color: var(--steel); font-size: var(--fs-sm); }
@media (max-width: 960px) { .roles { grid-template-columns: minmax(0, 1fr); } }

.col-stack { display: grid; gap: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); align-content: start; }
.col-stack .photo { aspect-ratio: 16 / 9; border-radius: var(--radius-m); }
.access { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--rim); }
.access li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rim); align-items: baseline; }
.access b { font-weight: 600; }
.access span { color: var(--steel); font-size: var(--fs-sm); text-align: right; }
@media (max-width: 640px) { .access li { grid-template-columns: minmax(0, 1fr); gap: .2rem; } .access span { text-align: left; } }

.utpo { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 1rem + 3vw, 4rem); padding: clamp(1.75rem, 1rem + 3vw, 3rem); }
.utpo h2 { font-size: var(--fs-h3); margin-bottom: 1rem; }
.utpo .prose { color: #cdd5e3; }
@media (max-width: 960px) { .utpo { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: start; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

.form { padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); display: grid; gap: 1.25rem; }
.form h2 { font-size: var(--fs-h3); }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
@media (max-width: 640px) { .form__row { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: .45rem; min-width: 0; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: #cfd7e5; }
.field label i { font-style: normal; color: var(--steel); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: .8rem 1rem;
  font: 400 1rem/1.4 var(--font-body); color: var(--frost);
  background: rgba(12, 15, 21, .7); border: 1px solid var(--rim); border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ion) 50%), linear-gradient(135deg, var(--ion) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.5rem; }
.field select option { background: #141924; color: var(--frost); }
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #6c778c; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #3c4760; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ion); box-shadow: 0 0 0 4px rgba(98, 216, 255, .14); background: rgba(12, 15, 21, .9); }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--err); }
.field__err { font-size: var(--fs-xs); color: var(--err); min-height: 0; }
.field__err:empty { display: none; }
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: .75rem; align-items: start; font-size: var(--fs-sm); color: var(--steel); }
.check input { width: 20px; height: 20px; margin: .1rem 0 0; accent-color: var(--signal); }
.check a { color: var(--frost); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form__note { font-size: var(--fs-xs); color: var(--steel); }
.form-status { padding: 1rem 1.1rem; border-radius: 12px; font-size: var(--fs-sm); display: grid; gap: .35rem; }
.form-status[data-type="ok"] { background: rgba(79, 224, 168, .1); border: 1px solid rgba(79, 224, 168, .4); color: #c9f7e5; }
.form-status[data-type="err"] { background: rgba(255, 107, 129, .08); border: 1px solid rgba(255, 107, 129, .4); color: #ffd3da; }
.btn[aria-busy="true"] { opacity: .75; pointer-events: none; }

.side-stack { display: grid; gap: 1.25rem; }
.mail-card { padding: 1.5rem; display: grid; gap: .75rem; }
.mail-card__addr { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.mail-card__addr span { font-family: var(--font-display); font-size: clamp(1.1rem, 1rem + .6vw, 1.4rem); font-weight: 500; letter-spacing: -.02em; user-select: all; overflow-wrap: anywhere; }
.copy-btn { font: 600 .78rem/1 var(--font-body); color: var(--frost); padding: .5rem .8rem; border-radius: 999px; border: 1px solid var(--rim); background: rgba(233, 238, 247, .04); cursor: pointer; }
.copy-btn:hover { border-color: var(--ion); }
.copy-btn[data-done] { border-color: var(--ok); color: var(--ok); }

.netmap { margin: 0; border-radius: var(--radius-l); border: 1px solid var(--rim); background: radial-gradient(rgba(233, 238, 247, .08) 1px, transparent 1.3px) 0 0 / 14px 14px, radial-gradient(80% 80% at 30% 20%, rgba(160, 102, 255, .14), transparent 60%), radial-gradient(70% 70% at 80% 80%, rgba(43, 155, 255, .14), transparent 60%), #0e1118; overflow: hidden; }
.netmap svg { width: 100%; height: auto; }
.netmap figcaption { padding: .9rem 1.2rem 1.1rem; font-size: var(--fs-xs); color: var(--steel); border-top: 1px solid var(--rim); }


/* --------------------------------------------------------------------------
   Photography in context
   -------------------------------------------------------------------------- */
/* full-bleed background photo behind heroes and CTA bands */
.hero-photo { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.92); }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 21, 28, .96) 0%, rgba(18, 21, 28, .86) 36%, rgba(18, 21, 28, .58) 68%, rgba(18, 21, 28, .5) 100%),
    linear-gradient(180deg, rgba(18, 21, 28, .45) 0%, rgba(18, 21, 28, 0) 28%, rgba(18, 21, 28, .55) 78%, var(--graphite) 100%);
}
.hero-photo.is-empty { display: none; }
.hero:has(.hero-photo) .hero__canvas, .page-hero:has(.hero-photo) .hero__canvas { opacity: .45; mix-blend-mode: screen; }
@media (max-width: 960px) {
  .hero-photo::after { background: linear-gradient(180deg, rgba(18, 21, 28, .78), rgba(18, 21, 28, .88) 60%, var(--graphite)); }
}
.cta-band .hero-photo { border-radius: inherit; }
.cta-band .hero-photo::after { background: linear-gradient(90deg, rgba(15, 18, 25, .95) 0%, rgba(15, 18, 25, .82) 50%, rgba(15, 18, 25, .55) 100%); }

/* photo inside a section head / service head */
.sec-head .photo, .svc__head .photo { margin-top: .75rem; }
.svc__head .photo { aspect-ratio: 16 / 9; border-radius: var(--radius-m); }

/* card-top photo that bleeds to the card edges */
.scenario, .role { --pad: clamp(1.5rem, 1rem + 1.5vw, 2rem); padding: var(--pad); overflow: hidden; }
.photo--card { width: calc(100% + 2 * var(--pad)); max-width: none; margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) .35rem; aspect-ratio: 16 / 9; border: 0; border-radius: 0; }

/* timeline thumbnails */
.era .photo { aspect-ratio: 2 / 1; max-width: 420px; margin-top: .6rem; border-radius: var(--radius-m); }

/* people + AI band */
.people { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: center; }
.people .photo { aspect-ratio: 16 / 10; }
.people__copy { display: grid; gap: 1.1rem; }
.people__copy p { color: #c3cbda; font-size: var(--fs-lg); }
@media (max-width: 960px) { .people { grid-template-columns: minmax(0, 1fr); } }

/* workspace gallery */
.gallery { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(160px, 17vw, 250px); gap: clamp(.6rem, .4rem + .8vw, 1rem); }
.gallery__item { min-width: 0; }
.gallery__item--big { grid-column: span 2; grid-row: span 2; }
.gallery .photo { height: 100%; aspect-ratio: auto; border-radius: var(--radius-m); }
.gallery .photo:hover img { transform: scale(1.03); }
@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 170px; }
  .gallery__item--big { grid-column: span 2; grid-row: span 1; }
}

/* office cards with city photo */
.office__photo { aspect-ratio: 4 / 3; border-radius: var(--radius-m); margin-bottom: .5rem; }

/* portfolio: photo behind the process graph */
.work__img { position: absolute; inset: 0; }
.work__img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); transition: transform .6s ease, opacity .4s ease; }
.work__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 16, 23, .45), rgba(13, 16, 23, .8)); }
.work__img img.is-broken { opacity: 0; }
.work:hover .work__img img { transform: scale(1.04); }
.work__viz svg { z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .gallery .photo:hover img, .work:hover .work__img img { transform: none; }
}

/* --------------------------------------------------------------------------
   Legal
   -------------------------------------------------------------------------- */
.legal { display: grid; gap: 2rem; max-width: 46rem; }
.legal section { display: grid; gap: .75rem; }
.legal h2 { font-size: var(--fs-h3); }
.legal p, .legal li { color: #cdd5e3; }
.legal ul { padding-left: 1.2rem; display: grid; gap: .4rem; }
.legal .updated { color: var(--steel); font-size: var(--fs-sm); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { margin-top: 0; border-top: 1px solid var(--rim); background: linear-gradient(180deg, #10131a, #0d1016); padding-top: clamp(3rem, 2rem + 3vw, 4.5rem); }
.footer-top { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 1rem + 4vw, 5rem); padding-bottom: 2.5rem; }
.footer-brand { display: grid; gap: 1.1rem; align-content: start; }
.footer-brand p { color: var(--steel); font-size: var(--fs-sm); max-width: 24rem; }
.footer-brand .mail { font-family: var(--font-display); font-size: 1.05rem; color: var(--frost); text-decoration: none; letter-spacing: -.01em; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.footer-cols h2 { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600; color: var(--frost); margin-bottom: .7rem; letter-spacing: .02em; }
.footer-cols address, .footer-cols li { font-style: normal; font-size: var(--fs-xs); color: var(--steel); line-height: 1.6; }
.footer-cols ul { list-style: none; display: grid; gap: .35rem; }
.footer-cols a { color: var(--steel); text-decoration: none; }
.footer-cols a:hover { color: var(--frost); }
.footer-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; padding-block: 1.25rem; border-top: 1px solid var(--rim); }
.footer-nav a { color: #cdd5e3; text-decoration: none; font-size: var(--fs-sm); }
.footer-nav a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rim); font-size: var(--fs-xs); color: var(--steel); }
.footer-bottom__legal { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; align-items: center; }
.footer-bottom__legal a { color: var(--steel); }
.footer-bottom__legal a:hover { color: var(--frost); }

/* agency signature — bottom right */
.signature {
  margin-left: auto; display: inline-flex; align-items: center; padding: .35rem;
  border-radius: 10px; text-decoration: none; line-height: 0;
}
.signature__logo { height: 32px; width: auto; filter: invert(1) grayscale(1) brightness(1.25) contrast(1.1); opacity: .7; transition: opacity .25s ease, transform .25s ease; }
.signature:hover .signature__logo, .signature:focus-visible .signature__logo { opacity: 1; transform: translateY(-1px); }
@media (max-width: 960px) { .footer-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .signature { margin-left: 0; } }

/* 404 */
.nf { min-height: 70vh; display: grid; align-content: center; gap: 1.5rem; }
.nf__code { font-family: var(--font-display); font-size: var(--fs-mega); font-weight: 500; letter-spacing: -.05em; line-height: 1; background: var(--loop); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* --------------------------------------------------------------------------
   dipro asistan — site içi yapay zeka sohbet penceresi
   -------------------------------------------------------------------------- */
.ai { --ai-r: 22px; font-family: var(--font-body); }
.ai-fab {
  position: fixed; z-index: 160; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: .6rem; height: 52px; padding: 0 1.15rem 0 .45rem;
  border-radius: 999px; border: 1px solid rgba(98, 216, 255, .35); cursor: pointer;
  color: var(--frost); font: 600 var(--fs-sm)/1 var(--font-body); letter-spacing: .01em;
  background: rgba(18, 21, 28, .82); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 0 0 1px rgba(160, 102, 255, .12), 0 14px 40px -14px rgba(43, 155, 255, .75), 0 10px 30px -18px rgba(160, 102, 255, .8);
  transition: transform .2s ease, border-color .2s ease, box-shadow .3s ease;
}
.ai-fab:hover { transform: translateY(-2px); border-color: rgba(98, 216, 255, .7); }
.ai-fab:focus-visible { outline: 2px solid var(--ion); outline-offset: 3px; }
.ai-fab__icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff;
  background: linear-gradient(135deg, var(--signal), #5b7dff 50%, var(--violet));
  box-shadow: 0 0 18px rgba(98, 216, 255, .45);
}
.ai-fab__icon svg { width: 22px; height: 22px; }
.ai.is-open .ai-fab { border-color: rgba(160, 102, 255, .6); }

.ai-panel {
  position: fixed; z-index: 170; right: 20px; bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100dvh - 120px));
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--ai-r); border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(233, 238, 247, .06), rgba(233, 238, 247, .02)), rgba(16, 19, 26, .94);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  box-shadow: var(--shadow-deep), 0 0 0 1px rgba(43, 155, 255, .08);
}
.ai-panel[hidden] { display: none; }
.ai-panel:not([hidden]) { animation: ai-in .22s ease-out; }
@keyframes ai-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

.ai-head { display: flex; align-items: center; gap: .7rem; padding: .85rem .8rem .85rem 1rem; border-bottom: 1px solid var(--rim); }
.ai-head__mark { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--signal), var(--violet)); }
.ai-head__mark svg { width: 19px; height: 19px; }
.ai-head__txt { flex: 1; min-width: 0; }
.ai-head h2 { font: 600 .98rem/1.2 var(--font-display); letter-spacing: -.01em; }
.ai-head p { display: flex; align-items: center; gap: .4rem; margin-top: .2rem; font-size: var(--fs-xs); color: var(--steel); }
.ai-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px rgba(79, 224, 168, .8); }
.ai-iconbtn { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--steel); cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.ai-iconbtn svg { width: 18px; height: 18px; }
.ai-iconbtn:hover { color: var(--frost); border-color: var(--rim); background: rgba(233, 238, 247, .04); }
.ai-iconbtn:focus-visible, .ai-send:focus-visible, .ai-chip:focus-visible { outline: 2px solid var(--ion); outline-offset: 2px; }

.ai-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1rem; display: flex; flex-direction: column; gap: .65rem; scrollbar-width: thin; scrollbar-color: var(--rim) transparent; }
.ai-log:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(98, 216, 255, .35); }
.ai-msg { max-width: 88%; padding: .7rem .9rem; border-radius: 16px; font-size: .9375rem; line-height: 1.55; overflow-wrap: anywhere; }
.ai-msg p + p, .ai-msg p + ul, .ai-msg p + ol, .ai-msg ul + p, .ai-msg ol + p { margin-top: .5rem; }
.ai-msg ul, .ai-msg ol { padding-left: 1.15rem; margin: .1rem 0; }
.ai-msg ul { list-style: disc; }
.ai-msg ol { list-style: decimal; }
.ai-msg li + li { margin-top: .2rem; }
.ai-msg strong { font-weight: 600; color: #fff; }
.ai-msg a { color: var(--ion); text-decoration: underline; text-underline-offset: 2px; }
.ai-msg--bot { align-self: flex-start; color: #d9e1ee; background: rgba(233, 238, 247, .05); border: 1px solid var(--rim); border-bottom-left-radius: 6px; }
.ai-msg--user { align-self: flex-end; color: #fff; background: linear-gradient(100deg, #2b8df0, #6a72ff); border-bottom-right-radius: 6px; box-shadow: 0 8px 22px -14px rgba(43, 155, 255, .9); }
.ai-msg--error { border-color: rgba(255, 107, 129, .45); }
.ai-retry { display: inline-block; margin-top: .55rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--rim); background: transparent; color: var(--frost); font: 600 var(--fs-xs)/1.2 var(--font-body); cursor: pointer; }
.ai-retry:hover { border-color: rgba(98, 216, 255, .6); }
.ai-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .15rem; }
.ai-chip { padding: .5rem .8rem; border-radius: 999px; border: 1px solid var(--rim); background: rgba(98, 216, 255, .04); color: var(--frost); font: 500 .84rem/1.3 var(--font-body); text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.ai-chip:hover { border-color: rgba(98, 216, 255, .6); background: rgba(98, 216, 255, .08); }
.ai-typing { display: inline-flex; gap: 5px; padding: .25rem 0; }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--steel); animation: ai-dot 1.1s infinite ease-in-out; }
.ai-typing i:nth-child(2) { animation-delay: .15s; }
.ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 70%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); background: var(--ion); } }

.ai-form { display: flex; align-items: flex-end; gap: .5rem; padding: .75rem .75rem .5rem; border-top: 1px solid var(--rim); }
.ai-form textarea {
  flex: 1; min-height: 46px; max-height: 140px; resize: none; padding: .72rem .9rem; border-radius: 14px;
  border: 1px solid var(--rim); background: rgba(233, 238, 247, .045); color: var(--frost);
  font: 400 .9375rem/1.45 var(--font-body); transition: border-color .2s, background .2s;
}
.ai-form textarea::placeholder { color: #7d889c; }
.ai-form textarea:focus { outline: none; border-color: rgba(98, 216, 255, .65); background: rgba(233, 238, 247, .06); }
.ai-send { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; cursor: pointer; color: #fff; background: linear-gradient(120deg, var(--signal), var(--violet)); box-shadow: 0 8px 22px -12px rgba(43, 155, 255, .9); transition: transform .15s ease, opacity .2s; }
.ai-send svg { width: 20px; height: 20px; }
.ai-send:hover { transform: translateX(1px); }
.ai-send:disabled { opacity: .45; cursor: progress; }
.ai-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem 1rem; padding: .1rem 1rem .85rem; font-size: .75rem; line-height: 1.45; color: var(--steel); }
.ai-foot p { flex: 1 1 220px; }
.ai-foot a { color: var(--steel); text-decoration: underline; text-underline-offset: 2px; }
.ai-foot .ai-cta { color: var(--frost); font-weight: 600; text-decoration: none; white-space: nowrap; }
.ai-foot .ai-cta:hover { color: var(--ion); }

@media (max-width: 560px) {
  .ai-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; padding: 0; justify-content: center; }
  .ai-fab__icon { width: 44px; height: 44px; }
  .ai-fab__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body:has(.lang-toast) .ai-fab { bottom: calc(196px + env(safe-area-inset-bottom, 0px)); }
  .ai.is-open .ai-fab { display: none; }
  .ai-panel { inset: 0; width: 100%; height: 100dvh; border-radius: 0; border: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .ai-msg { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-panel:not([hidden]) { animation: none; }
  .ai-typing i { animation-duration: 2.4s; }
  .ai-fab:hover { transform: none; }
}
@media print { .ai { display: none; } }
