/* Geist and Geist Mono, self-hosted (SIL Open Font License, see fonts/OFL.txt). */
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #111317;
  --fg: #eef0f3;
  --muted: #aeb4be;
  --faint: #7d8490;
  --border: #272b32;
  --accent: #8aa9ff;
  --surface: #161a20;
  --accent-2: #5fe3c4;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 80px; scrollbar-gutter: stable; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 var(--sans);
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

.wrap { width: min(1120px, calc(100% - 96px)); margin: 0 auto; }
.overline { color: var(--faint); font: 13px/1.5 var(--mono); }

.skip-link { position: absolute; top: 12px; left: 20px; padding: 10px 16px; background: var(--fg); color: var(--bg); transform: translateY(-160%); z-index: 30; }
.skip-link:focus { transform: none; }
.skip-link:hover { color: var(--bg); }

/* Header: stays visible for navigation. */
.site-header { position: sticky; top: 0; z-index: 20; background: rgb(17 19 23 / .95); border-bottom: 1px solid var(--border); }
@supports (backdrop-filter: blur(10px)) {
  .site-header { background: rgb(17 19 23 / .82); backdrop-filter: blur(10px); }
}
.header { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.logo { font-size: 24px; font-weight: 700; letter-spacing: -.05em; }
.logo span { color: var(--accent); }
.navigation { display: flex; align-items: center; gap: 28px; font-size: 15px; color: var(--muted); }
.navigation a { padding: 10px 0; }
.navigation .contact-link { color: var(--accent); }

/* Hero */
.hero { padding: 88px 0 80px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.2vw, 54px); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; margin: 18px 0 24px; }
.highlight {
  color: var(--accent);
  background: linear-gradient(90deg, var(--accent-2), var(--accent) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.intro { max-width: 52ch; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 24px; }
.primary-action { display: inline-flex; align-items: center; gap: 20px; min-height: 48px; padding: 12px 20px; border-radius: 6px; background: var(--accent); color: var(--bg); font-size: 16px; font-weight: 600; }
.primary-action:hover { background: var(--fg); color: var(--bg); }
.hero-email { color: var(--accent); font-size: 16px; }
.hero-email:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-trust { margin-top: 20px; color: var(--muted); font-size: 14px; line-height: 1.7; }

summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }

/* Attack-path visual, drawn by site.js. Hidden until the script runs. */
.hero-visual { position: relative; min-width: 0; width: 100%; aspect-ratio: 1 / 1; max-height: 460px; }
.hero-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Sections: one background, separated by space and a hairline. */
.section { padding: 72px 0; border-top: 1px solid var(--border); }
.section-title { font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; margin-bottom: 36px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 30px; margin-bottom: 36px; }
.section-heading .section-title { margin-bottom: 0; }
.section-note { color: var(--faint); font-size: 15px; }

/* Expertise: without JavaScript, a plain two-column list. */
.offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.offer { border-top: 1px solid var(--border); padding: 28px 0; }
.offer h3 { display: flex; gap: 14px; font-size: 20px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.offer-number { flex: none; width: 26px; font: 13px/1.9 var(--mono); letter-spacing: 0; color: var(--faint); }
.offer-label { min-width: 0; }
.offer-situation { display: block; margin-top: 5px; color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.5; letter-spacing: 0; }
.offer-panel { padding-left: 40px; }
.offer-panel p { max-width: 58ch; font-size: 17px; color: var(--muted); margin-top: 14px; }
.offer-panel .tech { font: 14px/1.8 var(--mono); color: var(--muted); }
.offer-panel strong { color: var(--fg); font-weight: 600; }

/* Desktop keeps one selection; the mobile accordion can also collapse completely. */
.offers.is-enhanced { display: block; border-bottom: 1px solid var(--border); }
.is-enhanced .offer { padding: 0; }
.is-enhanced .offer h3 { display: block; font-size: 18px; }
.offer-toggle { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 12px 0; border: 0; background: none; color: var(--fg); font: inherit; letter-spacing: inherit; line-height: inherit; text-align: left; cursor: pointer; }
.offer-toggle[aria-expanded="true"] { color: var(--accent); }
.offer-toggle:focus-visible { outline-offset: -2px; }
.offer-toggle::after { content: "+"; margin-left: auto; padding-left: 12px; color: var(--faint); font: 20px/1 var(--mono); }
.offer-toggle[aria-expanded="true"]::after { content: "−"; color: var(--accent); }
.is-enhanced .offer-panel { padding: 0 0 24px 40px; }
/* The panel title only makes sense beside the desktop list; the accordion already shows the name. */
.offer-panel-title { display: none; }

@media (min-width: 901px) {
  .offers.is-enhanced { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 56px; border-bottom: 0; }
  .is-enhanced .offer { display: contents; }
  .is-enhanced .offer h3 { grid-column: 1; border-top: 1px solid var(--border); }
  .is-enhanced .offer:last-child h3 { border-bottom: 1px solid var(--border); }
  /* Hover only tints the row; the selected row is the only one in accent. */
  .is-enhanced .offer h3:hover { background: var(--surface); }
  .is-enhanced .offer.is-active h3 { background: var(--surface); box-shadow: inset 2px 0 0 var(--accent); }
  .offer-toggle { min-height: 56px; padding: 10px 16px; }
  .offer-toggle::after, .offer-toggle[aria-expanded="true"]::after { content: "→"; font-size: 16px; opacity: 0; }
  .offer-toggle[aria-expanded="true"]::after { opacity: 1; }
  .is-enhanced .offer-panel { grid-column: 2; grid-row: 1 / span 6; align-self: start; padding: 14px 0 0; }
  .is-enhanced .offer-panel p { margin-top: 0; font-size: 19px; line-height: 1.6; }
  .is-enhanced .offer-panel p + p { margin-top: 18px; }
  .is-enhanced .offer-panel .offer-panel-title { display: block; font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; color: var(--fg); }
  .is-enhanced .offer-panel .tech { margin-top: 24px; font-size: 14px; }
}

/* Case studies */
.case-studies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 32px; }
.case-study { min-width: 0; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.case-study:hover { border-color: var(--faint); }
/* Ring the whole card, not the text block inside it. */
.case-study > summary:focus-visible { outline: none; }
.case-study:has(> summary:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.case-category { display: block; font: 14px/1.6 var(--mono); color: var(--muted); margin-bottom: 14px; }
.case-preview { display: block; }
.case-title { display: block; font-size: 23px; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; }
.case-description { display: block; font-size: 17px; font-weight: 400; color: var(--muted); max-width: 58ch; margin-top: 12px; }
.read-label { display: inline-block; margin-top: 18px; color: var(--accent); font-size: 16px; }
.read-label::after { content: " →"; }
.case-study > summary:hover .read-label { text-decoration: underline; text-underline-offset: 4px; }
.disclosure-symbol { display: none; }
.when-open { display: none; }
.case-study[open] .when-open { display: inline; }
.case-study[open] .when-closed { display: none; }
.case-body { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.case-body dl { margin: 0; }
.case-body dt { color: var(--muted); font: 14px/1.5 var(--mono); margin-bottom: 8px; }
.case-body dd { margin: 0 0 28px; font-size: 17px; color: var(--muted); max-width: 65ch; }
.case-body dd:last-child { margin-bottom: 0; }
.case-findings { margin: 0; padding-left: 20px; }
.case-findings li + li { margin-top: 16px; }
.case-findings strong { color: var(--fg); font-weight: 600; }

/* About & process */
.working { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 72px; }
.biography h2 { margin-bottom: 24px; }
.biography > p:not(.credentials) { color: var(--muted); font-size: 17px; margin-top: 16px; max-width: 58ch; }
.biography > h2 + p { margin-top: 0; }
.biography .credentials { font: 14px/1.9 var(--mono); color: var(--muted); margin-top: 24px; }
.credentials a { color: var(--accent); }
.credentials a:hover { text-decoration: underline; text-underline-offset: 4px; }
.process-title { padding-top: 6px; font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.steps { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { padding: 16px 0; border-top: 1px solid var(--border); counter-increment: step; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.steps li::before { content: "0" counter(step); font: 13px/1.7 var(--mono); color: var(--faint); }
.steps h4 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 17px; }

/* Contact */
.contact { padding: 72px 0 40px; border-top: 1px solid var(--border); }
.contact h2 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.email { display: inline-block; font-size: clamp(18px, 2vw, 24px); color: var(--accent); margin-top: 20px; }
.email:hover { text-decoration: underline; text-underline-offset: 5px; }
.contact > p { max-width: 58ch; color: var(--muted); font-size: 17px; margin-top: 16px; }
.footer { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; color: var(--faint); margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--border); }

/* Case-study reading dialog */
body.dialog-open { overflow: hidden; }
.case-dialog { width: min(760px, calc(100% - 48px)); max-height: calc(100dvh - 64px); padding: 0; margin: auto; color: var(--fg); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.case-dialog[open] { display: flex; flex-direction: column; }
.case-dialog::backdrop { background: rgb(0 0 0 / .7); }
.dialog-header { display: flex; flex: none; align-items: start; justify-content: space-between; gap: 24px; padding: 28px 32px; border-bottom: 1px solid var(--border); }
.dialog-header .case-category { margin-bottom: 10px; }
.dialog-header h2 { font-size: 24px; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; }
.dialog-close { flex: none; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--muted); font: 15px/1.5 var(--sans); cursor: pointer; }
.dialog-close:hover { color: var(--fg); border-color: var(--faint); }
.dialog-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 28px 32px 32px; }
.dialog-content .case-body { margin: 0; padding: 0; border: 0; }

@media (max-width: 1050px) {
  .working { gap: 40px; }
  .case-studies { gap: 24px; }
}

@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .hero { gap: 36px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); padding: 64px 0; }
  .offers { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  html { scrollbar-gutter: auto; scroll-padding-top: 68px; }
  .wrap { width: calc(100% - 40px); }
  .header { min-height: 58px; gap: 12px; }
  .logo { font-size: 22px; }
  .navigation { gap: 12px; font-size: 14px; }
  .hero { display: block; padding: 44px 0 48px; }
  .hero h1 { font-size: clamp(32px, 8.6vw, 42px); margin: 14px 0 18px; }
  .intro { font-size: 17px; }
  /* Keep services near the first screen; the decorative attack path is desktop-only. */
  .hero-visual { display: none; }
  .section { padding: 52px 0; }
  .section-title { font-size: 24px; margin-bottom: 24px; }
  .section-heading { flex-direction: column; gap: 6px; margin-bottom: 24px; }
  .case-studies { grid-template-columns: 1fr; gap: 20px; }
  .case-study { padding: 22px 20px; }
  .working { grid-template-columns: 1fr; gap: 36px; }
  .contact { padding-top: 52px; }
  .contact h2 { font-size: 24px; }
  .footer { flex-wrap: wrap; margin-top: 48px; }
  .case-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .dialog-header { gap: 16px; padding: 20px; }
  .dialog-header h2 { font-size: 21px; }
  .dialog-content { padding: 24px 20px; }
}

/* Four nav links plus the logo on one row down to 360px. */
@media (max-width: 400px) {
  .logo { font-size: 20px; }
  .navigation { gap: 10px; }
}
