/* =========================================================================
   Cerevia marketing site — design system
   Fonts: Space Grotesk (display) · IBM Plex Sans (body) · IBM Plex Mono (data)
   Brand: cobalt #2E52E0 → botanical green #12876A
   ========================================================================= */

:root {
    /* Accent — cobalt */
    --cobalt: #2E52E0;
    --cobalt-soft: #EDF1FE;
    --cobalt-ink: #20379E;
    --cobalt-bd: #CBD6FB;
    /* Accent — green */
    --green: #12876A;
    --green-soft: #E6F4EE;
    --green-ink: #0B6A52;
    --green-bd: #BFE3D5;
    /* Brand gradient */
    --brand-grad: linear-gradient(135deg, #2E52E0 0%, #12876A 100%);

    /* Neutrals */
    --page: #F3F3EE;
    --panel: #FFFFFF;
    --alt: #FBFBF8;
    --ink: #191C22;
    --muted: #6A7079;
    --faint: #8A9099;
    --faint-2: #9AA0A8;
    --placeholder: #B4B8BE;
    --hair: #E7E7E1;
    --hair-inner: #EFEFEA;
    --input-bd: #DEDED7;
    --dark: #14161B;
    --dark-2: #2A2E36;
    --dark-text: #E8E9EC;
    --dark-muted: #9AA0A8;

    --shadow-hover: 0 3px 16px rgba(20, 22, 27, .06);
    --shadow-card: 0 1px 3px rgba(20, 22, 27, .04);
    --shadow-lg: 0 18px 50px rgba(20, 22, 27, .10);

    --r-card: 14px;
    --r-tile: 9px;
    --r-btn: 9px;
    --container: 1160px;

    --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--page);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; color: var(--ink); letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 26px; }
.container-narrow { max-width: 760px; }

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

/* -------------------------------------------------------------------------
   Brand mark
   ------------------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--brand-grad);
    display: grid; place-items: center;
    color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 19px;
    box-shadow: 0 2px 8px rgba(46, 82, 224, .28);
}
.brand-word { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; color: var(--ink); }

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
    padding: 11px 20px; border-radius: var(--r-btn); border: 1px solid transparent;
    cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
    white-space: nowrap;
}
.btn i { font-size: 0.9em; }
.btn-sm { padding: 8px 15px; font-size: 13.5px; }
.btn-large { padding: 14px 26px; font-size: 15.5px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--cobalt); color: #fff; box-shadow: 0 2px 10px rgba(46, 82, 224, .22); }
.btn-primary:hover { background: #2846c4; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(46, 82, 224, .28); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--input-bd); }
.btn-ghost:hover { border-color: var(--cobalt); color: var(--cobalt-ink); background: var(--cobalt-soft); }

.btn-light { background: #fff; color: var(--cobalt-ink); }
.btn-light:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

/* -------------------------------------------------------------------------
   Navigation
   ------------------------------------------------------------------------- */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(251, 251, 248, .82);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--hair);
}
.nav.scrolled { box-shadow: 0 1px 0 var(--hair), 0 6px 20px rgba(20, 22, 27, .04); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.nav-menu { display: flex; align-items: center; gap: 6px; }
.nav-link {
    padding: 8px 13px; border-radius: 8px; font-size: 14.5px; font-weight: 500;
    color: var(--muted); transition: color .18s ease, background .18s ease;
}
.nav-link:hover { color: var(--ink); background: rgba(20, 22, 27, .04); }
.nav-cta { margin-left: 8px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; flex-direction: column; gap: 4px; padding: 12px 26px 20px; background: var(--alt); border-bottom: 1px solid var(--hair); }
.mobile-menu a { padding: 12px 10px; border-radius: 8px; font-weight: 500; color: var(--ink); }
.mobile-menu a:hover { background: rgba(20, 22, 27, .04); }
.mobile-menu .btn { margin-top: 8px; }
.mobile-menu.open { display: flex; }

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 84px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-glow {
    position: absolute; top: -220px; left: 50%; transform: translateX(-50%);
    width: 900px; height: 620px; border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgba(46, 82, 224, .16), transparent 60%),
                radial-gradient(circle at 65% 55%, rgba(18, 135, 106, .14), transparent 62%);
    filter: blur(20px);
}
.hero-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(20, 22, 27, .035) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(20, 22, 27, .035) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%);
    -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%);
}
.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 760px; margin: 0 auto; text-align: center; }

.eyebrow {
    display: inline-block; font-family: var(--font-mono); font-size: 12px; font-weight: 500;
    text-transform: uppercase; letter-spacing: .12em; color: var(--cobalt-ink);
    background: var(--cobalt-soft); border: 1px solid var(--cobalt-bd);
    padding: 6px 13px; border-radius: 999px; margin-bottom: 22px;
}
.hero-title { font-size: clamp(38px, 6vw, 66px); font-weight: 600; letter-spacing: -0.03em; margin-bottom: 22px; }
.gradient-text { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hero-subtitle { font-size: clamp(16px, 2.2vw, 19px); color: var(--muted); max-width: 620px; margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }

.hero-stats { display: flex; justify-content: center; gap: 46px; flex-wrap: wrap; }
.stat h3 { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--ink); }
.stat p { font-size: 13.5px; color: var(--faint); }

/* Secondary page hero (contact / products) */
.page-hero { position: relative; overflow: hidden; padding: 84px 0 40px; text-align: center; }
.page-hero .hero-glow { top: -320px; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero-content { max-width: 720px; margin: 0 auto; }
.page-hero .hero-title { font-size: clamp(34px, 5vw, 52px); }
.page-hero .hero-subtitle { margin-bottom: 0; }

/* -------------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------------- */
.section { padding: 84px 0; }
.section-alt { background: var(--alt); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-eyebrow {
    display: inline-block; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
    text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 14px;
}
.section-title { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
.section-subtitle { font-size: 16.5px; color: var(--muted); }

/* -------------------------------------------------------------------------
   Capability cards
   ------------------------------------------------------------------------- */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cap-card {
    background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-card);
    padding: 28px 26px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cap-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--cobalt-bd); }
.cap-icon {
    width: 46px; height: 46px; border-radius: var(--r-tile);
    background: var(--cobalt-soft); color: var(--cobalt);
    display: grid; place-items: center; font-size: 19px; margin-bottom: 18px;
}
.cap-card:nth-child(3n+2) .cap-icon { background: var(--green-soft); color: var(--green); }
.cap-card h3 { font-size: 17.5px; margin-bottom: 9px; }
.cap-card p { font-size: 14.5px; color: var(--muted); }

/* -------------------------------------------------------------------------
   Product cards
   ------------------------------------------------------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.product-grid-wide { max-width: 1000px; margin: 0 auto; }
.product-card {
    background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-card);
    padding: 30px 28px; display: flex; flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    --card-acc: var(--cobalt); --card-acc-soft: var(--cobalt-soft); --card-acc-bd: var(--cobalt-bd); --card-acc-ink: var(--cobalt-ink);
}
.product-card.accent-green { --card-acc: var(--green); --card-acc-soft: var(--green-soft); --card-acc-bd: var(--green-bd); --card-acc-ink: var(--green-ink); }
.product-card.accent-neutral { --card-acc: var(--faint); --card-acc-soft: #F1F1EC; --card-acc-bd: var(--hair); --card-acc-ink: var(--muted); }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--card-acc-bd); }
.product-card.accent-neutral { border-style: dashed; }
.product-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.product-icon {
    width: 48px; height: 48px; border-radius: var(--r-tile);
    background: var(--card-acc-soft); color: var(--card-acc);
    display: grid; place-items: center; font-size: 21px;
}
.product-industry {
    font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: var(--card-acc-ink); background: var(--card-acc-soft); border: 1px solid var(--card-acc-bd);
    padding: 5px 11px; border-radius: 999px;
}
.product-card h3 { font-size: 20px; margin-bottom: 10px; }
.product-card p { font-size: 14.5px; color: var(--muted); flex: 1; margin-bottom: 20px; }
.product-link {
    display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px;
    color: var(--card-acc-ink); align-self: flex-start;
}
.product-link i { font-size: 0.85em; transition: transform .18s ease; }
.product-link:hover i { transform: translate(2px, -2px); }
.product-link-muted { color: var(--muted); }
.product-link-muted:hover i { transform: translateX(3px); }

/* -------------------------------------------------------------------------
   Timeline (approach)
   ------------------------------------------------------------------------- */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 980px; margin: 0 auto; }
.timeline-item {
    background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-card);
    padding: 30px 26px; position: relative;
}
.timeline-number {
    width: 40px; height: 40px; border-radius: 11px; background: var(--brand-grad); color: #fff;
    display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 18px;
    margin-bottom: 18px;
}
.timeline-content h3 { font-size: 18px; margin-bottom: 9px; }
.timeline-content p { font-size: 14.5px; color: var(--muted); }

/* -------------------------------------------------------------------------
   About + orbit visual
   ------------------------------------------------------------------------- */
.about-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.about-text .section-eyebrow { margin-bottom: 12px; }
.about-text h2 { font-size: clamp(26px, 3.5vw, 36px); margin-bottom: 18px; }
.about-text .lead { font-size: 17px; color: var(--ink); margin-bottom: 16px; }
.about-text p { color: var(--muted); margin-bottom: 16px; }
.about-actions { margin-top: 26px; }

.about-visual { display: grid; place-items: center; }
.orbit { position: relative; width: 300px; height: 300px; }
.orbit-core {
    position: absolute; inset: 0; margin: auto; width: 96px; height: 96px; border-radius: 26px;
    background: var(--brand-grad); color: #fff; display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 700; font-size: 46px;
    box-shadow: 0 16px 40px rgba(46, 82, 224, .3);
}
.orbit::before, .orbit::after {
    content: ""; position: absolute; inset: 0; margin: auto; border-radius: 50%;
    border: 1px dashed var(--hair);
}
.orbit::before { width: 300px; height: 300px; }
.orbit::after { width: 200px; height: 200px; }
.orbit-chip {
    position: absolute; width: 54px; height: 54px; border-radius: 15px; background: var(--panel);
    border: 1px solid var(--hair); box-shadow: var(--shadow-card);
    display: grid; place-items: center; font-size: 20px; color: var(--cobalt);
}
.orbit-chip.chip-1 { top: -6px; left: 50%; transform: translateX(-50%); color: var(--cobalt); }
.orbit-chip.chip-2 { bottom: -6px; left: 50%; transform: translateX(-50%); color: var(--green); }
.orbit-chip.chip-3 { left: -6px; top: 50%; transform: translateY(-50%); color: var(--green); }
.orbit-chip.chip-4 { right: -6px; top: 50%; transform: translateY(-50%); color: var(--cobalt); }

/* -------------------------------------------------------------------------
   CTA band
   ------------------------------------------------------------------------- */
.cta-band { background: var(--dark); color: var(--dark-text); padding: 72px 0; position: relative; overflow: hidden; }
.cta-band::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(46, 82, 224, .28), transparent 45%),
                radial-gradient(circle at 85% 80%, rgba(18, 135, 106, .26), transparent 48%);
}
.cta-inner { position: relative; text-align: center; max-width: 640px; margin: 0 auto; }
.cta-inner h2 { color: #fff; font-size: clamp(26px, 3.5vw, 36px); margin-bottom: 14px; }
.cta-inner p { color: var(--dark-muted); font-size: 17px; margin-bottom: 28px; }

/* -------------------------------------------------------------------------
   Contact
   ------------------------------------------------------------------------- */
.contact-section { padding-top: 56px; }
.contact-wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: start; }
.contact-info h2 { font-size: 26px; margin-bottom: 14px; }
.contact-info .lead { font-size: 16.5px; color: var(--muted); margin-bottom: 32px; }
.contact-details { display: flex; flex-direction: column; gap: 20px; margin-bottom: 34px; }
.contact-item { display: flex; gap: 15px; align-items: flex-start; }
.contact-icon {
    width: 44px; height: 44px; border-radius: var(--r-tile); flex-shrink: 0;
    background: var(--cobalt-soft); color: var(--cobalt); display: grid; place-items: center; font-size: 17px;
}
.contact-item h4 { font-size: 14.5px; margin-bottom: 2px; }
.contact-item p { font-size: 14.5px; color: var(--muted); }
.contact-products { border-top: 1px solid var(--hair); padding-top: 26px; }
.contact-products h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 14px; font-family: var(--font-body); font-weight: 600; }
.contact-products ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.contact-products a { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); }
.contact-products a i { color: var(--cobalt); width: 18px; }
.contact-products a:hover { color: var(--cobalt-ink); }

.contact-card {
    background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-card);
    padding: 34px 32px; box-shadow: var(--shadow-card);
}
.contact-card h3 { font-size: 20px; margin-bottom: 6px; }
.contact-card .muted { color: var(--muted); font-size: 14.5px; margin-bottom: 24px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.form-control {
    width: 100%; padding: 12px 14px; border: 1px solid var(--input-bd); border-radius: 9px;
    font-family: var(--font-body); font-size: 15px; color: var(--ink); background: var(--alt);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.form-control::placeholder { color: var(--placeholder); }
.form-control:focus { outline: none; border-color: var(--cobalt); background: #fff; box-shadow: 0 0 0 3px var(--cobalt-soft); }
textarea.form-control { resize: vertical; min-height: 120px; }

.form-message { padding: 13px 16px; border-radius: 9px; font-size: 14px; margin-bottom: 20px; }
.form-message-success { background: var(--green-soft); border: 1px solid var(--green-bd); color: var(--green-ink); }
.form-message-error { background: #FBECE9; border: 1px solid #F2C9C2; color: #A5382B; }

.btn-loader { display: inline-flex; align-items: center; gap: 8px; }

/* -------------------------------------------------------------------------
   Legal pages
   ------------------------------------------------------------------------- */
.legal { padding: 66px 0 84px; }
.legal h1 { font-size: clamp(30px, 4vw, 42px); margin: 8px 0 10px; }
.legal-updated { font-family: var(--font-mono); font-size: 13px; color: var(--faint); margin-bottom: 28px; }
.legal-intro { font-size: 17px; color: var(--ink); margin-bottom: 8px; padding-bottom: 24px; border-bottom: 1px solid var(--hair); }
.legal h2 { font-size: 20px; margin: 34px 0 10px; }
.legal p { color: var(--muted); margin-bottom: 12px; }
.legal a { color: var(--cobalt-ink); font-weight: 500; }
.legal a:hover { text-decoration: underline; }
.legal-contact { margin-top: 40px; padding: 22px 24px; background: var(--alt); border: 1px solid var(--hair); border-radius: var(--r-card); }
.legal-contact p { color: var(--ink); margin: 0; font-size: 14.5px; line-height: 1.8; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.footer { background: var(--dark); color: var(--dark-muted); padding: 60px 0 32px; }
.footer .brand-word { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, .09); }
.footer-tag { font-size: 14px; color: var(--dark-muted); margin: 16px 0 18px; max-width: 300px; }
.social-links a {
    width: 38px; height: 38px; border-radius: 10px; background: var(--dark-2); color: var(--dark-text);
    display: inline-grid; place-items: center; font-size: 16px; transition: background .18s ease, transform .18s ease;
}
.social-links a:hover { background: var(--cobalt); transform: translateY(-2px); }
.footer-col h3 { color: #fff; font-family: var(--font-body); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 14px; color: var(--dark-muted); transition: color .16s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 26px; }
.footer-bottom p { font-size: 12.5px; color: var(--faint); }

/* -------------------------------------------------------------------------
   Scroll / entrance animations
   ------------------------------------------------------------------------- */
.animate-up { opacity: 0; transform: translateY(22px); animation: fadeUp .7s ease forwards; }
.animate-up.delay-1 { animation-delay: .12s; }
.animate-up.delay-2 { animation-delay: .24s; }
.animate-up.delay-3 { animation-delay: .36s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.animate-on-scroll { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .animate-up, .animate-on-scroll { opacity: 1 !important; transform: none !important; }
    html { scroll-behavior: auto; }
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .cap-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: 1fr; }
    .timeline { grid-template-columns: 1fr; }
    .about-wrap { grid-template-columns: 1fr; gap: 40px; }
    .about-visual { order: -1; }
    .contact-wrap { grid-template-columns: 1fr; gap: 34px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 720px) {
    .nav-menu { display: none; }
    .nav-toggle { display: flex; }
    .section { padding: 60px 0; }
    .hero { padding: 66px 0 60px; }
    .cap-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 30px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; }
}
