/* World: a city at night where the backend is the only thing still working.
   Ink surfaces, one amber accent taken from a lit window, a warm paper band for the work itself. */
:root {
  --night: #080a14;
  --night-2: #0e1120;
  --night-3: #181c30;
  --paper: #f6f2ea;
  --paper-2: #fffdf8;
  --paper-3: #e9e3d6;
  --amber: #ffbe3d;
  --amber-deep: #b97f10;
  --amber-ink: #1c1303;
  --display: "Handjet", "IBM Plex Sans", system-ui, sans-serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

/* night surfaces */
body, .featured, .contact, .foot {
  --bg: var(--night);
  --card: var(--night-2);
  --raised: var(--night-3);
  --fg: #eef0f5;
  --fg-2: #aab1c5;
  --fg-3: #7d859c;
  --hair: rgba(238, 240, 245, 0.09);
  --hair-2: rgba(238, 240, 245, 0.18);
  --ok: #4cc38a;
  --bad: #ff6b72;
  --lit: var(--amber);
}

/* the paper band: inside a lit window */
.light {
  --bg: var(--paper);
  --card: var(--paper-2);
  --raised: var(--paper-3);
  --fg: #171520;
  --fg-2: #4f4a5c;
  --fg-3: #6f6a5f;
  --hair: rgba(23, 21, 32, 0.1);
  --hair-2: rgba(23, 21, 32, 0.22);
  --ok: #177a4f;
  --bad: #c7282d;
  --lit: #f0a31a;
  background: var(--bg);
  color: var(--fg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, ol, ul, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 500; }
.mono { font-family: var(--mono); }
.shell { width: min(1200px, 100% - 64px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; top: 8px; z-index: 30; padding: 8px 12px; border-radius: 6px; background: var(--amber); color: var(--amber-ink); transform: translateY(-200%); }
.skip:focus { transform: none; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
section[id] { scroll-margin-top: 64px; }

/* the signature: a lit window */
.win { display: inline-block; flex: none; width: 8px; height: 8px; background: var(--lit); }
.wins { display: inline-grid; grid-template-columns: repeat(2, 10px); gap: 4px; }
.wins i { width: 10px; height: 10px; background: var(--raised); }
.wins i.on { background: var(--lit); }

/* header */
.top { position: fixed; inset: 0 0 auto 0; z-index: 20; padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid transparent; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.top.solid { background: rgba(8, 10, 20, 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom-color: var(--hair); }
.top-inner { height: 64px; display: flex; align-items: center; gap: 16px; }
.name { display: inline-flex; align-items: center; gap: 10px; font: 600 26px/1 var(--display); letter-spacing: 0.02em; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 6px; color: var(--fg-2); font-size: 15px; text-decoration: none; transition: background-color .15s var(--ease), color .15s var(--ease); }
.nav a:hover { background: rgba(238, 240, 245, 0.08); color: var(--fg); }
.lang select { appearance: none; height: 36px; padding: 0 30px 0 12px; border: 1px solid var(--hair-2); border-radius: 6px; background: rgba(8, 10, 20, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23aab1c5' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--fg-2); font: 500 14px/1 var(--sans); cursor: pointer; transition: border-color .15s var(--ease), color .15s var(--ease); }
.lang select:hover { color: var(--fg); border-color: var(--fg-3); }
[dir="rtl"] .lang select { padding: 0 12px 0 30px; background-position: left 10px center; }

/* buttons: the accent one presses like a key */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border-radius: 6px; border: 1px solid transparent; font: 500 15px/1 var(--sans); text-decoration: none; white-space: nowrap; transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease), box-shadow .12s var(--ease); }
.btn.accent { background: var(--amber); color: var(--amber-ink); box-shadow: 0 3px 0 var(--amber-deep); }
.btn.accent:hover { background: #ffcd66; }
.btn.accent:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--amber-deep); }
.btn.ghost { background: rgba(128, 128, 140, 0.1); background: color-mix(in srgb, var(--fg) 7%, transparent); border-color: var(--hair-2); color: var(--fg); }
.btn.ghost:hover { background: rgba(128, 128, 140, 0.18); background: color-mix(in srgb, var(--fg) 14%, transparent); }
.btn.ghost:active { transform: translateY(1px); }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; box-shadow: 0 2px 0 var(--amber-deep); }

/* hero: the whole first screen is the city */
.hero { position: relative; display: flex; flex-direction: column; height: 100vh; height: 100svh; min-height: 720px; max-height: 1080px; overflow: hidden; }
.sky { position: absolute; inset: 0; }
#city, #dawn { display: block; width: 100%; height: 100%; image-rendering: crisp-edges; image-rendering: pixelated; }
.hero-inner { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-top: 64px; }
.status { display: inline-flex; align-items: center; gap: 10px; font: 400 13px/1.4 var(--mono); color: var(--fg-2); }
.hero h1 { max-width: 8.2em; margin: 16px 0 24px; font: 700 clamp(56px, min(8.4vw, 14.5vh), 132px)/0.86 var(--display); letter-spacing: 0.01em; text-wrap: balance; }
.lead { max-width: 33rem; margin-bottom: 32px; color: #c6ccdc; font-size: 18px; line-height: 1.6; }
.hero .btn.ghost { background: rgba(8, 10, 20, 0.6); }
.hero .btn.ghost:hover { background: rgba(24, 28, 48, 0.85); }

.facts-bar { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--hair-2); }
.fact { display: flex; align-items: baseline; gap: 12px; min-width: 0; padding: 16px 0 20px; text-decoration: none; }
.fact + .fact { padding-inline-start: 28px; border-inline-start: 1px solid var(--hair); }
.fact b { font: 600 44px/1 var(--display); letter-spacing: 0.02em; transition: color .15s var(--ease); }
.fact span { color: var(--fg-2); font-size: 14px; line-height: 1.4; }
a.fact:hover b { color: var(--amber); }

/* notes pinned to the windows of the city */
.tag { position: absolute; left: 0; top: 0; z-index: 1; display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 10px; border: 1px solid var(--hair-2); border-radius: 4px; background: rgba(8, 10, 20, 0.94); color: var(--fg); font: 400 12px/1.4 var(--mono); white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(var(--x, 0), var(--y, 0)) translateY(4px); transition: opacity .4s var(--ease); }
.tag.on { opacity: 1; transform: translate(var(--x, 0), var(--y, 0)); }
.tag b { font-weight: 500; color: var(--ok); }
.tag[data-kind="warn"] b { color: var(--amber); }

/* sections */
.block { padding-top: 128px; }
#services, .light > .block:last-child { padding-bottom: 128px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
h2 { font: 600 clamp(44px, 5.6vw, 80px)/0.9 var(--display); letter-spacing: 0.01em; }
.head p { max-width: 22rem; padding-bottom: 4px; color: var(--fg-3); font-size: 14px; text-align: end; }
.pass { color: var(--ok); }
.px { width: 14px; height: 10px; margin-inline-end: 6px; vertical-align: -1px; fill: currentColor; shape-rendering: crispEdges; }

/* services: a price-list of four rows, each with the project that proves it */
.offers { list-style: none; padding: 0; border-bottom: 1px solid var(--hair); }
.offers li { display: grid; grid-template-columns: 72px minmax(0, 5fr) minmax(0, 6fr) minmax(0, 3fr); gap: 24px; align-items: baseline; padding: 28px 0; border-top: 1px solid var(--hair); }
.offers .num { display: inline-flex; align-items: center; gap: 10px; font: 400 13px/1 var(--mono); color: var(--fg-3); }
.offers .win { transition: background-color .4s var(--ease) .25s; }
.js .offers li:not(.seen) .win { background: var(--raised); }
.offers h3 { font: 500 26px/1.2 var(--sans); letter-spacing: -0.01em; }
.offers p { color: var(--fg-2); font-size: 16px; line-height: 1.55; }
.proof { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; font: 400 13px/1.5 var(--mono); }
.proof a { text-decoration: none; border-bottom: 1px solid var(--hair-2); transition: color .15s var(--ease), border-color .15s var(--ease); }
.proof a:hover { color: var(--amber); border-color: var(--amber); }

/* featured: the one in production, a night card on the paper */
.featured { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; padding: 48px; margin-bottom: 24px; background: var(--bg); color: var(--fg); border-radius: 16px; }
.live { display: inline-flex; align-items: center; gap: 10px; font: 400 13px/1 var(--mono); color: var(--fg-2); }
.live i { width: 8px; height: 8px; background: var(--ok); }
.featured h3 { margin: 16px 0 12px; font: 600 clamp(48px, 5.4vw, 76px)/0.9 var(--display); letter-spacing: 0.01em; }
.featured-text > p:not(.live) { margin-bottom: 24px; color: var(--fg-2); font-size: 17px; line-height: 1.6; }
.facts { margin-bottom: 32px; }
.facts div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--hair); }
.facts dt { color: var(--fg-3); font-size: 13px; }
.facts dd { font: 400 13px/1.6 var(--mono); }

.day { align-self: center; padding: 20px; background: var(--card); border: 1px solid var(--hair); border-radius: 12px; }
.day-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; font-size: 14px; }
.day-head .mono { color: var(--fg-3); font-size: 12px; }
.slots { list-style: none; padding: 0; display: grid; gap: 4px; }
.slots li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 36px; }
.slots time { font: 400 12px/1 var(--mono); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.slots b { padding: 8px 12px; border-radius: 6px; font-weight: 400; font-size: 13px; }
.slots .booked { background: var(--raised); border: 1px solid var(--hair-2); }
.slots .free { color: var(--fg-3); border: 1px dashed var(--hair-2); }
.slots .race .booked { border-color: color-mix(in srgb, var(--ok) 55%, transparent); box-shadow: inset 2px 0 0 var(--ok); }
.refused { grid-column: 2; display: flex; align-items: center; gap: 4px; padding: 4px 0 4px 12px; }
.refused i { width: 6px; height: 6px; background: var(--bad); opacity: .8; transition: background-color .3s var(--ease), opacity .3s var(--ease); }
.refused em { margin-inline-start: 8px; font: normal 400 12px/1 var(--mono); color: var(--bad); transition: opacity .3s var(--ease); }
.day.wait .refused i { background: var(--fg-3); opacity: .35; }
.day.wait .refused em { opacity: 0; }
.day.play .refused i { transition-delay: calc(var(--i) * 90ms + 300ms); }
.day.play .refused em { transition-delay: 1.2s; }
.day figcaption { margin-top: 16px; color: var(--fg-3); font-size: 13px; line-height: 1.5; }

/* projects: varied widths so the grid has a rhythm */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.w7 { grid-column: span 7; }
.w5 { grid-column: span 5; }
.w4 { grid-column: span 4; }
.card { display: flex; flex-direction: column; padding: 8px; background: var(--card); border: 1px solid var(--hair); border-radius: 14px; text-decoration: none; transition: border-color .15s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.card:hover { border-color: var(--hair-2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(23, 21, 32, 0.08); }
.card img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border-radius: 6px; border: 1px solid var(--hair); background: var(--raised); }
.w7 img { aspect-ratio: 16 / 9; }
.w5 img { aspect-ratio: 5 / 4; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 16px 16px; }
.card h3 { margin-bottom: 8px; font-size: 22px; line-height: 1.25; }
.card p { margin-bottom: 16px; color: var(--fg-2); font-size: 15px; line-height: 1.55; }
.meta { margin-top: auto; font: 400 12px/1.5 var(--mono); color: var(--fg-3); }
.more { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; border: 1px dashed var(--hair-2); border-radius: 14px; color: var(--fg-2); text-decoration: none; transition: border-color .15s var(--ease), color .15s var(--ease); }
.more:hover { color: var(--fg); border-color: var(--fg-3); }
.more .mono { font-size: 13px; }

/* what comes with the code */
.gets { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.gets li { padding-top: 24px; border-top: 1px solid var(--hair-2); }
.gets .wins { margin-bottom: 24px; }
.gets h3 { margin-bottom: 8px; font-size: 22px; line-height: 1.25; }
.gets p { color: var(--fg-2); font-size: 15px; line-height: 1.6; }

/* about */
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; }
.split p { max-width: 42rem; color: var(--fg-2); font-size: 17px; line-height: 1.65; }
.split .big { margin-bottom: 20px; color: var(--fg); font-size: 26px; line-height: 1.4; letter-spacing: -0.01em; }
.stack { list-style: none; padding: 0; margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.stack li { padding: 8px 10px; border: 1px solid var(--hair-2); border-radius: 4px; font: 400 12px/1 var(--mono); color: var(--fg-2); }

/* contact: the same city at sunrise */
.contact { position: relative; overflow: hidden; background: var(--bg); color: var(--fg); }
#dawn { position: absolute; inset: 0; }
.contact-inner { position: relative; z-index: 1; padding: 128px 0 380px; }
.contact h2 { max-width: 9em; margin-bottom: 24px; font-size: clamp(56px, 8.6vw, 128px); line-height: 0.86; text-wrap: balance; }
.contact p { max-width: 34rem; margin-bottom: 32px; color: #c6ccdc; font-size: 19px; line-height: 1.6; }
.contact .btn.ghost { background: rgba(8, 10, 20, 0.6); }
.contact .price-note { margin-top: -16px; color: var(--fg-2); font-size: 16px; }

.foot { background: #0a0b17; color: var(--fg-3); font-size: 14px; }
.foot-row { display: flex; justify-content: space-between; gap: 16px; padding: 24px 0 calc(32px + env(safe-area-inset-bottom, 0px)); }
.foot a { text-decoration: none; transition: color .15s var(--ease); }
.foot a:hover { color: var(--fg); }

/* one entrance: a short fade and rise as a block scrolls in */
.js [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease) var(--d, 0ms), transform .5s var(--ease) var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  .offers li { grid-template-columns: 56px minmax(0, 1fr); gap: 8px 16px; }
  .offers p, .offers .proof { grid-column: 2; }
  .proof { justify-content: flex-start; margin-top: 4px; }
  .featured { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .w7, .w5 { grid-column: span 6; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); }
  .nav, .top .btn { display: none; }
  .lang { margin-inline-start: auto; }
  .top-inner { height: 56px; }
  section[id] { scroll-margin-top: 56px; }
  .shell { width: calc(100% - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); }
  .lang select { font-size: 16px; }
  .hero { height: auto; min-height: 100vh; min-height: 100svh; max-height: none; }
  .hero-inner .actions .btn, .contact .actions .btn { flex: 1 1 auto; }
  .contact .actions { flex-direction: column; align-items: stretch; }
  .contact .btn { white-space: normal; text-align: center; }
  .hero-inner { justify-content: flex-start; padding-top: 96px; padding-bottom: max(280px, 36svh); }
  .status { max-width: calc(100% - 112px); align-items: flex-start; }
  .status .win { margin-top: 5px; }
  .hero h1 { font-size: clamp(56px, 17vw, 84px); }
  .lead { font-size: 17px; }
  .tag { display: none; }
  .facts-bar { grid-template-columns: minmax(0, 1fr); }
  .fact { padding: 12px 0; }
  .fact + .fact { padding-inline-start: 0; border-inline-start: 0; border-top: 1px solid var(--hair); }
  .fact b { font-size: 36px; }
  .block { padding-top: 88px; }
  #services, .light > .block:last-child { padding-bottom: 88px; }
  .head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 28px; }
  .head p { text-align: start; }
  .offers h3 { font-size: 22px; }
  .featured { padding: 24px; margin-inline: -8px; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .grid { gap: 16px; }
  .w7, .w5, .w4 { grid-column: 1 / -1; }
  .more { flex-direction: column; align-items: flex-start; }
  .gets { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .split .big { font-size: 21px; }
  .contact-inner { padding: 88px 0 300px; }
}

/* touch screens keep no sticky hover after a tap */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: none; border-color: var(--hair); }
  .btn.accent:hover { background: var(--amber); }
  .nav a:hover { background: transparent; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 52px; }
  .name { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .nav a, .more, .tag, .top, .offers .win { transition: none; }
  .day.play .refused i, .day.play .refused em { transition: none; }
}

/* more work: two half-width cards, then the platform building blocks */
.w6 { grid-column: span 6; }
.minis { grid-column: 1 / -1; padding-top: 24px; }
.minis h3 { margin-bottom: 16px; color: var(--fg-2); font: 400 14px/1.4 var(--sans); }
.minis ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.minis a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 20px; background: var(--card); border: 1px solid var(--hair); border-radius: 14px; text-decoration: none; transition: border-color .15s var(--ease), transform .2s var(--ease); }
.minis a:hover { border-color: var(--hair-2); transform: translateY(-2px); }
.minis b { font: 500 18px/1.3 var(--sans); }
.minis span { color: var(--fg-2); font-size: 14px; line-height: 1.5; }
.minis em { margin-top: auto; padding-top: 12px; font: normal 400 12px/1.5 var(--mono); color: var(--fg-3); }

/* how a project goes: four steps, each marked by a lit window */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.steps li { padding-top: 24px; border-top: 1px solid var(--hair-2); }
.steps .num { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; font: 400 13px/1 var(--mono); color: var(--fg-3); }
.steps .win { transition: background-color .4s var(--ease) .25s; }
.js .steps li:not(.seen) .win { background: var(--raised); }
.steps h3 { margin-bottom: 8px; font-size: 22px; line-height: 1.25; }
.steps p { color: var(--fg-2); font-size: 15px; line-height: 1.6; }

/* questions */
.faq { border-bottom: 1px solid var(--hair); }
.faq details { border-top: 1px solid var(--hair); }
.faq summary { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 20px 0; font-size: 20px; line-height: 1.4; cursor: pointer; list-style: none; transition: color .15s var(--ease); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 20px/1 var(--mono); color: var(--fg-3); }
.faq details[open] summary::after { content: "\2212"; color: var(--lit); }
.faq summary:hover::after { color: var(--fg); }
.faq details p { margin-bottom: 20px; }

@media (max-width: 1024px) {
  .w6 { grid-column: span 6; }
  .minis ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
}

@media (max-width: 760px) {
  .w6 { grid-column: 1 / -1; }
  .minis ul { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .faq summary { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .minis a, .steps .win, .faq summary { transition: none; }
}
