/* ============================================================================
   Hailen Group — Frontend Design System
   Modern & minimal · indigo · corporate
   Hand-authored (loaded outside the SCSS build) so the public site and the
   page-builder preview share one professional visual language.

   Everything is namespaced under `.hl-*` so it never leaks into the admin UI.
   ========================================================================== */

:root {
    /* Brand palette — overridable per-site from the admin Header (indigo defaults).
       Only these three are set by the admin; the shades below are derived. */
    --hl-primary:        #4f46e5;
    --hl-secondary:      #6366f1;
    --hl-tertiary:       #0ea5e9;

    /* Derived shades — literal fallbacks; recomputed from --hl-primary via
       color-mix where supported so a custom primary cascades to every shade. */
    --hl-primary-600:    #4338ca;
    --hl-primary-700:    #3730a3;
    --hl-primary-050:    #eef2ff;
    --hl-primary-100:    #e0e7ff;
    --hl-accent:         var(--hl-secondary);

    /* Neutrals — slate */
    --hl-ink:            #0f172a;   /* headings            */
    --hl-ink-soft:       #1e293b;
    --hl-body:           #475569;   /* body copy           */
    --hl-muted:          #64748b;   /* secondary / captions */
    --hl-faint:          #94a3b8;
    --hl-line:           #e2e8f0;   /* borders / dividers  */
    --hl-bg:             #ffffff;
    --hl-bg-soft:        #f8fafc;   /* alternating band    */
    --hl-bg-softer:      #f1f5f9;

    /* Type */
    --hl-font:      "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --hl-font-head: "Plus Jakarta Sans", var(--hl-font);

    /* Shape & depth */
    --hl-radius-sm: 10px;
    --hl-radius:    16px;
    --hl-radius-lg: 24px;
    --hl-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
    --hl-shadow:    0 6px 24px -8px rgba(15, 23, 42, .14), 0 2px 6px -2px rgba(15, 23, 42, .06);
    --hl-shadow-lg: 0 24px 60px -18px rgba(15, 23, 42, .28), 0 8px 24px -12px rgba(15, 23, 42, .12);
    --hl-ring:      0 0 0 4px var(--hl-primary-100);

    /* Rhythm */
    --hl-section-y: 6rem;
}

/* Derive brand shades from the (possibly admin-overridden) primary. */
@supports (color: color-mix(in srgb, red, blue)) {
    :root {
        --hl-primary-600: color-mix(in srgb, var(--hl-primary) 82%, #000);
        --hl-primary-700: color-mix(in srgb, var(--hl-primary) 66%, #000);
        --hl-primary-100: color-mix(in srgb, var(--hl-primary) 16%, #fff);
        --hl-primary-050: color-mix(in srgb, var(--hl-primary) 8%,  #fff);
    }
}

/* ── Base scoping ─────────────────────────────────────────────────────────
   Applied per-block so sections style themselves correctly in both the public
   layout and the builder preview, without restyling the admin chrome. */
.hl-site,
.hl-section,
.hl-site-header,
.hl-site-footer {
    font-family: var(--hl-font);
    color: var(--hl-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.hl-site { background: var(--hl-bg); }

.hl-section :where(h1, h2, h3, h4, h5, h6) {
    font-family: var(--hl-font-head);
    color: var(--hl-ink);
    letter-spacing: -.02em;
}

/* ── Layout ───────────────────────────────────────────────────────────── */
.hl-container {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}
.hl-section { padding-block: var(--hl-section-y); position: relative; }
.hl-section--tight { padding-block: 4rem; }
.hl-section--soft  { background: var(--hl-bg-soft); }
.hl-section--ink   { background: var(--hl-ink); }

/* ── Section header (eyebrow + title + lead) ───────────────────────────── */
.hl-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--hl-font-head);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--hl-primary);
}
.hl-eyebrow::before {
    content: "";
    width: 1.5rem; height: 2px;
    background: var(--hl-primary);
    border-radius: 2px;
    opacity: .6;
}
.hl-section-head { max-width: 640px; margin-bottom: 3.25rem; }
.hl-section-head--center { margin-inline: auto; text-align: center; }
.hl-section-head--center .hl-eyebrow::before { display: none; }

.hl-title {
    font-size: clamp(1.85rem, 1.2rem + 2.2vw, 2.75rem);
    font-weight: 800;
    line-height: 1.12;
    margin: 1rem 0 0;
}
.hl-lead {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--hl-muted);
    margin: 1.1rem 0 0;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.hl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .8rem 1.5rem;
    border-radius: var(--hl-radius-sm);
    font-family: var(--hl-font-head);
    font-weight: 600;
    font-size: .975rem;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
    white-space: nowrap;
}
.hl-btn:focus-visible { outline: none; box-shadow: var(--hl-ring); }
.hl-btn .bi { font-size: 1.05em; }

.hl-btn--primary {
    background: var(--hl-primary);
    color: #fff;
    box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--hl-primary) 55%, transparent);
}
.hl-btn--primary:hover { background: var(--hl-primary-600); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px -10px color-mix(in srgb, var(--hl-primary) 60%, transparent); }

.hl-btn--ghost {
    background: #fff;
    color: var(--hl-ink);
    border-color: var(--hl-line);
    box-shadow: var(--hl-shadow-sm);
}
.hl-btn--ghost:hover { color: var(--hl-primary); border-color: var(--hl-primary-100); transform: translateY(-2px); }

.hl-btn--light {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-color: rgba(255, 255, 255, .28);
    backdrop-filter: blur(4px);
}
.hl-btn--light:hover { background: rgba(255, 255, 255, .2); color: #fff; transform: translateY(-2px); }

.hl-btn--lg { padding: .95rem 1.85rem; font-size: 1.05rem; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.hl-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--hl-line);
    border-radius: var(--hl-radius);
    box-shadow: var(--hl-shadow-sm);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
    height: 100%;
}
.hl-card:hover { transform: translateY(-4px); box-shadow: var(--hl-shadow-lg); border-color: transparent; }

/* ============================================================================
   HERO
   ========================================================================== */
.hl-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(60rem 40rem at 80% -10%, var(--hl-primary-050), transparent 55%),
        radial-gradient(48rem 40rem at -10% 10%, color-mix(in srgb, var(--hl-tertiary) 12%, #fff), transparent 50%),
        var(--hl-bg);
    padding-block: clamp(4rem, 3rem + 6vw, 7.5rem);
}
.hl-hero__grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 3.5rem;
    align-items: center;
}
.hl-hero__title {
    font-size: clamp(2.25rem, 1.3rem + 3.6vw, 3.75rem);
    font-weight: 800;
    line-height: 1.06;
    color: var(--hl-ink);
    margin: 1.25rem 0 0;
}
.hl-hero__title .hl-grad {
    background: linear-gradient(100deg, var(--hl-primary), var(--hl-accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hl-hero__lead {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--hl-muted);
    max-width: 34rem;
    margin: 1.35rem 0 0;
}
.hl-hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.1rem; }
.hl-hero__media {
    position: relative;
    border-radius: var(--hl-radius-lg);
    overflow: hidden;
    box-shadow: var(--hl-shadow-lg);
    aspect-ratio: 4 / 3.4;
    background: linear-gradient(140deg, var(--hl-primary-100), #fff);
}
.hl-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hl-hero__media--empty {
    display: grid; place-items: center;
    color: var(--hl-primary);
    background:
        linear-gradient(140deg, var(--hl-primary), var(--hl-primary-700));
}
.hl-hero__media--empty .bi { font-size: 4rem; color: rgba(255,255,255,.9); }

/* ============================================================================
   STATS band
   ========================================================================== */
.hl-stats {
    background:
        radial-gradient(38rem 26rem at 88% 130%, color-mix(in srgb, var(--hl-tertiary) 55%, transparent), transparent 60%),
        linear-gradient(120deg, var(--hl-primary), var(--hl-secondary));
    color: #fff;
}
.hl-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.hl-stat { text-align: center; padding: .5rem; }
.hl-stat__value {
    font-family: var(--hl-font-head);
    font-size: clamp(2.1rem, 1.4rem + 2.4vw, 3rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    color: #fff;
}
.hl-stat__label {
    margin-top: .6rem;
    font-size: .95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .82);
}
.hl-stat + .hl-stat { border-left: 1px solid rgba(255,255,255,.16); }

/* ============================================================================
   ABOUT
   ========================================================================== */
.hl-about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
}
.hl-about__media {
    border-radius: var(--hl-radius-lg);
    overflow: hidden;
    box-shadow: var(--hl-shadow);
    aspect-ratio: 5 / 4;
    background: var(--hl-bg-softer);
}
.hl-about__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hl-about__media--empty { display: grid; place-items: center; color: var(--hl-faint); }
.hl-about__media--empty .bi { font-size: 3rem; }

/* ============================================================================
   FEATURES grid
   ========================================================================== */
.hl-features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.hl-feature { padding: 2rem 1.75rem; }
.hl-feature__icon {
    display: grid; place-items: center;
    width: 3.25rem; height: 3.25rem;
    border-radius: 14px;
    background: var(--hl-primary-050);
    color: var(--hl-primary);
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}
.hl-feature__title { font-size: 1.2rem; font-weight: 700; margin: 0 0 .5rem; }
.hl-feature__text  { color: var(--hl-muted); line-height: 1.65; margin: 0; font-size: .975rem; }

/* ============================================================================
   PRODUCTS / DIVISIONS cards
   ========================================================================== */
.hl-cards-grid { display: grid; gap: 1.5rem; }
.hl-cards-grid[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
.hl-cards-grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.hl-cards-grid[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }

.hl-pcard__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--hl-bg-softer);
    overflow: hidden;
}
.hl-pcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.hl-card:hover .hl-pcard__media img { transform: scale(1.04); }
.hl-pcard__media--empty { display: grid; place-items: center; color: var(--hl-faint); }
.hl-pcard__media--empty .bi { font-size: 2.25rem; }
.hl-pcard__badge {
    position: absolute; top: .75rem; left: .75rem;
    padding: .3rem .7rem; border-radius: 999px;
    font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.hl-pcard__body { padding: 1.4rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.hl-pcard__title { font-size: 1.15rem; font-weight: 700; margin: 0 0 .4rem; }
.hl-pcard__text  { color: var(--hl-muted); font-size: .95rem; line-height: 1.6; margin: 0; flex: 1; }
.hl-pcard__price { font-family: var(--hl-font-head); font-weight: 800; font-size: 1.25rem; color: var(--hl-primary); margin: 1rem 0 0; }
.hl-pcard__link {
    display: inline-flex; align-items: center; gap: .4rem;
    margin-top: 1.15rem;
    font-family: var(--hl-font-head); font-weight: 600; font-size: .95rem;
    color: var(--hl-primary); text-decoration: none;
    transition: gap .15s ease;
}
.hl-pcard__link:hover { gap: .7rem; color: var(--hl-primary-600); }

.hl-empty {
    grid-column: 1 / -1;
    border: 1px dashed var(--hl-line);
    border-radius: var(--hl-radius);
    padding: 3rem; text-align: center; color: var(--hl-faint);
    background: var(--hl-bg-soft);
}
.hl-empty .bi { font-size: 2rem; display: block; margin-bottom: .5rem; }

/* ============================================================================
   TESTIMONIALS
   ========================================================================== */
.hl-testimonials__grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); }
.hl-testimonials__grid[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
.hl-testimonials__grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }

.hl-testimonial { padding: 2rem 1.75rem; }
.hl-testimonial__mark { font-size: 2rem; line-height: 1; color: var(--hl-primary); opacity: .35; }
.hl-testimonial__quote {
    margin: .75rem 0 1.5rem; padding: 0; border: 0;
    color: var(--hl-ink-soft); font-size: 1.05rem; line-height: 1.7;
}
.hl-testimonial__author { display: flex; align-items: center; gap: .85rem; margin-top: auto; }
.hl-testimonial__avatar {
    display: grid; place-items: center; flex-shrink: 0;
    width: 3rem; height: 3rem; border-radius: 50%; overflow: hidden;
    background: var(--hl-primary-050); color: var(--hl-primary); font-size: 1.25rem;
}
.hl-testimonial__avatar img { width: 100%; height: 100%; object-fit: cover; }
.hl-testimonial__meta { display: flex; flex-direction: column; min-width: 0; }
.hl-testimonial__name { font-weight: 700; color: var(--hl-ink); }
.hl-testimonial__role { font-size: .875rem; color: var(--hl-muted); }

/* ============================================================================
   FAQ / Q&A  (native <details> accordion — click a question to reveal its answer)
   ========================================================================== */
.hl-faq { max-width: 780px; margin-inline: auto; display: flex; flex-direction: column; gap: 1rem; }
.hl-faq__item {
    background: #fff; border: 1px solid var(--hl-line); border-radius: var(--hl-radius);
    box-shadow: var(--hl-shadow-sm); overflow: hidden;
    transition: border-color .2s ease, box-shadow .25s ease;
}
.hl-faq__item[open] {
    border-color: color-mix(in srgb, var(--hl-primary) 40%, var(--hl-line));
    box-shadow: var(--hl-shadow);
}
.hl-faq__question {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1.15rem 1.5rem; cursor: pointer; list-style: none;
    font-family: var(--hl-font-head); font-weight: 700; font-size: 1.05rem; color: var(--hl-ink);
}
.hl-faq__question::-webkit-details-marker { display: none; }
.hl-faq__icon { flex-shrink: 0; color: var(--hl-primary); transition: transform .25s ease; }
.hl-faq__item[open] .hl-faq__icon { transform: rotate(45deg); }
.hl-faq__answer { padding: 0 1.5rem 1.35rem; color: var(--hl-body); line-height: 1.7; }

/* ============================================================================
   CAROUSEL
   ========================================================================== */
.hl-carousel { border-radius: var(--hl-radius-lg); overflow: hidden; box-shadow: var(--hl-shadow); }
.hl-carousel .carousel-item > img,
.hl-carousel .hl-carousel__slide { height: clamp(320px, 32vw, 520px); object-fit: cover; }
.hl-carousel__slide--empty { display: grid; place-items: center; background: var(--hl-bg-softer); color: var(--hl-faint); }
.hl-carousel .carousel-caption {
    text-align: left; left: 8%; right: auto; bottom: 12%; max-width: 34rem;
    background: linear-gradient(120deg, rgba(15,23,42,.72), rgba(15,23,42,.15));
    padding: 1.5rem 1.75rem; border-radius: var(--hl-radius);
    backdrop-filter: blur(2px);
}
.hl-carousel .carousel-caption h4 { color: #fff; font-weight: 800; font-size: 1.6rem; }
.hl-carousel .carousel-caption p  { color: rgba(255,255,255,.9); }

/* ============================================================================
   CONTACT FORM
   ========================================================================== */
.hl-contact__card {
    background: #fff;
    border: 1px solid var(--hl-line);
    border-radius: var(--hl-radius-lg);
    box-shadow: var(--hl-shadow);
    padding: clamp(1.75rem, 1rem + 2vw, 3rem);
}
.hl-field-label { font-family: var(--hl-font-head); font-weight: 600; font-size: .9rem; color: var(--hl-ink-soft); margin-bottom: .4rem; }
.hl-input {
    width: 100%;
    padding: .8rem 1rem;
    border: 1px solid var(--hl-line);
    border-radius: var(--hl-radius-sm);
    font-family: var(--hl-font); font-size: 1rem; color: var(--hl-ink);
    background: var(--hl-bg-soft);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.hl-input::placeholder { color: var(--hl-faint); }
.hl-input:focus { outline: none; background: #fff; border-color: var(--hl-primary); box-shadow: var(--hl-ring); }
.hl-input.is-invalid { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.12); }
.hl-field-error { color: #dc2626; font-size: .85rem; margin-top: .35rem; }
.hl-alert-success {
    display: flex; gap: .75rem; align-items: flex-start;
    background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46;
    border-radius: var(--hl-radius-sm); padding: 1rem 1.15rem; margin-bottom: 1.5rem;
}
.hl-alert-success .bi { font-size: 1.15rem; margin-top: .05rem; }

/* ============================================================================
   SITE HEADER
   ========================================================================== */
.hl-site-header {
    position: sticky; top: 0; z-index: 1030;
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, .07);
}
.hl-site-header .navbar { padding-block: .9rem; }
.hl-site-header .navbar-brand { font-family: var(--hl-font-head); font-weight: 800; letter-spacing: -.02em; font-size: 1.3rem; }
.hl-site-header .nav-link {
    font-family: var(--hl-font-head);
    font-weight: 600; font-size: .95rem;
    padding: .4rem .9rem !important;
    position: relative; opacity: .85;
    transition: opacity .15s ease;
}
.hl-site-header .nav-link::after {
    content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .1rem; height: 2px;
    background: currentColor; border-radius: 2px;
    transform: scaleX(0); transform-origin: left; transition: transform .2s ease; opacity: .8;
}
.hl-site-header .nav-link:hover { opacity: 1; }
.hl-site-header .nav-link:hover::after { transform: scaleX(1); }
.hl-site-header__cta { margin-left: .75rem; }

/* ============================================================================
   SITE FOOTER
   ========================================================================== */
.hl-site-footer { padding: 4.5rem 0 2rem; }
.hl-site-footer__brand { font-family: var(--hl-font-head); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.hl-site-footer__desc { opacity: .82; max-width: 22rem; line-height: 1.7; margin-top: 1rem; }
.hl-site-footer__col-title {
    font-family: var(--hl-font-head); font-weight: 700; font-size: .82rem;
    letter-spacing: .1em; text-transform: uppercase; opacity: .7; margin-bottom: 1.1rem;
}
.hl-site-footer__link { display: inline-block; text-decoration: none; opacity: .8; padding: .28rem 0; transition: opacity .15s ease, transform .15s ease; }
.hl-site-footer__link:hover { opacity: 1; transform: translateX(3px); }
.hl-site-footer__socials { display: flex; gap: .6rem; }
.hl-site-footer__social {
    display: grid; place-items: center;
    width: 2.4rem; height: 2.4rem; border-radius: 10px;
    border: 1px solid currentColor; opacity: .7;
    text-decoration: none;
    transition: opacity .15s ease, transform .15s ease, background .15s ease;
}
.hl-site-footer__social:hover { opacity: 1; transform: translateY(-2px); }
.hl-site-footer__divider { border: 0; border-top: 1px solid currentColor; opacity: .16; margin: 2.75rem 0 1.5rem; }

/* ============================================================================
   Motion — subtle reveal on scroll (progressively enhanced by JS)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
    /* Hidden state is armed by JS (adds .hl-motion) so sections stay visible
       when JS is off or inside the builder preview. */
    .hl-motion .hl-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
    .hl-motion .hl-reveal.is-in { opacity: 1; transform: none; }
}

/* ============================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991px) {
    :root { --hl-section-y: 4.5rem; }
    .hl-hero__grid,
    .hl-about__grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .hl-hero__media { order: -1; aspect-ratio: 16 / 10; }
    .hl-features__grid { grid-template-columns: repeat(2, 1fr); }
    .hl-testimonials__grid,
    .hl-testimonials__grid[data-cols="3"] { grid-template-columns: repeat(2, 1fr); }
    .hl-stats__grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
    .hl-stat:nth-child(3) { border-left: 0; }
    .hl-cards-grid[data-cols="3"],
    .hl-cards-grid[data-cols="4"] { grid-template-columns: repeat(2, 1fr); }
    .hl-site-header__cta { display: none; }
}
@media (max-width: 575px) {
    .hl-features__grid,
    .hl-testimonials__grid,
    .hl-testimonials__grid[data-cols="2"],
    .hl-testimonials__grid[data-cols="3"],
    .hl-stats__grid,
    .hl-cards-grid[data-cols="2"],
    .hl-cards-grid[data-cols="3"],
    .hl-cards-grid[data-cols="4"] { grid-template-columns: 1fr; }
    .hl-stat + .hl-stat { border-left: 0; }
    .hl-hero__actions .hl-btn { width: 100%; }
}
