/* monitoring4D — house style
   a TOPO4D company
   ------------------------------------------------------------------ */

:root {
  --ink: #0b1a2e;
  --navy: #102a43;
  --navy-2: #173a5e;
  --blue: #1660d8;
  --blue-dark: #0f4aa8;
  --accent: #14c1a6;
  --accent-dark: #0e9c87;
  --bg: #ffffff;
  --soft: #f4f8fc;
  --soft-2: #eaf1f9;
  --muted: #5a6b80;
  --line: #e0e8f1;
  --text: #1d2b3a;
  --white: #ffffff;
  --warn: #e8853a;

  --maxw: 1180px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(16, 42, 67, 0.10);
  --shadow-sm: 0 4px 14px rgba(16, 42, 67, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: 180ms ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; font-weight: 700; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; display: block; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin-bottom: .4rem; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 72px 0; }
.section--soft { background: var(--soft); }
.section--navy { background: var(--navy); color: #cfe0f2; }
.section--navy h2, .section--navy h3 { color: #fff; }
.eyebrow { color: var(--accent-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: .6rem; }
.lead { font-size: 1.18rem; color: var(--muted); }
.center { text-align: center; }
.measure { max-width: 720px; margin-left: auto; margin-right: auto; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 10px 16px; z-index: 200; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: 1rem;
  padding: 13px 24px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; transition: all var(--transition); }
.btn--primary { background: var(--accent); color: #04221d; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn--blue { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn--blue:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.btn--lg { padding: 16px 30px; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { height: 40px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-weight: 800; font-size: 1.32rem; color: var(--navy); letter-spacing: -.02em; }
.brand__name b { color: var(--accent-dark); }
.brand__parent { font-size: .68rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 3px; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { color: var(--navy); font-weight: 600; font-size: .98rem; padding: 9px 13px; border-radius: 8px; }
.main-nav a:hover, .main-nav a.is-active { background: var(--soft-2); color: var(--blue); }

.header-right { display: flex; align-items: center; gap: 14px; }

/* language switch */
.lang { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang a { font-size: .82rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; color: var(--muted); }
.lang a.is-active { background: var(--navy); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: var(--transition); }

/* ---------- Hero ---------- */
.hero { position: relative; background: linear-gradient(135deg, #0b1a2e 0%, #102a43 55%, #143a5e 100%); color: #dbe7f4; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 80% 20%, rgba(20,193,166,.18), transparent 45%); pointer-events: none; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 84px 0; }
.hero h1 { color: #fff; }
.hero p { font-size: 1.2rem; color: #b9cce0; max-width: 33em; }
.hero-points { list-style: none; padding: 0; margin: 26px 0 30px; display: flex; flex-wrap: wrap; gap: 12px 22px; }
.hero-points li { display: flex; align-items: center; gap: 9px; font-weight: 600; color: #eaf3ff; margin: 0; }
.hero-points li svg { flex: none; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-visual { position: relative; }
.hero-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 26px; backdrop-filter: blur(6px); }
.hero-card h3 { color: #fff; font-size: 1rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(20,193,166,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(20,193,166,.6);} 70%{box-shadow:0 0 0 12px rgba(20,193,166,0);} 100%{box-shadow:0 0 0 0 rgba(20,193,166,0);} }
.spark { width: 100%; height: auto; }
.metric-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.metric { flex: 1; background: rgba(255,255,255,.05); border-radius: 10px; padding: 12px; text-align: center; }
.metric b { display: block; color: #fff; font-size: 1.35rem; }
.metric span { font-size: .76rem; color: #9fb6ce; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform var(--transition), box-shadow var(--transition); display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon { width: 52px; height: 52px; border-radius: 12px; background: var(--soft-2); display: grid; place-items: center; margin-bottom: 16px; color: var(--blue); }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .98rem; margin-bottom: 1rem; }
.card .card-link { margin-top: auto; font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; }
.card .card-link:hover { gap: 10px; }

.feature { padding: 4px; }
.feature .icon { color: var(--accent-dark); background: rgba(20,193,166,.12); }

/* numbered process */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 0; }
.step .num { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 14px; }

/* ---------- References ---------- */
.refs { display: flex; flex-wrap: wrap; gap: 12px 14px; justify-content: center; }
.ref-badge { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; font-weight: 600; color: var(--navy-2); font-size: .92rem; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(135deg, #102a43, #173a5e); color: #dbe7f4; padding: 56px 0; }
.page-hero h1 { color: #fff; margin-bottom: .3rem; }
.page-hero p { color: #b9cce0; font-size: 1.15rem; max-width: 40em; margin: 0; }
.breadcrumb { font-size: .85rem; color: #8fa9c4; margin-bottom: 14px; }
.breadcrumb a { color: #b9cce0; }
.breadcrumb a:hover { color: #fff; }

/* ---------- Content / article ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.6rem; color: var(--navy-2); }
.prose ul li { color: var(--text); }
.tag { display: inline-block; background: var(--soft-2); color: var(--blue-dark); border-radius: 999px; padding: 4px 12px; font-size: .8rem; font-weight: 700; }
.muted { color: var(--muted); }

.layout { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.sidebar { position: sticky; top: 100px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.sidebar h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.sidebar ul { list-style: none; padding: 0; margin: 0 0 18px; }
.sidebar li { margin-bottom: 8px; }
.sidebar a { font-weight: 600; }

.info-box { background: var(--soft); border-left: 4px solid var(--accent); border-radius: 8px; padding: 18px 22px; margin: 24px 0; }

/* ---------- Blog / KB lists ---------- */
.post-card { display: flex; flex-direction: column; }
.post-card .meta { font-size: .82rem; color: var(--muted); margin-bottom: 8px; display: flex; gap: 10px; align-items: center; }
.post-card h3 { margin-bottom: .5rem; }
.post-card h3 a { color: var(--navy); }
.post-card h3 a:hover { color: var(--blue); }

/* ---------- Contact / form ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info ul { list-style: none; padding: 0; }
.contact-info li { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
.contact-info .icon { color: var(--accent-dark); flex: none; margin-top: 2px; }
.contact-info a { color: var(--navy); font-weight: 600; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--navy); }
.field .req { color: var(--warn); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; color: var(--text); background: #fff; transition: border-color var(--transition), box-shadow var(--transition); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,96,216,.14); }
.field textarea { min-height: 130px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.checkbox input { width: auto; margin-top: 4px; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 12px; }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 600; }
.alert--ok { background: rgba(20,193,166,.12); color: var(--accent-dark); border: 1px solid rgba(20,193,166,.4); }
.alert--err { background: #fdecec; color: #c0392b; border: 1px solid #f5c6c6; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--blue-dark), var(--accent-dark)); color: #fff; border-radius: var(--radius); padding: 44px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 38em; margin: 0 auto 22px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #9fb2c8; padding: 60px 0 26px; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.site-footer a { color: #9fb2c8; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.footer-brand .brand__name { color: #fff; font-size: 1.4rem; font-weight: 800; }
.footer-brand .brand__name b { color: var(--accent); }
.footer-brand .brand__parent { color: #6f86a0; }
.footer-tag { margin: 14px 0 18px; max-width: 26em; }
.social { display: flex; gap: 10px; }
.social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.07); display: grid; place-items: center; }
.social a:hover { background: var(--accent); color: #04221d; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: #6f86a0; }

/* ---------- Mini contact (bottom of every page) ---------- */
.mini-contact { background: var(--soft); border-top: 1px solid var(--line); }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.hidden { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; padding: 60px 0; }
  .hero-visual { order: -1; max-width: 420px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .contact-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .main-nav { position: fixed; inset: 76px 0 auto 0; background: #fff; flex-direction: column;
    align-items: stretch; padding: 14px 22px 22px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-130%); transition: transform var(--transition); }
  .main-nav.is-open { transform: translateY(0); }
  .main-nav a { padding: 12px 10px; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .cta-band { padding: 30px 22px; }
  .hide-sm { display: none; }
}

/* =================================================================
   Enhancements: photo hero, gallery, partners, polish
   ================================================================= */

/* Slightly wider, more generous gutters */
:root { --maxw: 1200px; }
.container { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }

/* Section heading accent */
.section .center h2::after,
.page-hero h1::after { content: none; }

/* ---- Hero with photo ---- */
.hero-eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #9fe7da;
  font-weight: 600; font-size: .9rem; letter-spacing: .02em; margin: 0 0 18px;
  background: rgba(20,193,166,.12); border: 1px solid rgba(20,193,166,.3);
  padding: 7px 14px; border-radius: 999px; }
.hero-copy { max-width: 36em; }

.hero-visual { position: relative; }
.hero-photo { position: relative; border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 60px rgba(4,12,24,.45); border: 1px solid rgba(255,255,255,.12); }
.hero-photo img { width: 100%; height: 460px; object-fit: cover; display: block; }
.hero-photo__grad { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,26,46,0) 40%, rgba(11,26,46,.55) 100%); }
.hero-card { position: absolute; left: 18px; right: 18px; bottom: 18px;
  background: rgba(13,28,46,.78); border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px; padding: 18px 20px; backdrop-filter: blur(10px); }

/* ---- Service cards as links ---- */
.service-card { text-decoration: none; color: inherit; }
.service-card h3 { color: var(--navy); transition: color var(--transition); }
.service-card:hover h3 { color: var(--blue); }
.service-card .icon { transition: background var(--transition), color var(--transition); }
.service-card:hover .icon { background: var(--accent); color: #04221d; }

/* ---- Banner photo on service pages ---- */
.banner-photo { margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.banner-photo img { width: 100%; height: 320px; object-fit: cover; display: block; }

/* ---- Gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery__item { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); aspect-ratio: 4 / 3; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 500ms ease; }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item figcaption { position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 16px 12px; color: #fff; font-size: .9rem; font-weight: 600;
  background: linear-gradient(180deg, transparent, rgba(8,20,34,.82)); }

/* ---- Partners ---- */
.partner-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; display: flex; flex-direction: column; gap: 4px;
  transition: transform var(--transition), box-shadow var(--transition); }
.partner-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.partner-name { font-weight: 800; font-size: 1.25rem; color: var(--navy); letter-spacing: -.01em; }
.partner-role { color: var(--muted); font-size: .95rem; }

/* ---- Polish ---- */
.section--soft { background: linear-gradient(180deg, #f7fafd, #eef4fa); }
.btn--primary { box-shadow: 0 8px 20px rgba(20,193,166,.28); }
.card { border-radius: 16px; }

@media (max-width: 940px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .hero-photo img { height: 380px; }
}
@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hero-photo img { height: 300px; }
  .banner-photo img { height: 220px; }
  .hero-visual { max-width: 100%; }
}
