/* EBE-T Engineering Platform: landing page.
   Layout: the logo, unfolded. The wordmark sits on the brass "platform" line
   and the three companies hang beneath it, as in the artwork; each company
   then gets a spread (logo column | brass hairline | content), the same
   structure as the Methods Design & Engineering website. */

:root{
  --bg:#ffffff;
  --bg2:#f4f1ea;
  --ink:#231f20;
  --soft:#625c54;
  --rule:#bfa77d;
  --accent:#f15a24;
  --brass:linear-gradient(90deg,#6f5a3b,#d6ba8c 50%,#6f5a3b);
  --hero:none;
  --methods:#f15a24;
  --econ:#1f8a43;
  --kcsd:#2f9ee8;
  --kcsd-line:linear-gradient(90deg,#6ab023 0 40%,#ffd200 40% 62%,#3fa9f5 62%);
  --yamm:#d4891a;
  --lt:block;
  --dk:none;
  --display:"Archivo","Arial Black","Helvetica Neue",Arial,sans-serif;
  --body:"Outfit","Century Gothic","Avenir Next",Avenir,"Segoe UI",sans-serif;
  --gut:clamp(20px,4vw,56px);
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#0f151d;--bg2:#172029;--ink:#ece7db;--soft:#a8a295;--rule:#7d6a49;
    --hero:radial-gradient(120% 90% at 50% 38%,#1f2b37 0,#0f151d 70%);
    --econ:#2aa457;--lt:none;--dk:block;color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0f151d;--bg2:#172029;--ink:#ece7db;--soft:#a8a295;--rule:#7d6a49;
  --hero:radial-gradient(120% 90% at 50% 38%,#1f2b37 0,#0f151d 70%);
  --econ:#2aa457;--lt:none;--dk:block;color-scheme:dark;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
html,body{margin:0}
body{font-family:var(--body);font-size:17px;font-weight:300;line-height:1.65;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}
img{display:block;max-width:100%;height:auto}
a{color:inherit}
p{margin:0 0 1em}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
[hidden]{display:none!important}

/* the artwork comes in two versions: black lettering for the light page,
   cream lettering for the dark one */
img.lt{display:var(--lt)}
img.dk{display:var(--dk)}

/* page width and side gutter */
.w{max-width:1320px;margin-inline:auto;padding-left:max(var(--gut),env(safe-area-inset-left,0px));padding-right:max(var(--gut),env(safe-area-inset-right,0px))}

/* prototype note */
.pr{margin:0;background:var(--bg2);font-size:12px;line-height:1.4;color:var(--soft)}
.pr .w{padding-block:8px}
.dr{display:inline-block;margin-left:10px;padding:1px 7px;border:1px dashed var(--soft);font-family:var(--body);font-size:10px;font-weight:400;line-height:1.5;letter-spacing:.1em;text-transform:uppercase;color:var(--soft);vertical-align:middle;white-space:nowrap}

/* small wide capitals, as in "ENGINEERING PLATFORM"; the dash is the one
   from the wordmark, in the colour of the company it introduces */
.ey{display:flex;align-items:center;gap:12px;margin:0;font-family:var(--display);font-stretch:125%;font-size:11px;font-weight:500;line-height:1.4;letter-spacing:.22em;text-transform:uppercase}
.ey::before{content:"";flex:none;width:16px;height:6px;background:var(--brand-line,var(--brand,var(--accent)))}

/* header */
.hd .w{display:flex;align-items:center;gap:8px 36px;padding-block:22px}
.hd-l{display:flex;flex:none}
.hd-l img{width:96px}
.nv{display:flex;flex-wrap:wrap;gap:0 32px;margin-left:auto}
.nv a{display:block;padding:12px 0;font-size:12px;font-weight:400;letter-spacing:.12em;text-transform:uppercase;text-decoration:none}
.nv a:hover{color:var(--accent)}
.th{flex:none;display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:1px solid var(--rule);background:none;color:var(--ink);cursor:pointer}
.th i{display:block;width:16px;height:16px;border:1.5px solid currentColor;border-radius:50%;background:linear-gradient(90deg,currentColor 50%,transparent 50%)}
.th:hover{border-color:var(--accent);color:var(--accent)}

/* hero: wordmark, platform line, three companies */
.hero{background-image:var(--hero)}
.hero .w{padding-block:clamp(28px,5vw,72px) clamp(36px,4.5vw,64px)}
.hero-t{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,4fr);gap:32px clamp(32px,6vw,96px);align-items:end}
.mark{margin:0}
.mark img{width:100%}
.mark img+img{margin-top:0}
.mark .tag{margin-top:clamp(14px,2.2vw,30px)}
.lede{margin:0;font-size:clamp(18px,1.5vw,22px);line-height:1.5;text-wrap:pretty}
.lede strong{font-weight:500}
.plat{height:3px;margin-top:clamp(32px,4.5vw,64px);background:var(--brass);transform-origin:left center}
.doors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;padding:0;list-style:none}
.doors li{display:flex}
/* opening: the platform line draws from the left, then the three companies
   drop into place beneath it. The page sets "anim" on <html> only when it
   opens on screen, and clears it again, so nothing can stay hidden */
.anim .plat{animation:plat 1s cubic-bezier(.2,.7,.2,1) both}
.anim .doors li{animation:hang .7s cubic-bezier(.2,.7,.2,1) both}
.anim .doors li:nth-child(1){animation-delay:.45s}
.anim .doors li:nth-child(2){animation-delay:.57s}
.anim .doors li:nth-child(3){animation-delay:.69s}
.door{position:relative;display:flex;flex:1;flex-direction:column;gap:10px;min-width:0;padding:26px 32px 0;text-decoration:none}
.door:hover .ey{color:var(--brand)}
/* vertical lines between the companies: they start below the platform line and never touch it */
.doors li{position:relative}
.doors li+li::before{content:"";position:absolute;top:26px;bottom:0;left:0;width:1px;background:var(--rule)}
.doors li:first-child .door{padding-left:0}
.doors li:last-child .door{padding-right:0}
/* the stretch of platform line above a company takes that company's colour */
.door::before{content:"";position:absolute;top:-3px;right:0;left:0;height:3px;background:var(--brand-line,var(--brand));transform:scaleX(0);transform-origin:left center;transition:transform .35s cubic-bezier(.2,.7,.2,1)}
.door:hover::before,.door:focus-visible::before{transform:scaleX(1)}
.door-l{display:flex;align-items:center;height:60px}
.door-p{font-size:16px;line-height:1.5}
.go{display:inline-flex;align-items:center;gap:10px;margin-top:auto;padding-top:10px;font-size:12px;font-weight:400;letter-spacing:.12em;text-transform:uppercase}
.go::after{content:"";width:8px;height:8px;margin-top:-4px;border-right:2px solid var(--brand,var(--accent));border-bottom:2px solid var(--brand,var(--accent));transform:rotate(45deg);transition:translate .2s}
.door:hover .go::after{translate:0 3px}
@keyframes plat{from{transform:scaleX(0)}}
@keyframes hang{from{opacity:0;transform:translateY(-14px)}}

/* logo sizes: the three marks keep the proportions they have in the artwork */
.lg-m{width:272px}
.lg-e{width:236px}
.lg-k{width:128px}
.sp-l .lg-m{width:380px}
.sp-l .lg-e{width:330px}
.sp-l .lg-k{width:200px}
/* KCSD's full logo (framed letters with the name beneath) heads its own section */
.sp-l .lg-kf{width:260px}
.sp-l .lg-y{width:170px;height:auto}

/* spread: logo column | brass hairline | content */
.sp{scroll-margin-top:0;border-top:1px solid var(--rule)}
.sp .w{display:grid;grid-template-columns:minmax(0,38fr) minmax(0,62fr);padding-block:clamp(48px,6vw,88px)}
.sp-l{position:sticky;top:32px;align-self:start;display:flex;flex-direction:column;gap:28px;padding-right:var(--gut)}
.sp-b{min-width:0;padding-left:var(--gut);border-left:1px solid var(--rule)}
.sp-b>*:last-child{margin-bottom:0}
.sp-b>p{max-width:62ch}
.tt{margin:0;font-family:var(--display);font-stretch:125%;font-size:clamp(30px,3.4vw,54px);font-weight:800;line-height:1.02;letter-spacing:-.01em;text-transform:uppercase;text-wrap:balance}
.ld{max-width:none;margin:0 0 20px;font-size:clamp(22px,2vw,30px);line-height:1.35;letter-spacing:-.008em;text-wrap:balance}

/* rows: name and a line about it */
.rws{margin:36px 0 0;padding:0;list-style:none;border-bottom:1px solid var(--rule)}
.rws li{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:4px 40px;padding:16px 0;border-top:1px solid var(--rule)}
.rws b{position:relative;padding-left:20px;font-size:19px;font-weight:400;line-height:1.35}
.rws b::before{content:"";position:absolute;left:0;top:.56em;width:8px;height:3px;background:var(--brand-line,var(--brand,var(--accent)))}
.rws span{font-size:15px;line-height:1.5}

/* news and events: a large day numeral with the month beside each entry; the
   dash before "News" or "Event" is in the colour of the company it concerns.
   Events sit under "Coming up" (soonest first), news under "Latest news"
   (newest first) */
.sb{margin:48px 0 0;font-size:12px;font-weight:500;line-height:1.4;letter-spacing:.12em;text-transform:uppercase}
.sb+.nws{margin-top:14px}
.nws{margin:36px 0 0;padding:0;list-style:none;border-bottom:1px solid var(--rule)}
.nws li{display:grid;grid-template-columns:112px minmax(0,1fr);gap:8px 32px;padding:26px 0;border-top:1px solid var(--rule)}
.nws time{display:flex;flex-direction:column;gap:8px}
.nws time b{font-family:var(--display);font-stretch:125%;font-size:44px;font-weight:800;line-height:.86;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.nws time span{font-size:11px;font-weight:500;letter-spacing:.12em;text-transform:uppercase}
.nws h4{margin:10px 0 8px;font-size:clamp(19px,1.6vw,23px);font-weight:400;line-height:1.3}
.nws-s{max-width:60ch;margin:0;font-size:15px;line-height:1.55}
.nws-m{display:flex;flex-wrap:wrap;gap:6px 32px;margin:14px 0 0;font-size:14px;line-height:1.5}
.nws-m b{margin-right:10px;font-size:11px;font-weight:500;letter-spacing:.12em;text-transform:uppercase}

/* project cards */
.cds{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;margin:36px 0 0}
.cd{margin:0}
.cd img{width:100%;aspect-ratio:4/3;object-fit:cover}
.cd b{display:block;margin-top:12px;font-size:16px;font-weight:400;line-height:1.3}
.cd span{display:block;margin-top:2px;font-size:12px;letter-spacing:.02em;color:var(--soft)}

/* link out to a company's own website */
.mr{display:inline-flex;align-items:center;gap:12px;margin-top:36px;padding:12px 0 6px;border-bottom:2px solid var(--brand,var(--accent));font-size:12px;font-weight:400;letter-spacing:.12em;text-transform:uppercase;text-decoration:none}
.mr::after{content:"";width:8px;height:8px;border-top:2px solid var(--brand,var(--accent));border-right:2px solid var(--brand,var(--accent));transform:rotate(45deg);transition:translate .2s}
.mr:hover::after{translate:3px 0}
.mr.off{border-bottom-style:dashed;color:var(--soft)}
.mr.off::after{display:none}

/* label and value rows */
.fx{margin:36px 0 0;font-size:18px;line-height:1.5}
.fx:first-child{margin-top:0}
.fx div{display:grid;grid-template-columns:180px minmax(0,1fr);gap:16px;padding:16px 0;border-top:1px solid var(--rule)}
.fx div:last-child{border-bottom:1px solid var(--rule)}
.fx dt{padding-top:6px;font-size:11px;font-weight:500;letter-spacing:.12em;text-transform:uppercase}
.fx dd{margin:0;font-variant-numeric:tabular-nums}
.fx a{text-decoration:none}
.fx a:hover{text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:4px}
.fx .sm{font-size:13px;text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:3px}

/* footer */
.ft{border-top:3px solid transparent;border-image:var(--brass) 1;font-size:13px;line-height:1.5}
.ft .w{display:flex;flex-wrap:wrap;align-items:center;gap:20px 40px;padding-block:28px}
.ft-m{flex:none;width:120px}
.ft p{margin:0}
.ft-b{display:flex;flex-wrap:wrap;gap:4px 28px;margin:0 0 0 auto;padding:0;list-style:none}
.ft-b a{text-decoration:none}
.ft-b a:hover{color:var(--accent)}
.ft small{flex-basis:100%;font-size:11px;color:var(--soft)}

/* medium screens: narrower logo column */
@media (max-width:1100px){
  .sp-l .lg-m{width:300px}
  .sp-l .lg-e{width:270px}
  .sp-l .lg-k{width:170px}
  .sp-l .lg-kf{width:220px}
  .lg-m{width:220px}
  .lg-e{width:196px}
  .lg-k{width:110px}
  .door{padding-right:20px;padding-left:20px}
  .cds{gap:20px}
}

/* small screens: one column; the companies stack under the platform line */
@media (max-width:860px){
  body{font-size:16px}
  .hd .w{flex-wrap:wrap;padding-block:14px 6px}
  .hd-l{order:1}
  .th{order:2;margin-left:auto}
  .nv{order:3;flex-basis:100%;justify-content:space-between;gap:0 10px;margin:6px 0 0;border-top:1px solid var(--rule)}
  .nv a{font-size:11px;letter-spacing:.06em}
  .nws li{grid-template-columns:64px minmax(0,1fr);gap:8px 20px;padding:22px 0}
  .nws time b{font-size:30px}
  .nws time span{font-size:10px;letter-spacing:.08em}
  .hero-t{grid-template-columns:minmax(0,1fr)}
  .doors{grid-template-columns:minmax(0,1fr)}
  .doors li+li{border-top:1px solid var(--rule)}
  .doors li+li::before{display:none}
  .door,.doors li:first-child .door,.doors li:last-child .door{padding:20px 0}
  .door::before{display:none}
  .door-l{height:auto}
  .lg-m{width:240px}
  .lg-e{width:210px}
  .lg-k{width:120px}
  .sp .w{display:block}
  .sp-l{position:static;padding-right:0}
  .sp-l .lg-m{width:260px}
  .sp-l .lg-e{width:230px}
  .sp-l .lg-k{width:140px}
  .sp-l .lg-kf{width:200px}
  .sp-b{margin-top:28px;padding:28px 0 0;border-left:0;border-top:1px solid var(--rule)}
  .rws li{display:block}
  .rws span{display:block;padding-left:20px}
  .fx div{display:block}
  .fx dt{padding:0 0 4px}
  .ft-b{margin-left:0}
}
@media (max-width:560px){
  .cds{grid-template-columns:minmax(0,1fr);gap:28px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .anim .plat,.anim .doors li{animation:none}
  .door::before,.go::after,.mr::after{transition:none}
}
