/* Smart Building Engineering — site styles */
:root {
  --paper: #EEF2F4;
  --white: #FFFFFF;
  --ink: #14324A;
  --ink-2: #3D5A70;
  --cyan: #0E7C8C;
  --cyan-soft: #D5ECEF;
  --amber: #E39B2D;
  --red: #D81F26;
  --red-dark: #A9161C;
  --charcoal: #494747;
  --line: #B9C7D0;
  --grid: #DCE4E9;
  --night: #0F2A3F;

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.3rem + 1.6vw, 2.375rem);
  --step-4: clamp(2.1rem, 1.4rem + 3vw, 3.5rem);

  --gutter: 16px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-stretch: 85%; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 750; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 650; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font-family: var(--display); font-weight: 650; font-size: 1.0625rem; font-stretch: 90%;
  text-decoration: none; border-radius: 6px; border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 1rem; }
.btn--amber { background: var(--red); color: var(--white); }
.btn--amber:hover { background: var(--red-dark); color: var(--white); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--ghostlight { border-color: #9FC3CF; color: var(--white); }
.btn--ghostlight:hover { background: var(--white); color: var(--night); }
.textlink { font-weight: 700; color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; }

/* Header */
.masthead { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.masthead__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 44px; width: auto; }
@media (min-width: 720px) { .brand img { height: 50px; } }
.navtoggle {
  font: inherit; font-weight: 700; background: none; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 6px; padding: 6px 14px; cursor: pointer;
}
.sitenav { display: none; }
.sitenav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 68px;
  background: var(--white); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px;
}
.sitenav ul { list-style: none; margin: 0 0 12px; padding: 0; }
.sitenav li a { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; font-weight: 700; border-bottom: 1px solid var(--grid); }
.sitenav a[aria-current="page"] { color: var(--cyan); }
@media (min-width: 1060px) {
  .navtoggle { display: none; }
  .sitenav, .sitenav.is-open { display: flex; position: static; align-items: center; gap: 20px; padding: 0; border: 0; }
  .sitenav ul { display: flex; gap: 20px; margin: 0; }
  .sitenav li a { padding: 6px 0; border: 0; font-size: .98rem; }
  .sitenav li a:hover { color: var(--cyan); }
}

/* Hero */
.hero { padding: 48px 0 56px; border-bottom: 1px solid var(--line); }
.hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } .hero { padding: 72px 0 80px; } }
.lede { font-size: var(--step-1); color: var(--ink-2); max-width: 54ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 36px; }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 36px; margin: 0; }
.facts div { border-left: 3px solid var(--cyan); padding-left: 12px; }
.facts dt { font-size: .9rem; color: var(--ink-2); }
.facts dd { margin: 0; font-family: var(--display); font-weight: 750; font-size: var(--step-2); font-stretch: 85%; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr 1fr; } }

.plant { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.plant svg { width: 100%; height: auto; display: block; }
.plant .ink { stroke: var(--ink); }
.plant .duct { stroke: var(--cyan); }
.plant .chw { stroke: var(--ink-2); stroke-dasharray: 7 5; }
.plant .fan { stroke: var(--ink); fill: none; stroke-width: 2; }
.plant .diffusers rect { fill: var(--cyan); }
.plant .devices circle { fill: #C8423B; }
.plant .lamps path { stroke: var(--amber); stroke-width: 6; stroke-linecap: round; }
.plant .lbl { font-family: var(--display); font-weight: 700; font-size: 15px; fill: var(--ink); }
.plant .tag rect { fill: var(--night); }
.plant .tag text { font-family: var(--body); font-size: 15px; fill: var(--white); white-space: pre; }
.plant .tag .ok { fill: #3CCB7F; }

/* one orchestrated load: building draws, then points come online */
@media (prefers-reduced-motion: no-preference) {
  .plant .draw { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1.4s ease-out forwards; }
  .plant .chw.draw { stroke-dasharray: 7 5; stroke-dashoffset: 0; animation: none; }
  .plant .tag { opacity: 0; animation: online .35s ease-out forwards; }
  .plant .t1 { animation-delay: 1.2s; } .plant .t2 { animation-delay: 1.4s; } .plant .t3 { animation-delay: 1.6s; }
  .plant .t4 { animation-delay: 1.8s; } .plant .t5 { animation-delay: 2s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes online { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

/* Two paths */
.paths { background: var(--white); }
.paths__grid { display: grid; }
@media (min-width: 820px) { .paths__grid { grid-template-columns: 1fr 1fr; } }
.path { padding: 40px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 820px) {
  .path { padding: 48px 48px 48px 0; border-bottom: 0; }
  .path--alt { padding: 48px 0 48px 48px; border-left: 1px solid var(--line); }
}

/* Section heads */
section { scroll-margin-top: 80px; }
.systems, .services, .process, .project, .founder { padding: 64px 0; }
@media (min-width: 960px) { .systems, .services, .process, .project, .founder { padding: 88px 0; } }
.sectionhead { margin-bottom: 36px; }
.sectionhead p { color: var(--ink-2); font-size: var(--step-1); max-width: 60ch; }

/* Systems as a riser: one line, nine taps */
.riser { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 48px; }
@media (min-width: 820px) { .riser { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .riser { grid-template-columns: 1fr 1fr 1fr; } }
.riser li { display: grid; grid-template-columns: 76px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.riser__abbr {
  align-self: start; text-align: center; padding: 6px 0;
  font-family: var(--display); font-weight: 750; font-stretch: 75%; font-size: 1.05rem;
  color: var(--cyan); background: var(--cyan-soft); border-radius: 4px;
}
.riser h3 { font-size: 1.15rem; margin-bottom: .25em; }
.riser p { margin: 0; color: var(--ink-2); font-size: 1rem; }

/* Process */
.process { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.process__grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .process__grid { grid-template-columns: 1fr 1.4fr; gap: 72px; } }
.process__grid > div p { color: var(--ink-2); font-size: var(--step-1); }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 32px 72px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -4px;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 750; font-size: 1.3rem; color: var(--white); background: var(--ink);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 23px; top: 48px; bottom: 4px; width: 2px; background: var(--line); }
.steps p { color: var(--ink-2); margin: 0; }

/* Services */
.servicelist { display: grid; gap: 0 48px; margin: 0; }
@media (min-width: 820px) { .servicelist { grid-template-columns: 1fr 1fr; } }
.servicelist div { padding: 20px 0; border-top: 2px solid var(--ink); }
.servicelist dt { font-family: var(--display); font-weight: 700; font-size: var(--step-1); font-stretch: 88%; margin-bottom: .2em; }
.servicelist dd { margin: 0; color: var(--ink-2); }

/* Training */
.training { background: var(--night); color: #DCE8EE; padding: 72px 0; }
@media (min-width: 960px) { .training { padding: 96px 0; } }
.training h2, .training h3 { color: var(--white); }
.sectionhead--light p { color: #B7CBD6; }
.courses { display: grid; gap: 20px; }
@media (min-width: 900px) { .courses { grid-template-columns: 1.2fr 1.2fr 1fr; } }
.course { background: #173A55; border-radius: 10px; padding: 28px; display: flex; flex-direction: column; }
.course--lab { background: transparent; border: 2px dashed #4F7A93; }
.course__for { color: #B7CBD6; }
.course ul { margin: 0 0 20px; padding-left: 1.1em; }
.course li { margin-bottom: 6px; }
.course__price { margin-top: auto; font-size: var(--step-1); }
.course__price strong { font-family: var(--display); font-size: var(--step-2); color: var(--white); }
.course__price s { color: #8FA9B8; margin-left: 6px; }
.course .btn { align-self: flex-start; }
.course--lab .btn { margin-top: auto; }

.reviews { display: grid; gap: 28px; margin-top: 56px; }
@media (min-width: 900px) { .reviews { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.reviews blockquote { margin: 0; padding-left: 20px; border-left: 3px solid var(--red); }
.reviews blockquote p { font-size: 1.1rem; color: var(--white); }
.reviews footer { color: #9FB8C6; font-size: .95rem; }
.reviews__more { margin-top: 28px; }
.reviews__more a { color: #7FD3DD; }

/* Project */
.project__grid { display: grid; gap: 36px; }
@media (min-width: 900px) { .project__grid { grid-template-columns: 1.2fr 1fr; gap: 72px; align-items: start; } }
.projectfacts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.projectfacts div { padding: 16px 0; border-top: 1px solid var(--line); }
.projectfacts__scope { grid-column: 1 / -1; }
.projectfacts dt { color: var(--ink-2); font-size: .95rem; }
.projectfacts dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: var(--step-1); font-stretch: 88%; }
.projectfacts__scope dd { font-family: var(--body); font-weight: 400; font-size: 1.05rem; }

/* Founder */
.founder { background: var(--white); border-top: 1px solid var(--line); }
.founder__grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 720px) { .founder__grid { grid-template-columns: 220px 1fr; gap: 48px; } }
.founder img { border-radius: 10px; background: var(--paper); width: 220px; }
.founder__role { color: var(--cyan); font-weight: 700; margin-top: -.3em; }

/* CTA */
.cta { background: var(--ink); color: var(--white); padding: 48px 0; }
.cta__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta h2 { color: var(--white); margin: 0; max-width: 22ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Placeholder pages */
.soon { padding: 80px 0 100px; }

/* Footer */
.foot { background: var(--night); color: #B7CBD6; padding: 56px 0 24px; font-size: 1rem; }
.foot a { color: #DCE8EE; }
.foot address { font-style: normal; margin-bottom: 1em; }
.foot__grid { display: grid; gap: 32px; }
@media (min-width: 720px) { .foot__grid { grid-template-columns: 1.3fr 1fr 1fr 0.8fr; } }
.foot__brand img { height: 56px; width: auto; margin-bottom: 16px; }
.foot__head { color: var(--white); font-weight: 700; margin-bottom: .3em; }
.foot__links { list-style: none; margin: 0; padding: 0; }
.foot__links li { margin-bottom: 4px; }
.foot__legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid #2A4A62; font-size: .9rem; }

/* Floating WhatsApp */
.wafloat {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #25D366; color: #fff; box-shadow: 0 4px 14px rgba(15, 42, 63, .3);
}
.wafloat:hover { color: #fff; background: #1EB257; }

/* ---------- Inner pages ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap--narrow { max-width: 780px; }
.pagehead { padding: 48px 0 40px; border-bottom: 1px solid var(--line); background: var(--white); }
@media (min-width: 960px) { .pagehead { padding: 72px 0 56px; } }
.pagehead h1 { max-width: 22ch; }
.crumb { font-size: .95rem; color: var(--ink-2); margin-bottom: 12px; }
.crumb a { color: var(--ink-2); }
.systems--white { background: var(--white); border-top: 1px solid var(--line); }
.training--flat { padding-top: 56px; }
.note { color: var(--ink-2); margin-top: 24px; }

.stagelist { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; gap: 0 48px; }
@media (min-width: 820px) { .stagelist { grid-template-columns: 1fr 1fr; } }
.stagelist li { counter-increment: st; position: relative; padding: 20px 0 20px 56px; border-top: 1px solid var(--line); }
.stagelist li::before { content: counter(st); position: absolute; left: 0; top: 18px; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--red); color: var(--red); display: grid; place-items: center; font-family: var(--display); font-weight: 750; }
.stagelist h3 { margin-bottom: .2em; }
.stagelist p { margin: 0; color: var(--ink-2); }

.svcdetail { display: grid; gap: 0 56px; }
@media (min-width: 820px) { .svcdetail { grid-template-columns: 1fr 1fr; } }
.svcdetail article { padding: 28px 0; border-top: 2px solid var(--ink); }
.svcdetail h2 { font-size: var(--step-2); }
.svcdetail p { color: var(--ink-2); margin: 0; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: var(--cyan-soft); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .98rem; }

.ticklist { padding: 0; list-style: none; margin: 0 0 24px; }
.ticklist li { position: relative; padding: 8px 0 8px 30px; border-bottom: 1px solid var(--grid); }
.ticklist li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 12px; height: 7px; border-left: 3px solid var(--cyan); border-bottom: 3px solid var(--cyan); transform: rotate(-45deg); }
.projectfacts dd.big { font-family: var(--display); font-size: var(--step-3); font-weight: 750; }

.member { display: grid; gap: 24px; padding: 32px 0; border-top: 1px solid var(--line); }
@media (min-width: 720px) { .member { grid-template-columns: 200px 1fr; gap: 40px; } }
.member img { border-radius: 10px; background: var(--paper); width: 200px; }

.reviews--light blockquote p { color: var(--ink); }
.reviews--light footer { color: var(--ink-2); }
.reviews--light { margin-top: 0; }
.founder .reviews__more a { color: var(--cyan); }

.faq h2 { margin-bottom: 24px; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; max-width: 780px; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-size: 1.1rem; list-style-position: outside; }
.faq details p { color: var(--ink-2); padding-bottom: 12px; }

.postlist { max-width: 780px; }
.postcard { padding: 28px 0; border-top: 1px solid var(--line); }
.postcard h2 a { color: var(--ink); text-decoration: none; }
.postcard h2 a:hover { color: var(--red); }
.postmeta { color: var(--ink-2); font-size: .95rem; }
.article { padding: 48px 0 72px; background: var(--white); }
.article h1 { font-size: var(--step-4); }
.prose { font-size: 1.1rem; line-height: 1.7; }
.prose h2 { font-size: var(--step-2); margin-top: 1.6em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }

/* Contact + form */
.contact__grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .contact__grid { grid-template-columns: 1.3fr 1fr; gap: 72px; align-items: start; } }
.form { display: grid; gap: 18px; max-width: 560px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 2px solid var(--line); border-radius: 6px; padding: 12px 14px; min-height: 48px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(216, 31, 38, .25); }
.field--err input, .field--err select, .field--err textarea { border-color: var(--red); }
.field__err { color: var(--red-dark); font-size: .95rem; margin: 6px 0 0; }
.hp { position: absolute; left: -9999px; }
.form .btn { justify-self: start; cursor: pointer; }
.form .btn[disabled] { opacity: .7; cursor: progress; }
.notice { border-radius: 8px; padding: 16px 20px; margin-bottom: 20px; }
.notice p:last-child { margin-bottom: 0; }
.notice--ok { background: #E3F4EA; border-left: 5px solid #1F8A4C; }
.notice--err { background: #FCE8E8; border-left: 5px solid var(--red); }
.contactcard { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.contactcard h3 { margin-top: 1.2em; font-size: 1.1rem; }
.contactcard address { font-style: normal; }
