/* ============ Firjar tokens ============ */
:root {
	--ink: #1b1a17;
	--paper: #f3ecdc;
	--paper-2: #ebe2cc;
	--card: #fbf6ea;
	--sand: #d9c9a3;
	--ochre: #b5482a;
	--ochre-deep: #9a3a20;
	--muted: #6a645a;
	--line: rgba(27, 26, 23, .14);
	--display: "Amiri", serif;
	--text: "IBM Plex Sans Arabic", system-ui, sans-serif;
	--gutter: clamp(16px, 4vw, 56px);
	--sec: clamp(96px, 12vw, 160px);
	--radius: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.8 var(--text); overflow-x: clip; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 4px; border-radius: 4px; }
.wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: fixed; top: -100px; right: 16px; z-index: 200; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* section label: number + name, no ornaments */
.label { display: flex; align-items: baseline; gap: 12px; font-weight: 600; font-size: .92rem; color: var(--muted); margin-bottom: 18px; }
.label span { font: 700 1.05rem var(--display); color: var(--ochre); }
.label.center { justify-content: center; }

.h2 { font: 700 clamp(2.2rem, 4.8vw, 4.2rem)/1.35 var(--display); }
.muted { color: var(--muted); }
.body-lg { font-size: clamp(1.08rem, 1.4vw, 1.25rem); color: var(--muted); max-width: 46ch; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(40px, 6vw, 72px); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; flex: none; font-weight: 700; font-size: .98rem; text-decoration: none; color: var(--ink); padding-bottom: 4px; background: linear-gradient(var(--ink), var(--ink)) right bottom / 0 1.5px no-repeat; transition: background-size .4s; }
.link-arrow .arrow { width: 20px; height: 20px; stroke-width: 3; transition: transform .3s; }
.link-arrow:hover { background-size: 100% 1.5px; }
.link-arrow:hover .arrow { transform: translateX(-5px); }

/* icons: ink only */
.ic { width: 44px; height: 44px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic .d, .ic .f { fill: var(--ink); stroke: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 28px; border-radius: 999px; font-weight: 700; text-decoration: none; transition: background-color .3s, color .3s; }
.btn-ochre { background: var(--ochre); color: #fff; }
.btn-ochre:hover { background: var(--ochre-deep); }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: .9rem; }

/* ============ Intro (logo, once) ============ */
.intro { display: none; }
.js .intro { display: grid; position: fixed; inset: 0; z-index: 100; place-items: center; background: var(--paper); }
.intro-mark { width: min(380px, 70vw); overflow: visible; }

/* ============ Header ============ */
.site-header {
	position: fixed; inset: 0 0 auto; z-index: 50; height: 76px;
	display: flex; align-items: center; gap: 24px; padding-inline: var(--gutter);
	background: rgba(243, 236, 220, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid transparent; transition: border-color .3s, transform .5s cubic-bezier(.2, .7, .2, 1);
}
.site-header.is-scrolled { border-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.brand { display: block; width: 100px; flex: none; }
.brand svg { width: 100%; height: auto; overflow: visible; }
.nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.nav > a, .nav-item > a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .25s, background-color .25s; }
.nav > a:hover, .nav-item > a:hover, .nav-item:focus-within > a { color: var(--ink); background: rgba(27, 26, 23, .05); }
.nav-item { position: relative; }
.nav-item > a svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .3s; }
.has-mega:hover > a svg { transform: rotate(180deg); }
.mega {
	position: absolute; top: calc(100% + 16px); right: 50%; translate: 50% 0; width: 620px;
	display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; padding: 16px; background: var(--card);
	border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 60px -28px rgba(27, 26, 23, .45);
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .3s, transform .3s, visibility .3s;
}
.mega::before { content: ""; position: absolute; inset: -18px 0 auto; height: 18px; }
.has-mega:hover .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega-col { display: grid; align-content: start; gap: 2px; }
.mega-col + .mega-col { border-right: 1px solid var(--line); padding-right: 10px; }
.mega-title { font-size: .8rem; font-weight: 600; color: var(--muted); padding: 4px 10px 8px; }
.mega a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; text-decoration: none; transition: background-color .25s; }
.mega a:hover { background: var(--paper); }
.mega .ic { width: 34px; height: 34px; }
.mega b { display: block; font-size: .95rem; }
.mega small { display: block; font-size: .8rem; color: var(--muted); line-height: 1.5; }
.header-cta { flex: none; }
.burger { display: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(27, 26, 23, .06); cursor: pointer; place-items: center; align-content: center; gap: 6px; }
.burger span { display: block; width: 18px; height: 1.6px; background: var(--ink); transition: transform .35s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.8px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.8px) rotate(-45deg); }
.mobile-menu { position: fixed; inset: 0; z-index: 45; display: grid; align-content: center; gap: 36px; padding: 100px var(--gutter) 40px; background: var(--paper); clip-path: circle(0% at 40px 38px); visibility: hidden; }
.mobile-menu nav { display: grid; gap: 2px; }
.mobile-menu nav a { font: 700 clamp(2.2rem, 10vw, 3rem)/1.5 var(--display); text-decoration: none; }
.mobile-foot { color: var(--muted); }
.mobile-foot a { text-decoration: none; color: var(--ink); }

/* ============ Hero ============ */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 120px 0 90px; overflow: hidden; isolation: isolate; }
.hero-copy { display: grid; gap: 28px; max-width: 920px; }
.eyebrow { font-weight: 600; color: var(--muted); }
.hero h1 { font: 700 clamp(3rem, 8.4vw, 8rem)/1.32 var(--display); }
.hero h1 .line { display: block; }
.hero h1 .accent { color: var(--ochre); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--muted); max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions.center { justify-content: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(30px, 4vw, 60px); align-items: center; }
.hero-grid h1 { font-size: clamp(2.8rem, 4.9vw, 5.2rem); }

/* hero visual: a real project, its real result, and the question behind it */
/* Hero visual: the usual page, then the same page with a purpose */
.hv { position: relative; justify-self: center; display: grid; justify-items: center; gap: 16px; width: min(500px, 100%); }
.hv-switch { position: relative; display: inline-flex; padding: 4px; border-radius: 99px; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.hv-switch button { position: relative; z-index: 1; font: inherit; font-size: .88rem; font-weight: 700; padding: 8px 18px; border: 0; border-radius: 99px; background: none; color: var(--muted); cursor: pointer; transition: color .35s; }
.hv-switch button[aria-pressed="true"] { color: var(--paper); }
.hv-knob { position: absolute; top: 4px; bottom: 4px; border-radius: 99px; background: var(--ink); }
.pg { width: 100%; border-radius: 16px; overflow: hidden; background: #fffdf7; box-shadow: 0 50px 80px -44px rgba(27, 26, 23, .55), 0 0 0 1px var(--line); }
.pg-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.pg-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--sand); }
.pg-bar span { margin-inline-start: auto; font-size: .75rem; color: var(--muted); }
.pg-body { display: flex; flex-direction: column; gap: 9px; height: 400px; padding: 14px; overflow: hidden; }
.b { position: relative; flex: none; border-radius: 9px; }
.bt { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }

.b-nav { display: flex; align-items: center; gap: 7px; height: 22px; }
.pg-logo { width: 46px; height: 12px; border-radius: 3px; background: var(--ink); margin-inline-end: auto; }
.nav-i { width: 26px; height: 6px; border-radius: 3px; background: rgba(27, 26, 23, .18); }
.nav-cta { display: none; padding: 3px 14px; border-radius: 99px; background: var(--ochre); color: #fff; font-size: .7rem; font-weight: 700; }

.b-hero { height: 104px; overflow: hidden; background: var(--sand); }
.hero-old { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; color: #fff; }
.hero-old b { font: 700 1.05rem var(--display); color: var(--ink); opacity: .75; }
.ho-arr { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .6); color: var(--ink); font-weight: 700; }
.ho-dots { position: absolute; bottom: 8px; left: 50%; display: flex; gap: 4px; translate: -50% 0; }
.ho-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .8); }
.hero-new { position: absolute; inset: 0; display: none; align-content: center; justify-items: start; gap: 12px; padding: 0 18px; }
.hero-new b { font: 700 1.5rem/1.35 var(--display); color: var(--paper); }
.hero-new i { width: 70%; height: 7px; border-radius: 4px; background: rgba(243, 236, 220, .3); }
.hn-btn { padding: 7px 18px; border-radius: 99px; background: var(--ochre); color: #fff; font-size: .8rem; font-weight: 700; }

.b-vision { display: grid; gap: 6px; padding: 10px 12px; background: var(--paper); }
.b-vision .bt { margin: 0; }
.b-vision > i { display: block; height: 6px; border-radius: 3px; background: rgba(27, 26, 23, .12); }
.b-vision > i:last-of-type { width: 70%; }
.b-svc { padding: 2px 0; }
.cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.c { height: 26px; border-radius: 7px; background: var(--paper-2); }
.b-partners .logos { display: flex; justify-content: space-between; gap: 6px; }
.b-partners .logos i { flex: 1; height: 16px; border-radius: 4px; background: rgba(27, 26, 23, .1); }
.b-cta { display: none; align-items: center; justify-content: center; height: 44px; background: #dcf3d6; color: #1f5a2c; font-size: .82rem; font-weight: 700; }
.b-foot { height: 22px; margin-top: auto; background: var(--ink); opacity: .85; }

/* strikes and the reason for each */
.st { position: absolute; z-index: 2; right: -4px; left: -4px; top: 50%; height: 2.5px; border-radius: 2px; background: var(--ochre); transform: scaleX(0); transform-origin: right; text-decoration: none; }
.why { position: absolute; z-index: 3; left: 8px; top: 50%; translate: 0 -50%; padding: 3px 10px; border-radius: 99px; background: var(--ochre); color: #fff; font: 700 .72rem var(--text); font-style: normal; opacity: 0; }

/* the same page, with a purpose */
.pg.is-after .x { display: none; }
.pg.is-after .b-nav { gap: 0; }
.pg.is-after .nav-cta { display: block; }
.pg.is-after .b-hero { height: 176px; background: var(--ink); }
.pg.is-after .hero-old { display: none; }
.pg.is-after .hero-new { display: grid; }
.pg.is-after .cells .c { height: 44px; }
.pg.is-after .b-cta { display: flex; }

.hv-cap { font-size: .9rem; color: var(--muted); text-align: center; }
.hv-cap b { color: var(--ink); }

/* ============ POV ============ */
.pov { padding: var(--sec) 0; border-top: 1px solid var(--line); }
.pov-text { font: 700 clamp(1.8rem, 3.8vw, 3.4rem)/1.65 var(--display); max-width: 22ch; }
.pov-text q { quotes: "«" "»"; color: var(--ochre); }

/* ============ Services ============ */
.services { padding: 0 0 var(--sec); }
.svc-list { border-top: 1px solid var(--line); }
.svc-list li { border-bottom: 1px solid var(--line); }
.svc-row { display: grid; grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1fr) 44px; align-items: center; gap: 28px; padding: clamp(26px, 3.5vw, 40px) 8px; text-decoration: none; transition: background-color .4s; }
.svc-row:hover { background: rgba(255, 255, 255, .35); }
.svc-ic .ic { width: 56px; height: 56px; }
.svc-title { font: 700 clamp(1.6rem, 3vw, 2.6rem)/1.35 var(--display); transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.svc-row:hover .svc-title { transform: translateX(-10px); }
.svc-desc { color: var(--muted); }
.svc-arrow .ic { width: 28px; height: 28px; transition: transform .35s; }
.svc-row:hover .svc-arrow .ic { transform: translateX(-8px); }

/* ============ Sectors ============ */
.sectors { padding: var(--sec) 0; background: var(--paper-2); border-block: 1px solid var(--line); }
.sector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sector { display: flex; flex-direction: column; gap: 12px; padding: clamp(26px, 3vw, 38px); border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: box-shadow .35s, border-color .35s; }
.sector:hover { border-color: rgba(27, 26, 23, .3); box-shadow: 0 30px 60px -36px rgba(27, 26, 23, .5); }
.sector-ic { width: 72px; height: 72px; margin-bottom: 18px; overflow: visible; }
.sector h3 { font: 700 1.7rem/1.4 var(--display); }
.sector p { color: var(--muted); flex: 1; }

/* ============ Work (Metalab list) ============ */
.work { padding: var(--sec) 0; }
.work-list { border-top: 1px solid var(--line); }
.work-list li { border-bottom: 1px solid var(--line); }
.work-row { display: grid; grid-template-columns: minmax(170px, .75fr) minmax(0, 1.5fr) minmax(130px, .55fr); gap: 32px; align-items: start; padding: clamp(30px, 4vw, 48px) 12px; text-decoration: none; transition: background-color .4s; }
.work-row:hover { background: rgba(255, 255, 255, .35); }
.w-thumb { display: none; }
.w-name { font: 700 clamp(1.4rem, 2.2vw, 1.9rem)/1.4 var(--display); }
.w-desc { font-size: clamp(1.05rem, 1.35vw, 1.2rem); line-height: 1.75; max-width: 40ch; }
.w-desc b { color: var(--ochre); }
.w-tags { display: grid; gap: 6px; font-size: .92rem; color: var(--muted); }
.w-tags i { font-style: normal; }
.arch-preview {
	position: fixed; top: 0; left: 0; z-index: 30; width: 260px; aspect-ratio: 5 / 6; pointer-events: none; opacity: 0; visibility: hidden;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 120'%3E%3Cpath d='M0 120 V48 C0 24 26 8 50 0 C74 8 100 24 100 48 V120 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 120'%3E%3Cpath d='M0 120 V48 C0 24 26 8 50 0 C74 8 100 24 100 48 V120 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.arch-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ============ Method (pinned browser) ============ */
.method { background: var(--paper-2); border-block: 1px solid var(--line); }
.method-pin { min-height: 100svh; width: min(1200px, 100%); margin-inline: auto; padding: 100px var(--gutter) 60px; display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.method h2 { font: 700 clamp(2.2rem, 4.4vw, 3.8rem)/1.35 var(--display); margin-bottom: 22px; }
.method-side { display: grid; justify-items: start; }
.steps { display: grid; gap: 4px; width: 100%; margin-bottom: 22px; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 14px 18px; border-radius: 16px; opacity: .35; transition: opacity .4s, background-color .4s; }
.step.is-on { opacity: 1; background: rgba(243, 236, 220, .92); box-shadow: 0 12px 30px -20px rgba(27, 26, 23, .5); }
.step b { font: 700 2rem/1.1 var(--display); color: var(--ochre); }
.step h3 { font-size: 1.2rem; margin-bottom: 2px; }
.step p { font-size: .95rem; color: var(--muted); line-height: 1.65; }

.browser { width: min(100%, calc((100svh - 200px) * 1.55)); justify-self: center; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 40px 80px -36px rgba(27, 26, 23, .5), 0 0 0 1px var(--line); }
.browser-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--sand); }
.url { flex: 1; text-align: center; font-size: .82rem; color: var(--muted); background: var(--card); border-radius: 8px; padding: 4px 12px; }
.screen { position: relative; aspect-ratio: 16 / 10; background: var(--card); overflow: hidden; contain: paint; }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform, opacity; }
.layer-design { padding: 4%; display: grid; grid-template-rows: auto 1fr auto; gap: 5%; background: var(--ink); }
.d-nav { display: flex; align-items: center; gap: 4%; }
.d-nav span { height: 8px; width: 8%; border-radius: 4px; background: rgba(243, 236, 220, .3); }
.d-nav .d-logo { width: 22px; height: 22px; border-radius: 50%; background: var(--ochre); margin-inline-end: auto; }
.d-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 5%; align-items: center; }
.d-copy { display: grid; gap: 10px; justify-items: start; }
.d-copy i { display: block; height: 14px; border-radius: 7px; background: var(--paper); }
.d-copy i.w60 { width: 60%; background: rgba(243, 236, 220, .35); height: 9px; }
.d-copy i.w80 { width: 80%; } .d-copy i.w95 { width: 95%; }
.d-copy b { margin-top: 6px; font-size: 11px; padding: 6px 14px; border-radius: 99px; background: var(--ochre); color: #fff; }
.d-img { aspect-ratio: 4 / 3; border-radius: 12px; background: linear-gradient(140deg, var(--sand), #a88f5e); }
.d-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3%; }
.d-cards span { height: 52px; border-radius: 10px; background: rgba(243, 236, 220, .08); border: 1px solid rgba(243, 236, 220, .14); }
.layer-code { background: #15140f; padding: 5% 6%; }
.layer-code pre { margin: 0; font: 500 clamp(9px, 1.15vw, 14px)/1.9 ui-monospace, Consolas, monospace; color: #e8dfc9; }
.layer-code .cl { display: block; white-space: pre; }
.layer-code em { color: #e0866a; font-style: normal; }
.layer-code u { color: #d9c9a3; text-decoration: none; }
.layer-code s { color: #a9c08a; text-decoration: none; }
.layer-code i { color: #e8b75a; font-style: normal; }
.layer-live { pointer-events: none; }
.live-badge { position: absolute; top: 5%; left: 5%; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: #3e8e5e; color: #fff; font-weight: 700; font-size: .85rem; }
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.live-pills { position: absolute; left: 5%; bottom: 7%; display: flex; flex-wrap: wrap; gap: 8px; }
.live-pills li { background: var(--card); color: var(--ink); font-weight: 700; font-size: .85rem; padding: 6px 14px; border-radius: 99px; box-shadow: 0 10px 24px -12px rgba(27, 26, 23, .6); }

/* ============ Principles (horizontal) ============ */
.principles { overflow: hidden; }
.principles-pin { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 48px; padding: 110px 0 80px; }
.scroll-track { display: flex; gap: 22px; padding-inline: var(--gutter); width: max-content; justify-self: start; }
.pr-card { position: relative; width: clamp(290px, 28vw, 360px); min-height: 380px; padding: 34px 30px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.pr-num { position: absolute; top: 14px; left: 22px; font: 700 5.2rem/1 var(--display); color: rgba(27, 26, 23, .08); }
.pr-card .ic { width: 52px; height: 52px; margin-bottom: auto; }
.pr-card h3 { font: 700 1.55rem/1.45 var(--display); }
.pr-card p { color: var(--muted); }

/* ============ About ============ */
.about { padding: var(--sec) 0; background: var(--paper-2); border-block: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 7vw, 100px); align-items: start; }
.about-copy { display: grid; gap: 28px; justify-items: start; }
.facts { width: 100%; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts b { font-size: 1.08rem; }
.facts span { color: var(--muted); }

/* ============ Knowledge ============ */
.knowledge { padding: var(--sec) 0; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post { display: flex; flex-direction: column; gap: 18px; min-height: 300px; padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s; }
.post:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -34px rgba(27, 26, 23, .5); }
.post-top { display: flex; align-items: center; justify-content: space-between; }
.post-cat { font-size: .85rem; font-weight: 600; color: var(--muted); }
.post .ic { width: 38px; height: 38px; }
.post h3 { font: 700 1.45rem/1.55 var(--display); flex: 1; }
.post-foot { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .92rem; }
.post-foot .ic { width: 18px; height: 18px; stroke-width: 3; }

/* ============ CTA ============ */
.cta { padding: var(--sec) 0; text-align: center; border-top: 1px solid var(--line); }
.cta h2 { font: 700 clamp(2.8rem, 8vw, 6.5rem)/1.3 var(--display); margin-bottom: 18px; }
.cta-text { color: var(--muted); margin-bottom: 36px; }

/* ============ Footer ============ */
.site-footer { padding: clamp(70px, 9vw, 110px) 0 30px; background: var(--ink); color: var(--paper); overflow: hidden; }
.footer-cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.f-brand { display: grid; gap: 14px; align-content: start; justify-items: start; color: rgba(243, 236, 220, .65); }
.f-logo { width: 110px; height: auto; }
.site-footer .wm path[fill="#1b1a17"] { fill: var(--paper); }
.f-contact a { text-decoration: none; color: var(--paper); }
.site-footer nav { display: grid; gap: 10px; align-content: start; }
.f-title { font-size: .82rem; font-weight: 600; color: var(--sand); margin-bottom: 6px; }
.site-footer nav a { text-decoration: none; color: rgba(243, 236, 220, .65); transition: color .25s; }
.site-footer nav a:hover { color: var(--paper); }
.f-word { margin: clamp(50px, 7vw, 90px) 0 10px; display: grid; place-items: center; padding-inline: var(--gutter); }
.f-word .big { width: min(900px, 92vw); height: auto; overflow: visible; }
.f-row { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid rgba(243, 236, 220, .14); color: rgba(243, 236, 220, .55); font-size: .88rem; }
.f-row a { color: rgba(243, 236, 220, .55); }

/* ============ Cursor: a simple ink dot ============ */
.cursor { display: none; }
@media (pointer: fine) {
	.cursor { display: grid; place-items: center; position: fixed; top: 0; left: 0; z-index: 150; pointer-events: none; width: 10px; height: 10px; translate: -50% -50%; opacity: 0; transition: opacity .3s; }
	.cursor.is-on { opacity: 1; }
	.cursor i { position: absolute; inset: 0; border-radius: 50%; background: var(--ink); transition: transform .35s, background-color .35s; }
	.cursor em { position: relative; font: 600 .78rem var(--text); color: var(--paper); opacity: 0; white-space: nowrap; transition: opacity .25s; }
	.cursor.is-link i { transform: scale(3.2); background: rgba(27, 26, 23, .18); }
	.cursor.is-label i { transform: scale(7.5); background: var(--ink); }
	.cursor.is-label em { opacity: 1; }
}

/* ============ Responsive ============ */
@media (max-width: 1080px) {
	.nav { display: none; }
	.burger { display: grid; }
	.header-cta { margin-inline-start: auto; }
}
@media (max-width: 900px) {
	.hv { width: min(440px, 100%); margin-top: 10px; }
	.pg-body { height: 380px; }
	.pg.is-after .b-hero { height: 158px; }
	.sec-head { flex-direction: column; align-items: flex-start; }
	.hero-grid { grid-template-columns: minmax(0, 1fr); }
	.svc-row { grid-template-columns: 48px 1fr 28px; gap: 6px 14px; }
	.svc-ic .ic { width: 44px; height: 44px; }
	.svc-desc { grid-column: 2; grid-row: 2; font-size: .95rem; }
	.svc-arrow { grid-column: 3; grid-row: 1; }
	.sector-grid, .posts { grid-template-columns: 1fr; }
	.work-list { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 18px; border-top: 0; scrollbar-width: none; overscroll-behavior-x: contain; }
	.work-list::-webkit-scrollbar { display: none; }
	.work-list li { flex: 0 0 84%; scroll-snap-align: start; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
	.work-row { grid-template-columns: 1fr; gap: 8px; padding: 0 0 22px; height: 100%; align-content: start; }
	.work-row:hover { background: none; }
	.w-thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
	.w-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
	.w-name, .w-desc, .w-tags { padding-inline: 20px; }
	.w-desc { font-size: 1rem; }
	.w-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
	.w-tags i { font-size: .8rem; padding: 3px 12px; border-radius: 99px; background: var(--paper-2); }
	.method-pin { grid-template-columns: 1fr; align-content: start; padding-top: 92px; gap: 18px; }
	.method h2 { font-size: clamp(1.8rem, 7vw, 2.4rem); margin-bottom: 12px; }
	.method-side .link-arrow { display: none; }
	.steps { grid-template-areas: "s"; margin-bottom: 0; }
	.step { grid-area: s; opacity: 0; visibility: hidden; background: rgba(243, 236, 220, .92); transition: opacity .2s, visibility 0s linear .2s; }
	.step.is-on { opacity: 1; visibility: visible; transition: opacity .3s .2s, visibility 0s linear .2s; }
	.browser { width: 100%; }
	.scroll-track { width: auto; display: grid; grid-template-columns: 1fr; justify-self: stretch; }
	.pr-card { width: 100%; min-height: 0; }
	.pr-card .ic { margin-bottom: 18px; }
	.about-grid { grid-template-columns: 1fr; }
	.footer-cols { grid-template-columns: 1fr 1fr; }
	.f-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	.site-header { height: 64px; gap: 10px; }
	.brand { width: 82px; }
	.actions .btn { flex: 1 1 100%; }
	.facts li { flex-direction: column; gap: 2px; }
	.live-pills li, .live-badge { font-size: .72rem; padding: 4px 10px; }
	.f-row { flex-direction: column; text-align: center; }
}

/* No JS / reduced motion: final state */
html:not(.js) .layer-sketch, html:not(.js) .layer-code { display: none; }
@media (max-width: 900px) {
	html:not(.js) .steps { grid-template-areas: none; }
	html:not(.js) .step { grid-area: auto; opacity: 1; visibility: visible; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
	.js .intro { display: none; }
}

/* ============ Pinned sections must fit the screen height ============ */
/* The code never spills out of its own layer, whatever the frame size. */
.screen { container-type: size; }
.layer-code { overflow: hidden; }
.layer-code pre { font-size: clamp(7px, min(2.25cqh, 1.15vw), 14px); }

@media (min-width: 901px) {
	/* Method: the pinned block is exactly one screen tall, and everything in it scales with the height. */
	.method-pin { min-height: 0; height: 100svh; padding: clamp(76px, 12svh, 100px) var(--gutter) clamp(20px, 4svh, 60px); }
	.method h2 { font-size: clamp(1.8rem, min(4.4vw, 6.4svh), 3.8rem); margin-bottom: clamp(10px, 2.4svh, 22px); }
	.method-side .label { margin-bottom: clamp(8px, 1.6svh, 18px); }
	.steps { margin-bottom: clamp(8px, 2svh, 22px); }
	.step { padding: clamp(8px, 1.6svh, 14px) 18px; }
	.step b { font-size: clamp(1.4rem, 3.4svh, 2rem); }
	.step h3 { font-size: clamp(1rem, 2.4svh, 1.2rem); }
	.step p { font-size: clamp(.82rem, 1.9svh, .95rem); line-height: 1.55; }
	.browser { width: min(100%, calc((100svh - 170px) * 1.4)); }

	/* Principles: the heading and the cards share one screen. */
	.principles-pin { min-height: 0; height: 100svh; gap: clamp(20px, 4svh, 48px); padding: clamp(80px, 13svh, 110px) 0 clamp(24px, 5svh, 80px); }
	.principles .sec-head { margin-bottom: 0; }
	.principles .h2 { font-size: clamp(2rem, min(4.8vw, 7svh), 4.2rem); }
	.pr-card { min-height: clamp(250px, calc(100svh - 360px), 380px); padding: clamp(22px, 3.4svh, 34px) 30px; }
	.pr-num { font-size: clamp(3.6rem, 9svh, 5.2rem); }
}

/* Very short screens (small laptops, zoomed browsers): only the current step keeps its sentence. */
@media (min-width: 901px) and (max-height: 640px) {
	.step:not(.is-on) p { display: none; }
	.method-side .link-arrow { display: none; }
}
@media (max-width: 900px) {
	.layer-code { padding: 4% 5%; }
	.layer-code pre { line-height: 1.5; }
}
.handoff .intro { display: none; }

/* Hero proof: three real results under the buttons */
.proof { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.proof li { display: grid; font-size: .85rem; color: var(--muted); font-weight: 600; }
.proof b { font: 700 1.45rem/1.3 var(--display); color: var(--ink); }
