/* KIBO Group — homepage styles
   Direction: European industrial minimal. White space, hairlines, one brand blue,
   flat surfaces, no shadows or gradients. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0e1a26;
  --text: #36424f;
  --muted: #6a7582;
  --line: #e1e4e7;
  --line-strong: #c9ced3;
  --surface: #f4f5f3;
  --white: #fff;
  --brand: #01479d;
  --brand-dark: #013a80;
  --dark: #0c1722;
  --dark-line: rgba(255, 255, 255, .16);
  --dark-muted: rgba(255, 255, 255, .66);

  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1320px;
  --section: clamp(72px, 9vw, 136px);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.visually-hidden { position: absolute; 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; padding: 10px 16px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 12px; }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-size: .8125rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 20px;
}
h2 { font-size: clamp(1.9rem, 1.15rem + 2.3vw, 3.1rem); line-height: 1.08; }
h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -.01em; }
.meta { font-size: .875rem; color: var(--muted); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  font-weight: 600; font-size: 1rem; letter-spacing: .005em;
  border: 1px solid transparent; border-radius: 2px; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--surface); }

.link-arrow {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-weight: 600; color: var(--ink);
  padding-bottom: 4px; border-bottom: 1px solid var(--line-strong);
  transition: border-color .2s, color .2s;
}
.link-arrow span, .card-more span { display: inline-block; transition: transform .25s var(--ease); }
.link-arrow:hover { color: var(--brand); border-color: var(--brand); }
.link-arrow:hover span, a:hover .card-more span { transform: translateX(5px); }
.card-more { display: inline-flex; gap: 8px; font-size: .9375rem; font-weight: 600; color: var(--ink); }
a:hover .card-more { color: var(--brand); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(12px); }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand img { height: 38px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.nav-list { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  height: var(--header-h);
  font-size: .9688rem; font-weight: 500; color: var(--ink);
  border-bottom: 2px solid transparent; border-top: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.nav-link:hover, .nav-item:focus-within > .nav-link { color: var(--brand); border-bottom-color: var(--brand); }
.chev { transition: transform .2s; }
.nav-cta { min-height: 44px; padding: 0 20px; font-size: .9375rem; }

.nav-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility 0s .18s;
}
.has-panel:hover .nav-panel, .has-panel:focus-within .nav-panel {
  opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
.has-panel:hover .chev, .has-panel:focus-within .chev { transform: rotate(180deg); }
.nav-panel-inner { display: grid; grid-template-columns: repeat(3, 1fr) 1.2fr; gap: 40px; padding-block: 40px 48px; }
.nav-col-title { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.nav-col li + li { margin-top: 10px; }
.nav-col a:not(.link-arrow) { color: var(--ink); font-weight: 500; }
.nav-col a:not(.link-arrow):hover { color: var(--brand); }
.nav-col-aside { padding-left: 40px; border-left: 1px solid var(--line); font-size: .9688rem; }
.nav-col-aside p:not(.nav-col-title) { margin-bottom: 18px; }

.nav-toggle { display: none; width: 44px; height: 44px; padding: 0; background: none; border: 0; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 24px; height: 2px; background: var(--ink); margin-inline: auto;
  transition: transform .25s var(--ease), background-color .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; border-bottom: 1px solid var(--line); }
.hero-copy {
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(56px, 7vw, 112px);
  padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2));
  padding-right: clamp(24px, 3.4vw, 56px);
}
.hero h1 { font-size: clamp(2.45rem, 1.1rem + 3.2vw, 3.9rem); line-height: 1.04; letter-spacing: -.03em; text-wrap: pretty; }
.lede { margin-top: 28px; max-width: 34em; font-size: clamp(1.0625rem, .95rem + .4vw, 1.25rem); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 40px; }
.hero-media { position: relative; min-height: clamp(420px, 46vw, 700px); background: var(--surface); }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Figures ---------- */
.figures { border-bottom: 1px solid var(--line); }
.figures-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.figure { display: flex; flex-direction: column; padding: clamp(28px, 3.4vw, 48px) clamp(16px, 2.4vw, 36px); border-left: 1px solid var(--line); }
.figure:first-child { border-left: 0; padding-left: 0; }
.figure dt { order: 1; font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.figure dd { order: 2; margin-top: 14px; font-size: clamp(2.4rem, 1.4rem + 2.6vw, 3.9rem); font-weight: 500; line-height: 1; letter-spacing: -.035em; color: var(--ink); font-variant-numeric: tabular-nums; }
.figure .unit { font-size: .42em; letter-spacing: 0; color: var(--muted); }
.figure p { order: 3; margin-top: 14px; font-size: .9375rem; color: var(--muted); max-width: 22em; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-tint { background: var(--surface); }
.section-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px clamp(32px, 6vw, 96px);
  align-items: end; margin-bottom: clamp(40px, 5vw, 72px);
}
.section-head-aside { justify-self: end; max-width: 30em; }
.section-head-aside p { margin-bottom: 20px; }

/* ---------- Products ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.product-card { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.product-card a { display: flex; flex-direction: column; height: 100%; padding: clamp(20px, 2.2vw, 32px); transition: background-color .25s; }
.product-card a:hover { background: var(--surface); }
.product-media { display: grid; place-items: center; height: clamp(150px, 15vw, 210px); margin-bottom: 20px; }
.product-media img { max-height: 100%; width: auto; max-width: 92%; object-fit: contain; mix-blend-mode: multiply; transition: transform .5s var(--ease); }
.product-card a:hover .product-media img { transform: scale(1.04); }
.tag { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.product-card h3 { font-size: 1.1875rem; }
.product-desc { margin-top: 10px; margin-bottom: 24px; font-size: .9375rem; color: var(--muted); }
.product-card .card-more { margin-top: auto; }

/* ---------- Applications ---------- */
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.6vw, 40px); }
.app-card a { display: block; }
.app-media, .project-media, .news-media { overflow: hidden; background: #e6e8e6; }
.app-media { aspect-ratio: 4 / 5; }
.app-media img, .project-media img, .news-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
a:hover .app-media img, a:hover .project-media img, a:hover .news-media img { transform: scale(1.035); }
.app-index { margin-top: 24px; font-size: .8125rem; font-weight: 600; letter-spacing: .08em; color: var(--brand); }
.app-card h3 { margin-top: 8px; font-size: clamp(1.4rem, 1.1rem + .9vw, 1.85rem); }
.app-card h3 + p { margin-top: 12px; margin-bottom: 20px; max-width: 28em; }

/* ---------- Manufacturing ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px clamp(40px, 8vw, 128px); align-items: start; }
.split-lead h2 + p { margin-top: 24px; margin-bottom: 28px; max-width: 32em; }
.capabilities { counter-reset: cap; border-top: 1px solid var(--line-strong); }
.capabilities li { counter-increment: cap; display: grid; grid-template-columns: 56px 1fr; gap: 4px 16px; padding-block: 26px; border-bottom: 1px solid var(--line); }
.capabilities li::before { content: counter(cap, decimal-leading-zero); grid-row: span 2; font-size: .8125rem; font-weight: 600; letter-spacing: .08em; color: var(--brand); padding-top: 5px; }
.capabilities p { color: var(--muted); }
.wide-figure { margin-top: clamp(48px, 6vw, 96px); }
.wide-figure img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.wide-figure figcaption { margin-top: 14px; font-size: .875rem; color: var(--muted); }

/* ---------- Projects ---------- */
.project-grid, .news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.6vw, 40px); }
.project-media { aspect-ratio: 4 / 3; }
.news-media { aspect-ratio: 16 / 10; }
.project-card .meta, .news-card .meta { margin-top: 20px; }
.project-card h3, .news-card h3 { margin-top: 8px; font-size: 1.3125rem; line-height: 1.28; transition: color .2s; }
.project-card a:hover h3, .news-card a:hover h3 { color: var(--brand); }

.clients { margin-top: clamp(56px, 7vw, 104px); padding-top: 36px; border-top: 1px solid var(--line); }
.client-list { display: flex; flex-wrap: wrap; gap: 10px clamp(20px, 3vw, 44px); font-size: clamp(1.15rem, .95rem + .8vw, 1.6rem); font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.client-list li { opacity: .72; }

/* ---------- Enquiry ---------- */
.section-dark { background: var(--dark); color: var(--dark-muted); }
.section-dark h2 { color: #fff; }
.section-dark .eyebrow { color: #8fb8ee; }
.quote { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px clamp(40px, 8vw, 128px); }
.quote-lead h2 + p { margin-top: 24px; max-width: 30em; }
.contact-list { margin-top: 48px; border-top: 1px solid var(--dark-line); }
.contact-list > div { display: grid; grid-template-columns: 120px 1fr; padding-block: 18px; border-bottom: 1px solid var(--dark-line); }
.contact-list dt { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding-top: 4px; }
.contact-list dd a { color: #fff; font-weight: 500; border-bottom: 1px solid var(--dark-line); transition: border-color .2s; }
.contact-list dd a:hover { border-color: #fff; }

.quote-form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; align-content: start; }
.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 0; color: #fff; background: transparent;
  border: 0; border-bottom: 1px solid rgba(255, 255, 255, .34); border-radius: 0;
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 112px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; padding-right: 24px; }
.field select option { color: var(--ink); background: #fff; }
.field ::placeholder { color: rgba(255, 255, 255, .42); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-bottom-color: #fff; box-shadow: 0 1px 0 #fff; }
.field .is-invalid { border-bottom-color: #ff9f8a; }
.form-foot { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 8px; }
.form-note { font-size: .9375rem; }
.form-note.is-error { color: #ffb4a3; }
.form-note.is-ok { color: #a8e0bd; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--dark-muted); border-top: 1px solid var(--dark-line); font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1.3fr 1fr 1fr 1.1fr; gap: 40px clamp(24px, 3vw, 48px); padding-block: clamp(56px, 6vw, 88px); }
.footer-brand img { height: 40px; width: auto; margin-bottom: 20px; }
.footer-brand p { max-width: 22em; }
.footer-col h2 { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.footer-col li + li { margin-top: 9px; }
.footer-col a { transition: color .2s; }
.footer-col a:hover { color: #fff; }
.social { display: flex; gap: 18px; margin-top: 22px; }
.social li + li { margin-top: 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 24px; padding-right: 76px; border-top: 1px solid var(--dark-line); font-size: .875rem; }
.footer-bottom a:hover { color: #fff; }

/* ---------- WhatsApp ---------- */
.wa-float {
  position: fixed; right: clamp(16px, 2.4vw, 32px); bottom: clamp(16px, 2.4vw, 32px); z-index: 40;
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: #1fa855; color: #fff; transition: transform .2s var(--ease), background-color .2s, opacity .2s, visibility .2s;
}
.wa-float:hover { transform: translateY(-3px); background: #178a45; }
.wa-float.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---------- Reveal on scroll (only when JS is running) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 959px) {
  :root { --header-h: 64px; }
  .brand img { height: 32px; }
  /* backdrop-filter would make the header the containing block of the fixed menu */
  .site-header { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-toggle { display: block; }
  .primary-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 32px; background: #fff; overflow-y: auto;
    visibility: hidden; opacity: 0; transition: opacity .2s, visibility 0s .2s;
  }
  .nav-open .primary-nav { visibility: visible; opacity: 1; transition-delay: 0s; }
  .nav-open { overflow: hidden; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--line); }
  .nav-link { height: auto; padding-block: 18px; font-size: 1.125rem; border: 0; justify-content: space-between; }
  .chev { display: none; }
  .nav-panel { position: static; opacity: 1; visibility: visible; transform: none; border: 0; transition: none; }
  .nav-panel-inner { width: 100%; grid-template-columns: 1fr; gap: 20px; padding-block: 0 24px; }
  .nav-col-aside { display: none; }
  .nav-col-title { margin-bottom: 10px; }
  .nav-cta { margin-top: 28px; min-height: 52px; }

  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-inline: var(--gutter); padding-block: 48px 44px; }
  .hero-media { min-height: 0; aspect-ratio: 5 / 4; }

  .figures-grid { grid-template-columns: repeat(2, 1fr); }
  .figure { padding-inline: 20px; }
  .figure:nth-child(odd) { border-left: 0; padding-left: 0; }
  .figure:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .section-head, .split, .quote { grid-template-columns: 1fr; }
  .section-head-aside { justify-self: start; }
  .app-grid, .project-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .wide-figure img { aspect-ratio: 16 / 9; }
}

@media (max-width: 639px) {
  body { font-size: 1rem; }
  .app-grid, .project-grid, .news-grid { grid-template-columns: 1fr; gap: 40px; }
  .app-media { aspect-ratio: 4 / 3; }
  .product-card a { padding: 18px 16px 20px; }
  .product-media { height: 110px; margin-bottom: 14px; }
  .product-card h3 { font-size: 1.0313rem; }
  .product-desc { display: none; }
  .product-card h3 { margin-bottom: 18px; }
  .quote-form { grid-template-columns: 1fr; }
  .contact-list > div { grid-template-columns: 96px 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
