/* ==========================================================================
   ClinTech Solutions — global stylesheet
   ========================================================================== */

:root {
  --brand: #003152;
  --brand-600: #0b4f80;
  --brand-2: #1a6aa8;
  --brand-50: #e7eef5;
  --on-brand: #ffffff;
  --accent: #f8b810;
  --accent-50: #fff6dc;

  --bg: #ffffff;
  --bg-soft: #f4f7fa;
  --surface: #ffffff;
  --surface-2: #edf2f7;
  --text: #0e1a2b;
  --text-2: #4a5a70;
  --text-3: #7b8aa0;
  --border: #e3e9f2;

  --shadow-sm: 0 1px 2px rgba(14, 26, 43, .06), 0 1px 3px rgba(14, 26, 43, .05);
  --shadow: 0 10px 30px -12px rgba(14, 26, 43, .18);
  --shadow-lg: 0 30px 60px -20px rgba(10, 60, 120, .28);

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1200px;
  --header-h: 76px;

  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #8cc0ea;
    --brand-600: #b3d6f2;
    --brand-2: #3d8bc8;
    --brand-50: #0d2a44;
    --on-brand: #021626;
    --accent: #ffc533;
    --accent-50: #2e2408;
    --bg: #04111d;
    --bg-soft: #071827;
    --surface: #0b1f31;
    --surface-2: #10283d;
    --text: #e8eef7;
    --text-2: #a9b6c8;
    --text-3: #7a889c;
    --border: #1c3a55;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #8cc0ea;
  --brand-600: #b3d6f2;
  --brand-2: #3d8bc8;
  --brand-50: #0d2a44;
  --on-brand: #021626;
  --accent: #ffc533;
  --accent-50: #2e2408;
  --bg: #04111d;
  --bg-soft: #071827;
  --surface: #0b1f31;
  --surface-2: #10283d;
  --text: #e8eef7;
  --text-2: #a9b6c8;
  --text-3: #7a889c;
  --border: #1c3a55;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1rem; color: var(--text-2); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brand); color: var(--on-brand); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip-link:focus { left: 8px; color: var(--on-brand); }

.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section--soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section-head p { font-size: 1.075rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-50);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.text-gradient {
  background: linear-gradient(100deg, var(--brand) 5%, var(--brand-2) 55%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  --_bg: var(--brand); --_fg: var(--on-brand);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 1.5px solid transparent;
  background: var(--_bg); color: var(--_fg);
  font: 700 .975rem/1 var(--font-sans); cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--brand) 70%, transparent);
}
.btn:hover { color: var(--_fg); transform: translateY(-2px); box-shadow: 0 14px 28px -10px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn svg { width: 18px; height: 18px; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn--ghost { --_bg: transparent; --_fg: var(--text); border-color: var(--border); box-shadow: none; }
.btn--ghost:hover { border-color: var(--brand); box-shadow: none; }
.btn--light { --_bg: #fff; --_fg: #003152; box-shadow: none; }
.btn--outline-light { --_bg: transparent; --_fg: #fff; border-color: rgba(255,255,255,.45); box-shadow: none; }
.btn--outline-light:hover { border-color: #fff; box-shadow: none; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-color: var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-weight: 800; }
.brand:hover { color: var(--text); }
.brand__mark { width: 46px; height: 46px; border-radius: 12px; background: #fff; padding: 3px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; font-size: 1.15rem; letter-spacing: -.01em; }
.brand__text small { font-size: .68rem; font-weight: 600; letter-spacing: .22em; color: var(--text-3); text-transform: uppercase; margin-top: 3px; }

.nav__links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: block; padding: 10px 16px; border-radius: 999px;
  color: var(--text-2); font-weight: 600; font-size: .95rem; transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__links a[aria-current="page"] { color: var(--brand); background: var(--brand-50); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__actions .btn { padding: 11px 20px; font-size: .9rem; }

.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; transition: border-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--brand); transform: rotate(-12deg); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

.menu-toggle { display: none; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .3s, background .3s;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu-open .menu-toggle span { background: transparent; }
.menu-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; }
  .nav__actions .btn { display: none; }
  .nav__links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px; background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .3s ease, opacity .3s ease, visibility .3s;
  }
  .nav__links a { padding: 14px 16px; border-radius: 12px; font-size: 1.05rem; }
  .nav__links .nav__cta { display: block; margin-top: 8px; }
  .nav__links .nav__cta a { background: var(--brand); color: var(--on-brand); text-align: center; }
  .menu-open .nav__links { transform: none; opacity: 1; visibility: visible; }
  .menu-open .site-header { background: var(--bg); border-color: var(--border); }
}
@media (min-width: 901px) { .nav__cta { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--header-h) + clamp(40px, 7vw, 90px)) 0 clamp(64px, 8vw, 110px); position: relative; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__bg::before, .hero__bg::after { content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.hero__bg::before { width: 560px; height: 560px; background: color-mix(in srgb, var(--brand-2) 40%, transparent); top: -180px; right: -120px; animation: float 14s ease-in-out infinite; }
.hero__bg::after { width: 420px; height: 420px; background: color-mix(in srgb, var(--accent) 40%, transparent); bottom: -160px; left: -120px; animation: float 18s ease-in-out infinite reverse; }
.grid-pattern {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: .6;
}
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-40px, 40px); } }

.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.hero__lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 560px; margin-bottom: 32px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero__checks { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; }
.hero__checks li { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-2); font-size: .95rem; }
.hero__checks svg { width: 20px; height: 20px; color: #19a974; flex: none; }

.hero__visual { position: relative; }
.hero__img-main { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 4.4; background: var(--surface-2); }
.hero__img-main img { width: 100%; height: 100%; object-fit: cover; }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px 18px; box-shadow: var(--shadow); font-weight: 700; font-size: .92rem;
  animation: bob 6s ease-in-out infinite;
}
.float-card small { display: block; font-weight: 500; color: var(--text-3); font-size: .78rem; }
.float-card .dot { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.float-card .dot svg { width: 22px; height: 22px; }
.float-card--a { left: -36px; bottom: 56px; }
.float-card--b { right: -24px; top: 40px; animation-delay: -3s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 520px; margin: 0 auto; width: 100%; }
  .float-card--a { left: 8px; bottom: 24px; }
  .float-card--b { right: 8px; top: 24px; }
}

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--border); background: var(--surface); overflow: hidden; padding: 22px 0; }
.marquee__track { display: flex; gap: 56px; width: max-content; animation: scroll 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; font-size: 1.05rem; }
.marquee__item svg { width: 22px; height: 22px; color: var(--brand); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Cards / Services ---------- */
.grid { display: grid; gap: 24px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1080px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px; overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.card p:last-child { margin-bottom: 0; }

.service-card { display: flex; flex-direction: column; padding: 0; }
.service-card__img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.service-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.service-card:hover .service-card__img img { transform: scale(1.06); }
.service-card__body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.service-card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand); margin: -52px 0 18px; position: relative;
  border: 4px solid var(--surface); box-sizing: content-box;
}
.service-card__icon svg { width: 24px; height: 24px; }
.service-card .link { margin-top: auto; padding-top: 12px; }

.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .95rem; }
.link svg { width: 16px; height: 16px; transition: transform .2s; }
.link:hover svg { transform: translateX(4px); }

.icon-badge { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px; background: var(--brand-50); color: var(--brand); }
.icon-badge svg { width: 26px; height: 26px; }
.icon-badge--accent { background: var(--accent-50); color: var(--accent); }

/* ---------- Split / About ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.split--reverse > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split--reverse > :first-child { order: 0; } }

.img-stack { position: relative; padding: 0 0 48px 48px; }
.img-stack__main { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3.4; background: var(--surface-2); }
.img-stack__main img, .img-stack__sub img { width: 100%; height: 100%; object-fit: cover; }
.img-stack__sub { position: absolute; left: 0; bottom: 0; width: 44%; aspect-ratio: 1; border-radius: 20px; overflow: hidden; border: 6px solid var(--bg); box-shadow: var(--shadow); background: var(--surface-2); }
.img-stack__badge {
  position: absolute; right: -12px; bottom: 24px; background: linear-gradient(135deg, #003152, #1a6aa8);
  color: #fff; padding: 18px 22px; border-radius: 18px; box-shadow: var(--shadow); max-width: 220px; font-weight: 700; line-height: 1.3;
}
.img-stack__badge small { display: block; font-weight: 500; opacity: .85; margin-top: 4px; font-size: .8rem; }
@media (max-width: 600px) { .img-stack { padding: 0 0 32px 24px; } .img-stack__badge { right: 0; padding: 14px 16px; font-size: .9rem; } }

.check-list { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 14px; align-items: flex-start; }
.check-list .tick { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-top: 1px; }
.check-list .tick svg { width: 15px; height: 15px; }
.check-list strong { display: block; color: var(--text); }
.check-list span { color: var(--text-2); font-size: .95rem; }

/* ---------- Process ---------- */
.process { counter-reset: step; }
.process .card { padding-top: 34px; }
.process .card::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; top: 18px; right: 22px; font-size: 3.2rem; font-weight: 800; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--border);
}

/* ---------- Tabs (services page) ---------- */
.tabs__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 40px; padding: 6px; background: var(--surface-2); border-radius: 999px; width: fit-content; margin-inline: auto; max-width: 100%; }
.tabs__btn {
  border: 0; background: transparent; color: var(--text-2); font: 700 .95rem var(--font-sans);
  padding: 12px 20px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s;
}
.tabs__btn[aria-selected="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.tabs__panel[hidden] { display: none; }
.tabs__panel { animation: fadeUp .5s ease; }
@media (max-width: 640px) { .tabs__list { border-radius: 18px; } .tabs__btn { flex: 1 1 45%; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 24px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; transition: transform .3s; }
.faq summary .plus svg { width: 16px; height: 16px; }
.faq details[open] .plus { transform: rotate(45deg); }
.faq details > div { padding: 0 24px 22px; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: 28px; padding: clamp(40px, 6vw, 72px);
  background: radial-gradient(circle at 85% 20%, rgba(248,184,16,.32), transparent 40%), linear-gradient(135deg, #001d33 0%, #003152 55%, #0b5a92 100%);
  color: #fff; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); font-size: 1.075rem; margin: 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.cta-band::after { content: ""; position: absolute; width: 340px; height: 340px; border: 60px solid rgba(255,255,255,.07); border-radius: 50%; right: -120px; bottom: -160px; }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; } .cta-band__actions { justify-content: flex-start; } }

/* ---------- Page hero ---------- */
.page-hero { padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) 0 clamp(48px, 6vw, 80px); position: relative; overflow: hidden; text-align: center; }
.page-hero p { max-width: 640px; margin: 0 auto; font-size: 1.1rem; }
.breadcrumb { display: flex; justify-content: center; gap: 8px; font-size: .9rem; color: var(--text-3); margin-bottom: 18px; list-style: none; padding: 0; }
.breadcrumb a { color: var(--text-2); font-weight: 600; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--border); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.info-card { display: flex; gap: 18px; align-items: flex-start; padding: 24px; }
.info-card .icon-badge { margin: 0; flex: none; }
.info-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.info-card p { margin: 0; overflow-wrap: anywhere; }
.info-stack { display: grid; gap: 16px; }

.form-card { padding: clamp(26px, 4vw, 44px); }
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 8px; color: var(--text); }
.field label .req { color: #e5484d; }
.field input, .field textarea, .field select {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text); font: 500 1rem var(--font-sans);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #e5484d; }
.field .error { display: none; color: #e5484d; font-size: .85rem; margin-top: 6px; font-weight: 600; }
.field.has-error .error { display: block; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--text-2); }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.consent.has-error { color: #e5484d; }
.form-status { display: none; padding: 14px 18px; border-radius: 12px; font-weight: 600; }
.form-status.is-success { display: block; background: color-mix(in srgb, #19a974 14%, transparent); color: #128a5e; }
:root[data-theme="dark"] .form-status.is-success { color: #4fd6a1; }

.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16 / 7; background: var(--surface-2); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px) { .map { aspect-ratio: 4 / 3; } }

/* ---------- Legal ---------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { font-size: 1.4rem; margin-top: 2.2em; }
.prose .placeholder { background: var(--accent-50); border: 1px dashed var(--accent); color: var(--text); padding: 2px 8px; border-radius: 6px; font-weight: 600; font-size: .95em; }
.legal-table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.legal-table th, .legal-table td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal-table th { width: 38%; color: var(--text); font-weight: 700; }
.legal-table td { color: var(--text-2); }
@media (max-width: 600px) { .legal-table th, .legal-table td { display: block; width: 100%; padding: 8px 0; } .legal-table th { border: 0; padding-top: 18px; } }

/* ---------- Footer ---------- */
.site-footer { background: #001a2c; color: #a9b6c8; padding: clamp(56px, 7vw, 88px) 0 28px; margin-top: clamp(64px, 9vw, 120px); }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 18px; letter-spacing: 0; }
.site-footer a { color: #a9b6c8; }
.site-footer a:hover { color: #fff; }
.site-footer p { color: #a9b6c8; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-brand .brand__text small { color: #7a889c; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--accent); }
.footer-bottom { border-top: 1px solid #0f3350; margin-top: 48px; padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .9rem; }
.footer-bottom ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }

/* ---------- Floating utilities ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 20px; height: 20px; }
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 110; background: linear-gradient(90deg, var(--brand), var(--accent)); }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

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

/* ==========================================================================
   CMS additions
   ========================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.eyebrow--light { background: rgba(255,255,255,.15); color: #fff; }
.section-more { text-align: center; margin: 40px 0 0; }
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Rich text from the editor */
.rte > :last-child { margin-bottom: 0; }
.rte h2 { font-size: 1.5rem; margin-top: 1.8em; }
.rte h3 { margin-top: 1.6em; }
.rte > h2:first-child, .rte > h3:first-child { margin-top: 0; }
.rte ul, .rte ol { color: var(--text-2); padding-left: 1.3em; margin: 0 0 1rem; }
.rte li { margin-bottom: .35em; }
.rte a { text-decoration: underline; text-underline-offset: 3px; }
.rte img { border-radius: var(--radius-sm); height: auto; margin: 1.5em 0; }
.rte blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); color: var(--text); font-weight: 600; }
.rte table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.rte th, .rte td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.legal-table td p { margin: 0; }

/* Form states */
.form-status.is-error { display: block; background: color-mix(in srgb, #e5484d 12%, transparent); color: #c4383d; }
:root[data-theme="dark"] .form-status.is-error { color: #ff8a8d; }
.form-card > .form-status { margin-bottom: 18px; }
.info-card__address { font-style: normal; color: var(--text-2); }

/* Blog */
.post-card .service-card__img { display: block; }
.post-card__title { font-size: 1.2rem; }
.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--brand); }
.post-meta { font-size: .85rem; font-weight: 600; color: var(--text-3); margin-bottom: 10px; }
.post-hero .post-meta { margin-top: 8px; }
.post-figure { margin: 0 0 40px; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9; background: var(--surface-2); }
.post-figure img { width: 100%; height: 100%; object-fit: cover; }
.post-body { font-size: 1.075rem; }
.post-share { display: flex; align-items: center; gap: 10px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-weight: 700; color: var(--text-2); }
.post-share a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); }
.post-share a:hover { border-color: var(--brand); color: var(--brand); }
.post-share svg { width: 18px; height: 18px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 48px; flex-wrap: wrap; }
.pagination__info { font-weight: 600; color: var(--text-3); }
.empty-state { text-align: center; max-width: 560px; margin: 0 auto; }
.empty-state .icon-badge { margin: 0 auto 20px; }

/* Footer social */
.footer-social { display: flex; gap: 10px; list-style: none; padding: 0; margin: 20px 0 0; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #0f3350; display: grid; place-items: center; }
.footer-social a:hover { border-color: var(--accent); }
.footer-social svg { width: 17px; height: 17px; }

/* Draft preview notice (only visible to logged-in editors) */
.cms-preview-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 120; background: #f8b810; color: #0e1a2b; font-weight: 700; font-size: .9rem; padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); }
