/* ==========================================================================
   BEE Engineering Ltd. — beeengbd.com
   Warm cream ground, serif display, rounded honey-toned cards and arched
   photo crops (after the KBITEC reference), coloured from the bee logo.
   ========================================================================== */

:root {
  --ground:   #F5ECDC;   /* cream page */
  --paper:    #FBF6EC;   /* lighter panels */
  --white:    #FFFFFF;
  --ink:      #2F1D0F;   /* text, near logo brown */
  --ink-2:    #66513F;   /* secondary text */
  --ink-3:    #8C7763;   /* captions */
  --line:     #E2D3BA;
  --pill:     #EBDFC9;
  --brown:    #40220F;   /* logo border + wordmark */
  --c1:       #5A3517;   /* card: dark brown  */
  --c2:       #B4562A;   /* card: rust        */
  --c3:       #D8901F;   /* card: amber       */
  --c4:       #F2C14E;   /* card: honey       */
  --yellow:   #FEC81A;

  --display: "Gelasio", Georgia, "Times New Roman", serif;
  --body:    "Open Sans", "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4.5vw, 48px);
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:where(a, button, input, textarea, select):focus-visible { outline: 2px solid var(--c2); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.15; margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 1.4rem + 3.2vw, 3.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 1.25rem + 1.9vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--paper { background: var(--paper); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.lede { font-size: clamp(1.02rem, .98rem + .3vw, 1.15rem); color: var(--ink-2); max-width: 62ch; }
.prose { color: var(--ink-2); max-width: 66ch; display: flex; flex-direction: column; gap: 14px; }
.prose strong { color: var(--ink); }

/* pill eyebrow, as on the reference brochure */
.pill {
  display: inline-flex; align-self: flex-start;
  background: var(--pill); color: var(--ink-2);
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(28px, 4vw, 44px); max-width: 760px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-family: var(--body); font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--dark { background: var(--brown); color: #FBF6EC; }
.btn--dark:hover { background: var(--c2); }
.btn--line { border-color: var(--brown); color: var(--brown); background: transparent; }
.btn--line:hover { background: var(--brown); color: #FBF6EC; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(245, 236, 220, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 76px; }
.brand img { height: 60px; width: auto; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { padding: 8px 13px; border-radius: 999px; font-size: .93rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.nav a:hover { background: var(--pill); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--brown); color: #FBF6EC; }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--brown); background: transparent; color: var(--brown); cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 920px) {
  .brand img { height: 48px; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 4px; background: var(--paper); padding: 12px var(--gutter) 18px; border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; }
}

/* ---------------- arched photo crops ---------------- */
.arch-left  { clip-path: ellipse(100% 78% at 0% 50%); }
.arch-right { clip-path: ellipse(100% 78% at 100% 50%); }
.arch-top   { border-radius: 999px 999px var(--r-md) var(--r-md); }
.arch-img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------- hero ---------------- */
.hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); min-height: 620px; }
.hero__media { position: relative; background: var(--c1); }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__body { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(40px, 6vw, 80px) clamp(32px, 5vw, 72px); max-width: 680px; }
.hero__tag { font-family: var(--display); font-style: italic; color: var(--c2); font-size: 1.1rem; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__media { height: 340px; }
  .hero__media.arch-left { clip-path: ellipse(90% 100% at 50% 0%); }
  .hero__body { padding-inline: var(--gutter); }
}

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; }
.stat b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: var(--brown); line-height: 1.1; font-variant-numeric: lining-nums; }
.stat span { font-size: .8rem; color: var(--ink-3); line-height: 1.35; display: block; margin-top: 4px; }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------- coloured cards (KBITEC stack) ---------------- */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ccard { border-radius: var(--r-md); padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 12px; }
.ccard h3 { color: inherit; }
.ccard p, .ccard li { font-size: .95rem; }
.ccard ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.ccard--1 { background: var(--c1); color: #F8EEDD; }
.ccard--2 { background: var(--c2); color: #FFF4E8; }
.ccard--3 { background: var(--c3); color: #2A1808; }
.ccard--4 { background: var(--c4); color: #2A1808; }
.ccard .more { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: .9rem; text-decoration: none; }
.ccard .more:hover { text-decoration: underline; }

/* outlined cards with coloured left rule (values) */
.vcards { display: grid; gap: 14px; }
.vcard { background: var(--paper); border: 1.5px solid var(--line); border-left: 6px solid var(--c1); border-radius: var(--r-sm); padding: 16px 20px; }
.vcard:nth-child(2) { border-left-color: var(--c2); }
.vcard:nth-child(3) { border-left-color: var(--c3); }
.vcard:nth-child(4) { border-left-color: var(--c4); }
.vcard h4 { font-size: 1.12rem; margin-bottom: 4px; }
.vcard h4 .letter { color: var(--c2); }
.vcard p { color: var(--ink-2); font-size: .95rem; }

/* split layout: text + arched image */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.split--wide-text { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.split__img { aspect-ratio: 4 / 5; overflow: hidden; max-width: 100%; }
.split__img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .split, .split--wide-text { grid-template-columns: 1fr; } .split__img { aspect-ratio: 4 / 3; } .split .order-first-mobile { order: -1; } }

/* arrow list (Engineering Synergy style) */
.arrows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.arrows li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.arrows li::before { content: "→"; font-size: 1.35rem; line-height: 1.2; color: var(--c3); font-weight: 600; }
.arrows li:nth-child(3n+2)::before { color: var(--c2); }
.arrows li:nth-child(3n)::before { color: var(--c1); }
.arrows h4 { font-size: 1.15rem; margin-bottom: 3px; }
.arrows p { color: var(--ink-2); font-size: .95rem; }

/* chevron process flow (matches the factory flow-chart boards) */
.flow { display: flex; flex-wrap: wrap; gap: 10px 4px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.flow li {
  counter-increment: step; position: relative;
  background: var(--c1); color: #F8EEDD;
  padding: 12px 26px 12px 30px; min-height: 66px;
  display: flex; flex-direction: column; justify-content: center;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%, 16px 50%);
  font-size: .9rem; font-weight: 600; line-height: 1.25; flex: 1 1 150px; max-width: 220px;
}
.flow li::before { content: counter(step, decimal-leading-zero); font-size: .7rem; font-weight: 600; opacity: .7; letter-spacing: .06em; }
.flow li small { font-weight: 400; opacity: .85; font-size: .78rem; }
.flow--amber li { background: var(--c3); color: #2A1808; }
.flow--rust li  { background: var(--c2); color: #FFF4E8; }
.flow li.hi { background: var(--yellow); color: #2A1808; }
@media (max-width: 560px) { .flow li { max-width: none; flex-basis: 46%; } }

/* photo grids */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); }
.gallery figcaption { font-size: .85rem; color: var(--ink-3); }
.gallery--tall img { aspect-ratio: 3 / 4; border-radius: 999px 999px var(--r-md) var(--r-md); }
.gallery--tall figcaption b { display: block; font-family: var(--display); font-weight: 600; color: var(--ink); font-size: 1.05rem; }

/* tables */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; background: var(--pill); }
td { color: var(--ink-2); }
td:first-child { color: var(--ink); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; color: var(--ink); background: var(--pill); }

/* clients */
.logos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.logo-tile { background: var(--white); border-radius: var(--r-sm); border: 1px solid var(--line); height: 110px; display: flex; align-items: center; justify-content: center; padding: 18px; }
.logo-tile img { max-height: 70px; max-width: 100%; width: auto; object-fit: contain; }
.names { display: flex; flex-wrap: wrap; gap: 10px; }
.names span { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.sector { display: flex; flex-direction: column; gap: 14px; }
.sector + .sector { margin-top: 34px; }
.sector h3 { font-size: 1.2rem; }
.note { display: flex; gap: 10px; align-items: flex-start; background: #F3E3C2; border-radius: var(--r-sm); padding: 12px 16px; font-size: .9rem; color: var(--ink-2); margin-top: 26px; }

/* people */
.people { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.person { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.person b { font-family: var(--display); font-weight: 600; font-size: 1.08rem; }
.person span { font-size: .88rem; color: var(--c2); font-weight: 600; }
.person small { font-size: .82rem; color: var(--ink-3); }
.person--lead { border-color: var(--c3); }

/* photo band */
.band-photo { border-radius: var(--r-lg); overflow: hidden; }
.band-photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
@media (max-width: 640px) { .band-photo img { aspect-ratio: 4 / 3; } }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.dl { display: flex; flex-direction: column; border-top: 1.5px solid var(--line); margin: 0; }
.dl div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1.5px solid var(--line); }
.dl dt { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding-top: 3px; }
.dl dd { margin: 0; }
.dl a { text-decoration: none; border-bottom: 1px solid var(--c3); }
form { display: flex; flex-direction: column; gap: 14px; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: clamp(20px, 3vw, 30px); }
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
input, select, textarea { font: inherit; font-size: .95rem; color: var(--ink); background: var(--white); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c3); }
textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .82rem; color: var(--ink-3); }

/* page head (inner pages) */
.page-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: stretch; min-height: 340px; }
.page-head__body { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: clamp(40px, 5vw, 64px) var(--gutter); padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); }
.page-head__media { position: relative; min-height: 260px; }
.page-head__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .page-head { grid-template-columns: 1fr; }
  .page-head__media { order: -1; height: 230px; }
  .page-head__media.arch-right { clip-path: ellipse(90% 100% at 50% 0%); }
  .page-head__body { padding-left: var(--gutter); }
}

/* quote */
.quote { font-family: var(--display); font-style: italic; font-size: clamp(1.25rem, 1.1rem + .7vw, 1.65rem); color: var(--brown); line-height: 1.4; max-width: 34ch; }

/* closing panel + footer (KBITEC closing slide) */
.closing { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.closing .tagline { font-family: var(--display); font-size: clamp(1.7rem, 1.2rem + 2vw, 2.7rem); line-height: 1.25; color: var(--brown); }
.site-footer { padding-bottom: 28px; }
.footer-panel { background: var(--c1); color: #F2E5CE; border-radius: var(--r-lg); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; overflow: hidden; }
.footer-panel > div { padding: 26px 26px 28px; border-right: 1px solid rgba(242, 193, 78, .35); display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.footer-panel > div:last-child { border-right: 0; }
.footer-panel h4 { font-family: var(--display); color: #FFFFFF; font-size: 1.15rem; font-weight: 500; }
.footer-panel a { text-decoration: none; color: #F2E5CE; }
.footer-panel a:hover { color: var(--c4); }
.footer-panel img { height: 56px; width: auto; align-self: flex-start; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 16px 6px 0; font-size: .8rem; color: var(--ink-3); }
@media (max-width: 900px) { .footer-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-panel > div:nth-child(2) { border-right: 0; } .footer-panel > div:nth-child(-n+2) { border-bottom: 1px solid rgba(242, 193, 78, .35); } }
@media (max-width: 560px) { .footer-panel { grid-template-columns: 1fr; } .footer-panel > div { border-right: 0; border-bottom: 1px solid rgba(242, 193, 78, .35); } .footer-panel > div:last-child { border-bottom: 0; } }

.stack > .btn, .stack > .btn-row { align-self: flex-start; }
.table-wrap--compact table { min-width: 0; }
/* Enquiry form: spam trap (hidden from people) and send status */
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note.is-ok { color: #1F6B3A; font-weight: 600; }
.form-note.is-error { color: #A12D1F; font-weight: 600; }
