/* =================================================================
   THEME — engineered: white, true black, one signal blue. Geist.
   Final layer: overrides site.css, motion.css and hero3d.css.
   ================================================================= */
:root {
  --bg: #FFFFFF;
  --bg-2: #F4F4F5;
  --panel: #FFFFFF;
  --text: #0C0C0E;
  --text-2: #2B2B30;
  --muted: #5E6068;
  --faint: #889A9C;
  --line: #E6E6EA;
  --line-2: #CFCFD5;
  --accent: #B8432F;
  --accent-ink: #A33A28;
  --on-accent: #FFFFFF;
  --lime: #B8432F;
  --lime-ink: #A33A28;
  --serif: "Bricolage Grotesque", "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Bricolage Grotesque", "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 6px;
}
body { font-weight: 400; background: var(--bg); color: var(--text); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); }

/* ---------- Type: precise, medium weight ---------- */
.display, .h2, .chap h2, .story h2, .hl figcaption h3, .wcard h3, .timeline h3, .big-steps h3,
.next strong, .form h2, .ftr__q, .statement__text, .h3d__title, .known2 h3, .faq summary, .channels strong {
  font-family: var(--sans); font-variation-settings: normal; font-weight: 500;
}
.display { letter-spacing: -.05em; line-height: .98; }
.h2 { letter-spacing: -.045em; line-height: 1; }
.chap h2, .story h2, .hl figcaption h3, .wcard h3, .timeline h3, .big-steps h3 { letter-spacing: -.035em; }
.lede, .chap__idea, .case-hero__idea { font-weight: 400; }
.h3 { font-weight: 500; letter-spacing: -.02em; }
.logo { font-weight: 600; font-size: 18px; letter-spacing: -.03em; }
.kicker, .chap__where, .crumb, .story .num, .facts dt, .ftr__cols .ftr__h, .prog, .h3d__hint, .card__tag, .wcard p, .strip small {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0;
}

/* ---------- Buttons: rectangular ---------- */
.btn { border-radius: var(--r); background: var(--text); color: #fff; font-weight: 500; padding: 13px 20px; }
.btn:hover { background: #2A2A2F; transform: none; }
.btn--line { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--line:hover { background: transparent; border-color: var(--text); }
.btn--light { background: #fff; color: var(--text); }
.btn--light:hover { background: #E8E8EA; }
.nav .btn { color: #fff; padding: 9px 16px; }
.menu-btn { border-radius: var(--r); }
.copy { border-radius: var(--r); }

/* ---------- Header on the black hero ---------- */
.hdr.is-scrolled { background: rgba(255, 255, 255, .9); }
.page-home .hdr:not(.is-scrolled) .nav .btn { background: #fff; color: var(--text); }
.page-home .hdr:not(.is-scrolled) .nav > a:not(.btn):hover { color: #fff; opacity: .7; }
.page-home .hdr:not(.is-scrolled) .nav > a:not(.btn) { color: #E6E6EA; }

/* ---------- 3D hero: black, technical grid ---------- */
.h3d { background: #000; }
.h3d::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M120 0H0v120' fill='none' stroke='%23ffffff' stroke-opacity='.08'/%3E%3C/svg%3E");
}
.h3d__title { font-size: clamp(3rem, 7.4vw, 8.2rem); letter-spacing: -.06em; line-height: .94; max-width: 13ch; }
.h3d__hint { color: #889A9C; }
.h3d__hint span { border-radius: 4px; }
.h3d__hint span::after { background: var(--accent); border-radius: 1px; }
.h3d__tag { background: #fff; color: var(--text); border-radius: var(--r); }
.h3d__tag b { font-family: var(--sans); font-weight: 600; font-variation-settings: normal; }
.h3d__tag i { color: var(--accent-text); }
.h3d .btn--line { color: #fff; background: #000; border-color: rgba(255, 255, 255, .3); }
.h3d .btn--line:hover { border-color: #fff; color: #fff; background: #000; }

/* ---------- Projects stage: full-bleed black ---------- */
.dark { --text: #F5F5F6; --text-2: #D4D4D8; --muted: #9A9CA4; --faint: #6E7078; --line: rgba(255, 255, 255, .12); --line-2: rgba(255, 255, 255, .26);
  background: #000; border-radius: 0; margin: 0; }
.dark .btn { background: #fff; color: #0C0C0E; }
.dark .btn:hover { background: #E8E8EA; }
.dark .btn--line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.dark .btn--line:hover { color: #fff; border-color: #fff; }
.dark .chap__where { color: var(--muted); }
.dark .prog b i { background: var(--accent); }
.pal i { border-radius: 2px; }
.laptop__screen, .phone { border-color: #172427; }
.laptop__base, .dark .laptop__base { background: #172427; }
.dark .laptop__screen, .dark .phone { border-color: #172427; }

/* ---------- Sections ---------- */
.sec--line { border-top: 1px solid var(--line); }
.sec--grey { background: var(--bg-2); }
.statement__text { letter-spacing: -.045em; line-height: 1.1; max-width: 24ch; }

.grid-4 { border-radius: 8px; }
.grid-4 svg { color: var(--accent-text); }
.grid-4 > div:hover svg { transform: none; }

.known2 { margin-top: clamp(64px, 8vw, 110px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--g); }
.known2 h3 { margin: 0; font-size: clamp(1.4rem, 2.2vw, 1.9rem); letter-spacing: -.035em; line-height: 1.1; max-width: 14ch; }
.known2 ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--g); counter-reset: k; border-top: 1px solid var(--line); }
.known2 li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.known2 li::before { counter-increment: k; content: counter(k, decimal-leading-zero); font: 13px/1.9 var(--mono); color: var(--accent-text); }
@media (max-width: 860px) { .known2 { grid-template-columns: 1fr; } .known2 ul { grid-template-columns: 1fr; } }

.steps li { border-top: 1px solid var(--line-2); }
.steps li::before { font: 500 13px var(--mono); color: var(--accent-text); margin-bottom: 18px; letter-spacing: 0; }
.sec--grey .steps li { border-top-color: var(--text); }

.portrait { background: #0C0C0E; border-radius: 8px; }
.portrait__ph span { color: #fff; font-family: var(--sans); font-weight: 500; font-variation-settings: normal; letter-spacing: -.05em; }
.roles li { border-radius: 4px; font-family: var(--mono); font-size: 13px; }

/* ---------- Footer: black ---------- */
.ftr { background: #000; color: #F5F5F6; padding-top: 0; }
.ftr__cta { padding-top: clamp(90px, 11vw, 160px); }
.ftr__q { color: #fff; font-size: clamp(2.6rem, 6.4vw, 6.4rem); line-height: .98; letter-spacing: -.055em; }
.ftr__mail { margin-top: 40px; }
.ftr__mail a { font-weight: 400; letter-spacing: -.03em; border-color: rgba(255, 255, 255, .3); }
.ftr__mail a:hover { border-color: var(--accent); color: #fff; }
.ftr .copy { border-color: rgba(255, 255, 255, .3); color: #fff; }
.ftr .copy:hover { background: #fff; color: #000; border-color: #fff; }
.ftr__cols, .ftr__base { border-color: rgba(255, 255, 255, .12); }
.ftr__cols .ftr__h, .ftr__base { color: #889A9C; }
.ftr__cols a, .ftr__cols p { color: #C9CACF; }
.ftr__cols a:hover { color: var(--accent-text); }

/* ---------- Case + inner pages ---------- */
.case-hero .display { font-size: clamp(3rem, 7.4vw, 7.6rem); line-height: .95; }
.next { background: var(--bg-2); }
.next small, .next span { color: var(--muted); }
.next strong { letter-spacing: -.05em; }
.next:hover strong { color: var(--accent-text); }
.wcard__img, .hl__img, .swatches div, .specimens div, .strip img, .form, .field input, .field textarea, .field select { border-radius: 8px; }
.tags li { border-radius: 4px; font-family: var(--mono); font-size: 12.5px; }
.faq summary i { border-radius: 4px; }
.faq details[open] summary i { background: var(--text); border-color: var(--text); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--text); box-shadow: 0 0 0 3px rgba(184, 67, 47, .2); }
.channels a:hover strong { color: var(--accent-text); }
.pv__bg { background: rgba(0, 0, 0, .82); }
.pv__seg button[aria-pressed="true"] { background: #fff; color: #0C0C0E; }

/* Screen recordings inside the device frames */
.scr--video video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; background: #0C0C0E; }

/* Scroll-scrubbed recordings */
.scr--seq { background: #0C0C0E; }
.scr--seq canvas, .scr--seq .seq-poster { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: top; }
.scr--seq canvas { opacity: 0; transition: opacity .3s; }
.scr--seq.is-live canvas { opacity: 1; }
.showcase:hover .scr img, .showcase.is-auto .scr img { transform: none; }

/* Live websites inside the device frames (case pages) */
.live-frame { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #fff; opacity: 0; transition: opacity .5s; pointer-events: none; z-index: 2; }
.is-live-site > .live-frame { opacity: 1; }
.showcase.is-interactive .live-frame { pointer-events: auto; }
.showcase--live:not(.is-interactive) .laptop__screen, .showcase--live:not(.is-interactive) .phone { cursor: pointer; }
.showcase.is-interactive .laptop__screen, .showcase.is-interactive .phone { outline: 2px solid var(--accent); outline-offset: 4px; }
.live-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 32px 0 clamp(64px, 10vh, 112px); }   /* close to the phone, well clear of the line below */
/* "Try the live site" under the phone: same quiet style as the laptop's Exit button; turns into Exit while in use */
.live-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 13px; border-radius: 8px; border: 1px solid #3A4E53; background: #121D20; color: #ECF0F0; font: 500 14.5px var(--sans); cursor: pointer; transition: border-color .2s, background .2s; }
.live-btn:hover { border-color: #ECF0F0; background: #19272A; }
.live-btn svg { width: 15px; height: 15px; }
.live-btn__go { fill: var(--accent); }
.live-btn__x { display: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.live-btn[aria-pressed="true"] .live-btn__go { display: none; }
.live-btn[aria-pressed="true"] .live-btn__x { display: block; }
.live-ctrl__state { font: 13px var(--mono); color: var(--muted); }

/* Murja Labs logo: terminal mark + mono wordmark, blinking blue cursor */
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 500; font-size: 17px; letter-spacing: -.03em; }
.logo__mark { width: 26px; height: 26px; flex: none; }
.logo__caret { animation: logoBlink 1.1s steps(1) infinite; }
@keyframes logoBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .logo__caret { animation: none; } }

/* Case pages: only the phone in the hero (the 3D laptop is further down), drawn like a current iPhone.
   Flat colours only: a thin metal band, black bezel, Dynamic Island, side buttons. */
.showcase--phone { padding: 0; display: grid; place-items: center; }
.iphone { --w: min(300px, 72vw, calc((100svh - 170px) / 2.17)); position: relative; width: var(--w); padding: 3px; border-radius: calc(var(--w) * .19); background: #4A4A52; box-shadow: inset 0 0 0 1px #6A6A74, 0 50px 80px -36px rgba(0, 0, 0, .9); }
.devs--phone .iphone .phone { position: relative; inset: auto; right: auto; bottom: auto; width: 100%; aspect-ratio: 9 / 19.5; border: calc(var(--w) * .036) solid #070D0F; border-radius: calc(var(--w) * .18); box-shadow: 0 0 0 1px #172427; background: #000; }
.iphone::after { content: ""; position: absolute; z-index: 5; left: 50%; top: calc(3px + var(--w) * .036 + var(--w) * .018); translate: -50% 0; width: calc(var(--w) * .3); height: calc(var(--w) * .082); border-radius: 999px; background: #000; pointer-events: none; }
/* status bar: the website starts below it, like in a real phone browser */
.iphone { --sb: calc(var(--w) * .118); }
.iphone__sb { position: absolute; z-index: 4; inset: 0 0 auto; height: var(--sb); display: flex; align-items: center; justify-content: space-between; padding: 0 calc(var(--w) * .085) 0 calc(var(--w) * .1); background: #FFFFFF; color: #000; font: 600 calc(var(--w) * .045)/1 var(--sans); letter-spacing: -.01em; pointer-events: none; }
.iphone__sb > span { display: flex; align-items: flex-end; gap: 1.5px; }
.iphone__sb i { width: 3px; background: #000; border-radius: 1px; }
.iphone__sb i:nth-child(1) { height: 4px; } .iphone__sb i:nth-child(2) { height: 6px; } .iphone__sb i:nth-child(3) { height: 8px; } .iphone__sb i:nth-child(4) { height: 10px; }
.iphone__sb u { width: 20px; height: 10px; margin-left: 5px; border: 1.5px solid #000; border-radius: 3px; box-shadow: inset 0 0 0 1.5px #fff, inset 13px 0 0 #000; }
.iphone .phone .live-frame, .iphone .phone .scr { top: var(--sb); }
.iphone__b { position: absolute; width: 3px; background: #3A3A42; border-radius: 2px; }
.iphone__b--act { left: -3px; top: 17%; height: 4.5%; }
.iphone__b--up { left: -3px; top: 25%; height: 8%; }
.iphone__b--down { left: -3px; top: 35%; height: 8%; }
.iphone__b--power { right: -3px; top: 27%; height: 12%; }
.iphone__b--cam { right: -3px; top: 55%; height: 7%; }
.showcase.is-interactive .iphone .phone { outline: 0; }   /* no highlight around the phone while it is in use */

/* Case pages: a small sticky menu of the sections, and a closing call before "Next project" */
.case-nav { position: sticky; top: 64px; z-index: 40; background: rgba(11, 19, 21, .94); border-block: 1px solid var(--line); }
.case-nav .wrap { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 8px; }
.case-nav .wrap::-webkit-scrollbar { display: none; }
.case-nav a { flex: none; padding: 8px 14px; border-radius: 6px; font: 500 14px var(--sans); color: var(--muted); text-decoration: none; transition: color .2s, background .2s; }
.case-nav a:hover { color: var(--text); }
.case-nav a.on { color: var(--text); background: #172427; }
[id^="c-"] { scroll-margin-top: 140px; }
.case-cta { border-top: 1px solid var(--line); padding-block: clamp(80px, 12vh, 140px); text-align: center; }
.case-cta .h2 { max-width: 20ch; margin-inline: auto; }
.case-cta .lede { margin: 18px auto 0; max-width: 46ch; }
.case-cta__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

/* Page tops (Portfolio, How we work, Contact): text on the left, a small window on the right */
.phero--split .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: end; }
.phero--split .display { font-size: clamp(2.8rem, 5.6vw, 5.6rem); }
.pwin { background: #0F181A; border: 1px solid #253438; border-radius: 12px; overflow: hidden; }
.pwin__bar { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; background: #121D20; border-bottom: 1px solid #253438; font: 13px var(--mono); color: #9FAEB0; }
.pwin__bar i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
.pwin__bar i + i { background: #FEBC2E; } .pwin__bar i + i + i { background: #28C840; }
.pwin__bar span { margin-left: 8px; }
.pwin__shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.pwin__shots img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 6px; display: block; }
.pwin__steps { list-style: none; margin: 0; padding: 8px 20px 14px; }
.pwin__steps li { display: grid; grid-template-columns: 42px 1fr auto; align-items: baseline; gap: 8px; padding: 13px 0; border-bottom: 1px solid #22222A; font: 500 16px var(--sans); color: var(--text); }
.pwin__steps li:last-child { border-bottom: 0; }
.pwin__steps b { font: 500 13px var(--mono); color: var(--accent-text); }
.pwin__steps span { font: 13px var(--mono); color: #9FAEB0; text-align: right; }
@media (max-width: 860px) {
  .phero--split .wrap { grid-template-columns: 1fr; }
  .pwin__steps span { display: none; }
}

/* key words in running text: brighter, so a skimming reader catches them */
.lede strong, .big-steps p strong, .grid-4 p strong, .timeline p strong, .values p strong, .faq p strong, .story__body p strong { color: var(--text); font-weight: 500; }
.phero .lede + .lede { margin-top: 12px; }

/* Photos: real ones from assets/img/photos/, or a labelled placeholder until they arrive (flat, no gradients) */
.photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #121D20; }
.photo--ph { display: grid; place-content: center; justify-items: center; gap: 8px; border: 1px dashed #3A4E53; color: #A6B4B6; text-align: center; padding: 16px; }
.photo--ph svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.photo--ph span { font: 500 15px var(--sans); color: var(--text); }
.photo--ph small { font: 12px var(--mono); color: #8A9B9E; }
.portrait .photo { aspect-ratio: 4 / 5; height: 100%; border-radius: inherit; object-position: 50% 30%; }

/* Home: From the field */
section.field { background: #0B1315; padding: clamp(70px, 11vh, 130px) 0; position: relative; z-index: 1; border-top: 1px solid #172427; }
.field__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; margin-top: clamp(32px, 5vh, 56px); }   /* big enough to see the faces */
section.field figure, .about__photos figure { margin: 0; }
section.field figcaption, .about__photos figcaption { margin-top: 10px; font: 13px var(--mono); color: #A6B4B6; }
section.field .photo { aspect-ratio: 3 / 2; }
@media (max-width: 640px) { .field__grid { grid-template-columns: 1fr; } }

/* About: photos under the founder's path */
.about__photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(40px, 6vh, 64px); }
@media (max-width: 760px) { .about__photos { grid-template-columns: 1fr; } }

/* Contact: a face to talk to */
.founder { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.founder .photo { width: 72px; height: 72px; aspect-ratio: 1; border-radius: 50%; flex: none; padding: 0; }
.founder .photo--ph span, .founder .photo--ph small { display: none; }
.founder p { margin: 0; color: var(--muted); max-width: 40ch; }
.founder strong { color: var(--text); font-weight: 500; }
.ftr__tag { color: var(--text); font-weight: 500; display: block; margin-bottom: 4px; }
