/* Belanes — studio site. Light/dark tokens, layout rails, one accent. */

/* ---------- Font (self-hosted Geist, variable 400–700) ---------- */
@font-face { font-family: "Geist"; font-weight: 400 700; font-display: swap; src: url("../fonts/geist-latin.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; }
@font-face { font-family: "Geist"; font-weight: 400 700; font-display: swap; src: url("../fonts/geist-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #fbfbfa;
  --ink: #0b0b0c;
  --ink-2: #5d5e64;   /* ≥ 6:1 on bg */
  --rule: #e6e6e4;
  --accent: #2141f2;
  --on-accent: #ffffff;

  --font: "Geist", ui-sans-serif, system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --pad: clamp(20px, 4vw, 56px);
  --max: 1200px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
/* Dark theme: follows the system unless the visitor picked one (data-theme on <html>) */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="dark"] {
  --bg: #0a0a0b;
  --ink: #ededee;
  --ink-2: #a2a3aa;
  --rule: #232326;
  --accent: #5a74ff;
  --on-accent: #050507; /* white on this blue is only 3.9:1 */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0b;
    --ink: #ededee;
    --ink-2: #a2a3aa;
    --rule: #232326;
    --accent: #5a74ff;
    --on-accent: #050507;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--font); -webkit-font-smoothing: antialiased; }
svg { display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* Layout rails: the page sits in a hairline frame; sections are ruled with cross marks at the joints */
.frame { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; border-inline: 1px solid var(--rule); }
.section { position: relative; padding: clamp(64px, 10vw, 128px) var(--pad); border-top: 1px solid var(--rule); }
.section::before, .section::after {
  content: ""; position: absolute; top: -6px; width: 11px; height: 11px;
  background: linear-gradient(var(--ink-2), var(--ink-2)) center / 1px 100% no-repeat, linear-gradient(var(--ink-2), var(--ink-2)) center / 100% 1px no-repeat;
}
.section::before { left: -6px; }
.section::after { right: -6px; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--rule); }
.top .frame { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; padding-inline: var(--pad); }
.mark { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.02em; }
.mark svg { width: 22px; height: 22px; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 32px); font-size: .9375rem; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.lang { display: flex; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; font-size: .8125rem; font-weight: 500; }
.lang a, .lang span { padding: 3px 10px; border-radius: 999px; }
.lang [aria-current] { background: var(--ink); color: var(--bg); }
@media (max-width: 760px) { .nav .nav-link { display: none; } }

/* Theme toggle: shows the moon in light mode, the sun in dark mode */
.theme { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--rule); border-radius: 999px; background: none; color: var(--ink); cursor: pointer; transition: border-color .2s; }
.theme:hover { border-color: var(--ink); }
.theme svg { width: 16px; height: 16px; grid-area: 1 / 1; transition: transform .4s var(--ease-out), opacity .2s; }
.theme .sun, :root[data-theme="dark"] .theme .moon { opacity: 0; transform: rotate(-90deg) scale(.6); }
:root[data-theme="dark"] .theme .sun { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .moon { opacity: 0; transform: rotate(-90deg) scale(.6); }
  :root:not([data-theme="light"]) .theme .sun { opacity: 1; transform: none; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 500; font-size: .9375rem; transition: background-color .2s, color .2s, border-color .2s; }
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease-out); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost { border: 1px solid var(--rule); }
.btn-ghost:hover { border-color: var(--ink); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: .75rem; font-weight: 500; letter-spacing: 0; }

/* ---------- Hero ---------- */
.hero { border-top: 0; padding-top: clamp(72px, 13vw, 168px); }
.hero::before, .hero::after { display: none; }
.hero h1 { font-size: clamp(2.75rem, 7.4vw, 6rem); letter-spacing: -0.04em; line-height: .98; max-width: 14ch; }
.hero h1 .line { display: block; }
.hero h1 .muted { color: var(--ink-2); }
.hero .lead { margin-top: 28px; max-width: 52ch; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--ink-2); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Track record: number above its label (the label comes first in the markup for screen readers) */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: clamp(56px, 8vw, 96px) 0 0; max-width: 760px; }
.facts div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding-top: 16px; border-top: 1px solid var(--rule); }
.facts dd { margin: 0; font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.facts dt { font-size: .875rem; color: var(--ink-2); }
@media (max-width: 480px) { .facts { gap: 16px; } }

.clients { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 32px; padding: 28px var(--pad); border-top: 1px solid var(--rule); }
.clients p { font-size: .875rem; color: var(--ink-2); }
.clients ul { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 0; padding: 0; list-style: none; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-2); }

/* ---------- Section heads ---------- */
.head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 48px; margin-bottom: clamp(36px, 5vw, 64px); align-items: end; }
.head h2 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); }
.head p { max-width: 52ch; color: var(--ink-2); font-size: 1.125rem; }
@media (max-width: 760px) { .head { grid-template-columns: 1fr; } }

/* ---------- Services: ruled list ---------- */
.services { margin: 0; padding: 0; list-style: none; }
.services li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px 48px; padding-block: 28px; border-top: 1px solid var(--rule); }
.services li:last-child { border-bottom: 1px solid var(--rule); }
.services h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.services p { color: var(--ink-2); max-width: 56ch; }
@media (max-width: 760px) { .services li { grid-template-columns: 1fr; } }

/* ---------- References: typographic index ---------- */
.index { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--rule); }
.index a {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) auto 3rem 20px; align-items: center; gap: 24px;
  padding: 18px 12px; margin-inline: -12px; border-top: 1px solid var(--rule);
  transition: color .3s var(--ease-out);
}
/* Signature: the accent fills the row from the left */
.index a::before {
  content: ""; position: absolute; inset: -1px 0 0; z-index: -1; background: var(--accent);
  clip-path: inset(0 100% 0 0); transition: clip-path .45s var(--ease-out);
}
.index a:hover, .index a:focus-visible { color: var(--on-accent); }
.index a:hover::before, .index a:focus-visible::before { clip-path: inset(0); }
.index .name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: clamp(1.375rem, 2.6vw, 2rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.index .domain, .index .cc { color: var(--ink-2); font-size: .9375rem; transition: color .3s; }
.index .cc { text-align: right; }
.index svg { width: 20px; height: 20px; transition: transform .35s var(--ease-out); }
.index a:hover :is(.domain, .cc, .tag), .index a:focus-visible :is(.domain, .cc, .tag) { color: inherit; border-color: currentColor; }
.index a:hover svg, .index a:focus-visible svg { transform: translate(2px, -2px); }
@media (max-width: 640px) {
  .index a { grid-template-columns: minmax(0, 1fr) 20px; gap: 2px 16px; }
  .index .domain { grid-row: 2; font-size: .875rem; }
  .index .cc { display: none; }
  .index svg { grid-column: 2; grid-row: 1 / span 2; }
}
.js .index .is-folded { display: none; }
.index.is-deployed .is-folded { display: block; animation: rise .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 35ms); }
.deploy { margin-top: 32px; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: step; border-top: 1px solid var(--rule); }
.steps li { padding: 28px 28px 0 0; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--rule); }
.steps li::before { counter-increment: step; content: counter(step); display: block; margin-bottom: 40px; color: var(--accent); font-weight: 600; }
.steps h3 { font-size: 1.5rem; margin-bottom: 10px; }
.steps p { color: var(--ink-2); }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n + 3) { margin-top: 28px; border-top: 1px solid var(--rule); }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0 0; border-left: 0; }
  .steps li + li { margin-top: 24px; border-top: 1px solid var(--rule); }
  .steps li::before { margin-bottom: 16px; }
}

/* ---------- Contact ---------- */
.contact h2 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); }
.contact .lead { margin-top: 16px; color: var(--ink-2); font-size: 1.125rem; max-width: 48ch; }
.mail {
  display: inline-block; margin-top: clamp(32px, 5vw, 56px); padding-bottom: 8px;
  font-size: clamp(2.25rem, 7.6vw, 6.5rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; overflow-wrap: anywhere;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 3px no-repeat;
  transition: background-size .5s var(--ease-out), color .3s;
}
.mail:hover { color: var(--accent); background-size: 100% 3px; }
.contact .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }
.phone { font-size: 1.25rem; font-weight: 500; }
.phone:hover { color: var(--accent); }

.company { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: clamp(56px, 8vw, 96px) 0 0; border-top: 1px solid var(--rule); }
.company > div { padding: 20px 20px 0 0; }
.company > div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.company dt { margin-bottom: 6px; font-size: .8125rem; color: var(--ink-2); }
.company dd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.company address { font-style: normal; }
.copy { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid var(--rule); border-radius: 999px; background: none; color: var(--ink-2); font: 500 .75rem/1 var(--font); cursor: pointer; transition: border-color .2s, color .2s; }
.copy svg { width: 12px; height: 12px; }
.copy:hover { border-color: var(--ink); color: var(--ink); }
.copy.is-done { border-color: var(--accent); color: var(--accent); }
@media (max-width: 860px) {
  .company { grid-template-columns: 1fr 1fr; }
  .company > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .company > div:nth-child(n + 3) { margin-top: 20px; border-top: 1px solid var(--rule); }
}
@media (max-width: 480px) {
  .company { grid-template-columns: 1fr; }
  .company > div, .company > div + div { margin: 0; padding: 16px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .company > div:first-child { border-top: 0; }
}

/* ---------- Footer ---------- */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 28px var(--pad) 40px; border-top: 1px solid var(--rule); font-size: .875rem; color: var(--ink-2); }

/* ---------- Motion: the headline settles once on load ---------- */
@keyframes rise {
  from { opacity: .2; transform: translateY(.35em); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.js .hero h1 .line { animation: rise .9s var(--ease-out) both; }
.js .hero h1 .line + .line { animation-delay: .1s; }
.js .hero :is(.lead, .actions) { animation: rise .9s .2s var(--ease-out) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
