/* ==========================================================================
   Mordy Comms & Electrical — site styles
   Light, editorial, coastal-technical. No framework.
   ========================================================================== */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --white: #ffffff;
  --mist: #f3f9fc;
  --pale: #e8f6fb;
  --cyan: #3bbde3;          /* sampled from the logo waves */
  --ocean: #007e9e;
  --ocean-dark: #00657f;
  --navy: #172b36;
  --ink: #102c39;
  --muted: #526875;
  --line: rgba(16, 44, 57, .12);
  --line-strong: rgba(16, 44, 57, .22);
  --glass: rgba(255, 255, 255, .72);

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(88px, 12vw, 168px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--ocean); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ocean-dark); }
:focus-visible { outline: 2px solid var(--ocean); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--pale); color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--f-display); font-stretch: 112%; font-weight: 600; line-height: 1.02; letter-spacing: -.025em; margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px; }
.skip-link:focus { top: 16px; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; position: relative; }
.section--mist { background: var(--mist); }
.eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ocean); display: inline-flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 28px; height: 8px; background: no-repeat center/28px 8px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 8'%3E%3Cpath d='M0 4c3.5 0 3.5-3 7-3s3.5 3 7 3 3.5-3 7-3 3.5 3 7 3' fill='none' stroke='%233bbde3' stroke-width='1.6'/%3E%3C/svg%3E"); }
.display { font-size: clamp(48px, 8.4vw, 128px); font-weight: 650; letter-spacing: -.04em; line-height: .94; }
.h2 { font-size: clamp(36px, 5vw, 68px); }
.h3 { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.015em; }
.lede { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--muted); max-width: 40ch; }
.muted { color: var(--muted); }
.accent { color: var(--ocean); }

/* Placeholders — clearly not verified facts */
.ph { font-family: var(--f-mono); font-size: .82em; color: #8a5a00; background: #fff6df; border: 1px dashed #d9a63a; padding: .05em .45em; border-radius: 4px; white-space: nowrap; }

/* Buttons */
.btn { --b: var(--ink); display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 26px; border-radius: 999px; font: 600 16px/1 var(--f-body); text-decoration: none; border: 1px solid var(--b); color: var(--b); background: transparent; cursor: pointer; transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease); }
.btn svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn:hover { color: var(--b); transform: translateY(-1px); }
.btn:hover svg { transform: translateX(4px); }
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: var(--ocean); border-color: var(--ocean); color: #fff; }
.btn--cyan { background: var(--ocean); border-color: var(--ocean); color: #fff; }
.btn--cyan:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--ghost { border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-strong); padding-bottom: 4px; transition: color .25s, border-color .25s; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.link-arrow:hover { color: var(--ocean); border-color: var(--ocean); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Navigation ---------- */
.site-nav { position: fixed; z-index: 50; top: 14px; left: 0; right: 0; padding: 0 var(--gutter); pointer-events: none; }
.site-nav__bar { pointer-events: auto; max-width: calc(var(--wrap) - 2 * 0px); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; padding: 0 12px 0 22px; border-radius: 16px; background: var(--glass); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border: 1px solid rgba(255,255,255,.7); box-shadow: 0 1px 0 rgba(16,44,57,.04); transition: box-shadow .4s var(--ease), background .4s; }
.site-nav.is-scrolled .site-nav__bar { background: rgba(255,255,255,.86); box-shadow: 0 10px 40px -18px rgba(16,44,57,.28), 0 0 0 1px var(--line); }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 40px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; font-weight: 500; font-size: 15px; color: var(--ink); text-decoration: none; transition: background .25s, color .25s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--pale); color: var(--ocean-dark); }
.nav-portal { font-family: var(--f-mono); font-size: 11.5px !important; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) !important; }
.nav-cta { margin-left: 8px; }
.nav-links a.btn--solid { background: var(--ink); color: #fff; border-radius: 999px; padding: 0 20px; }
.nav-links a.btn--solid:hover { background: var(--ocean); color: #fff; }
.nav-cta.btn { min-height: 46px; padding: 0 20px; font-size: 15px; }
.menu-toggle { display: none; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; align-items: center; justify-content: center; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 20px; height: 1.6px; background: var(--ink); position: relative; transition: transform .3s var(--ease), background .2s; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; } .menu-toggle span::after { top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { pointer-events: auto; position: fixed; inset: 0; z-index: -1; background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); padding: 110px var(--gutter) 40px; overflow-y: auto; }
.mobile-menu ul { list-style: none; display: grid; gap: 4px; }
.mobile-menu a { display: block; padding: 12px 0; font: 600 30px/1.1 var(--f-display); font-stretch: 112%; letter-spacing: -.02em; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.mobile-menu .sub a { font: 500 17px/1.3 var(--f-body); padding: 10px 0 10px 18px; color: var(--muted); }
.mobile-menu .btn { margin-top: 28px; }
body.menu-open { overflow: hidden; }
@media (max-width: 1080px) { .nav-links { display: none; } .menu-toggle { display: inline-flex; } }
@media (min-width: 1081px) { .mobile-menu { display: none !important; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: max(720px, 100svh); display: flex; align-items: center; overflow: hidden; background: linear-gradient(180deg, var(--white) 0%, var(--mist) 70%, var(--white) 100%); isolation: isolate; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(60% 55% at 22% 42%, rgba(255,255,255,.9), rgba(255,255,255,0) 70%); }
.hero__inner { position: relative; z-index: 1; width: 100%; padding-top: 130px; padding-bottom: clamp(120px, 20vh, 220px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; }
.hero__title { margin: 22px 0 28px; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; }
.js .hero__title .line > span { transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
.js .hero__title .line:nth-child(2) > span { animation-delay: .12s; }
.js .hero__title .line:nth-child(3) > span { animation-delay: .24s; }
.hero__title em { font-style: normal; color: var(--ocean); position: relative; }
.hero__copy { max-width: 46ch; font-size: clamp(18px, 1.5vw, 21px); color: var(--muted); }
.js .hero__copy, .js .hero .btn-row { opacity: 0; animation: fade 1s var(--ease) .55s forwards; }
.hero .btn-row { margin-top: 36px; }
.hero__readout { display: grid; gap: 10px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 18px 20px; border-radius: 14px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); min-width: 250px; }
.js .hero__readout { opacity: 0; animation: fade 1s var(--ease) .8s forwards; }
.hero__readout div { display: flex; justify-content: space-between; gap: 22px; align-items: center; }
.hero__readout b { font-weight: 500; color: var(--ink); }
.signal { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(59,189,227,.6); animation: ping 2.4s infinite; }
.hero__scroll { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 1; width: 1px; height: 46px; background: linear-gradient(var(--line-strong), transparent); }
@media (max-width: 860px) { .hero__inner { grid-template-columns: 1fr; } .hero__readout { display: none; } }
@keyframes rise { to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(59,189,227,.55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(59,189,227,0); } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; padding: 190px 0 clamp(64px, 8vw, 110px); background: linear-gradient(180deg, var(--mist), var(--white)); overflow: hidden; isolation: isolate; }
.page-hero .waves { position: absolute; right: -6%; bottom: -10px; width: min(70%, 900px); z-index: -1; opacity: .9; }
.page-hero h1 { font-size: clamp(44px, 6.6vw, 96px); letter-spacing: -.035em; margin: 22px 0 26px; max-width: 14ch; }
.page-hero .lede { max-width: 52ch; }
.crumbs { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--ocean); }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }

/* Logo-echo waves (three lines) */
.waves path { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; }
.waves path:nth-child(2) { opacity: .65; } .waves path:nth-child(3) { opacity: .35; }
.waves--draw path { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 2.6s var(--ease) forwards; }
.waves--draw path:nth-child(2) { animation-delay: .15s; } .waves--draw path:nth-child(3) { animation-delay: .3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Intro statement ---------- */
.statement { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 40px; }
.statement p.big { font-family: var(--f-display); font-stretch: 105%; font-size: clamp(24px, 3.4vw, 50px); line-height: 1.14; letter-spacing: -.02em; font-weight: 500; color: var(--ink); }
.statement p.big span { color: var(--muted); }
.statement__meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.statement__meta h3 { font-size: 20px; margin-bottom: 8px; letter-spacing: -.01em; }
.statement__meta p { color: var(--muted); font-size: 16px; }
@media (max-width: 860px) { .statement, .statement__meta { grid-template-columns: 1fr; } .statement__meta { gap: 24px; } }

/* ---------- Service explorer ---------- */
.explorer { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); margin-top: 64px; align-items: start; }
.explorer__list { list-style: none; border-top: 1px solid var(--line); }
.explorer__tab { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 48px 1fr 20px; align-items: center; gap: 10px; padding: 22px 4px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; transition: color .3s; }
.explorer__tab .num { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.explorer__tab .name { font: 600 clamp(20px, 2vw, 27px)/1.15 var(--f-display); font-stretch: 108%; letter-spacing: -.015em; color: var(--muted); transition: color .3s, transform .4s var(--ease); }
.explorer__tab svg { width: 18px; height: 18px; opacity: 0; transform: translateX(-6px); transition: .35s var(--ease); color: var(--ocean); }
.explorer__tab::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--cyan); transition: width .5s var(--ease); }
.explorer__tab:hover .name { color: var(--ink); }
.explorer__tab[aria-selected="true"] .name { color: var(--ink); transform: translateX(6px); }
.explorer__tab[aria-selected="true"] .num { color: var(--ocean); }
.explorer__tab[aria-selected="true"] svg { opacity: 1; transform: none; }
.explorer__tab[aria-selected="true"]::after { width: 100%; }
.explorer__tab:focus-visible { outline-offset: -2px; }
.explorer__panel { position: sticky; top: 110px; padding: clamp(28px, 3.4vw, 48px); border-radius: 22px; background: linear-gradient(160deg, var(--mist), var(--white) 60%); border: 1px solid var(--line); overflow: hidden; }
.explorer__panel h3 { font-size: clamp(28px, 3vw, 40px); margin: 14px 0 16px; }
.explorer__panel p { color: var(--muted); max-width: 54ch; }
.explorer__panel.is-in > * { animation: fade .6s var(--ease) both; }
.explorer__panel.is-in > *:nth-child(2) { animation-delay: .05s; } .explorer__panel.is-in > *:nth-child(3) { animation-delay: .1s; } .explorer__panel.is-in > *:nth-child(4) { animation-delay: .15s; }
.caps { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 26px 0 30px; }
.caps li { padding: 10px 0 10px 22px; border-top: 1px solid var(--line); font-size: 15px; position: relative; }
.caps li::before { content: ""; position: absolute; left: 0; top: 19px; width: 10px; height: 1.6px; background: var(--cyan); }
@media (max-width: 960px) { .explorer { grid-template-columns: 1fr; } .explorer__panel { position: relative; top: 0; } }
@media (max-width: 560px) { .caps { grid-template-columns: 1fr; } }

/* Schematic (animated technical diagram) */
.schematic { margin: 8px 0 4px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); padding: 14px 8px 8px; }
.schematic svg { width: 100%; height: auto; overflow: visible; }
.schematic .wire { fill: none; stroke: rgba(16,44,57,.18); stroke-width: 1.5; }
.schematic .flow { fill: none; stroke: var(--cyan); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 18 220; animation: flow 2.8s linear infinite; }
.schematic .flow.f2 { animation-delay: -.9s; } .schematic .flow.f3 { animation-delay: -1.8s; }
.schematic .node rect { fill: var(--white); stroke: var(--ink); stroke-width: 1.3; }
.schematic .node.hot rect { fill: var(--pale); stroke: var(--ocean); }
.schematic .node text { font: 500 11px var(--f-mono); letter-spacing: .06em; fill: var(--ink); text-transform: uppercase; }
.schematic .node .sub { font: 400 10.5px var(--f-body); letter-spacing: 0; fill: var(--muted); text-transform: none; }
@keyframes flow { from { stroke-dashoffset: 238; } to { stroke-dashoffset: 0; } }

/* ---------- Convergence band (electrical + comms + fibre) ---------- */
.converge { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.converge__art { position: relative; }
.converge__art svg { width: 100%; height: auto; }
.converge__art .c-line { fill: none; stroke-width: 2.4; stroke-linecap: round; }
.converge__art .c-pulse { fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 10 400; animation: flow2 3.6s linear infinite; mix-blend-mode: normal; }
.converge__art .label { font: 500 11.5px var(--f-mono); letter-spacing: .1em; fill: var(--muted); }
.converge__art .label--main { fill: var(--ink); font-size: 13px; }
@keyframes flow2 { from { stroke-dashoffset: 410; } to { stroke-dashoffset: 0; } }
.disciplines { list-style: none; margin-top: 36px; counter-reset: d; }
.disciplines li { display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 22px 0; border-top: 1px solid var(--line); }
.disciplines li:last-child { border-bottom: 1px solid var(--line); }
.disciplines .k { font-family: var(--f-mono); font-size: 12px; color: var(--ocean); padding-top: 6px; }
.disciplines h3 { font-size: 22px; margin-bottom: 6px; }
.disciplines p { color: var(--muted); font-size: 16px; }
@media (max-width: 960px) { .converge { grid-template-columns: 1fr; } }

/* ---------- Projects ---------- */
.projects-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px; }
.project-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); margin-top: 64px; }
.project { grid-column: span 6; display: flex; flex-direction: column; gap: 18px; text-decoration: none; color: inherit; }
.project--wide { grid-column: span 7; } .project--narrow { grid-column: span 5; margin-top: 120px; }
.project__media { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--pale); }
.project--wide .project__media { aspect-ratio: 16 / 11; }
.project__media .art { position: absolute; inset: -8% 0; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.project:hover .project__media img, .project:hover .project__media .art svg { transform: scale(1.03); }
.project__media .art svg { width: 100%; height: 100%; transition: transform 1.2s var(--ease); }
.photo-tag { position: absolute; left: 14px; bottom: 14px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.85); color: var(--muted); padding: 6px 10px; border-radius: 6px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.project__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.project h3 { font-size: clamp(24px, 2.4vw, 32px); }
.project p { color: var(--muted); max-width: 52ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.tags li { font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: #fff; }
@media (max-width: 860px) { .project, .project--wide, .project--narrow { grid-column: 1 / -1; margin-top: 0; } }

/* Case studies (Projects page) */
.case { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); padding: clamp(56px, 7vw, 96px) 0; border-top: 1px solid var(--line); align-items: start; }
.case:nth-of-type(even) .case__media { order: 2; }
.case__media { position: sticky; top: 110px; }
.case dl { display: grid; grid-template-columns: 140px 1fr; gap: 0; margin: 28px 0; border-top: 1px solid var(--line); }
.case dt, .case dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.case dt { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 15px; }
.case h4 { font-size: 15px; font-family: var(--f-mono); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ocean); margin: 28px 0 12px; font-stretch: 100%; }
.case .scope { list-style: none; columns: 2; column-gap: 28px; }
.case .scope li { break-inside: avoid; padding: 7px 0 7px 20px; position: relative; font-size: 15.5px; }
.case .scope li::before { content: ""; position: absolute; left: 0; top: 17px; width: 9px; height: 1.6px; background: var(--cyan); }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 12px; background: #fffaf0; border: 1px dashed #e2b860; color: #6b4a00; font-size: 14.5px; }
@media (max-width: 960px) { .case { grid-template-columns: 1fr; } .case__media { position: relative; top: 0; order: 0 !important; } .case .scope { columns: 1; } .case dl { grid-template-columns: 110px 1fr; } }

/* ---------- Heritage ---------- */
.heritage { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--white), var(--pale)); isolation: isolate; }
.heritage__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 100px); align-items: center; }
.heritage__media { position: relative; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #dff2f9 0%, #bfe6f3 46%, #7fcbe3 47%, #4fb3d4 70%, #2a97bd 100%); }
.heritage__media svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.heritage__media .swell path { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1.4; }
.heritage__copy h2 { margin: 20px 0 28px; }
.heritage__copy p + p { margin-top: 18px; }
.heritage__copy p { color: var(--muted); font-size: 18px; max-width: 54ch; }
.heritage__logo { display: flex; align-items: center; gap: 18px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.heritage__logo img { height: 46px; width: auto; }
.heritage__logo span { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); max-width: 30ch; }
@media (max-width: 960px) { .heritage__grid { grid-template-columns: 1fr; } .heritage__media { aspect-ratio: 16 / 11; } }

/* ---------- Why Mordy ---------- */
.why { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); }
.why__intro { position: sticky; top: 120px; align-self: start; }
.why__intro p { margin-top: 22px; color: var(--muted); }
.why__list { list-style: none; counter-reset: w; }
.why__list li { counter-increment: w; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; padding: 36px 0; border-top: 1px solid var(--line); }
.why__list li:last-child { border-bottom: 1px solid var(--line); }
.why__list h3 { font-size: clamp(22px, 2.2vw, 28px); display: flex; gap: 18px; }
.why__list h3::before { content: "0" counter(w); font: 500 12px var(--f-mono); color: var(--ocean); padding-top: 9px; letter-spacing: .06em; }
.why__list p { color: var(--muted); }
@media (max-width: 960px) { .why { grid-template-columns: 1fr; } .why__intro { position: relative; top: 0; } }
@media (max-width: 640px) { .why__list li { grid-template-columns: 1fr; gap: 10px; } }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; padding: clamp(100px, 13vw, 190px) 0; background: radial-gradient(80% 120% at 85% 110%, rgba(59,189,227,.28), rgba(59,189,227,0) 60%), linear-gradient(180deg, var(--pale), var(--mist)); isolation: isolate; }
.cta .waves { position: absolute; left: -4%; right: -4%; bottom: 8%; width: 108%; z-index: -1; }
.cta h2 { font-size: clamp(48px, 8vw, 120px); letter-spacing: -.04em; max-width: 11ch; margin: 22px 0 28px; }
.cta p { max-width: 50ch; color: var(--muted); font-size: 19px; margin-bottom: 40px; }

/* ---------- Service pages ---------- */
.svc-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(40px, 6vw, 96px); }
.svc-layout section + section { margin-top: 72px; }
.svc-layout h2 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 20px; }
.svc-layout .prose p + p { margin-top: 16px; }
.svc-layout .prose p { color: var(--muted); font-size: 18px; }
.cap-full { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.cap-full li { padding: 14px 0 14px 24px; border-top: 1px solid var(--line); position: relative; }
.cap-full li::before { content: ""; position: absolute; left: 0; top: 26px; width: 11px; height: 1.6px; background: var(--cyan); }
.cap-full.is-collapsible li:nth-child(n+9) { display: none; }
.cap-full.is-collapsible.is-open li { display: block; }
.expand-btn { all: unset; cursor: pointer; margin-top: 16px; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ocean); min-height: 44px; }
.expand-btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.expand-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.expand-btn:focus-visible { outline: 2px solid var(--ocean); outline-offset: 3px; border-radius: 4px; }
.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; list-style: none; }
.apps li { padding: 22px; border-radius: 14px; background: var(--mist); border: 1px solid var(--line); }
.apps h3 { font-size: 18px; margin-bottom: 6px; letter-spacing: -.01em; }
.apps p { font-size: 15.5px; color: var(--muted); }
.benefits { list-style: none; counter-reset: b; }
.benefits li { counter-increment: b; display: grid; grid-template-columns: 48px 1fr; padding: 18px 0; border-top: 1px solid var(--line); }
.benefits li::before { content: "0" counter(b); font: 500 12px var(--f-mono); color: var(--ocean); padding-top: 5px; }
.benefits strong { display: block; font-family: var(--f-display); font-stretch: 108%; font-size: 19px; font-weight: 600; margin-bottom: 4px; }
.benefits span { color: var(--muted); font-size: 16px; }
.aside-card { position: sticky; top: 110px; padding: 28px; border-radius: 18px; background: linear-gradient(170deg, var(--pale), var(--white)); border: 1px solid var(--line); }
.aside-card h2 { font-size: 24px; margin-bottom: 10px; }
.aside-card p { color: var(--muted); font-size: 15.5px; margin-bottom: 20px; }
.aside-card .contact-line { display: block; font-weight: 600; font-size: 17px; margin-top: 10px; text-decoration: none; color: var(--ink); }
.aside-card .contact-line:hover { color: var(--ocean); }
.aside-nav { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); list-style: none; }
.aside-nav li a { display: flex; justify-content: space-between; padding: 9px 0; font-size: 15px; text-decoration: none; color: var(--muted); }
.aside-nav li a:hover, .aside-nav li a[aria-current="page"] { color: var(--ocean); }
@media (max-width: 960px) { .svc-layout { grid-template-columns: 1fr; } .aside-card { position: relative; top: 0; } }
@media (max-width: 640px) { .cap-full, .apps { grid-template-columns: 1fr; } }

/* Services overview index */
.svc-index { list-style: none; border-top: 1px solid var(--line); }
.svc-index a { display: grid; grid-template-columns: 70px minmax(0, 5fr) minmax(0, 6fr) 40px; gap: 24px; align-items: center; padding: 34px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); position: relative; transition: padding .45s var(--ease), background .45s; }
.svc-index a:hover { padding-left: 18px; padding-right: 10px; background: linear-gradient(90deg, var(--mist), rgba(243,249,252,0)); }
.svc-index .n { font: 500 12px var(--f-mono); color: var(--ocean); }
.svc-index h2 { font-size: clamp(26px, 3vw, 42px); }
.svc-index p { color: var(--muted); font-size: 16px; }
.svc-index svg { width: 22px; height: 22px; color: var(--ocean); transition: transform .35s var(--ease); }
.svc-index a:hover svg { transform: translateX(6px); }
@media (max-width: 860px) { .svc-index a { grid-template-columns: 48px 1fr 24px; } .svc-index p { grid-column: 2 / 3; } }

/* Industries */
.ind-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 80px); }
.ind-list li { padding: 40px 0; border-top: 1px solid var(--line); }
.ind-list h2 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 14px; }
.ind-list p { color: var(--muted); }
.ind-list .tags { margin-top: 18px; }
@media (max-width: 860px) { .ind-list { grid-template-columns: 1fr; } }

/* About */
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); list-style: none; }
.values li { padding-top: 22px; border-top: 2px solid var(--ink); }
.values h3 { font-size: 22px; margin-bottom: 10px; }
.values p { color: var(--muted); font-size: 16px; }
@media (max-width: 860px) { .values { grid-template-columns: 1fr; } }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; position: relative; margin-top: 56px; }
.steps li { counter-increment: s; padding: 0 24px 0 0; position: relative; }
.steps li::before { content: "0" counter(s); display: block; font: 600 44px/1 var(--f-display); font-stretch: 112%; color: var(--cyan); margin-bottom: 24px; }
.steps li::after { content: ""; position: absolute; top: 22px; left: 72px; right: 20px; height: 1px; background: var(--line-strong); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 20px; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 15.5px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; gap: 40px 0; } .steps li::after { display: none; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.info-table { width: 100%; border-collapse: collapse; margin-top: 28px; }
.info-table th, .info-table td { text-align: left; padding: 14px 0; border-top: 1px solid var(--line); vertical-align: top; font-size: 16px; }
.info-table th { font: 500 12px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); width: 38%; padding-top: 17px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); }
.contact-direct { display: grid; gap: 28px; align-content: start; }
.contact-direct .k { font: 500 12px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact-direct a.big { font: 600 clamp(22px, 2.4vw, 30px)/1.2 var(--f-display); font-stretch: 108%; letter-spacing: -.015em; color: var(--ink); text-decoration: none; word-break: break-word; }
.contact-direct a.big:hover { color: var(--ocean); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: clamp(24px, 3.4vw, 44px); border-radius: 22px; background: var(--mist); border: 1px solid var(--line); }
.form .full { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; color: var(--ink); width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ocean); box-shadow: 0 0 0 4px rgba(59,189,227,.22); }
fieldset.field { border: 0; padding: 0; margin: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.seg label { position: relative; font-weight: 500; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; transition: .2s; }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--ocean); outline-offset: 2px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.form-status { font-size: 15px; color: var(--muted); }
.form-status.is-ok { color: #0b6b3a; } .form-status.is-err { color: #a3261b; }
.form small { color: var(--muted); font-size: 13.5px; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--mist); border-top: 1px solid var(--line); padding: 80px 0 36px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr)); gap: 40px; }
.footer-grid h2 { font: 500 12px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer-grid ul { list-style: none; display: grid; gap: 8px; }
.footer-grid a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; } .footer-grid a:hover { color: var(--ocean); }
.footer-brand img { height: 44px; width: auto; margin-bottom: 18px; }
.footer-brand p { color: var(--muted); max-width: 34ch; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.footer-base a { color: var(--muted); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="2"] { transition-delay: .1s; } .js [data-reveal="3"] { transition-delay: .2s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .hero__title .line > span { transform: none; }
  .schematic .flow, .converge__art .c-pulse { display: none; }
}
