/* Maurice Lee Limited — shared design system and page compositions */
@font-face { font-family: Newsreader; src: url('assets/fonts/newsreader-latin.woff2') format('woff2'); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: Inter; src: url('assets/fonts/inter-latin.woff2') format('woff2'); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
  --serif: Newsreader, Georgia, 'Times New Roman', serif;
  --sans: Inter, 'Segoe UI', Arial, sans-serif;
  /* Brand palette */
  --deep: #173F67; --brand: #21618F; --pale: #DCEEF9; --surface: #F2F7FB; --white: #FFFFFF;
  /* Derived tones */
  --ink: #173F67; --text: #3A4E62; --muted: #55687C; --line: #D5E3EE; --line-strong: #AFC8DC;
  --brand-hover: #173F67; --night: #0E2A47; --field: #F6FAFD;
  --error: #A8261B; --error-bg: #FDF1EF; --success: #1F5E36; --success-bg: #EDF7F0;
  /* Type scale */
  --h1-hero: clamp(2.75rem, 1.85rem + 3.3vw, 4.75rem);
  --h1: clamp(2.5rem, 1.85rem + 2.4vw, 4rem);
  --h2: clamp(2rem, 1.62rem + 1.45vw, 2.875rem);
  --h3: clamp(1.375rem, 1.24rem + .5vw, 1.75rem);
  --lead: clamp(1.125rem, 1.06rem + .28vw, 1.3125rem);
  --body: 1.0625rem; --small: .9375rem; --xs: .875rem; --label: .75rem;
  /* Layout */
  --container: 76rem; --gutter: clamp(1.25rem, 4.5vw, 3rem);
  --section: clamp(4rem, 2.8rem + 4.4vw, 7.5rem);
  --split-gap: clamp(2.5rem, 1rem + 5vw, 6rem);
  --radius: .875rem; --radius-sm: .5rem;
  --shadow: 0 1px 2px rgb(23 63 103 / .06), 0 18px 40px -20px rgb(23 63 103 / .28);
}
@media (min-width: 112.5rem) { :root { --container: 86rem; } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); background: var(--white); font: 400 var(--body)/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); letter-spacing: -.018em; font-optical-sizing: auto; text-wrap: balance; }
h1 { font-size: var(--h1); line-height: 1.06; }
h2 { font-size: var(--h2); line-height: 1.12; }
h3 { font-size: var(--h3); line-height: 1.22; }
p { text-wrap: pretty; }
a { color: var(--brand); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-hover); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.banner :focus-visible { outline-color: var(--white); }
.skip-link { position: absolute; top: 1rem; left: 1rem; transform: translateY(-250%); z-index: 30; padding: .75rem 1rem; background: var(--white); color: var(--ink); font-weight: 600; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.skip-link:focus { transform: none; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(var(--container), calc(100% - 2 * var(--gutter))); margin-inline: auto; }

/* Shared typographic components */
.eyebrow { display: flex; align-items: center; gap: .875rem; font: 600 var(--label)/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brand); overflow-wrap: anywhere; }
.eyebrow::before { content: ''; width: 2rem; height: 2px; flex-shrink: 0; background: currentColor; }
.eyebrow + :is(h1, h2) { margin-top: 1.125rem; }
.lead { font-size: var(--lead); line-height: 1.55; color: #2E4358; }
.prose > * + * { margin-top: 1.1rem; }
.prose { max-width: 38rem; }
:is(h1, h2) + :is(.prose, .lead) { margin-top: 1.5rem; }
.lead + .prose { margin-top: 1.1rem; }
.section { padding-block: var(--section); }
.bg-surface { background: var(--surface); }

/* Buttons and links */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .625rem; min-height: 3rem; padding: .8rem 1.6rem; border: 1.5px solid transparent; border-radius: 999px; font: 600 var(--small)/1.3 var(--sans); text-decoration: none; cursor: pointer; transition: background-color .18s, border-color .18s, color .18s; }
.button-primary { background: var(--brand); color: var(--white); }
.button-primary:hover { background: var(--brand-hover); color: var(--white); }
.button-outline { background: var(--white); border-color: var(--brand); color: var(--brand); }
.button-outline:hover { background: var(--pale); color: var(--deep); }
.arrow { display: inline-block; font-family: Arial, sans-serif; font-weight: 400; transition: transform .18s; }
:is(.button, .text-link):hover .arrow { transform: translateX(3px); }
.text-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; font-weight: 600; font-size: var(--small); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Header */
.site-header { position: relative; z-index: 10; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 5.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
/* Company logo, as real Georgia text: ML square, hairline divider, name, tracked capitals tagline. Every size
   follows --s (the name's font size). Georgia's line box is trimmed to its capitals, so the square is centred
   on the visible lettering. Master: the branding folder in the workspace (brand.css). */
.ml-logo {
  --s: clamp(1.25rem, 1.15rem + .3vw, 1.4375rem); --sq: 2.1; --t: .625rem; --tl: .2em; --tg: .6rem;
  display: inline-flex; align-items: center; gap: calc(var(--s) * var(--sq) * .268); padding-block: .5rem;
  font-family: Georgia, 'Times New Roman', serif; font-weight: 400; color: var(--deep); text-decoration: none;
}
.ml-mark {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: calc(var(--s) * var(--sq)); aspect-ratio: 1; background: #6889B7; color: #fff;
  font: 400 calc(var(--s) * var(--sq) * .5)/1 Georgia, 'Times New Roman', serif;
}
.ml-mark > span { display: block; margin: -.156em 0 -.151em; translate: -.012em 0; }
.ml-words {
  align-self: stretch; display: flex; flex-direction: column; justify-content: center;
  padding-left: calc(var(--s) * var(--sq) * .268); border-left: 1px solid #A6B7CD;
}
.ml-name { display: block; font-size: var(--s); line-height: 1; white-space: nowrap; margin: -.156em 0 -.151em -.023em; }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .ml-name { background: linear-gradient(90deg, var(--brand), var(--night)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
}
.ml-tagline {
  display: block; font-size: var(--t); line-height: 1; letter-spacing: var(--tl); white-space: nowrap;
  text-transform: uppercase; color: #466A97; margin: calc(var(--tg) - .156em) 0 -.151em -.042em;
}
.ml-logo:hover .ml-mark { background: var(--brand); }
@media (forced-colors: active) { .ml-name { -webkit-text-fill-color: currentColor; color: CanvasText; } .ml-mark { border: 1px solid; } }
#primary-nav { display: flex; align-items: center; gap: .25rem; }
#primary-nav a { position: relative; display: flex; align-items: center; min-height: 3rem; padding: .75rem 1rem; color: var(--ink); font-size: var(--small); font-weight: 500; text-decoration: none; border-radius: var(--radius-sm); white-space: nowrap; }
#primary-nav a:hover { background: var(--surface); color: var(--brand); }
#primary-nav a[aria-current="page"] { color: var(--brand); }
#primary-nav a[aria-current="page"]::after { content: ''; position: absolute; left: 1rem; right: 1rem; bottom: .3rem; height: 2px; background: var(--brand); border-radius: 2px; }
.menu-toggle { display: none; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .5rem .9rem; background: var(--white); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: var(--small); font-weight: 500; cursor: pointer; }
.menu-icon { width: 1.125rem; height: .75rem; position: relative; border-block: 2px solid currentColor; }
.menu-icon::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: currentColor; }

/* Hero (shared structure; each page sets its own composition) */
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(180deg, #E4EFF8, #EDF4FA 55%, #D6E5F0); }
.hero-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 72% 60%; }
/* The mist sits behind the text only; the river and bridge below it stay clear. */
.hero-content { flex: 1; display: flex; align-items: center; padding-block: clamp(3.5rem, 2rem + 5vw, 7rem); }
.hero-copy { position: relative; width: fit-content; max-width: 37rem; }
/* The mist is sized by the text block itself: it runs from the left edge to just past the
   longest line and feathers out a little above and below, so it only sits where words are. */
.hero-copy::before { content: ''; position: absolute; z-index: -1; top: -4.5rem; bottom: -4.5rem; left: -100vw; right: -9rem; pointer-events: none;
  background: linear-gradient(90deg, rgb(242 247 251 / .95) 0%, rgb(242 247 251 / .9) calc(100% - 16rem), rgb(242 247 251 / .6) calc(100% - 7rem), rgb(242 247 251 / 0) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 4.5rem, #000 calc(100% - 4.5rem), transparent); mask-image: linear-gradient(180deg, transparent, #000 4.5rem, #000 calc(100% - 4.5rem), transparent); }
.hero-copy > p:not(.eyebrow), .hero-detail > p:not(.eyebrow) { margin-top: 1.25rem; color: #2E4358; }
.hero-copy > .lead, .hero-detail > .lead { margin-top: 1.5rem; }
.hero-copy > .lead + .lead, .hero-detail > .lead + .lead { margin-top: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }
/* Phone-only wrappers in the home hero; above phone width they add no boxes, so desktop is unchanged. */
@media (min-width: 48.0625rem) { .hero-intro, .hero-detail { display: contents; } }
/* Home has the full landing hero; every other page shares one shorter hero, cropped identically. */
.hero { min-height: clamp(34rem, 19.5rem + 23vw, 40rem); }
.hero:not(.hero-home) .hero-content { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.hero-home { min-height: clamp(36rem, 30.5rem + 21vw, 52rem); }
.hero-home h1 { font-size: var(--h1-hero); max-width: 13ch; }
/* Breaks as "Software designed / around educational / needs." (8.2em is the longest line);
   balanced wrapping would pick "Software / designed around / educational needs." instead. */
.hero-develop h1 { max-width: 9em; text-wrap: wrap; }
.hero-about h1 { max-width: 15ch; }
@media (min-width: 120rem) {
  .hero-art { width: 120rem; left: 50%; transform: translateX(-50%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
}

/* What we develop: in-page index along the hero base */
.page-index { position: relative; background: rgb(255 255 255 / .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid rgb(255 255 255 / .9); }
.page-index ol { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.page-index li + li { border-left: 1px solid var(--line); }
.page-index a { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: 1.25rem 1.25rem 1.35rem; color: var(--ink); text-decoration: none; transition: background-color .18s; }
.page-index li:first-child a { padding-left: 0; }
.page-index a:hover { background: rgb(220 238 249 / .6); }
.page-index span { font: 600 var(--label)/1.4 var(--sans); letter-spacing: .14em; color: var(--brand); }
.page-index strong { font: 400 1.1875rem/1.3 var(--serif); }

/* Home — educational foundations */
.foundations-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: var(--split-gap); align-items: center; }
.foundations-media { position: relative; isolation: isolate; margin: 0 0 2.5rem 2.5rem; }
.foundations-media::before { content: ''; position: absolute; z-index: -1; left: -2.5rem; top: 2.5rem; right: 2.5rem; bottom: -2.5rem; background: var(--pale); border-radius: var(--radius); }
.foundations-media img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 30% center; border-radius: var(--radius); box-shadow: var(--shadow); }
.foundations-copy .lead { margin-top: 1.5rem; }
.audiences { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.audience { padding-top: 1.1rem; border-top: 2px solid var(--pale); }
.audience h3 { font-size: 1.375rem; }
.audience p { margin-top: .5rem; font-size: var(--small); }
.foundations-copy .closing-line { margin-top: 2rem; }

/* Home — what we develop overview */
.overview-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem var(--split-gap); align-items: end; }
.overview-head .lead { max-width: 34rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, .6rem + 1.6vw, 2rem); margin-top: clamp(2.5rem, 1.8rem + 2.4vw, 4rem); }
.card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: clamp(1.5rem, 1.1rem + 1vw, 2.25rem); }
.card-index { font: 600 var(--label)/1.4 var(--sans); letter-spacing: .14em; color: var(--brand); }
.card h3 { margin-top: .6rem; }
.card p { margin-top: .75rem; }
.overview-action { display: flex; justify-content: center; margin-top: clamp(2.5rem, 1.8rem + 2.4vw, 3.75rem); }

/* Dark illustrated banner (Home and What we develop) */
.banner { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: #D7E5F2; }
.banner-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 78% center; }
.banner::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(11 35 61 / .96) 0%, rgb(11 35 61 / .92) 40%, rgb(11 35 61 / .6) 60%, rgb(11 35 61 / 0) 80%); }
.banner h2, .banner h3 { color: var(--white); }
.banner .eyebrow { color: #A9CDEB; }
.banner p { color: #D7E5F2; }
.banner-home .banner-content { padding-block: clamp(5rem, 3rem + 7vw, 9rem); }
.banner-copy { max-width: 34rem; }
.banner-copy > p:not(.eyebrow) { margin-top: 1.1rem; }
.banner-copy > .lead { margin-top: 1.5rem; color: #E9F1F9; }
.values { list-style: none; padding: 0; margin-top: 2rem; display: grid; grid-template-columns: repeat(2, max-content); gap: 1rem 2.25rem; }
.values li { display: flex; align-items: center; gap: .6rem; font-size: var(--small); font-weight: 500; color: #E9F1F9; }
.values svg { width: 1.5rem; height: 1.5rem; flex: none; fill: none; stroke: #A9CDEB; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.statement { margin-top: 2rem !important; padding-left: 1.4rem; border-left: 2px solid #7FB4DE; font: 400 clamp(1.25rem, 1.1rem + .5vw, 1.5rem)/1.4 var(--serif); color: var(--white) !important; }

/* Home — closing company introduction */
.closing { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: clamp(34rem, 22rem + 22vw, 46rem); background: #CFE0EE; }
.closing-art { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: 62% 42%; }
.closing-inner { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.closing-panel { max-width: 36rem; padding: clamp(2rem, 1.4rem + 2vw, 3.25rem); background: rgb(255 255 255 / .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-radius: var(--radius); box-shadow: 0 24px 60px -24px rgb(14 42 71 / .45); }
.closing-panel h2 { font-size: clamp(1.875rem, 1.55rem + 1.1vw, 2.5rem); }
.closing-panel p:not(.eyebrow) { margin-top: 1rem; }
.closing-panel .text-link { margin-top: 1.25rem; }

/* What we develop — feature sections */
.feature-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--split-gap); align-items: center; }
.feature-copy .lead { margin-top: 1.5rem; }
.feature-copy .prose { margin-top: 1.1rem; }
.feature-media img { width: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-tools .feature-media img { aspect-ratio: 5 / 6; object-position: 72% center; }
.chips-block { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.chips-label { font: 600 var(--label)/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; padding: 0; list-style: none; }
.chips li { padding: .45rem .95rem; background: var(--pale); color: var(--deep); border-radius: 999px; font-size: var(--xs); font-weight: 500; line-height: 1.4; }
.bg-surface .chips li { background: var(--white); border: 1px solid var(--line); }

/* §2: flowing artwork bleeds to the right edge with feathered masks */
.feature-flow { position: relative; isolation: isolate; overflow: clip; background: linear-gradient(180deg, var(--surface), #EAF3FA); }
.flow-art { position: absolute; z-index: -1; top: 0; bottom: 0; right: 0; width: 58%; }
.flow-art img { width: 100%; height: 100%; object-fit: cover; object-position: 40% center; mix-blend-mode: multiply; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%), linear-gradient(180deg, transparent 0%, #000 16%, #000 84%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0%, #000 34%), linear-gradient(180deg, transparent 0%, #000 16%, #000 84%, transparent 100%); mask-composite: intersect; }
.flow-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--split-gap); }
.flow-grid .feature-copy { max-width: 36rem; }

/* §3: half-bleed image on the left */
.feature-learning { overflow: clip; }
.feature-learning .feature-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
/* Bleed images reach the window edge. The distance is worked out from the viewport and the .wrap width:
   a percentage margin here would resolve against the grid column, not the page, and overshoot. */
:root { --bleed: calc((100vw - min(var(--container), 100vw - 2 * var(--gutter))) / 2); }
.bleed-left { margin-left: calc(-1 * var(--bleed)); }
.bleed-left img { width: 100%; aspect-ratio: 4 / 3.2; object-fit: cover; object-position: 60% center; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); }
@media (min-width: 120rem) { .bleed-left, .bleed-right { margin-inline: 0; } .bleed-left img, .bleed-right img { border-radius: var(--radius); } }

/* §4: technical approach on the dark banner */
.banner-approach::before { background: linear-gradient(90deg, rgb(11 35 61 / .96) 0%, rgb(11 35 61 / .9) 45%, rgb(11 35 61 / .74) 75%, rgb(11 35 61 / .62) 100%); }
.banner-approach .banner-art { object-position: 85% 30%; }
.approach-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem var(--split-gap); align-items: start; }
.approach-grid .prose > p { color: #D7E5F2; }
.approach-compare { display: grid; gap: 1rem; }
.compare-card { padding: 1.5rem 1.6rem; background: rgb(11 35 61 / .62); border: 1px solid rgb(255 255 255 / .18); border-radius: var(--radius); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.compare-card h3 { font-size: 1.3125rem; }
.compare-card ul { margin-top: .75rem; padding-left: 1.15rem; color: #D7E5F2; }
.compare-card li + li { margin-top: .3rem; }
.compare-card li::marker { color: #7FB4DE; }
.sequence-block { margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); padding-top: 2.5rem; border-top: 1px solid rgb(255 255 255 / .18); }
.sequence-block > h3 { font-size: 1.5rem; }
.sequence-block > p { margin-top: .6rem; max-width: 46rem; }
.sequence { list-style: none; padding: 0; margin-top: 2rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; counter-reset: step; }
.sequence li { position: relative; padding: 1.5rem 1.4rem 1.6rem; background: rgb(11 35 61 / .62); border: 1px solid rgb(255 255 255 / .18); border-radius: var(--radius); counter-increment: step; }
.sequence li::before { content: counter(step); display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--white); color: var(--deep); font: 600 1rem/1 var(--sans); }
.sequence li:not(:last-child)::after { content: '→'; position: absolute; top: 2.1rem; right: -1.05rem; z-index: 1; font: 400 1.25rem/1 Arial, sans-serif; color: #A9CDEB; }
.sequence h4 { margin: 1rem 0 0; font: 400 1.375rem/1.25 var(--serif); color: var(--white); }
.sequence p { margin-top: .5rem; font-size: var(--small); color: #D2E1EF; }
.banner-approach .banner-content { padding-block: var(--section); }

/* Closing invitation (What we develop) */
.cta-band { padding-block: clamp(3.5rem, 2.5rem + 3vw, 5.5rem); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(1.75rem, 1.5rem + 1vw, 2.375rem); }
.cta-inner p { margin-top: .5rem; }

/* About */
.about-background { padding-block: var(--section); }
.background-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem var(--split-gap); align-items: center; }
.background-grid .prose { margin-top: 1.5rem; }
.background-media img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 55% center; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-why { padding-block: var(--section); }
.why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 2.5rem var(--split-gap); align-items: center; }
.why-grid .prose { margin-top: 1.5rem; }
.why-points { list-style: none; margin: 0; padding: 0 0 0 clamp(1.5rem, .5rem + 2.5vw, 3rem); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.75rem; border-left: 1px solid var(--line); }
.why-icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%; background: var(--pale); }
.why-icon svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.why-points h3 { margin-top: 1rem; font-size: 1.25rem; }
.why-points p { margin-top: .5rem; font-size: var(--small); color: var(--muted); }
.about-direction { overflow: clip; }
.direction-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--split-gap); align-items: center; }
.direction-grid .prose { margin-top: 1.5rem; }
.direction-grid .text-link { margin-top: 1.5rem; }
.bleed-right { margin-right: calc(-1 * var(--bleed)); }
.bleed-right img { width: 100%; aspect-ratio: 4 / 3.1; object-fit: cover; object-position: 35% center; border-radius: var(--radius) 0 0 var(--radius); }

/* Contact */
.contact-main { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) var(--section); background: var(--surface); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(1.5rem, 1rem + 2vw, 3rem); align-items: start; }
.form-card, .details-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-card { padding: clamp(1.5rem, 1rem + 2.4vw, 3.25rem); }
.form-card h2, .details-card h2 { font-size: clamp(1.75rem, 1.55rem + .7vw, 2.125rem); }
.form-intro { margin-top: .6rem; color: var(--muted); }
.field { margin-top: 1.4rem; }
.field label { display: block; margin-bottom: .45rem; font-size: var(--small); font-weight: 600; color: var(--ink); }
.field .optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea { display: block; width: 100%; min-height: 3.125rem; padding: .8rem 1rem; background: var(--field); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink); font-size: 1rem; line-height: 1.5; transition: border-color .18s, background-color .18s, box-shadow .18s; }
.field textarea { min-height: 11rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #6B7D8F; opacity: 1; }
.field input:hover, .field textarea:hover { border-color: var(--brand); }
.field input:focus, .field textarea:focus { background: var(--white); border-color: var(--brand); outline: 3px solid rgb(33 97 143 / .35); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--error); background: var(--error-bg); }
.field [aria-invalid="true"]:focus { outline-color: rgb(168 38 27 / .3); }
.field-error { margin-top: .45rem; color: var(--error); font-size: var(--xs); font-weight: 500; }
.field-error[hidden] { display: none; }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.form-actions .button { min-width: min(11rem, 100%); }
.button[aria-disabled="true"] { opacity: .7; cursor: progress; }
.form-note { flex: 1 1 14rem; font-size: var(--xs); color: var(--muted); line-height: 1.5; }
.form-status { margin-top: 1.5rem; padding: 1rem 1.25rem; border-radius: var(--radius-sm); border: 1px solid; font-size: var(--small); }
.form-status:empty, .form-status[hidden] { display: none; }
.form-status.is-success { background: var(--success-bg); border-color: #A8D4B4; color: var(--success); }
.form-status.is-error { background: var(--error-bg); border-color: #EBB9B2; color: var(--error); }
.form-status strong { display: block; font-size: var(--body); }
.form-status ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.form-status a { color: inherit; }
.details-card { overflow: hidden; }
.details-card > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 40%; }
.details-body { padding: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); }
.details-list { margin: 1.25rem 0 0; padding: 0; list-style: none; display: grid; gap: 1.1rem; }
.details-list li { padding-top: 1.1rem; border-top: 1px solid var(--line); }
.details-list a { display: flex; gap: .9rem; align-items: baseline; color: var(--ink); font-weight: 600; text-decoration: none; }
.details-list a:hover { color: var(--brand); }
.details-list span { min-width: 1.6rem; font: 600 var(--label)/1.4 var(--sans); letter-spacing: .12em; color: var(--muted); }
.details-body .text-link { margin-top: 1.25rem; }

/* Footer */
.site-footer { padding-block: 2.25rem; background: var(--white); border-top: 1px solid var(--line); }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 2rem; font-size: var(--xs); color: var(--muted); line-height: 1.6; }
.footer-legal p, .footer-legal address { font-style: normal; }
/* Company details on the left, registered office on the right.
   Each phrase stays whole: lines only break between them. */
.footer-legal address { text-align: right; }
.footer-legal span:not(.sep) { white-space: nowrap; }
.footer-legal .footer-brand { font: 400 1.25rem/1.3 var(--serif); color: var(--ink); white-space: nowrap; }
.footer-legal a { color: inherit; text-underline-offset: .2em; }
.footer-legal a:hover { color: var(--brand); }

/* Privacy */
.legal-page h1 { font-size: clamp(2.25rem, 1.9rem + 1.4vw, 3rem); }
.legal-page h1 + .prose { margin-top: 1.75rem; }
.sent-actions { margin-top: 2.25rem; }

/* Responsive composition */
@media (max-width: 75rem) {
  .sequence { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sequence li:nth-child(2)::after { display: none; }
}
@media (max-width: 64rem) {
  .banner::before { background: linear-gradient(90deg, rgb(11 35 61 / .95) 0%, rgb(11 35 61 / .88) 50%, rgb(11 35 61 / .55) 80%, rgb(11 35 61 / .4) 100%); }
  .approach-grid { grid-template-columns: minmax(0, 1fr); }
  .approach-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 56rem) {
  .nav-enhanced .menu-toggle { display: inline-flex; }
  .nav-enhanced #primary-nav:not(.is-open) { display: none; }
  .header-inner { flex-wrap: wrap; gap: 0 1rem; min-height: 5rem; }
  #primary-nav { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: .25rem 0 1rem; }
  #primary-nav a { padding-inline: .75rem; border-top: 1px solid var(--line); border-radius: 0; }
  #primary-nav a[aria-current="page"] { background: var(--surface); }
  #primary-nav a[aria-current="page"]::after { left: 0; right: auto; top: .6rem; bottom: .6rem; width: 3px; height: auto; }
  .page-index ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-index li:nth-child(3) { border-left: 0; }
  .page-index li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .page-index li:nth-child(3) a { padding-left: 0; }
  .foundations-grid, .feature-grid, .feature-learning .feature-grid, .flow-grid, .direction-grid, .background-grid, .overview-head, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .foundations-media { margin: 0 0 2rem 2rem; max-width: 40rem; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .card img { height: 100%; aspect-ratio: auto; min-height: 15rem; }
  .feature-tools .feature-media img { aspect-ratio: 16 / 10; }
  .feature-tools .feature-media { order: -1; }
  .flow-art { position: relative; width: auto; height: clamp(13rem, 40vw, 20rem); margin-top: 1rem; }
  .flow-art img { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%); }
  .feature-flow { padding-bottom: clamp(2rem, 4vw, 3rem); }
  /* Stacked, bleed images sit inside the page margins like every other image. */
  .bleed-left, .bleed-right { margin-inline: 0; }
  .bleed-left img, .bleed-right img { border-radius: var(--radius); aspect-ratio: 16 / 10; }
  .direction-grid .bleed-right { order: -1; }
  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .why-points { padding: 2rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .background-media img { aspect-ratio: 16 / 10; }
  .contact-grid { max-width: 44rem; margin-inline: auto; }
}
@media (max-width: 48rem) {
  .values { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
  /* Heroes stack: artwork first so every page opens on a picture, fading into the copy below */
  .hero { min-height: 0; background: var(--surface); }
  .hero-copy::before { display: none; }
  .hero-content { padding-block: 1.25rem 3rem; }
  .hero-art { position: relative; inset: auto; order: -1; height: clamp(14rem, 56vw, 20rem); object-position: 74% 62%; -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%); mask-image: linear-gradient(180deg, #000 72%, transparent 100%); }
  .hero-develop .page-index { order: 2; }
  .page-index { background: var(--white); }
  .hero-actions .button { flex: 1 1 100%; }
  .banner::before { background: linear-gradient(180deg, rgb(11 35 61 / .92), rgb(11 35 61 / .88) 60%, rgb(11 35 61 / .84)); }
  .banner-art { object-position: 80% center; }
  .approach-compare, .sequence { grid-template-columns: minmax(0, 1fr); }
  .sequence li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: 1rem; }
  .sequence li::before { grid-row: span 2; }
  .sequence h4 { margin-top: .3rem; }
  .sequence li:not(:last-child)::after { content: '↓'; top: auto; bottom: -1.05rem; right: auto; left: 2.35rem; }
  .sequence li:nth-child(2)::after { display: block; }
  .closing { display: block; min-height: 0; background: var(--surface); }
  .closing-art { position: relative; height: clamp(16rem, 62vw, 22rem); object-position: 70% 45%; }
  .closing-inner { padding-block: 0 3.5rem; margin-top: -4rem; }
  .audiences { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .foundations-media { margin: 0 0 1.5rem 1.5rem; }
  .foundations-media img { aspect-ratio: 16 / 10; }
  .foundations-media::before { left: -1.5rem; top: 1.5rem; right: 1.5rem; bottom: -1.5rem; }
  .footer-legal { flex-direction: column; gap: .75rem; }
  .footer-legal address { text-align: left; }
  .footer-legal p span:not(.sep) { display: block; }
  .footer-legal .sep { display: none; }
  .footer-legal { align-items: flex-start; }
  /* Company lines, then the office, then Privacy last rather than wedged between them */
  .footer-legal { gap: 0; }
  .footer-legal p:not(.footer-brand) { display: contents; }
  .footer-legal .footer-brand { margin-bottom: .75rem; }
  .footer-legal address { margin-top: .75rem; }
  .footer-legal p span:last-child { order: 1; margin-top: .75rem; }
  /* Shorter images keep the stacked pages from becoming a run of tall pictures */
  .feature-tools .feature-media img, .bleed-left img, .bleed-right img, .background-media img, .details-card > img { aspect-ratio: 2 / 1; }
}
@media (max-width: 40rem) {
  .why-points { grid-template-columns: minmax(0, 1fr); }
  .card { display: flex; }
  .card img { aspect-ratio: 21 / 9; height: auto; min-height: 0; }
}
@media (max-width: 30rem) {
  .page-index li a { padding: .8rem .9rem .9rem; }
  .page-index li:nth-child(odd) a { padding-left: 0; }
  .page-index strong { font-size: 1.0625rem; }
  .values { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
  .hero-home .eyebrow { font-size: .6875rem; letter-spacing: .06em; gap: .5rem; }
  .hero-home .eyebrow::before { width: 1.25rem; }
  .header-inner { column-gap: .75rem; }
  .ml-logo { --s: 1.0625rem; --sq: 2.1; --t: .5625rem; --tl: .06em; --tg: .45rem; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .menu-toggle { min-width: 2.75rem; justify-content: center; padding: .5rem .75rem; }
}
/* Home on phones: composed sections rather than a stack of blocks */
@media (max-width: 48rem) {
  /* Opening: the skyline fills the screen, the heading sits in the sky and the introduction rises over the river */
  .hero-home { --art-h: clamp(32rem, 140vw, 40rem); display: block; }
  .hero-home .hero-art { position: absolute; top: 0; left: 0; height: var(--art-h); object-position: 76% center; -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent); mask-image: linear-gradient(180deg, #000 85%, transparent); }
  .hero-home::before { content: ''; position: absolute; z-index: -1; top: 0; left: 0; right: 0; height: calc(var(--art-h) * .62); background: linear-gradient(180deg, rgb(242 247 251 / .94) 0%, rgb(242 247 251 / .8) 55%, rgb(242 247 251 / 0) 100%); }
  .hero-home .hero-content { padding-block: 2rem 3rem; }
  .hero-home .hero-intro { min-height: calc(var(--art-h) - 7rem); }
  .hero-detail { padding: 1.5rem 1.375rem 1.625rem; background: rgb(255 255 255 / .95); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-radius: var(--radius); box-shadow: 0 24px 60px -24px rgb(14 42 71 / .45); }
  .hero-detail > .lead:first-child { margin-top: 0; }
  .hero-detail .hero-actions { margin-top: 1.75rem; }
  /* Foundation: text first, closing on the architecture edge to edge, so it never meets the opening picture */
  .foundations { padding-block: 3rem 0; }
  .foundations-media { order: 1; margin: .5rem calc(-1 * var(--gutter)) 0; max-width: none; }
  .foundations-media::before { display: none; }
  .foundations-media img { aspect-ratio: 4 / 3; border-radius: 0; box-shadow: none; }
  .audience { padding: 1.1rem 1.25rem 1.25rem; background: var(--surface); border-top: 0; border-left: 3px solid var(--brand); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
  /* Three areas: a row to swipe through, with the next card showing at the edge */
  .overview .cards { display: flex; gap: 1rem; margin-inline: calc(-1 * var(--gutter)); padding: .25rem var(--gutter) 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .overview .cards::-webkit-scrollbar { display: none; }
  .overview .card { display: flex; flex: 0 0 84%; scroll-snap-align: start; }
  .overview .card img { aspect-ratio: 4 / 3; height: auto; min-height: 0; }
  .overview .overview-action { margin-top: 1.25rem; }
  /* AI approach: the light ribbon opens the dark section */
  .banner-home { display: flex; flex-direction: column; }
  .banner-home::before { display: none; }
  .banner-home .banner-art { position: relative; inset: auto; z-index: 0; height: clamp(14rem, 62vw, 19rem); object-position: 84% center; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
  .banner-home .banner-content { position: relative; margin-top: -3.5rem; padding-block: 0 4.5rem; }
}
/* Other pages on phones: the skyline with the page introduction on a card rising over it */
@media (max-width: 48rem) {
  .hero:not(.hero-home) .hero-art { height: clamp(15rem, 64vw, 19rem); -webkit-mask-image: none; mask-image: none; }
  .hero:not(.hero-home) .hero-content { position: relative; margin-top: -4.5rem; padding-block: 0 2.5rem; }
  .hero:not(.hero-home) .hero-copy { width: auto; max-width: none; padding: 1.5rem 1.375rem 1.625rem; background: rgb(255 255 255 / .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-radius: var(--radius); box-shadow: 0 24px 60px -24px rgb(14 42 71 / .45); }
  .hero-develop .hero-content { padding-bottom: 1.5rem; }
  .contact-main { padding-top: .5rem; }
  .hero-develop .page-index { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-top: 0; }
  .hero-develop .page-index ol { border-top: 1px solid var(--line); }
  /* Section pictures run edge to edge, as on Home */
  .feature-tools .feature-media, .bleed-left, .bleed-right, .background-media { margin-inline: calc(-1 * var(--gutter)); }
  .feature-tools .feature-media img, .bleed-left img, .bleed-right img, .background-media img { aspect-ratio: 4 / 3; border-radius: 0; box-shadow: none; }
  /* Pictures alternate with text and never meet: §1 opens on its picture; §3 and both About sections close on
     theirs, so no picture lands next to the hero, the §2 wave or another picture. */
  .feature-tools { padding-top: 0; }
  .feature-tools .feature-media { margin-bottom: .25rem; }
  .feature-learning, .about-background, .about-direction { padding-bottom: 0; }
  .feature-learning .bleed-left, .background-grid .background-media, .direction-grid .bleed-right { order: 1; margin-top: .5rem; }
  .about-background { padding-top: 3rem; }
  .direction-grid .text-link { margin-top: .5rem; }
  /* AI and conventional software: two cards to swipe between */
  .approach-compare { display: flex; gap: 1rem; margin-inline: calc(-1 * var(--gutter)); padding: .25rem var(--gutter) .5rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .approach-compare::-webkit-scrollbar { display: none; }
  .compare-card { flex: 0 0 84%; scroll-snap-align: start; }
  /* Why this direction: icon beside each point */
  .why-points li { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); column-gap: 1.125rem; align-items: start; }
  .why-icon { grid-row: span 2; }
  .why-points h3 { margin-top: .35rem; }
  /* Longer passages fold away behind Read more */
  .fold-toggle { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; margin-top: .75rem; padding: 0; background: none; border: 0; color: var(--brand); font: 600 var(--small)/1.3 var(--sans); cursor: pointer; }
  .fold-toggle::after { content: ''; width: .5rem; height: .5rem; margin-top: -.25rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .3s, margin .3s; }
  .fold-toggle[aria-expanded="true"]::after { margin-top: .25rem; transform: rotate(-135deg); }
  .banner .fold-toggle { color: #A9CDEB; }
  .is-folded { display: none !important; }
}
@media (min-width: 48.0625rem) { .fold-toggle { display: none; } }
/* Sections rise into place as they scroll into view (phones, and only when motion is welcome) */
@media (max-width: 48rem) and (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity .6s ease, transform .75s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--reveal-delay, 0ms); }
  .reveal.is-shown { opacity: 1; transform: none; }
}
@media (min-width: 120rem) {
  .bleed-right { margin-right: 0; }
  .bleed-right img { border-radius: var(--radius); box-shadow: var(--shadow); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
