/* FlowVent Co W.L.L — corporate site */
:root {
  --navy: #1b2a6b;
  --blue: #2b3990;
  --blue-600: #23307c;
  --sky: #2b8fd6;
  --red: #c8262d;
  --red-600: #a91f25;
  --ink: #141a2e;
  --text: #3d4459;
  --muted: #6b7288;
  --line: #e3e6ee;
  --tint: #f4f6fa;
  --white: #fff;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(20, 26, 46, .08);
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 400 16px/1.65 var(--body); color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); line-height: 1.1; margin: 0 0 .5em; letter-spacing: .01em; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 600; }
p { margin: 0 0 1em; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

.eyebrow { font: 600 .8rem/1 var(--body); text-transform: uppercase; letter-spacing: .14em; color: var(--red); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow--light { color: #ff8a8f; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 6px; font: 600 .95rem/1 var(--body); border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn--sm { padding: 10px 18px; font-size: .88rem; }
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-600); }
.btn--ghost { border-color: rgba(255,255,255,.7); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--ink); }
.btn--light { background: var(--white); color: var(--blue); }
.btn--whatsapp { background: #1fa855; color: var(--white); margin-top: 8px; }
.btn--whatsapp:hover { background: #178a45; }

/* Top bar */
.topbar { background: var(--navy); color: #c9cfe8; font-size: .82rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.topbar__links { display: flex; gap: 20px; }
.topbar a { color: #fff; }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.header.is-scrolled { box-shadow: 0 4px 20px rgba(20,26,46,.08); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--blue); }
.brand__mark { width: 42px; height: 40px; }
.brand__text { display: flex; flex-direction: column; font-family: var(--head); line-height: 1; }
.brand__text strong { font-size: 1.55rem; letter-spacing: .06em; color: var(--blue); }
.brand__text small { font-size: .8rem; letter-spacing: .3em; color: var(--red); font-weight: 600; margin-top: 2px; }
.brand--light .brand__text strong { color: #fff; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--ink); font-weight: 500; font-size: .95rem; position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--red); transition: width .2s; }
.nav a:not(.btn):hover::after, .nav a.is-current::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }

/* Hero */
.hero { position: relative; color: var(--white); padding: 120px 0 0; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center 60%; transform: scale(1.04); }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(14,22,62,.92) 0%, rgba(27,42,107,.75) 45%, rgba(27,42,107,.25) 100%); }
.hero__content { position: relative; max-width: 1180px; padding-bottom: 80px; }
.hero h1 { color: var(--white); font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 700; text-transform: uppercase; }
.hero h1 span { color: #ffd166; }
.hero__lead { max-width: 560px; font-size: 1.08rem; color: #dde2f5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.stats { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white); border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow); }
.stats li { padding: 26px 28px; border-right: 1px solid var(--line); }
.stats li:last-child { border-right: 0; }
.stats strong { display: block; font: 700 2.6rem/1 var(--head); color: var(--blue); }
.stats span { color: var(--muted); font-size: .9rem; }

/* Sections */
.section { padding: 100px 0; }
.section--tint { background: var(--tint); }
.section--dark { background: var(--navy); color: #cdd3ec; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section__head { max-width: 640px; margin-bottom: 48px; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section__head--row h2 { margin: 0; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about__media { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.about__media img { width: 100%; height: 420px; object-fit: cover; border-radius: var(--radius); }
.about__media img:last-of-type { height: 300px; align-self: end; }
.about__badge { position: absolute; left: -18px; bottom: 28px; background: var(--red); color: #fff; padding: 16px 20px; border-radius: 8px; box-shadow: var(--shadow); }
.about__badge strong { display: block; font: 700 1.5rem/1 var(--head); letter-spacing: .04em; }
.about__badge span { font-size: .78rem; opacity: .9; }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checklist li { padding-left: 32px; position: relative; color: var(--ink); font-weight: 500; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service { background: var(--white); padding: 34px 30px; border-radius: var(--radius); border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.service::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--red); transition: width .3s; }
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service:hover::after { width: 100%; }
.service__icon { width: 54px; height: 54px; border-radius: 12px; background: #e9ecf8; display: grid; place-items: center; margin-bottom: 20px; }
.service__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service p { margin: 0; color: var(--muted); }

/* Projects */
.filters { display: flex; gap: 6px; background: var(--tint); padding: 5px; border-radius: 8px; }
.filter { border: 0; background: none; padding: 10px 18px; border-radius: 6px; font: 600 .9rem var(--body); color: var(--muted); cursor: pointer; }
.filter.is-active { background: var(--white); color: var(--blue); box-shadow: 0 2px 8px rgba(20,26,46,.08); }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project { border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--line); cursor: pointer; text-align: left; padding: 0; font: inherit; color: inherit; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.project__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.project__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project:hover .project__img img { transform: scale(1.06); }
.project__count { position: absolute; right: 12px; bottom: 12px; background: rgba(14,22,62,.75); color: #fff; font-size: .75rem; padding: 4px 10px; border-radius: 20px; }
.project__body { padding: 20px 22px 24px; }
.project__body h3 { font-size: 1.3rem; margin-bottom: 4px; }
.project__loc { color: var(--muted); font-size: .9rem; margin: 0; }
.tag { display: inline-block; font: 600 .72rem/1 var(--body); text-transform: uppercase; letter-spacing: .08em; padding: 6px 10px; border-radius: 4px; margin-bottom: 12px; }
.tag--ongoing { background: #fff3d6; color: #9a6400; }
.tag--completed { background: #e2f4e8; color: #1c7a3e; }
.project.is-hidden { display: none; }

.record { margin-top: 80px; }
.record__note { color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 620px; }
th, td { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--line); }
th { background: var(--tint); font: 600 .78rem var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
td:first-child { color: var(--ink); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfd; }

/* Quality */
.quality { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.commit { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.commit li { display: flex; gap: 18px; }
.commit span { font: 700 1.6rem/1 var(--head); color: #ff8a8f; flex: none; width: 36px; }
.org { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 32px; }
.org h3 { margin-bottom: 24px; }
.org__tree { display: flex; flex-direction: column; align-items: center; }
.org__node { background: var(--white); color: var(--ink); font: 600 .9rem var(--body); padding: 10px 16px; border-radius: 6px; text-align: center; position: relative; white-space: nowrap; }
.org__node--top { background: var(--red); color: #fff; padding: 12px 28px; }
.org__node--team { background: #ffd166; }
.org__split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; margin-top: 28px; width: 100%; position: relative; }
.org__split::before { content: ""; position: absolute; top: -14px; left: calc((100% - 24px) * .3077); right: calc((100% - 24px) * .1923); border-top: 2px solid rgba(255,255,255,.35); }
.org__split::after { content: ""; position: absolute; top: -28px; left: 50%; height: 14px; border-left: 2px solid rgba(255,255,255,.35); }
.org__col { display: flex; flex-direction: column; align-items: center; gap: 22px; position: relative; }
.org__col::before { content: ""; position: absolute; top: -14px; height: 14px; border-left: 2px solid rgba(255,255,255,.35); left: 50%; }
.org__col > .org__node:not(:last-child)::after, .org__pair::after { content: ""; position: absolute; left: 50%; bottom: -22px; height: 22px; border-left: 2px solid rgba(255,255,255,.35); }
.org__pair { display: flex; gap: 10px; position: relative; }

/* Resources */
.resources { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; }
.res-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.res-list { list-style: none; margin: 0; padding: 0; }
.res-list--2col { columns: 2; column-gap: 32px; }
.res-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); break-inside: avoid; }
.res-list b { font: 700 1.25rem/1 var(--head); color: var(--blue); }

/* Clients */
.clients { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.clients li { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 22px 20px; font: 600 1.15rem/1.2 var(--head); color: var(--ink); display: flex; align-items: center; min-height: 88px; border-left: 4px solid var(--blue); }

/* CTA */
.cta { background: linear-gradient(110deg, var(--blue) 0%, var(--sky) 100%); color: #fff; padding: 56px 0; }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 6px; }
.cta p { margin: 0; color: #e3ebff; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; }
.contact__list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 22px; }
.contact__list li { display: flex; gap: 16px; }
.contact__list svg { width: 44px; height: 44px; flex: none; padding: 11px; border-radius: 50%; background: #e9ecf8; fill: none; stroke: var(--blue); stroke-width: 1.8; }
.contact__list b { display: block; color: var(--ink); }
.form { background: var(--tint); border-radius: var(--radius); padding: 36px; display: grid; gap: 18px; align-content: start; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: .9rem; color: var(--ink); }
.form input, .form select, .form textarea { font: inherit; padding: 12px 14px; border: 1px solid #cfd4e2; border-radius: 6px; background: #fff; color: var(--ink); width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--sky); outline-offset: 0; border-color: transparent; }
.form .is-invalid { border-color: var(--red); }
.form__note { margin: 0; font-size: .82rem; color: var(--muted); }
.form button { justify-self: start; }
.map { margin-top: 80px; height: 380px; }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.3); }

/* Footer */
.footer { background: #0f1638; color: #9aa3c7; padding: 72px 0 0; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer__grid > div > p { margin-top: 18px; max-width: 320px; }
.footer h4 { color: #fff; font-size: 1.15rem; margin-bottom: 16px; }
.footer__grid a:not(.brand) { display: block; color: #9aa3c7; padding: 4px 0; }
.footer__grid a:not(.brand):hover { color: #fff; }
.cr-link { background: none; border: 0; padding: 0; color: #ff8a8f; font: 600 .9rem var(--body); cursor: pointer; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.08); margin-top: 56px; padding: 22px 0; font-size: .82rem; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(8,12,30,.85); }
.modal__dialog { position: relative; background: #fff; border-radius: var(--radius); width: min(980px, 100%); max-height: calc(100vh - 40px); overflow: auto; }
.modal__dialog--doc { width: min(900px, 100%); padding: 12px; }
.modal__close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.modal__stage { position: relative; background: #0b1024; aspect-ratio: 16 / 9; }
.modal__stage img { width: 100%; height: 100%; object-fit: contain; }
.modal__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--ink); }
.modal__nav--prev { left: 12px; }
.modal__nav--next { right: 12px; }
.modal__thumbs { display: flex; gap: 8px; padding: 10px 12px; overflow-x: auto; background: #0b1024; }
.modal__thumbs button { flex: none; width: 84px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; cursor: pointer; opacity: .6; background: none; }
.modal__thumbs button.is-active { border-color: #ffd166; opacity: 1; }
.modal__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.modal__body { padding: 24px 28px 28px; }
.modal__body h3 { font-size: 1.8rem; }
.modal__body dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 12px 0 0; }
.modal__body dt { font-weight: 600; color: var(--ink); }
.modal__body dd { margin: 0; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1024px) {
  .nav { gap: 20px; }
  .services, .projects { grid-template-columns: repeat(2, 1fr); }
  .clients { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; padding: 8px 16px 20px; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(20,26,46,.1); transform: translateY(-120%); visibility: hidden; transition: transform .25s, visibility .25s; }
  .nav.is-open { transform: none; visibility: visible; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 14px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .about, .quality, .contact, .resources { grid-template-columns: 1fr; gap: 48px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(2) { border-right: 0; }
  .stats li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .topbar > .container > span:first-child { display: none; }
  .topbar__inner { justify-content: center; }
}
@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero { padding-top: 80px; }
  .hero__content { padding-bottom: 56px; }
  .services, .projects, .clients { grid-template-columns: 1fr; }
  .stats li { padding: 20px 18px; }
  .stats strong { font-size: 2rem; }
  .about__media img { height: 280px; }
  .about__media img:last-of-type { height: 200px; }
  .about__badge { left: 10px; bottom: 10px; }
  .res-list--2col { columns: 1; }
  .form { padding: 24px; }
  .form__row { grid-template-columns: 1fr; }
  .org { padding: 20px; }
  .org__node { font-size: .78rem; padding: 8px 10px; white-space: normal; }
  .footer__grid { grid-template-columns: 1fr; }
  .modal { padding: 0; }
  .modal__dialog { max-height: 100vh; border-radius: 0; }
  .modal__body dl { grid-template-columns: 1fr; gap: 2px; }
  .modal__body dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
