/* =========================================================================
   Agénor.bi — design system
   Dependency-free, modern CSS. Tokens first, then components, then utilities.
   ========================================================================= */

:root {
    /* Palette */
    --c-bg: #ffffff;
    --c-surface: #f5f8fa;
    --c-surface-2: #eef3f6;
    --c-ink: #0b1f33;
    --c-body: #2b3a4b;
    --c-muted: #5d6f80;
    --c-border: #e3eaf0;
    --c-primary: #0d9488;
    --c-primary-dark: #0f766e;
    --c-primary-soft: #e6f6f4;
    --c-accent: #f59e0b;
    --c-brand-1: #0b2236;
    --c-brand-2: #0d5b63;

    /* Status */
    --c-live: #16a34a;
    --c-beta: #d97706;
    --c-development: #2563eb;
    --c-concept: #6b7280;

    /* Typography */
    --font-head: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* Spacing / shape */
    --radius: 14px;
    --radius-sm: 9px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(11, 31, 51, 0.06), 0 2px 8px rgba(11, 31, 51, 0.05);
    --shadow-md: 0 10px 30px rgba(11, 31, 51, 0.08);
    --shadow-lg: 0 24px 60px rgba(11, 31, 51, 0.14);
    --container: 1160px;
    --gap: clamp(1.5rem, 4vw, 3rem);
    --section-y: clamp(3.5rem, 7vw, 6rem);
}

/* --- Reset-ish --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--c-body);
    background: var(--c-bg);
    line-height: 1.65;
    font-size: 1.02rem;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--c-ink); line-height: 1.18; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; }
svg.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon--flip { transform: rotate(180deg); }

/* --- Layout ------------------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--c-surface); }
.section--brand { background: linear-gradient(135deg, var(--c-brand-1), var(--c-brand-2)); color: #eaf6f5; }
.section--brand h1, .section--brand h2, .section--brand h3 { color: #fff; }
.muted { color: var(--c-muted); }

.section-head { max-width: 60ch; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head p { color: var(--c-muted); font-size: 1.08rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--split { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; max-width: none; flex-wrap: wrap; }

.eyebrow {
    display: inline-block; font-family: var(--font-head); font-weight: 600;
    font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--c-primary-dark); background: var(--c-primary-soft);
    padding: 0.35rem 0.8rem; border-radius: 999px; margin-bottom: 1rem;
}

/* --- Accessibility helpers -------------------------------------------- */
.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;
}
.skip-link {
    position: absolute; left: 1rem; top: -3rem; z-index: 100;
    background: var(--c-ink); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    transition: top 0.2s;
}
.skip-link:focus { top: 0; text-decoration: none; }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; border-radius: 4px; }

/* --- Buttons ----------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    font-family: var(--font-head); font-weight: 600; font-size: 0.98rem;
    padding: 0.8rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
    cursor: pointer; transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s; text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.9rem; }
.form__privacy { margin: 1rem 0 0; font-size: 0.85rem; color: var(--c-muted, #667); }
.btn--secondary { background: var(--c-ink); color: #fff; }
/* Loading state: a spinner replaces the label while a form submits. */
.btn__spinner { display: none; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn__label { visibility: hidden; }
.btn.is-loading .btn__spinner {
    display: block; position: absolute; top: 50%; left: 50%;
    width: 1.15em; height: 1.15em; margin: -0.575em 0 0 -0.575em;
    border: 2px solid currentColor; border-top-color: transparent;
    border-radius: 50%; animation: btnspin 0.6s linear infinite;
}
@keyframes btnspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .btn.is-loading .btn__spinner { animation: none; border-top-color: currentColor; opacity: 0.6; }
}
.btn--outline { background: transparent; border-color: currentColor; color: var(--c-primary-dark); }
.btn--outline:hover { background: var(--c-primary-soft); }
.section--brand .btn--outline { color: #fff; }
.section--brand .btn--outline:hover { background: rgba(255, 255, 255, 0.12); }
.btn--ghost { background: var(--c-surface-2); color: var(--c-ink); }
.btn--ghost:hover { background: var(--c-border); }
.btn--sm { padding: 0.5rem 0.95rem; font-size: 0.86rem; }
.btn--lg { padding: 0.95rem 1.7rem; font-size: 1.05rem; }
.btn--block { display: flex; width: 100%; }
.btn.is-disabled { opacity: 0.5; pointer-events: none; }

/* --- Header / nav ------------------------------------------------------ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.82); backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--c-border); box-shadow: var(--shadow-sm); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-head); font-weight: 700; color: var(--c-ink); font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand__mark {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-brand-2)); color: #fff; font-weight: 800;
}
/* Uploaded logo (Site settings → Brand). Max-capped (not forced) so a small
   upload keeps its native size instead of blurring up; the width/height attrs
   on the <img> preserve the aspect ratio and prevent layout shift. */
.brand__logo { display: block; max-height: 40px; width: auto; max-width: min(60vw, 260px); }
.brand--footer { color: #fff; }

.primary-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.primary-nav__list { display: flex; align-items: center; gap: clamp(0.5rem, 1.8vw, 1.5rem); list-style: none; }
.primary-nav__item { position: relative; }
.primary-nav__item > a { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.5rem 0; color: var(--c-ink); font-weight: 500; }
.primary-nav__item > a:hover { color: var(--c-primary-dark); text-decoration: none; }
.primary-nav__item.is-active > a { color: var(--c-primary-dark); }
.primary-nav__item.is-active > a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px; background: var(--c-primary); border-radius: 2px; }

.primary-nav__submenu {
    position: absolute; top: calc(100% + 0.5rem); left: 50%; transform: translateX(-50%) translateY(6px);
    min-width: 220px; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
    box-shadow: var(--shadow-md); padding: 0.5rem; list-style: none; opacity: 0; visibility: hidden; transition: 0.18s;
}
.primary-nav__item.has-children:hover .primary-nav__submenu,
.primary-nav__item.has-children:focus-within .primary-nav__submenu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.primary-nav__submenu a { display: block; padding: 0.55rem 0.8rem; border-radius: var(--radius-sm); color: var(--c-body); }
.primary-nav__submenu a:hover { background: var(--c-surface); text-decoration: none; color: var(--c-primary-dark); }

.primary-nav__actions { display: flex; align-items: center; gap: 1rem; }
.lang-switch { display: inline-flex; gap: 0.15rem; background: var(--c-surface-2); border-radius: 999px; padding: 0.2rem; }
.lang-switch__link { font-family: var(--font-head); font-size: 0.78rem; font-weight: 600; padding: 0.3rem 0.6rem; border-radius: 999px; color: var(--c-muted); }
.lang-switch__link:hover { text-decoration: none; color: var(--c-ink); }
.lang-switch__link.is-active { background: #fff; color: var(--c-ink); box-shadow: var(--shadow-sm); }

.nav-toggle { display: none; }

/* --- Hero -------------------------------------------------------------- */
.hero { padding-block: clamp(3rem, 7vw, 5.5rem); background: radial-gradient(1200px 500px at 80% -10%, var(--c-primary-soft), transparent 60%); }
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--gap); align-items: center; }
.hero__title { margin: 0 0 1rem; }
.hero__text { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--c-muted); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.hero__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 19 / 17; object-fit: cover; }

/* --- Cards / grids ----------------------------------------------------- */
.card-grid { display: grid; gap: clamp(1rem, 2.5vw, 1.6rem); }
.card-grid--3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card {
    background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow-sm); transition: transform 0.16s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d2dee7; }
.card__title { margin: 0 0 0.5rem; }
.card__title a { color: inherit; }
.card__text { color: var(--c-muted); margin: 0 0 1rem; }
.card__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--c-primary-soft); color: var(--c-primary-dark); margin-bottom: 1rem; }
.card__more { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; color: var(--c-primary-dark); font-family: var(--font-head); font-size: 0.92rem; }

.service-card { display: flex; flex-direction: column; }
.service-card:hover { text-decoration: none; }

/* Product cards */
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product-card__media { display: block; aspect-ratio: 16 / 10; background: var(--c-surface-2); overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .product-card__media img { transform: scale(1.04); }
.product-card__placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--c-muted); }
.product-card__body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.product-card__links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Post cards */
.post-card { padding: 0; overflow: hidden; }
.post-card__media { display: block; aspect-ratio: 16 / 9; background: var(--c-surface-2); overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--c-surface-2), var(--c-primary-soft)); }
.post-card__body { padding: 1.3rem 1.4rem 1.5rem; }
.post-card__meta { font-size: 0.85rem; color: var(--c-muted); margin-bottom: 0.5rem; }

/* --- Badges / tags / chips -------------------------------------------- */
.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.25rem 0.6rem; border-radius: 999px; color: #fff; width: fit-content; }
.badge--live { background: var(--c-live); }
.badge--beta { background: var(--c-beta); }
.badge--development { background: var(--c-development); }
.badge--concept { background: var(--c-concept); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; }
.tags li { font-size: 0.78rem; font-weight: 500; padding: 0.2rem 0.6rem; border-radius: 6px; background: var(--c-surface-2); color: var(--c-body); }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { display: inline-block; font-size: 0.82rem; font-weight: 500; padding: 0.35rem 0.8rem; border-radius: 999px; background: var(--c-surface-2); color: var(--c-body); border: 1px solid transparent; }
a.chip:hover { background: var(--c-primary-soft); color: var(--c-primary-dark); text-decoration: none; }
.chip.is-active { background: var(--c-primary); color: #fff; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }

/* --- Feature grid (blocks + service page) ------------------------------ */
.feature-grid__items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(1rem, 2.4vw, 1.6rem); }
.feature-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.feature-card__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--c-primary-soft); color: var(--c-primary-dark); margin-bottom: 0.9rem; }
.feature-card__title { margin: 0 0 0.4rem; font-size: 1.1rem; }
.feature-card p { color: var(--c-muted); margin: 0; }

/* --- Stats band -------------------------------------------------------- */
.stats-band { text-align: center; }
.stats-band__items { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.stat__value { display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); color: var(--c-primary-dark); }
.stat__label { color: var(--c-muted); font-size: 0.95rem; }

/* --- Pricing ----------------------------------------------------------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; align-items: stretch; }
.pricing-card { position: relative; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 1.8rem; display: flex; flex-direction: column; gap: 0.8rem; box-shadow: var(--shadow-sm); }
.pricing-card--featured { border-color: var(--c-primary); box-shadow: var(--shadow-md); }
.pricing-card__tag { position: absolute; top: -0.8rem; right: 1.4rem; background: var(--c-accent); color: #3a2400; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.3rem 0.7rem; border-radius: 999px; }
.pricing-card__name { margin: 0; }
.pricing-card__price { font-family: var(--font-head); font-weight: 800; font-size: 1.9rem; color: var(--c-ink); }
.pricing-card__price .muted { font-size: 0.9rem; font-weight: 500; }
.pricing-card__summary { color: var(--c-muted); margin: 0; }
.pricing-card__features { list-style: none; display: grid; gap: 0.55rem; margin: 0.5rem 0 0; }
.pricing-card__features li { display: flex; gap: 0.55rem; align-items: flex-start; }
.pricing-card__features svg { color: var(--c-primary); margin-top: 0.15rem; }
.pricing-card .btn { margin-top: auto; }

/* --- Testimonials ------------------------------------------------------ */
.testimonials .section-head h2 { color: #fff; }
.testimonials__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }
.testimonial { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--radius); padding: 1.6rem; margin: 0; backdrop-filter: blur(4px); }
.testimonial__stars { display: flex; gap: 0.15rem; color: var(--c-accent); margin-bottom: 0.8rem; }
.testimonial__quote { margin: 0 0 1.1rem; color: #f0fbfa; font-size: 1.05rem; }
.testimonial__author { display: flex; align-items: center; gap: 0.8rem; color: #fff; }
.testimonial__author .muted { color: #b7d4d3; }
.testimonial__avatar { border-radius: 50%; object-fit: cover; }

/* --- CTA band ---------------------------------------------------------- */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; background: linear-gradient(135deg, var(--c-brand-1), var(--c-brand-2)); color: #fff; border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 2.6rem); }
.section--brand .cta-band { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); }
.cta-band__content { max-width: 60ch; }
.cta-band__content h2 { color: #fff; margin: 0 0 0.4rem; }
.cta-band__content p { color: #d6ecea; margin: 0; }

/* --- Page hero (inner) ------------------------------------------------- */
.page-hero { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem); background: radial-gradient(900px 360px at 85% -20%, var(--c-primary-soft), transparent 60%); }
.page-hero__title { margin: 0.4rem 0 0.6rem; }
.page-hero__intro { font-size: 1.15rem; color: var(--c-muted); max-width: 65ch; }

.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.85rem; color: var(--c-muted); }
.breadcrumbs li::after { content: "/"; margin-left: 0.4rem; color: var(--c-border); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--c-muted); }

.feature-image { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); margin-block: 1rem; object-fit: cover; }

/* Hero video (muted autoplay loop). Fills the hero area edge-to-edge via
   object-fit:cover — cropped as needed but never distorted. The container has a
   definite aspect ratio (set inline from the image's dimensions, or 16:9 for
   .hero-media--solo when there's no image) so the cover fit always has a box to
   fill. The image is the fallback shown on mobile and for reduced motion. */
.hero-media {
    position: relative; margin-block: 1rem; overflow: hidden;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
    background: var(--c-primary-soft);   /* soft placeholder while the video loads */
}
.hero-media--solo { aspect-ratio: 16 / 9; }
.hero-media__video,
.hero-media__poster {
    position: absolute; inset: 0; display: block;
    width: 100%; height: 100%; object-fit: cover;
}
.hero-media__poster { display: none; }   /* shown only when the video is hidden */
@media (prefers-reduced-motion: reduce), (max-width: 768px) {
    .hero-media:not(.hero-media--solo) .hero-media__video { display: none; }
    .hero-media__poster { display: block; }
}

/* --- Streamfield / prose ---------------------------------------------- */
.streamfield { padding-block: clamp(2rem, 4vw, 3rem); display: grid; gap: 1.5rem; }
.streamfield--prose { max-width: 760px; }
.streamfield--prose.container { margin-inline: auto; }
.rich-text { font-size: 1.07rem; }
.rich-text h2, .rich-heading { margin-top: 0.5rem; }
.rich-text a { text-decoration: underline; }
.rich-text ul, .rich-text ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.rich-text img { border-radius: var(--radius); margin-block: 1rem; }
.content-image { margin: 0; }
.content-image--wide { margin-inline: calc(-1 * clamp(0.5rem, 3vw, 3rem)); }
.content-image--full img { width: 100%; border-radius: 0; }
.content-image img { border-radius: var(--radius); width: 100%; }
.content-image figcaption, .code-block__caption { font-size: 0.85rem; color: var(--c-muted); margin-top: 0.5rem; text-align: center; }
.pull-quote { border-left: 4px solid var(--c-primary); padding-left: 1.2rem; margin: 1rem 0; }
.pull-quote blockquote { margin: 0; font-size: 1.3rem; font-family: var(--font-head); color: var(--c-ink); }
.pull-quote figcaption { color: var(--c-muted); margin-top: 0.5rem; }
.code-block { margin: 0; }
.code-block__pre { background: #0b1f33; color: #e6edf3; padding: 1.2rem 1.4rem; border-radius: var(--radius); overflow-x: auto; font-size: 0.9rem; line-height: 1.6; }
.code-block__pre code { font-family: "SFMono-Regular", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; }
.embed-block { position: relative; }
.embed-block :is(iframe, video) { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
/* FAQ accordion (native <details>, works without JS) */
.faq { display: grid; gap: 0.6rem; }
.faq__heading { margin-bottom: 0.4rem; }
.faq__item { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; }
.faq__item[open] { background: var(--c-bg); box-shadow: var(--shadow-sm); }
.faq__question { cursor: pointer; font-weight: 600; font-family: var(--font-head); color: var(--c-ink); }
.faq__question::marker { color: var(--c-primary); }
.faq__answer { padding-top: 0.6rem; }
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.8rem; }
.gallery__item img { border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.streamfield table { width: 100%; border-collapse: collapse; }
.streamfield th, .streamfield td { border: 1px solid var(--c-border); padding: 0.6rem 0.8rem; text-align: left; }
.streamfield th { background: var(--c-surface); }

/* --- Forms ------------------------------------------------------------- */
.contact-layout { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: var(--gap); align-items: start; }
.lead-form { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.9rem; color: var(--c-ink); }
.input, .lead-form input, .lead-form select, .lead-form textarea {
    width: 100%; font-family: inherit; font-size: 1rem; color: var(--c-ink);
    padding: 0.75rem 0.9rem; border: 1.5px solid var(--c-border); border-radius: var(--radius-sm);
    background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .lead-form :is(input, select, textarea):focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.lead-form textarea { resize: vertical; min-height: 130px; }
.field__error { color: #b91c1c; font-size: 0.85rem; }
.contact-form-heading { margin-top: 0; }

.search-form { display: flex; gap: 0.6rem; max-width: 560px; margin-top: 1rem; }
.search-form .input { flex: 1; }
.search-results { list-style: none; display: grid; gap: 1rem; }
.search-result { border-bottom: 1px solid var(--c-border); padding-bottom: 1rem; }
.search-result h3 { margin: 0 0 0.25rem; }

/* --- Alerts ------------------------------------------------------------ */
.messages { margin-top: 1.5rem; display: grid; gap: 0.6rem; }
.alert { padding: 0.9rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid; font-weight: 500; }
.alert--success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert--info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* --- Info card (product/contact aside) -------------------------------- */
.info-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); position: sticky; top: 90px; display: grid; gap: 1.1rem; }
.info-card__title { margin: 0; }
.info-card__meta { display: grid; gap: 0.7rem; margin: 0; }
.info-card__meta > div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.info-card__meta dt { color: var(--c-muted); font-size: 0.9rem; }
.info-card__meta dd { margin: 0; font-weight: 600; color: var(--c-ink); }
.info-card__tech dt { color: var(--c-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.info-card__links { display: grid; gap: 0.55rem; }

.product-detail { display: grid; grid-template-columns: 1.6fr 0.9fr; gap: var(--gap); align-items: start; }

/* --- Contact list ------------------------------------------------------ */
.contact-list { list-style: none; display: grid; gap: 0.8rem; }
.contact-list li { display: flex; gap: 0.7rem; align-items: flex-start; }
.contact-list svg { color: var(--c-primary); margin-top: 0.15rem; flex: none; }

/* --- Post detail ------------------------------------------------------- */
.post-hero { padding-block: clamp(2.5rem, 5vw, 3.5rem) 1rem; }
.post-hero__inner { max-width: 800px; }
.post-hero__meta { color: var(--c-muted); font-size: 0.9rem; margin: 0.6rem 0; }
.post-hero__intro { font-size: 1.2rem; color: var(--c-muted); }
.post-tags, .post-authors { max-width: 760px; margin-inline: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; }
/* The byline sits between the post hero and the article body. */
.post-authors { display: grid; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--c-border); }
.author { display: flex; gap: 1rem; align-items: start; }
.author__photo { border-radius: 50%; }
.author p { color: var(--c-muted); margin: 0.3rem 0 0; }
.author__url { display: inline-block; margin-top: 0.3rem; font-size: 0.9rem; word-break: break-all; }

/* --- Team (About page) -------------------------------------------------- */
.team__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; margin-top: 1rem; }

/* --- Pagination -------------------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2.5rem; }
.pagination__status { color: var(--c-muted); font-size: 0.9rem; }

/* --- Social ------------------------------------------------------------ */
.social-list { display: flex; gap: 0.5rem; list-style: none; margin-top: 1.2rem; }
.social-list a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: #cfe8e6; transition: 0.2s; }
.social-list a:hover { background: var(--c-primary); color: #fff; }

/* --- Footer ------------------------------------------------------------ */
.site-footer { background: var(--c-brand-1); color: #c8d8e0; margin-top: auto; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: var(--gap); padding-block: clamp(3rem, 6vw, 4.5rem); }
.site-footer__heading { color: #fff; font-size: 1rem; margin: 0 0 1rem; }
.site-footer__blurb { color: #9fb6c2; max-width: 38ch; margin-top: 1rem; }
.site-footer__blurb p { margin: 0; }
.site-footer__links ul { list-style: none; display: grid; gap: 0.55rem; }
.site-footer a { color: #c8d8e0; }
.site-footer a:hover { color: #fff; }
.site-footer .contact-list svg { color: var(--c-primary); }
.site-footer__contact .btn { margin-top: 1.2rem; }
.site-footer__legal { margin-top: 2.5rem; padding-top: 1.3rem; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.85rem; }
/* A button that reads like the links around it (e.g. the footer "Cookie
   settings" trigger — a JS action, so semantically a button, not an anchor). */
.link-button { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; }
.link-button:hover { text-decoration: underline; }

/* --- Cookie consent banner --------------------------------------------- */
.cookie-consent {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 1000;
    background: var(--c-ink); color: #e8eef2;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
    padding: 1rem 1.2rem; animation: cookie-rise 0.25s ease;
}
.cookie-consent[hidden] { display: none; }
.cookie-consent__inner {
    max-width: 68rem; margin: 0 auto;
    display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap;
    justify-content: space-between;
}
.cookie-consent__text { margin: 0; font-size: 0.9rem; line-height: 1.5; flex: 1 1 20rem; }
.cookie-consent__text a { color: #fff; text-decoration: underline; }
.cookie-consent__actions { display: flex; gap: 0.6rem; flex-shrink: 0; }
@keyframes cookie-rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .cookie-consent { animation: none; } }

/* --- Error page -------------------------------------------------------- */
.error-page { text-align: center; }
.error-page__code { font-family: var(--font-head); font-weight: 800; font-size: clamp(4rem, 14vw, 9rem); color: var(--c-primary-soft); margin: 0; line-height: 1; }
.error-page h1 { margin: 0 0 0.5rem; }
.error-page .btn { margin-top: 1.5rem; }

/* Make body a flex column so the footer sticks to the bottom. */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 900px) {
    .hero__inner { grid-template-columns: 1fr; }
    .hero__media { order: -1; }
    .hero__media img { aspect-ratio: 16 / 10; }
    .contact-layout, .product-detail { grid-template-columns: 1fr; }
    .info-card { position: static; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: inline-grid; place-items: center; width: 44px; height: 44px;
        background: var(--c-surface-2); border: none; border-radius: 10px; color: var(--c-ink); cursor: pointer;
    }
    .nav-toggle__close { display: none; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline-flex; }

    .primary-nav {
        position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--c-border); box-shadow: var(--shadow-md);
        padding: 1rem clamp(1rem, 4vw, 2rem) 1.5rem; max-height: calc(100vh - 72px); overflow-y: auto;
        transform: translateY(-12px); opacity: 0; visibility: hidden; transition: 0.2s;
    }
    .primary-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
    .primary-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .primary-nav__item { border-bottom: 1px solid var(--c-border); }
    .primary-nav__item > a { padding: 0.9rem 0; justify-content: space-between; }
    .primary-nav__submenu { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: none; padding: 0 0 0.5rem 1rem; min-width: 0; }
    .primary-nav__actions { margin-top: 1rem; justify-content: space-between; }
}

@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .section-head--split { flex-direction: column; align-items: start; }
    .brand__name { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =========================================================================
   Motion & animation layer
   GPU-friendly (transform/opacity only), progressively enhanced, and fully
   disabled under prefers-reduced-motion.
   ========================================================================= */

@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes blobDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(28px, -22px) scale(1.08); }
    66% { transform: translate(-24px, 18px) scale(0.95); }
}
@keyframes shine { from { transform: translateX(-160%) skewX(-18deg); } to { transform: translateX(420%) skewX(-18deg); } }
@keyframes brandShift { 0%, 100% { filter: hue-rotate(0deg); } 50% { filter: hue-rotate(-18deg); } }

/* --- Scroll-progress bar ----------------------------------------------- */
.scroll-progress {
    position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
    transform: scaleX(0); transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
    will-change: transform;
}

/* --- Decorative hero blobs (subtle depth, static fallback) -------------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero__inner { position: relative; z-index: 1; }
.hero::before, .hero::after {
    content: ""; position: absolute; z-index: 0; border-radius: 50%;
    filter: blur(64px); opacity: 0.55; pointer-events: none;
}
.hero::before {
    width: 460px; height: 460px; top: -150px; right: -70px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.38), transparent 70%);
}
.hero::after {
    width: 420px; height: 420px; bottom: -180px; left: -110px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.24), transparent 70%);
}

/* --- Button shine + gradient ------------------------------------------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
    content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-160%) skewX(-18deg); z-index: -1;
}
.btn--primary { background: linear-gradient(135deg, var(--c-primary), var(--c-brand-2)); }
.btn--primary:hover { background: linear-gradient(135deg, var(--c-primary-dark), var(--c-brand-2)); }

/* --- Section heading accent bar ---------------------------------------- */
.section-head h2 { position: relative; }
.section-head h2::after {
    content: ""; display: block; width: 52px; height: 4px; margin-top: 0.85rem;
    border-radius: 2px; background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
}
.section-head--center h2::after { margin-inline: auto; }
.section--brand .section-head h2::after { background: linear-gradient(90deg, #5eead4, var(--c-accent)); }

/* --- Hover micro-interactions ------------------------------------------ */
.card__icon, .feature-card__icon { transition: transform 0.25s ease; }
.card:hover .card__icon, .feature-card:hover .feature-card__icon { transform: scale(1.08) rotate(-4deg); }
.card__more svg { transition: transform 0.2s ease; }
.card:hover .card__more svg { transform: translateX(5px); }
.pricing-card { transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.social-list a { transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease; }
.social-list a:hover { transform: translateY(-3px); }

/* Animated underline for in-content links and footer links. */
.rich-text a, .site-footer__links a, .contact-list a {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1.5px; background-position: 0 100%; background-repeat: no-repeat;
    transition: background-size 0.25s ease; text-decoration: none;
}
.rich-text a:hover, .site-footer__links a:hover, .contact-list a:hover { background-size: 100% 1.5px; }

/* Desktop nav: sliding underline on hover + active. */
@media (min-width: 769px) {
    .primary-nav__item > a::after {
        content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
        background: var(--c-primary); border-radius: 2px;
        transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.25s ease;
    }
    .primary-nav__item:hover > a::after,
    .primary-nav__item:focus-within > a::after,
    .primary-nav__item.is-active > a::after { transform: scaleX(1); }
}

/* --- Motion (only when the user hasn't asked to reduce it) -------------- */
@media (prefers-reduced-motion: no-preference) {
    /* Animated hero blobs + entrance choreography */
    .hero::before { animation: blobDrift 19s ease-in-out infinite; }
    .hero::after { animation: blobDrift 24s ease-in-out infinite reverse; }
    .hero__content > * { opacity: 0; animation: fadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
    .hero__content > *:nth-child(1) { animation-delay: 0.05s; }
    .hero__content > *:nth-child(2) { animation-delay: 0.15s; }
    .hero__content > *:nth-child(3) { animation-delay: 0.25s; }
    .hero__content > *:nth-child(4) { animation-delay: 0.35s; }
    .hero__media { opacity: 0; animation: fadeIn 1s ease 0.25s forwards; }
    .hero__media img { animation: floatY 6s ease-in-out 1.1s infinite; }
    .brand__mark { animation: brandShift 8s ease-in-out infinite; }

    /* Inner page hero fades in on load */
    .page-hero__title, .page-hero__intro, .post-hero__inner > * {
        opacity: 0; animation: fadeUp 0.6s ease forwards;
    }
    .page-hero__intro { animation-delay: 0.1s; }

    /* Button shine sweep on hover */
    .btn:hover::after { animation: shine 0.75s ease; }

    /* Scroll-reveal: hidden until observed (state added in CSS to avoid flash) */
    html.js :is(.section-head, .card, .feature-card, .pricing-card, .testimonial,
                .stat, .cta-band, .info-card, .gallery__item, .feature-image,
                .author, .search-result, .streamfield--prose > *) {
        opacity: 0; transform: translateY(26px);
        transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    }
    html.js .is-visible { opacity: 1; transform: none; }

    /* Standard/document pages (About, Privacy, Terms, Cookie policy) are read
       top-to-bottom, and their body sits below a tall page-hero — so revealing
       each block on scroll makes the text look like it isn't loading. Keep the
       prose visible from the start on these pages. */
    html.js .template-standard .streamfield--prose > * { opacity: 1; transform: none; }

    /* Living gradient on the brand band */
    .section--brand {
        background-size: 160% 160%; animation: brandShift 14s ease-in-out infinite;
    }
}
