/* ============ tokens ============ */
:root {
  --bg: #090909;
  --panel: #111;
  --panel-2: #181818;
  --ink: #f7f7ef;
  --muted: #a6a79e;
  --line: rgba(247, 247, 239, .14);
  --line-strong: rgba(247, 247, 239, .28);
  --lime: #c8ff19;
  --lime-soft: rgba(200, 255, 25, .12);
  --lime-edge: rgba(200, 255, 25, .5);
  --blue: #5c7cff;
  --cyan: #20d6d2;
  --pink: #ff5f9a;
  --radius: 8px;
  --radius-lg: 14px;
  --max: 1180px;
  --header: 74px;
  --accent: var(--lime);
  --surface: rgba(255, 255, 255, .035);
  --surface-hover: rgba(255, 255, 255, .06);
  --surface-sunk: rgba(0, 0, 0, .22);
  --header-bg: rgba(9, 9, 9, .74);
  --footer-bg: #050505;
  --dialog-bg: #0f0f0f;
  --media-bg: #070707;
  --work-card: rgba(9, 9, 9, .4);
  --expand-line: #3d3d36;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

/* ============ base ============ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); -webkit-text-size-adjust: 100%; }
html.modal-open { overflow: hidden; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 8%, rgba(200, 255, 25, .16), transparent 26rem),
    radial-gradient(circle at 88% 24%, rgba(92, 124, 255, .14), transparent 26rem),
    linear-gradient(180deg, #050505 0%, var(--bg) 30%, #0f0f0d 100%);
  background-color: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--lime); color: #111; padding: 10px 16px; border-radius: 999px; font-weight: 800;
}
.skip:focus { top: 12px; }

/* ============ type ============ */
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(3.1rem, 8.4vw, 7.2rem); line-height: .9; letter-spacing: -.025em; margin-bottom: 26px; font-weight: 900; }
h2 { font-size: clamp(2.3rem, 5.4vw, 4.5rem); line-height: .94; letter-spacing: -.02em; margin-bottom: 0; font-weight: 900; }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.12; margin-bottom: 10px; font-weight: 850; letter-spacing: -.01em; }
h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin: 0 0 12px; font-weight: 800; }
h4.gap { margin-top: 26px; }
p { color: var(--muted); line-height: 1.68; font-size: clamp(1rem, 1.15vw, 1.06rem); }
.lead { font-size: clamp(1.08rem, 1.55vw, 1.28rem); max-width: 720px; }
.eyebrow {
  color: var(--accent); font-weight: 850; font-size: .95rem; margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); }
.kind { color: var(--accent); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.inline-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  gap: clamp(20px, 5vw, 64px); align-items: end; margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head .lead { margin: 0; }

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 800; white-space: nowrap;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.solid { background: var(--lime); color: #111; border-color: var(--lime); }
.btn.solid:hover { background: #d8ff5c; }
.btn.ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn.ghost:hover { border-color: var(--lime); color: var(--accent); }
.btn.small { min-height: 38px; padding: 7px 14px; font-size: .9rem; }
.btn:disabled { opacity: .35; pointer-events: none; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center;
  font-size: 1.5rem; line-height: 1; flex: none; transition: .2s;
}
.icon-btn:hover { border-color: var(--lime); color: var(--accent); }

/* ============ header ============ */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { min-height: var(--header); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand, .loader-brand { --m: 40px; }
.brand { display: inline-flex; align-items: center; gap: calc(var(--m) * .38); }
.mark {
  position: relative; isolation: isolate; flex: none;
  width: var(--m); height: var(--m);
  display: grid; place-items: center;
  border-radius: 62.8% 0 62.8% 0;
  color: #10120f; background: var(--lime);
  font-size: calc(var(--m) * .45); font-weight: 800; letter-spacing: -.02em; line-height: 1;
}
.mark::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 156 156'%3E%3Cpath d='M22 140c52-6 86-38 105-88' fill='none' stroke='%23eff8df' stroke-width='8' stroke-linecap='round' opacity='.75'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.brand-text { display: grid; gap: calc(var(--m) * .1); justify-items: start; transform: translateY(calc(var(--m) * .08)); }
.brand-name { font-size: calc(var(--m) * .54); font-weight: 800; letter-spacing: .01em; line-height: 1; color: var(--ink); }
.brand-tag { font-size: calc(var(--m) * .135); font-weight: 700; letter-spacing: .24em; line-height: 1; color: var(--accent); white-space: nowrap; }
.site-header .brand-tag { display: none; }
.site-header .brand-text { transform: none; }
.footer .brand { --m: 60px; }
.navlinks { display: flex; align-items: center; gap: 4px; }
.navlinks a {
  min-height: 38px; display: inline-flex; align-items: center; padding: 8px 14px;
  border-radius: 999px; border: 1px solid transparent; color: var(--muted); transition: .2s;
}
.navlinks a:hover, .navlinks a[aria-current] { color: var(--ink); border-color: var(--line); background: var(--surface-hover); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }

/* ============ hero ============ */
.hero { position: relative; min-height: calc(100svh - var(--header)); display: grid; align-items: center; padding: 40px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.flow {
  margin: 0;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background:
    linear-gradient(140deg, rgba(200, 255, 25, .12), transparent 45%),
    linear-gradient(320deg, rgba(92, 124, 255, .14), transparent 42%),
    var(--panel);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
}
.flow-head {
  display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--muted);
  padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.flow-state {
  margin-left: auto; color: var(--accent); font-weight: 800; text-transform: uppercase; font-size: .7rem;
  letter-spacing: .1em; border: 1px solid var(--lime-edge); padding: 4px 9px; border-radius: 999px;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(200, 255, 25, .55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(200, 255, 25, 0); }
}
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; position: relative; }
.flow-steps::before { content: ""; position: absolute; left: 21px; top: 24px; bottom: 24px; width: 2px; background: var(--line); }
.flow-steps li {
  position: relative; display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center;
  padding: 9px 12px 9px 0; border-radius: 10px; transition: background .4s ease, opacity .4s ease;
}
.js .flow-steps li { opacity: .5; }
.flow-steps .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; position: relative; z-index: 1;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); transition: .4s ease;
}
.flow-steps .ico svg { width: 20px; height: 20px; }
.flow-steps b { display: block; font-weight: 800; }
.flow-steps small { color: var(--muted); font-size: .88rem; }
.flow-steps .tick {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: .72rem; font-weight: 900; color: #111; background: var(--lime); transform: scale(0); transition: transform .3s ease;
}
.js .flow-steps li.active, .js .flow-steps li.done { opacity: 1; }
.flow-steps li.active { background: rgba(200, 255, 25, .07); }
.flow-steps li.active .ico { background: var(--lime); border-color: var(--lime); color: #111; box-shadow: 0 0 26px rgba(200, 255, 25, .35); }
.flow-steps li.done .ico { border-color: var(--lime-edge); color: var(--accent); }
.flow-steps li.done .tick { transform: scale(1); }

/* ============ marquee ============ */
.marquee {
  border-block: 1px solid var(--line); overflow: hidden; padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 42s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; margin: 0; padding: 0; list-style: none; }
.marquee li {
  display: flex; align-items: center; gap: 30px; padding-right: 30px;
  color: var(--accent); font-weight: 900; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.marquee li::after { content: ""; width: 6px; height: 6px; background: var(--line-strong); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ services ============ */
.services { display: grid; grid-template-columns: minmax(230px, .36fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.service-tabs { display: grid; gap: 10px; position: sticky; top: calc(var(--header) + 20px); }
.service-tab {
  position: relative; text-align: left; display: grid; gap: 4px;
  padding: 18px 44px 18px 20px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); transition: .2s;
}
.service-tab .t { font-size: 1.2rem; font-weight: 850; }
.service-tab .s { color: var(--muted); font-size: .86rem; }
.service-tab:hover { border-color: var(--line-strong); }
.service-tab[aria-selected="true"] { border-color: var(--lime); background: var(--lime-soft); }
.service-tab[aria-selected="true"]::after {
  content: "→"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 900;
}
.service-panel {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(200, 255, 25, .08), transparent 40%), var(--panel);
  padding: clamp(22px, 4vw, 44px);
  animation: panel-in .35s ease;
}
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }
.service-panel h3 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: .95; letter-spacing: -.02em; margin-bottom: 16px; }
.service-panel .lead { color: var(--ink); opacity: .86; }
.panel-cols {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(22px, 4vw, 44px);
  margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line);
}
.panel-cols p { font-size: 1rem; }
.panel-cta { margin-top: 32px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 30px; color: var(--ink); line-height: 1.5; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 19px; height: 19px; border-radius: 50%;
  border: 1px solid var(--lime-edge);
  background: var(--lime-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8ff19' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; font-size: .8rem; background: var(--surface-sunk); }
.related { display: grid; gap: 8px; }
.related a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 800; transition: .2s;
}
.related a small { color: var(--muted); font-weight: 500; font-size: .82rem; text-align: right; }
.related a:hover { border-color: var(--lime); background: var(--lime-soft); }

/* ============ work ============ */
.work-tools { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 700; color: var(--muted); transition: .2s;
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: #111; }
.search-wrap { position: relative; flex: 1 1 260px; max-width: 380px; }
.search-wrap svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search {
  width: 100%; min-height: 44px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); padding: 0 16px 0 44px; transition: border-color .2s;
}
.search::placeholder { color: #7d7e76; }
.search:focus { border-color: var(--lime); outline: none; }

.work-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.project {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.project:hover { transform: translateY(-4px); border-color: var(--lime-edge); background: var(--surface-hover); }
.project-shot { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #0d0d0d; aspect-ratio: 16 / 9; overflow: hidden; }
.project-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project:hover .project-shot img { transform: scale(1.035); }
.project-shot:focus-visible { outline-offset: -3px; }
.status {
  position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px; border-radius: 999px; background: rgba(9, 9, 9, .82); border: 1px solid var(--line);
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.status.live { color: var(--ink); }
.status.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.project-body { display: flex; flex-direction: column; flex: 1; padding: 20px 20px 22px; }
.project-body .summary { font-size: .98rem; margin-bottom: 16px; }
.stack { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tech {
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: .78rem;
  background: var(--surface-sunk); transition: .2s;
}
.tech:hover { border-color: var(--lime); color: var(--accent); }
.project-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.empty { text-align: center; padding: 40px 0 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

/* ============ process ============ */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.step { border-top: 2px solid var(--line); padding-top: 22px; transition: border-color .3s ease; }
.step:hover { border-color: var(--lime); }
.step .n { display: block; color: var(--accent); font-weight: 900; font-size: .88rem; margin-bottom: 28px; }
.step h3 { font-size: clamp(1.45rem, 2.3vw, 1.95rem); }

/* ============ credentials ============ */
.credentials { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .02) 30%, transparent); }
.cert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cert {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  transition: transform .25s ease, border-color .25s ease;
}
.cert:hover { transform: translateY(-4px); border-color: var(--lime-edge); }
.cert-shot { position: relative; display: block; width: 100%; padding: 0; border: 0; aspect-ratio: 640 / 492; background: #f4f2ec; overflow: hidden; }
.cert-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cert-shot::after {
  content: "View certificate"; position: absolute; inset: auto 12px 12px auto; padding: 6px 12px; border-radius: 999px;
  background: rgba(9, 9, 9, .85); color: var(--ink); font-size: .78rem; font-weight: 800;
  opacity: 0; transform: translateY(6px); transition: .25s ease;
}
.cert:hover .cert-shot img { transform: scale(1.03); }
.cert:hover .cert-shot::after, .cert-shot:focus-visible::after { opacity: 1; transform: none; }
.cert-shot:focus-visible { outline-offset: -3px; }
.cert-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.cert-body h3 { font-size: 1.12rem; }
.cert-body p:not(.kind) { font-size: .94rem; }
.verify { margin-top: auto; color: var(--accent); font-weight: 800; font-size: .92rem; align-self: flex-start; }
.verify:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============ faq ============ */
.faq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 6vw, 72px); align-items: start; }
.faq-wrap h2 { margin-bottom: 18px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s; }
.faq-list details[open] { border-color: var(--lime-edge); }
.faq-list summary { cursor: pointer; list-style: none; position: relative; padding: 20px 56px 20px 22px; font-weight: 800; font-size: 1.06rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 1.5rem; font-weight: 500; transition: transform .25s ease;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list details p { margin: 0; padding: 0 22px 22px; }

/* ============ contact ============ */
.contact {
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(200, 255, 25, .1), transparent 45%), rgba(255, 255, 255, .02);
}
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 72px); align-items: start; }
.contact h2 { margin-bottom: 20px; }
.email-card {
  margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-sunk);
}
.email-card span { width: 100%; color: var(--muted); font-size: .85rem; }
.email-card a { font-weight: 800; font-size: clamp(1rem, 1.7vw, 1.18rem); overflow-wrap: anywhere; }
.email-card a:hover { color: var(--accent); }
.brief {
  display: grid; gap: 24px; padding: clamp(20px, 3.5vw, 34px);
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel);
}
.brief fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.brief legend { padding: 0; margin-bottom: 12px; font-weight: 800; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { position: relative; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700; transition: .2s;
}
.choice label:hover span { border-color: var(--line-strong); color: var(--ink); }
.choice input:checked + span { background: var(--lime); border-color: var(--lime); color: #111; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 8px; font-weight: 800; }
.field .opt { color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); font-weight: 400; transition: border-color .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--lime); outline: none; }
.field [aria-invalid="true"] { border-color: var(--pink); }
.brief .btn[type="submit"] { justify-self: start; }
.form-note { margin: 0; font-size: .9rem; }
.form-note.error { color: var(--pink); }
.form-note a { color: var(--accent); text-decoration: underline; overflow-wrap: anywhere; }

/* ============ footer ============ */
.footer { padding: 56px 0 28px; background: var(--footer-bg); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr .7fr .7fr 1fr; gap: 28px; }
.footer p { max-width: 340px; margin: 16px 0 0; font-size: .95rem; }
.footer h4 { margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--muted); overflow-wrap: anywhere; transition: color .2s; }
.footer ul a:hover { color: var(--ink); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); color: #7d7e76; font-size: .88rem;
}
.footer-bottom a:hover { color: var(--ink); }

/* ============ dialogs ============ */
dialog {
  padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--dialog-bg); color: var(--ink);
  max-width: calc(100% - 32px); max-height: calc(100dvh - 32px); box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
}
dialog::backdrop { background: rgba(0, 0, 0, .76); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog[open] { animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.985); } }

.case-dialog { width: min(1180px, 100%); }
.case-layout {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); grid-template-rows: minmax(0, 1fr);
  height: min(860px, calc(100dvh - 34px));
}
.case-media { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 18px; background: var(--media-bg); border-right: 1px solid var(--line); }
.browser { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #1b1b1b; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; flex: none; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span {
  margin-left: 10px; min-width: 0; padding: 4px 12px; border-radius: 999px; background: #262626;
  color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser-view { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; background: #fff; }
.browser-view img { width: 100%; height: auto; }
.browser-view.phone { background: #e9edf2; padding: 18px 0; }
.browser-view.phone img { width: min(100%, 430px); margin-inline: auto; border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, .18); }
.hint { margin: 0; text-align: center; font-size: .82rem; }
.case-info { min-height: 0; overflow: auto; padding: clamp(20px, 3vw, 32px); }
.case-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.case-info h3 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); letter-spacing: -.02em; line-height: 1; margin-bottom: 14px; }
.case-info .lead { font-size: 1.08rem; color: var(--ink); opacity: .86; }
.case-info .project-actions { margin: 4px 0 6px; }
#caseBody section { margin-top: 24px; padding: 0; }
#caseBody p { font-size: 1rem; margin-bottom: 0; }
.case-info .stack { margin-bottom: 0; }
.case-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }

.cert-dialog { width: min(980px, 100%); }
.cert-dialog-inner { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.cert-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.cert-head h3 { margin: 0; }
.cert-view { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; background: #f4f2ec; }
.cert-view img { width: 100%; height: auto; }
.cert-foot { display: flex; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line); }

/* ============ motion: caret, loader, cursor ============ */
.caret { color: var(--accent); animation: blink 1.05s steps(1) infinite; margin-left: .04em; }
@keyframes blink { 50% { opacity: 0; } }

html.intro { overflow: hidden; }
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(200, 255, 25, .1), transparent 30rem),
    var(--bg);
  transition: transform .9s cubic-bezier(.76, 0, .24, 1);
  animation: loader-failsafe 0s 6s forwards; /* never block the page if a script fails */
}
.loader.done { transform: translateY(-100%); }
@keyframes loader-failsafe { to { visibility: hidden; } }
.loader-brand { display: flex; align-items: center; gap: clamp(14px, 2vw, 22px); }
.loader-brand .mark { --m: clamp(52px, 7vw, 76px); animation: mark-in .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes mark-in { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }
.loader-word, .loader-brand .caret { font-size: clamp(2.2rem, 7vw, 5rem); font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.loader-count {
  position: absolute; right: clamp(16px, 4vw, 48px); bottom: clamp(12px, 3vw, 32px); display: flex;
  font-size: clamp(3rem, 10vw, 7.5rem); font-weight: 900; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--ink);
}
.odo { display: inline-block; height: 1em; overflow: hidden; }
.odo-strip { display: block; transition: transform .3s cubic-bezier(.3, .7, .2, 1); }

.cursor-ring {
  position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none;
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 1.5px solid var(--accent); display: grid; place-items: center; opacity: 0;
  transition: opacity .3s, width .25s, height .25s, margin .25s, background-color .25s;
}
.cursor-ring.on { opacity: 1; }
.cursor-ring.hover { width: 60px; height: 60px; margin: -30px 0 0 -30px; background-color: rgba(200, 255, 25, .12); }
.cursor-ring.label { width: 84px; height: 84px; margin: -42px 0 0 -42px; background-color: var(--lime); }
.cursor-ring span { color: #111; font-size: .78rem; font-weight: 900; opacity: 0; transition: opacity .2s; }
.cursor-ring.label span { opacity: 1; }
html.modal-open .cursor-ring, html.intro .cursor-ring { opacity: 0; }

/* ============ motion: hero ============ */
.hero-grid { position: relative; z-index: 1; }
.hero-title .outline, .hero-title .outline-lime { letter-spacing: .01em; }
.hero-title .outline > span { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.hero-title .outline-lime > span { color: transparent; -webkit-text-stroke: 2px var(--accent); }
.js .hero-title .w, .js .hero-title .w > span { display: inline-block; }
.js .hero-title .w > span { transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .9s ease; }
.js:not(.loaded) .hero-title .w > span { opacity: 0; transform: translateY(.55em) rotate(4deg); }
.js .hero-title .w:nth-child(2) > span { transition-delay: .07s; }
.js .hero-title .w:nth-child(3) > span { transition-delay: .14s; }
.js .hero-title .w:nth-child(4) > span { transition-delay: .21s; }
.js .hero-title .w:nth-child(5) > span { transition-delay: .28s; }
.js .hero .eyebrow, .js .hero .lead, .js .hero .actions, .js .hero .flow, .js .spin-badge { transition: opacity .9s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
.js:not(.loaded) .hero .eyebrow, .js:not(.loaded) .hero .lead, .js:not(.loaded) .hero .actions, .js:not(.loaded) .hero .flow, .js:not(.loaded) .spin-badge { opacity: 0; transform: translateY(24px); }
.js .hero .lead { transition-delay: .35s; }
.js .hero .actions { transition-delay: .45s; }
.js .hero .flow { transition-delay: .3s; }
.js .spin-badge { transition-delay: .6s; }
/* failsafe if main.js never runs */
.js:not(.loaded) .hero-title .w > span, .js:not(.loaded) .hero .eyebrow, .js:not(.loaded) .hero .lead, .js:not(.loaded) .hero .actions, .js:not(.loaded) .hero .flow { animation: show-anyway 0s 6s forwards; }
@keyframes show-anyway { to { opacity: 1; transform: none; } }

.orbs { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute; display: block; border-radius: 50%;
  transform: translate3d(calc(var(--mx, 0) * var(--d, 1) * 18px), calc(var(--my, 0) * var(--d, 1) * 18px - var(--sy, 0) * var(--d, 1) * .12px), 0);
  transition: transform .8s cubic-bezier(.2, .8, .2, 1);
}
.orb::before { content: ""; position: absolute; inset: 0; border-radius: 50%; animation: bob 7s ease-in-out infinite alternate; }
.orb-lime { width: 112px; height: 112px; top: 2%; right: 25%; }
.orb-lime::before { background: radial-gradient(circle at 32% 28%, #f4ffd0, #c8ff19 34%, #6a8c00 72%, #263300); box-shadow: 0 30px 70px rgba(200, 255, 25, .25); }
.orb-blue { width: 190px; height: 190px; bottom: 4%; left: -3%; }
.orb-blue::before { background: radial-gradient(circle at 32% 28%, #d3dcff, #5c7cff 38%, #22307f 78%, #0d1240); box-shadow: 0 30px 80px rgba(92, 124, 255, .3); animation-duration: 9s; }
.orb-pink { width: 84px; height: 84px; top: 13%; right: 3%; }
.orb-pink::before { background: radial-gradient(circle at 32% 28%, #ffd6e6, #ff5f9a 40%, #7d1b45 80%); box-shadow: 0 20px 50px rgba(255, 95, 154, .3); animation-duration: 6s; }
.orb-glass { width: 72px; height: 72px; bottom: 14%; left: 47%; }
.orb-glass.small { width: 38px; height: 38px; top: 58%; left: 38%; bottom: auto; }
.orb-glass::before {
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .7), rgba(255, 255, 255, .08) 42%, rgba(200, 255, 25, .12) 72%, rgba(255, 255, 255, .2));
  border: 1px solid rgba(255, 255, 255, .22); animation-duration: 8s;
}
@keyframes bob { from { transform: translateY(-10px) rotate(-6deg); } to { transform: translateY(12px) rotate(6deg); } }

.spin-badge { position: absolute; right: clamp(16px, 3vw, 40px); bottom: 28px; z-index: 2; width: 116px; height: 116px; display: grid; place-items: center; }
.spin-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 18s linear infinite; }
.spin-badge text { fill: var(--ink); stroke: none; font-size: 10.5px; font-weight: 800; letter-spacing: 2.3px; text-transform: uppercase; }
.spin-arrow { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: #111; font-size: 1.4rem; font-weight: 900; transition: transform .3s ease; }
.spin-badge:hover .spin-arrow { transform: scale(1.12) rotate(-45deg); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ motion: statement card that grows to full screen ============ */
.expand { position: relative; height: 230vh; padding: 0; }
.expand-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.expand-card {
  width: 100%; height: 100%; display: grid; place-content: center; text-align: center; padding: 24px;
  background: var(--ink); color: var(--bg);
  clip-path: inset(var(--iy, 24vh) var(--ix, 12vw) round var(--er, 36px));
}
.expand-word { margin: 0; font-size: clamp(3.4rem, 14.5vw, 14rem); font-weight: 900; letter-spacing: -.045em; line-height: .9; color: var(--bg); transform: scale(var(--ts, 1)); }
.expand-word .caret { color: var(--bg); }
.expand-line {
  margin: 26px auto 0; max-width: 760px; color: var(--expand-line); font-size: clamp(1.05rem, 2vw, 1.55rem); font-weight: 600;
  opacity: var(--lo, 1); transform: translateY(calc((1 - var(--lo, 1)) * 24px));
}

/* ============ motion: outlined headings fill letter by letter ============ */
.fill-text.split { letter-spacing: 0; }
.fill-text.split .word { display: inline-block; white-space: nowrap; }
.fill-text.split .ch { color: transparent; -webkit-text-stroke: 1.5px var(--stroke, var(--ink)); transition: color .35s ease; }
.fill-text.split .ch.on { color: var(--fill, var(--ink)); }

/* ============ motion: work, pinned intro + colour per project ============ */
.work { background-color: var(--work-bg, transparent); transition: background-color .8s ease; }
.work-layout { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.work-aside { position: sticky; top: calc(var(--header) + 28px); }
.work-aside h2 { margin-bottom: 0; }
.work-aside .lead { font-size: 1.04rem; margin: 18px 0 24px; }
.work-aside .work-tools { flex-direction: column; align-items: stretch; margin-bottom: 0; }
.work-aside .search-wrap { max-width: none; flex: none; }
.work-index { display: grid; gap: 2px; margin-top: 26px; }
.work-index button {
  position: relative; text-align: left; background: none; border: 0; padding: 7px 0 7px 22px;
  color: var(--muted); font-weight: 700; transition: color .25s;
}
.work-index button::before { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 2px; background: var(--line-strong); transition: width .25s, background-color .25s; }
.work-index button:hover, .work-index button.active { color: var(--ink); }
.work-index button.active::before { width: 16px; background: var(--accent); }
.work .project { background: var(--work-card); }
.work .project.active { border-color: var(--lime-edge); }
@media (max-height: 760px) { .work-index { display: none; } }

/* ============ motion: lime panel opens in the slanted Ss shape ============ */
.wipe { background: var(--lime); color: #0b0b0b; --stroke: #0b0b0b; --fill: #0b0b0b; }
.js .wipe { clip-path: polygon(var(--a, -20%) 0, var(--b, 120%) 0, var(--c, 120%) 100%, var(--d, -20%) 100%); }
.wipe h2, .wipe h3, .wipe .eyebrow, .wipe .step .n { color: #0b0b0b; }
.wipe p, .wipe .lead { color: #2c3500; }
.wipe .eyebrow::before { background: #0b0b0b; }
.wipe .step { border-top-color: rgba(11, 11, 11, .22); }
.wipe .step:hover { border-top-color: #0b0b0b; }
.wipe :focus-visible { outline-color: #0b0b0b; }

/* ============ motion: footer wordmark ============ */
.footer-word {
  margin-bottom: 44px; overflow: hidden; white-space: nowrap; color: var(--ink);
  font-size: clamp(3rem, 12.5vw, 10.5rem); font-weight: 900; letter-spacing: -.045em; line-height: .9;
}

/* ============ smooth scroll (Lenis) ============ */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }


/* ============ light theme ============ */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5ef;
  --panel: #ffffff;
  --panel-2: #efefe8;
  --ink: #121210;
  --muted: #55564e;
  --line: rgba(18, 18, 16, .12);
  --line-strong: rgba(18, 18, 16, .26);
  --accent: #4a6800;
  --lime-soft: rgba(170, 220, 0, .2);
  --lime-edge: rgba(74, 104, 0, .45);
  --surface: #ffffff;
  --surface-hover: #ffffff;
  --surface-sunk: rgba(18, 18, 16, .045);
  --header-bg: rgba(245, 245, 239, .82);
  --footer-bg: #ebebe3;
  --dialog-bg: #ffffff;
  --media-bg: #ecece6;
  --work-card: rgba(255, 255, 255, .78);
  --expand-line: #c4c4bb;
}
html[data-theme="light"] body {
  background:
    radial-gradient(circle at 16% 8%, rgba(200, 255, 25, .35), transparent 26rem),
    radial-gradient(circle at 88% 24%, rgba(92, 124, 255, .14), transparent 26rem),
    linear-gradient(180deg, #fbfbf6 0%, var(--bg) 30%, #efefe7 100%);
  background-color: var(--bg);
}
html[data-theme="light"] .flow { box-shadow: 0 28px 70px rgba(18, 18, 16, .12); }
html[data-theme="light"] .project, html[data-theme="light"] .cert,
html[data-theme="light"] .faq-list details, html[data-theme="light"] .service-tab { box-shadow: 0 1px 2px rgba(18, 18, 16, .04); }
html[data-theme="light"] .work { background-color: color-mix(in srgb, var(--work-bg, transparent) 16%, var(--bg)); }
html[data-theme="light"] .work-index button.active::before { background: var(--accent); }
html[data-theme="light"] .contact { background: linear-gradient(90deg, rgba(200, 255, 25, .28), transparent 45%), rgba(18, 18, 16, .02); }
html[data-theme="light"] dialog { box-shadow: 0 40px 120px rgba(18, 18, 16, .25); }
html[data-theme="light"] dialog::backdrop { background: rgba(18, 18, 16, .5); }
html[data-theme="light"] .orb-glass::before { border-color: rgba(18, 18, 16, .12); background: radial-gradient(circle at 30% 25%, #fff, rgba(255, 255, 255, .5) 42%, rgba(200, 255, 25, .25) 72%, rgba(255, 255, 255, .6)); }

/* theme switch button + a short colour cross-fade when switching */
.theme-btn { font-size: 1rem; }
.theme-btn svg { width: 19px; height: 19px; }
.theme-btn .i-moon, html[data-theme="light"] .theme-btn .i-sun { display: none; }
html[data-theme="light"] .theme-btn .i-moon { display: block; }
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease, fill .45s ease !important;
}

/* ============ reveal on scroll ============ */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .project.reveal.in:hover, .js .cert.reveal.in:hover { transform: translateY(-4px); }

/* ============ responsive ============ */
@media (max-width: 1060px) {
  .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
}

@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: 32px; }
  .hero-grid, .section-head, .services, .panel-cols, .contact-grid, .faq-wrap, .footer-grid, .work-layout { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .work-aside { position: static; }
  .work-index, .spin-badge { display: none; }
  .orb-pink, .orb-glass { display: none; }
  .orb-lime { width: 72px; height: 72px; top: auto; bottom: 30%; right: -22px; }
  .orb-blue { width: 120px; height: 120px; bottom: -30px; left: -50px; }
  .menu-btn { display: inline-flex; }
  .navlinks {
    display: none; position: absolute; left: 16px; right: 16px; top: calc(var(--header) + 4px);
    flex-direction: column; align-items: stretch; padding: 10px;
    background: var(--dialog-bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  }
  .navlinks.open { display: flex; }
  .navlinks a { min-height: 46px; }
  .service-tabs {
    position: static; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr);
    overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory;
  }
  .service-tab { scroll-snap-align: start; padding-right: 20px; }
  .service-tab[aria-selected="true"]::after { display: none; }
  .case-dialog { overflow: auto; }
  .case-dialog [data-close] { position: fixed; top: 26px; right: 26px; z-index: 5; background: var(--dialog-bg); }
  .case-layout { display: block; height: auto; }
  .case-media { border-right: 0; border-bottom: 1px solid var(--line); }
  .browser-view { max-height: 56vh; }
}

@media (max-width: 640px) {
  .nav-actions .btn.solid { display: none; }
  .work-grid, .cert-grid, .steps, .field-row { grid-template-columns: 1fr; }
  .flow-steps small { font-size: .8rem; }
  .case-nav .btn { flex: 1; }
  .brief .btn[type="submit"] { justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loader, .cursor-ring, .orbs { display: none !important; }
  .caret { animation: none; }
  .expand { height: auto; }
  .expand-sticky { position: static; height: auto; padding: 72px 0; }
  .expand-card { clip-path: none; }
  .js .wipe { clip-path: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .marquee-track { animation: none; }
}
