/* ==========================================================================
   CCD Health Systems – site styles
   ========================================================================== */

:root {
    --ink: #0b1324;
    --ink-2: #334155;
    --muted: #5b6b82;
    --line: #e3e9f2;
    --bg: #ffffff;
    --bg-tint: #f4f7fc;
    --night: #060a18;
    --night-2: #0c1430;
    --night-line: rgba(148, 176, 255, .14);
    --night-text: #b8c4dc;

    --brand: #1d64c2;
    --brand-strong: #154f9e;
    --brand-bright: #3d8bff;
    --indigo: #4f46e5;
    --cyan: #22d3ee;
    --grad: linear-gradient(120deg, #3d8bff 0%, #6366f1 55%, #22d3ee 100%);

    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(11, 19, 36, .06), 0 2px 8px rgba(11, 19, 36, .05);
    --shadow: 0 10px 30px -12px rgba(11, 19, 36, .18), 0 4px 12px -6px rgba(11, 19, 36, .08);
    --shadow-lg: 0 30px 60px -20px rgba(11, 19, 36, .35);

    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    --container: 1200px;
    --gutter: clamp(16px, 4vw, 32px);
    --header-h: 76px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::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: 17px;
    line-height: 1.65;
    color: var(--ink-2);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand-bright); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 860px; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* Icons ------------------------------------------------------------------ */
.icon { width: 24px; height: 24px; flex: none; }
.icon--sm { width: 18px; height: 18px; }
.icon--xs { width: 14px; height: 14px; }
.icon--flip { transform: scaleX(-1); }
.icon--up { transform: rotate(-90deg); }

/* Buttons ---------------------------------------------------------------- */
.btn {
    --btn-bg: var(--brand);
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: .8em 1.35em;
    font: 600 15px/1.2 var(--font-body);
    color: #fff; background: var(--btn-bg);
    border: 1px solid transparent; border-radius: 999px;
    text-decoration: none; cursor: pointer; overflow: hidden; isolation: isolate;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn .icon { transition: transform .25s var(--ease); }
.btn:hover { color: #fff; transform: translateY(-2px); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(0); }
.btn--sm { padding: .6em 1.1em; font-size: 14px; }
.btn--lg { padding: .95em 1.6em; font-size: 16px; }

.btn--primary { background: var(--grad); background-size: 180% 100%; background-position: 0 0; box-shadow: 0 8px 24px -8px rgba(61, 139, 255, .6); }
.btn--primary:hover { background-position: 100% 0; box-shadow: 0 14px 30px -10px rgba(99, 102, 241, .7); }
.btn--primary::after { /* shine sweep */
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .35) 50%, transparent 80%);
    transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn--primary:hover::after { transform: translateX(120%); }

.btn--ghost { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .25); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .5); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { color: var(--brand-strong); box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .45); }
.btn--outline { background: transparent; color: var(--brand); border-color: currentColor; margin-top: .5em; }
.btn--outline:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link { display: inline-flex; align-items: center; gap: .35em; font-weight: 600; font-size: 15px; color: var(--brand); text-decoration: none; }
.text-link .icon { transition: transform .25s var(--ease); }
.text-link:hover .icon, .card-spot:hover .text-link .icon { transform: translateX(4px); }
.text-link--back:hover .icon { transform: scaleX(-1) translateX(4px); }

.stretched-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* Header ----------------------------------------------------------------- */
.site-header {
    position: fixed; inset: 0 0 auto; z-index: 50;
    height: var(--header-h);
    color: #fff;
    transition: background-color .35s, box-shadow .35s, height .35s var(--ease), backdrop-filter .35s;
}
.site-header.is-scrolled {
    --header-h: 64px;
    height: 64px;
    background: rgba(6, 10, 24, .82);
    backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: 0 1px 0 var(--night-line), 0 10px 30px -15px rgba(0, 0, 0, .6);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 32px; width: auto; }
.brand-text { font: 800 20px var(--font-head); color: #fff; }

.main-nav { flex: 1; display: flex; align-items: center; }
.nav-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link {
    display: block; padding: 8px 12px; border-radius: 999px;
    color: rgba(255, 255, 255, .85); font-weight: 500; font-size: 15px; text-decoration: none;
    transition: color .2s, background-color .2s;
}
.nav-link:hover, .nav-link.is-active, .nav-item:hover > .nav-link { color: #fff; background: rgba(255, 255, 255, .08); }
.dropdown-toggle { display: none; }
.nav-item.has-dropdown > .nav-link { padding-right: 28px; }
.nav-item.has-dropdown > .nav-link::after {
    content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
    border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); opacity: .7;
    transition: transform .25s var(--ease);
}
.nav-item.has-dropdown:hover > .nav-link::after, .nav-item.is-open > .nav-link::after { transform: translateY(3px) rotate(225deg); }

.dropdown {
    position: absolute; top: calc(100% + 10px); left: -12px; min-width: 250px;
    padding: 10px; border-radius: 16px;
    background: rgba(12, 20, 48, .96); backdrop-filter: blur(16px);
    border: 1px solid var(--night-line); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
    opacity: 0; visibility: hidden; transform: translateY(8px) scale(.98); transform-origin: top left;
    transition: opacity .2s, transform .25s var(--ease), visibility .2s;
}
.dropdown::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.dropdown--wide { min-width: 460px; }
.nav-item:hover > .dropdown, .nav-item:focus-within > .dropdown, .nav-item.is-open > .dropdown {
    opacity: 1; visibility: visible; transform: none;
}
.dropdown-list, .dropdown-sublist { list-style: none; margin: 0; padding: 0; }
.dropdown--wide .dropdown-list { display: grid; grid-template-columns: 1.3fr 1fr; gap: 4px 10px; }
.dropdown--wide .dropdown-group { grid-row: span 6; }
.dropdown-link {
    display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px;
    color: var(--night-text); font-size: 14.5px; text-decoration: none;
    transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.dropdown-link:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateX(3px); }
.dropdown-link--title { color: #fff; font-weight: 600; }
.dropdown-link--sub { padding-left: 24px; font-size: 14px; position: relative; }
.dropdown-link--sub::before { content: ""; position: absolute; left: 12px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--brand-bright); opacity: .7; transform: translateY(-50%); }

.header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .85); font-weight: 500; font-size: 14.5px; text-decoration: none; white-space: nowrap; }
.header-phone:hover { color: #fff; }
.nav-cta { display: none; }

.nav-toggle { display: none; width: 44px; height: 44px; padding: 12px 10px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 12px; background: transparent; cursor: pointer; flex-direction: column; justify-content: space-between; }
.nav-toggle-bar { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) { .header-phone span { display: none; } }

@media (max-width: 960px) {
    .nav-toggle { display: flex; }
    .header-cta, .header-phone { display: none; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 0; z-index: 49;
        flex-direction: column; align-items: stretch; gap: 20px;
        padding: 20px var(--gutter) 40px; overflow-y: auto;
        background: rgba(6, 10, 24, .98); backdrop-filter: blur(16px);
        opacity: 0; visibility: hidden; transform: translateY(-10px);
        transition: opacity .3s, transform .35s var(--ease), visibility .3s;
    }
    .nav-open .main-nav { opacity: 1; visibility: visible; transform: none; }
    .nav-open .site-header { background: var(--night); }
    .nav-list { flex-direction: column; gap: 2px; }
    .nav-item { flex-wrap: wrap; border-bottom: 1px solid var(--night-line); }
    .nav-link { flex: 1; padding: 14px 4px; font-size: 18px; border-radius: 0; background: none !important; }
    .nav-item.has-dropdown > .nav-link { padding-right: 4px; }
    .nav-item.has-dropdown > .nav-link::after { display: none; }
    .dropdown-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: #fff; cursor: pointer; }
    .dropdown-toggle .icon { transition: transform .3s var(--ease); }
    .nav-item.is-open .dropdown-toggle .icon { transform: rotate(180deg); }
    .dropdown, .dropdown--wide {
        position: static; flex-basis: 100%; min-width: 0; padding: 0 0 12px; border: 0; box-shadow: none; background: none;
        opacity: 1; visibility: visible; transform: none; display: none;
    }
    .nav-item:hover > .dropdown, .nav-item:focus-within > .dropdown { display: none; }
    .nav-item.is-open > .dropdown { display: block; }
    .dropdown--wide .dropdown-list { display: block; }
    .nav-cta { display: inline-flex; align-self: flex-start; }
}

/* Hero ------------------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden; isolation: isolate;
    padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) 0 clamp(56px, 8vw, 104px);
    background: radial-gradient(120% 90% at 50% 0%, var(--night-2) 0%, var(--night) 60%);
    color: var(--night-text);
}
.hero--home { padding-bottom: clamp(120px, 14vw, 200px); }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(var(--night-line) 1px, transparent 1px), linear-gradient(90deg, var(--night-line) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
    animation: grid-drift 30s linear infinite;
}
@keyframes grid-drift { to { background-position: 56px 56px; } }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.hero-orb--1 { width: 520px; height: 520px; top: -180px; right: -120px; background: #2f6bff; animation: orb 18s ease-in-out infinite alternate; }
.hero-orb--2 { width: 420px; height: 420px; bottom: -220px; left: -140px; background: #6d28d9; opacity: .4; animation: orb 22s ease-in-out infinite alternate-reverse; }
.hero-orb--3 { width: 260px; height: 260px; top: 40%; left: 45%; background: #06b6d4; opacity: .25; animation: orb 16s ease-in-out infinite alternate; }
@keyframes orb { 50% { translate: 40px 30px; scale: 1.08; } 100% { translate: -30px 10px; scale: .95; } }

.hero-inner { position: relative; display: grid; gap: 48px; align-items: center; }
.hero--split .hero-inner { grid-template-columns: 1.05fr 1fr; }
.hero-copy { max-width: 720px; }
.hero-title { font-size: clamp(36px, 5.2vw, 62px); font-weight: 800; color: #fff; margin-bottom: .35em; }
.hero--home .hero-title {
    font-size: clamp(40px, 6vw, 72px);
    background: linear-gradient(180deg, #fff 30%, #b9ccff);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-title--article { font-size: clamp(30px, 4.2vw, 48px); }
.hero-text { font-size: clamp(17px, 1.6vw, 20px); max-width: 620px; margin-bottom: 1.8em; }

.eyebrow {
    display: inline-block; margin-bottom: 14px;
    font: 700 13px/1.4 var(--font-body); letter-spacing: .12em; text-transform: uppercase;
    color: var(--brand);
}
.eyebrow--pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px;
    color: #cfe0ff; background: rgba(61, 139, 255, .1); border: 1px solid rgba(61, 139, 255, .3);
    letter-spacing: .06em; font-size: 12.5px;
}
.eyebrow--pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, .2); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(34, 211, 238, 0); } }

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; font-size: 14px; }
.breadcrumbs li { display: flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .55); }
.breadcrumbs li + li::before { content: "/"; opacity: .4; }
.breadcrumbs a { color: rgba(255, 255, 255, .75); text-decoration: none; }
.breadcrumbs a:hover { color: #fff; }

.hero-visual { position: relative; perspective: 1200px; }
.hero-image {
    border-radius: var(--radius); overflow: hidden; background: #fff;
    border: 1px solid rgba(255, 255, 255, .12); box-shadow: var(--shadow-lg), 0 0 0 8px rgba(255, 255, 255, .03);
}
.hero-image img { width: 100%; }

/* Home hero mock dashboard */
.mock { position: relative; max-width: 520px; margin-left: auto; transform-style: preserve-3d; transition: transform .4s var(--ease); }
.mock-card {
    border-radius: var(--radius); color: #dbe5ff;
    background: linear-gradient(160deg, rgba(30, 44, 90, .85), rgba(12, 20, 48, .9));
    border: 1px solid rgba(148, 176, 255, .22); box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
}
.mock-card--main { padding: 18px 20px 22px; animation: float 7s ease-in-out infinite; }
.mock-head { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.mock-dot:first-child { background: #ff6b81; } .mock-dot:nth-child(2) { background: #ffc857; } .mock-dot:nth-child(3) { background: #3ddc97; }
.mock-title { margin-left: 10px; font-size: 13px; font-weight: 600; opacity: .8; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.mock-kpis div { padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .06); }
.mock-kpis strong { display: block; font: 800 22px var(--font-head); color: #fff; }
.mock-kpis span { font-size: 11.5px; opacity: .7; }
.mock-chart { display: flex; align-items: flex-end; gap: 7px; height: 130px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.mock-chart span {
    flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #5b9dff, #4f46e5);
    transform-origin: bottom; animation: bar-grow 1.1s var(--ease) both; animation-delay: calc(.5s + var(--i) * 60ms);
}
.mock-chart span:nth-child(6) { background: linear-gradient(180deg, #67e8f9, #22d3ee); }
@keyframes bar-grow { from { transform: scaleY(0); } }
.mock-card--float { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-size: 13px; }
.mock-card--float strong { display: block; color: #fff; font-size: 14px; }
.mock-card--float span { opacity: .7; }
.mock-card--float .icon { color: var(--cyan); padding: 8px; width: 36px; height: 36px; border-radius: 10px; background: rgba(34, 211, 238, .12); }
.mock-card--a { top: -26px; left: -40px; animation: float 6s ease-in-out -2s infinite; }
.mock-card--b { bottom: -30px; right: -20px; animation: float 8s ease-in-out -4s infinite; }
.mock-card--b .icon { color: #3ddc97; background: rgba(61, 220, 151, .12); }
@keyframes float { 50% { translate: 0 -10px; } }

@media (max-width: 960px) {
    .hero--split .hero-inner { grid-template-columns: 1fr; }
    .mock { margin: 20px auto 0; }
    .mock-card--a { left: -8px; }
    .mock-card--b { right: -8px; }
}
@media (max-width: 520px) {
    .mock-card--float { display: none; }
    .mock-kpis strong { font-size: 18px; }
}

/* Sections --------------------------------------------------------------- */
.section { position: relative; padding: clamp(64px, 9vw, 112px) 0; }
.section--tinted { background: var(--bg-tint); }
.section--dark { background: var(--night); color: var(--night-text); }
.section--dark .section-title, .section--dark h3 { color: #fff; }
.section + .section--light:not(.section--contact), .section--light + .section--light { padding-top: 0; }
.hero + .section--light { padding-top: clamp(64px, 9vw, 112px); }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-title { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; }
.section-title--center { text-align: center; }
.section-intro { font-size: 18px; color: var(--muted); }
.section--dark .section-intro { color: var(--night-text); }

/* Prose */
.prose { font-size: 17.5px; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: 28px; margin-top: 1.6em; }
.prose h3 { font-size: 21px; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 0; margin: 0 0 1.2em; list-style: none; }
.prose li { position: relative; padding-left: 30px; margin-bottom: .55em; }
.prose ul > li::before {
    content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%;
    background: rgba(29, 100, 194, .1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d64c2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.prose ol { counter-reset: li; }
.prose ol > li::before {
    counter-increment: li; content: counter(li); position: absolute; left: 0; top: .15em;
    width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
    font: 700 12px var(--font-body); color: var(--brand); background: rgba(29, 100, 194, .1);
}
.prose blockquote { margin: 1.5em 0; padding: 1em 1.4em; border-left: 3px solid var(--brand); background: var(--bg-tint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--bg-tint); color: var(--ink); }
.prose img { border-radius: var(--radius-sm); margin: 1.5em 0; }
.section--dark .prose ul > li::before { background-color: rgba(255, 255, 255, .1); }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--image-left .split-copy { order: 2; }
.split--text-only { grid-template-columns: minmax(0, 760px); }
.split-media { perspective: 1200px; }
.media-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.media-frame img { width: 100%; }
.browser-frame {
    border-radius: 14px; overflow: hidden; background: #fff;
    border: 1px solid var(--line); box-shadow: var(--shadow-lg);
    transition: transform .5s var(--ease);
}
.browser-bar { display: flex; gap: 6px; padding: 12px 14px; background: #eef2f8; border-bottom: 1px solid var(--line); }
.browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.browser-bar span:first-child { background: #ff6b81; } .browser-bar span:nth-child(2) { background: #ffc857; } .browser-bar span:nth-child(3) { background: #3ddc97; }
.browser-frame img { width: 100%; }
@media (max-width: 860px) {
    .split { grid-template-columns: 1fr; }
    .split--image-left .split-copy { order: 0; }
}

/* Spotlight cards (feature, card, testimonial, article) */
.card-spot { position: relative; isolation: isolate; }
.card-spot::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(61, 139, 255, .12), transparent 45%);
    transition: opacity .3s;
}
.card-spot:hover::before { opacity: 1; }

/* Feature grid */
.feature-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.feature-grid--4 { grid-template-columns: repeat(4, 1fr); }
.feature-grid--2 { grid-template-columns: repeat(2, 1fr); }
.feature {
    padding: 28px 26px; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.section--tinted .feature { background: #fff; }
.section--dark .feature { background: rgba(255, 255, 255, .03); border-color: var(--night-line); box-shadow: none; }
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(61, 139, 255, .35); }
.feature-icon {
    display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px; border-radius: 14px;
    color: #fff; background: var(--grad); box-shadow: 0 10px 20px -8px rgba(79, 70, 229, .55);
    transition: transform .45s var(--ease);
}
.feature:hover .feature-icon { transform: rotate(-8deg) scale(1.08); }
.feature-title { font-size: 19px; margin-bottom: .4em; }
.feature p { font-size: 15.5px; color: var(--muted); margin-bottom: .8em; }
.section--dark .feature p { color: var(--night-text); }
.feature p:last-child { margin-bottom: 0; }

/* Card grid */
.card-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
    display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-tint); }
.card-grid--2 .card-media { aspect-ratio: 16 / 9; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.card-body p { font-size: 15.5px; color: var(--muted); }
.card-body .text-link { margin-top: auto; }
.card-title { font-size: 20px; }
.card--plain { border-top: 3px solid transparent; border-image: var(--grad) 1; border-image-slice: 1 0 0; }

/* Stats */
.section--stats { padding: clamp(48px, 7vw, 80px) 0; }
.hero + .section--stats { background: var(--bg); }
.hero + .section--stats .stats { margin-top: calc(-1 * clamp(72px, 9vw, 120px)); z-index: 2; }
.stats {
    position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0;
    border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.stats--3 { grid-template-columns: repeat(3, 1fr); }
.stats--2 { grid-template-columns: repeat(2, 1fr); }
.stat { display: flex; flex-direction: column-reverse; padding: 28px 24px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-value {
    margin: 0 0 4px; font: 800 clamp(32px, 4vw, 46px)/1.1 var(--font-head); letter-spacing: -.03em;
    background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
    font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 15px; color: var(--muted); }
.section--dark .stats { background: rgba(255, 255, 255, .03); border-color: var(--night-line); box-shadow: none; }
.section--dark .stat + .stat { border-color: var(--night-line); }
.section--dark .stat-label { color: var(--night-text); }
@media (max-width: 860px) {
    .stats, .stats--3 { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(odd) { border-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
    .stats--3 .stat:last-child { grid-column: span 2; }
}

/* CTA */
.section--cta { padding: clamp(40px, 6vw, 72px) 0; }
.section--tinted + .section--cta { background: linear-gradient(var(--bg-tint) 50%, var(--bg) 50%); }
.cta {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
    padding: clamp(36px, 5vw, 64px); border-radius: 28px;
    background: linear-gradient(125deg, #0e1b44 0%, #1d3fa8 55%, #4338ca 100%);
    color: #d6e2ff; box-shadow: var(--shadow-lg);
}
.cta::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 40px 40px; mask-image: linear-gradient(90deg, transparent, #000 70%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
}
.cta-glow { position: absolute; z-index: -1; right: -10%; top: -60%; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(34, 211, 238, .45), transparent 65%); filter: blur(20px); }
.cta-copy { max-width: 620px; }
.cta-title { color: #fff; font-size: clamp(26px, 3vw, 38px); margin-bottom: .3em; }
.cta p { margin: 0; font-size: 18px; }

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq {
    border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line);
    transition: box-shadow .3s, border-color .3s;
}
.faq[open] { box-shadow: var(--shadow); border-color: rgba(61, 139, 255, .35); }
.faq-question {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 20px 24px; cursor: pointer; list-style: none;
    font: 600 17px/1.4 var(--font-head); color: var(--ink);
}
.faq-question::-webkit-details-marker { display: none; }
.faq-icon { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--bg-tint); transition: background-color .3s, transform .4s var(--ease); }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--brand); border-radius: 2px; transition: transform .4s var(--ease); }
.faq-icon::after { transform: rotate(90deg); }
.faq[open] .faq-icon { background: var(--brand); transform: rotate(180deg); }
.faq[open] .faq-icon::before, .faq[open] .faq-icon::after { background: #fff; }
.faq[open] .faq-icon::after { transform: rotate(0); }
.faq-answer { padding: 0 24px 22px; font-size: 16px; }
.faq[open] .faq-answer { animation: faq-in .45s var(--ease); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }

/* Testimonials */
.testimonials { columns: 3 300px; column-gap: 24px; }
.testimonial {
    break-inside: avoid; margin: 0 0 24px; padding: 30px 28px; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.testimonial:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.testimonial-mark { width: 34px; height: 34px; color: var(--brand-bright); opacity: .35; margin-bottom: 12px; }
.testimonial blockquote { margin: 0; font-size: 16.5px; color: var(--ink-2); }
.testimonial figcaption { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.testimonial figcaption strong { display: block; color: var(--ink); }
.testimonial figcaption small { color: var(--muted); font-size: 14px; }
.testimonial-logo { width: 64px; height: 40px; object-fit: contain; }

/* Articles */
.article-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.article-card {
    display: flex; flex-direction: column; padding: 28px; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.article-card p { color: var(--muted); font-size: 15.5px; }
.article-card .text-link { margin-top: auto; }
.article-card-title { font-size: 20px; }
.article-card-title a { color: var(--ink); text-decoration: none; }
.article-meta { font-size: 13.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.article-meta--hero { color: rgba(255, 255, 255, .7); }
.article-back { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }

/* Contact */
.contact { display: grid; grid-template-columns: 380px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact--single { grid-template-columns: minmax(0, 760px); justify-content: center; }
.contact-details {
    position: sticky; top: calc(var(--header-h) + 24px);
    padding: 34px 30px; border-radius: var(--radius); color: var(--night-text);
    background: linear-gradient(160deg, var(--night-2), var(--night)); box-shadow: var(--shadow-lg);
    overflow: hidden; isolation: isolate;
}
.contact-details::after { content: ""; position: absolute; z-index: -1; right: -120px; bottom: -120px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(61, 139, 255, .45), transparent 70%); }
.contact-details-title { color: #fff; font-size: 26px; }
.contact-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list small { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.contact-list a, .contact-list address { color: #fff; font-style: normal; font-weight: 500; text-decoration: none; }
.contact-list a:hover { color: var(--cyan); }
.contact-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: rgba(255, 255, 255, .08); color: var(--cyan); }
.contact-icon .icon { width: 20px; height: 20px; }
.contact-form-wrap .section-head { margin-bottom: 28px; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } .contact-details { position: static; } }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field--full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14.5px; color: var(--ink); }
.field label span { color: var(--brand); }
.field input, .field select, .field textarea {
    width: 100%; padding: 13px 15px; border-radius: 12px;
    font: 16px/1.4 var(--font-body); color: var(--ink);
    background: var(--bg-tint); border: 1px solid var(--line);
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #c7d3e5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--brand-bright); box-shadow: 0 0 0 4px rgba(61, 139, 255, .15); }
.field.has-error input, .field.has-error textarea { border-color: #e5484d; background: #fff7f7; }
.field-error { margin: 6px 0 0; font-size: 14px; color: #c62a2f; }
.form-alert { padding: 12px 16px; border-radius: 12px; background: #fff4e5; color: #8a4b00; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 24px; }
.form-note { margin: 0; font-size: 14px; color: var(--muted); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success { display: flex; gap: 18px; align-items: flex-start; padding: 28px; border-radius: var(--radius); background: #effaf4; border: 1px solid #bfe8d0; animation: faq-in .6s var(--ease); }
.form-success h3 { font-size: 20px; margin-bottom: .3em; }
.form-success p { margin: 0; }
.form-success-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; background: #1f9d5a; color: #fff; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* Footer ----------------------------------------------------------------- */
.site-footer { position: relative; overflow: hidden; isolation: isolate; background: var(--night); color: var(--night-text); padding: 80px 0 28px; font-size: 15px; }
.footer-glow { position: absolute; z-index: -1; left: 50%; top: -300px; width: 900px; height: 500px; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(61, 139, 255, .22), transparent 70%); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; }
.footer-brand img { height: 32px; width: auto; margin-bottom: 18px; }
.footer-brand p { max-width: 360px; }
.footer-contact { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.footer-contact li { display: flex; align-items: center; gap: 10px; }
.footer-contact .icon { color: var(--brand-bright); }
.site-footer a { color: var(--night-text); text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-heading { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.footer-heading a { color: #fff; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--night-line); font-size: 14px; }
.footer-bottom p { margin: 0; }
.back-to-top { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Responsive grids -------------------------------------------------------- */
@media (max-width: 1024px) {
    .feature-grid--4, .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .feature-grid, .card-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .feature-grid, .feature-grid--4, .feature-grid--2, .card-grid--2, .card-grid--3, .card-grid--4 { grid-template-columns: 1fr; }
    body { font-size: 16px; }
}

/* Motion ------------------------------------------------------------------ */
.js [data-reveal] {
    opacity: 0; transform: translateY(28px);
    transition: opacity .8s var(--ease), transform .9s var(--ease);
    transition-delay: calc(var(--d, 0) * 110ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-stagger] > [data-reveal] { transition-delay: calc(var(--i, 0) * 90ms); }
[data-parallax] { will-change: transform; }
[data-tilt] { transition: transform .5s var(--ease); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
    [data-parallax] { transform: none !important; }
}
