/* ==========================================================================
   MatterLab — Where Quality Matters
   Design tokens, base, layout, components, pages
   ========================================================================== */

:root {
  --navy: #1A1F33;
  --navy-900: #141828;
  --navy-700: #252B42;
  --orange: #CC3B00;        /* accessible orange for text & buttons (5:1 on white) */
  --orange-700: #A32F00;
  --orange-bright: #FF4F00; /* logo orange — decoration only */
  --orange-soft: #FFF1EA;
  --orange-line: #FFD9C7;
  --ink: #1A1F33;
  --muted: #4A5068;
  --muted-on-dark: #C9CEDC;
  --line: #E6E8EF;
  --line-strong: #CFD3DE;
  --bg-soft: #F6F7FA;
  --white: #FFFFFF;
  --green: #1F7A47;
  --green-soft: #E8F6EE;
  --danger: #B42318;

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(26, 31, 51, .06);
  --shadow: 0 10px 30px rgba(26, 31, 51, .08);
  --shadow-lg: 0 18px 40px rgba(26, 31, 51, .14);

  --container: 1200px;
  --gutter: 32px;
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.menu-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; line-height: 1.65; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--orange); }
a:hover { color: var(--orange-700); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--navy); color: #fff; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; }
.grid-2--top { align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.with-sidebar { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.with-sidebar > .main { flex: 999 1 560px; min-width: 0; }
.with-sidebar > .sidebar { flex: 1 1 320px; display: flex; flex-direction: column; gap: 20px; }
.sidebar--sticky { position: sticky; top: calc(var(--header-h) + 24px); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; }
.section-head > div { max-width: 660px; }

/* ---------- Typography ---------- */
.eyebrow { display: block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); margin-bottom: 14px; }
.eyebrow--light { color: #FF8A57; }
.display { font-size: clamp(38px, 5vw, 56px); line-height: 1.07; font-weight: 800; }
.h1 { font-size: clamp(36px, 4.4vw, 52px); line-height: 1.08; font-weight: 800; }
.h2 { font-size: clamp(30px, 3.4vw, 40px); }
.h3 { font-size: 20px; }
.lead { font-size: 18px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.on-dark { color: var(--muted-on-dark); }
.section--dark h2, .section--dark h3 { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: var(--radius-sm);
  font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-700); color: #fff; }
.btn--secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { color: var(--ink); border-color: var(--ink); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn--ghost:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, .06); }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: #F1F2F6; color: var(--ink); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--orange); text-decoration: none; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .15s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Utility bar ---------- */
.utility { background: var(--navy); color: var(--muted-on-dark); font-size: 13px; }
.utility .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 10px; padding-bottom: 10px; }
.utility a { color: #fff; text-decoration: none; }
.utility a:hover { text-decoration: underline; color: #fff; }
.utility__badge { display: inline-flex; align-items: center; gap: 8px; }
.utility__badge svg { width: 16px; height: 16px; color: #FF7A3D; }
.utility__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.header.is-scrolled { box-shadow: 0 6px 24px rgba(26, 31, 51, .08); }
.header .container { display: flex; align-items: center; gap: 32px; min-height: var(--header-h); }
.header__logo img { height: 44px; width: auto; }
.nav { flex: 1; display: flex; justify-content: center; }
.nav__list { display: flex; align-items: center; gap: 4px; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 8px; border: 0; background: none; cursor: pointer;
  color: var(--ink); font-weight: 500; font-size: 15px; text-decoration: none;
}
.nav__link:hover { color: var(--orange); background: #F7F8FB; }
.nav__link[aria-current="page"] { color: var(--orange); }
.nav__link svg { width: 14px; height: 14px; transition: transform .2s; }
.nav__item { position: relative; }
.nav__item.is-open > .nav__link svg { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%, 6px);
  width: 560px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  opacity: 0; visibility: hidden; transition: opacity .15s, transform .15s, visibility .15s;
}
.nav__item.is-open .dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dropdown a { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.dropdown a:hover { background: var(--bg-soft); color: var(--ink); }
.dropdown .icon-box { width: 38px; height: 38px; border-radius: 10px; }
.dropdown .icon-box svg { width: 20px; height: 20px; }
.dropdown strong { display: block; font-size: 15px; font-weight: 600; }
.dropdown a > div > span { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }
.dropdown .icon-box { margin-top: 2px; }
.dropdown__all { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.dropdown__all a { font-weight: 600; color: var(--orange); }

.header__cta { flex: none; }
.menu-toggle {
  display: none; margin-left: auto; width: 48px; height: 48px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle svg { width: 24px; height: 24px; }

/* Mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 150; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(20, 24, 40, .5); opacity: 0; transition: opacity .25s; }
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 88vw); background: #fff;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s ease;
  overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer__head img { height: 36px; width: auto; }
.drawer__close { width: 44px; height: 44px; border: 0; background: var(--bg-soft); border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.drawer__close svg { width: 22px; height: 22px; }
.drawer__nav { padding: 12px 20px; flex: 1; }
.drawer__nav > ul > li > a, .drawer__group summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; cursor: pointer; list-style: none;
}
.drawer__nav a[aria-current="page"] { color: var(--orange); }
.drawer__group summary::-webkit-details-marker { display: none; }
.drawer__group summary svg { width: 18px; height: 18px; transition: transform .2s; }
.drawer__group[open] summary svg { transform: rotate(180deg); }
.drawer__group ul { padding: 6px 0 10px 12px; }
.drawer__group ul a { display: block; padding: 10px 0; color: var(--muted); text-decoration: none; font-size: 15px; }
.drawer__foot { padding: 20px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); }

/* ---------- Image slots (replace with real photos) ---------- */
.img-slot {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: repeating-linear-gradient(135deg, #E3E7F0 0 14px, #EDF0F6 14px 28px);
  display: flex; align-items: flex-end; padding: 20px; color: var(--muted); font-size: 13px; font-weight: 500;
}
.img-slot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-slot__label { position: relative; background: #fff; padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.img-slot--dark { background: repeating-linear-gradient(135deg, #252B42 0 14px, #2C3350 14px 28px); }
.img-slot--round { border-radius: 50%; align-items: center; justify-content: center; padding: 0; }

/* ---------- Icons & cards ---------- */
.icon-box { flex: none; width: 52px; height: 52px; border-radius: 12px; background: var(--orange-soft); color: var(--orange); display: flex; align-items: center; justify-content: center; }
.icon-box svg { width: 28px; height: 28px; }
.icon-box--sm { width: 44px; height: 44px; }
.icon-box--sm svg { width: 22px; height: 22px; }
.icon-box--green { background: var(--green-soft); color: var(--green); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 12px; color: var(--ink);
}
.card--link { text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card--link:hover { border-color: var(--orange); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.card--link .link-arrow { margin-top: auto; }
.card--lg { padding: 40px; }
.card--warm { background: #FFF8F4; border-color: var(--orange-line); }
.card--dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.card--dark h3 { color: #fff; }
.card h3 { font-size: 19px; }
.card p { font-size: 15px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tag { font-size: 13px; padding: 6px 10px; border-radius: 8px; background: #F3F4F8; color: var(--ink); }
.chip { display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 500; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; font-size: 15px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list svg { width: 18px; height: 18px; color: var(--orange); flex: none; margin-top: 3px; }

.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.badge svg { width: 18px; height: 18px; color: var(--orange); }
.badges { display: flex; flex-wrap: wrap; gap: 12px 28px; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%); padding: 80px 0 104px; }
.hero__content { display: flex; flex-direction: column; gap: 24px; }
.hero__media { position: relative; }
.hero__media .img-slot { height: 520px; align-items: center; justify-content: center; text-align: center; }
.float-card { position: absolute; background: #fff; border-radius: 14px; padding: 16px 20px; box-shadow: var(--shadow-lg); display: flex; gap: 14px; align-items: center; }
.float-card--tl { left: -28px; top: 40px; }
.float-card--br { right: 24px; bottom: -28px; background: var(--navy); color: #fff; display: block; }
.float-card strong { display: block; font-size: 15px; }
.float-card small { display: block; font-size: 13px; color: var(--muted); }
.float-card--br small { color: var(--muted-on-dark); }
.float-card__big { font-family: var(--font-head); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }

.page-hero { background: var(--bg-soft); padding: 40px 0 72px; }
.page-hero--dark { background: var(--navy); color: #fff; padding: 96px 0; }
.page-hero--dark p { color: var(--muted-on-dark); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 36px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 500; }

/* ---------- Strip ---------- */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; }
.strip .container { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; justify-content: space-between; }
.strip p { max-width: 760px; }

/* ---------- Stats ---------- */
.stats { background: var(--navy); padding: 72px 0; }
.stats .grid-4 { gap: 32px; }
.stat__num { font-family: var(--font-head); font-size: 44px; font-weight: 800; color: #fff; letter-spacing: -0.03em; line-height: 1.1; }
.stat p { color: var(--muted-on-dark); }

/* ---------- Steps ---------- */
.step { display: flex; flex-direction: column; gap: 12px; }
.step__num { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-head); }
.step h3 { font-size: 19px; }

/* ---------- FAQ (accordion) ---------- */
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; background: none; border: 0; cursor: pointer; text-align: left;
  font-family: inherit; font-weight: 600; font-size: 17px; color: var(--ink);
}
.faq__q:hover { color: var(--orange); }
.faq__icon { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; transition: transform .2s, background-color .2s; }
.faq__icon svg { width: 16px; height: 16px; }
.faq__q[aria-expanded="true"] .faq__icon { transform: rotate(45deg); background: var(--orange-soft); color: var(--orange); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.faq__a > div { overflow: hidden; }
.faq__a p { color: var(--muted); padding-bottom: 22px; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--orange); border-radius: var(--radius-xl); padding: 56px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3vw, 34px); line-height: 1.2; margin-bottom: 10px; }
.cta-band p { color: #FFE6DA; font-size: 17px; }
.cta-band > div:first-child { max-width: 620px; }
.cta-band--navy { background: var(--navy); }
.cta-band--navy p { color: var(--muted-on-dark); }

/* ---------- Facts list (sidebar) ---------- */
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.related a { display: flex; justify-content: space-between; padding: 10px 0; text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 500; }
.related a:last-child { border-bottom: 0; }

/* ---------- Timeline ---------- */
.timeline { border-left: 2px solid var(--orange-line); margin-left: 8px; }
.timeline li { position: relative; padding: 0 0 28px 28px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--orange); border: 3px solid var(--navy); box-shadow: 0 0 0 1px var(--orange-line); }
.timeline strong { display: block; font-family: var(--font-head); font-size: 20px; color: #fff; margin-bottom: 4px; }
.timeline span { color: var(--muted-on-dark); }

/* ---------- People ---------- */
.person { padding: 0; overflow: hidden; }
.person .img-slot { height: 260px; border-radius: 0; }
.person__body { padding: 24px; }
.person__body h3 { font-size: 19px; margin-bottom: 4px; }

/* ---------- Downloads ---------- */
.download { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.download:hover { border-color: var(--orange); box-shadow: var(--shadow); color: var(--ink); }
.download strong { display: block; font-weight: 600; }
.download span { font-size: 14px; color: var(--muted); }
.download > div:nth-child(2) { flex: 1; }

/* ---------- Certificate card ---------- */
.cert { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.cert .img-slot { width: 160px; height: 160px; }
.cert__num { font-family: var(--font-head); font-weight: 800; font-size: 40px; letter-spacing: -0.02em; line-height: 1.1; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label, .field .label { font-size: 14px; font-weight: 600; }
.field .req { color: var(--orange); }
.field .hint { font-size: 13px; color: var(--muted); }
.input {
  font: inherit; font-size: 15px; color: var(--ink); background: #fff; width: 100%;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 13px 14px; min-height: 50px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 130px; resize: vertical; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234A5068' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(204, 59, 0, .15); }
.field.has-error .input { border-color: var(--danger); }
.field.has-error .input:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .15); }
.error-msg { display: none; font-size: 13px; color: var(--danger); font-weight: 500; }
.field.has-error .error-msg { display: block; }
.form-alert { display: none; padding: 14px 16px; border-radius: 10px; background: #FEF3F2; color: var(--danger); font-size: 14px; font-weight: 500; }
.form-alert.is-visible { display: block; }

.dropzone {
  position: relative; border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 24px;
  text-align: center; color: var(--muted); font-size: 14px; transition: border-color .15s, background-color .15s; cursor: pointer;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--orange); background: #FFFAF7; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone strong { color: var(--orange); }
.dropzone svg { width: 26px; height: 26px; margin: 0 auto 8px; color: var(--muted); }
.file-pill { display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); font-size: 14px; }
.file-pill.is-visible { display: flex; }
.file-pill button { border: 0; background: none; color: var(--danger); font-weight: 600; cursor: pointer; padding: 6px; }

.form-foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-top: 8px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; display: none; }
.btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.success { display: none; }
.success.is-visible { display: flex; }
.success__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; }
.success__icon svg { width: 32px; height: 32px; }

.contact-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-item:last-child { border-bottom: 0; }
.contact-item small { display: block; font-size: 13px; color: var(--muted); }
.contact-item a { color: var(--ink); text-decoration: none; font-weight: 600; }
.contact-item a:hover { color: var(--orange); }
.contact-item p { font-weight: 600; font-size: 15px; line-height: 1.5; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: var(--muted-on-dark); padding: 72px 0 32px; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer__brand img { height: 40px; width: auto; margin-bottom: 20px; }
.footer__brand p { max-width: 300px; }
.footer__brand p + p { margin-top: 16px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer a { color: var(--muted-on-dark); text-decoration: none; display: inline-block; padding: 5px 0; }
.footer a:hover { color: #fff; }
.footer li { display: block; }
.footer__bottom { border-top: 1px solid #2A3047; margin-top: 56px; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ---------- Floating actions ---------- */
.fab-whatsapp {
  position: fixed; right: 24px; bottom: 24px; z-index: 120; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(204, 59, 0, .32); transition: transform .15s, background-color .15s;
}
.fab-whatsapp:hover { transform: scale(1.06); background: var(--orange-700); color: #fff; }
.fab-whatsapp svg { width: 26px; height: 26px; }
.fab-whatsapp__close { display: none; }
.fab-whatsapp[aria-expanded="true"] { background: var(--navy); box-shadow: var(--shadow-lg); }
.fab-whatsapp[aria-expanded="true"] .fab-whatsapp__open { display: none; }
.fab-whatsapp[aria-expanded="true"] .fab-whatsapp__close { display: flex; }
.fab-whatsapp[aria-expanded="true"] svg { width: 24px; height: 24px; }

/* ---------- Chat widget ---------- */
.chat__panel {
  position: fixed; right: 24px; bottom: 96px; z-index: 120; width: min(380px, calc(100vw - 32px));
  max-height: min(600px, calc(100vh - 128px)); display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 24px 60px rgba(20, 24, 40, .22);
  overflow: hidden; transform-origin: bottom right; animation: chatIn .2s ease-out;
}
.chat__panel[hidden] { display: none; }
@keyframes chatIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--navy); color: #fff; }
.chat__avatar img { width: 40px; height: 40px; border-radius: 10px; }
.chat__who { flex: 1; min-width: 0; }
.chat__who strong { display: block; font-size: 15px; }
.chat__who small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-on-dark); }
.chat__dot { width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; }
.chat__close { width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.chat__close:hover { background: rgba(255,255,255,.16); }
.chat__close svg { width: 18px; height: 18px; }
.chat__body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-soft); min-height: 220px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; }
.msg p { line-height: 1.5; }
.msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg--user { align-self: flex-end; background: var(--orange); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .btn { margin-top: 10px; min-height: 44px; width: 100%; white-space: nowrap; }
.btn--wa { background: #1F9D55; color: #fff; }
.btn--wa:hover { background: #17824A; color: #fff; }
.typing { display: inline-flex; gap: 4px; padding: 14px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: #9AA0B4; animation: blink 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.chat__chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.chat__chip { border: 1px solid var(--orange-line); background: #fff; color: var(--orange); border-radius: 999px; padding: 8px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chat__chip:hover { background: var(--orange-soft); }
.chat__form { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.chat__form textarea { flex: 1; resize: none; font: inherit; font-size: 15px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 12px; max-height: 120px; min-height: 44px; line-height: 1.4; }
.chat__form textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(204, 59, 0, .15); }
.chat__send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--orange); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.chat__send:hover { background: var(--orange-700); }
.chat__send:disabled { opacity: .5; cursor: default; }
.chat__send svg { width: 20px; height: 20px; }
.chat__note { font-size: 12px; color: var(--muted); text-align: center; padding: 0 12px 12px; background: #fff; }
.chat__note a { font-weight: 600; }
body.chat-open .to-top { opacity: 0; visibility: hidden; }
.to-top {
  position: fixed; right: 30px; bottom: 96px; z-index: 90; width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: var(--ink); border: 1px solid var(--line-strong); cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav, .header__cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__media .img-slot { height: 380px; }
  .float-card--tl { left: 12px; top: 12px; }
  .sidebar--sticky { position: static; }
}
@media (max-width: 600px) {
  :root { --gutter: 20px; --header-h: 68px; }
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 80px; }
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .check-list { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .cta-band, .card--lg { padding: 28px; }
  .header__logo img { height: 38px; }
  .utility__badge span.long { display: none; }
  .hero__media .img-slot { height: 260px; }
  .hero__media { display: flex; flex-direction: column; gap: 12px; }
  .float-card { position: static; box-shadow: var(--shadow); }
  .utility__links a[href^="mailto"] { display: none; }
  .fab-whatsapp { right: 16px; bottom: 16px; }
  .chat__panel { right: 16px; bottom: 86px; max-height: calc(100vh - 110px); }
  .to-top { right: 22px; bottom: 86px; }
}

/* ---------- Map (contact) ---------- */
.map { position: relative; height: 300px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
