/* ==========================================================================
   Homepage S07 — Keep Sharing · Keep Learning · Keep Growing (12 Sep 2026, 4b)
   Heading and support line span the full width; below them the section
   splits mascot-left / copy-right. Copy = quiet track record + three doors.
   Own class prefix (fi-comm) so the retired .fi-home-community rules in
   home-batch5-sections.css never apply.
   ========================================================================== */

.fi-comm {
    padding: clamp(40px, 5vw, 64px) 0 0;
    overflow: hidden;
}

/* ---- head: one line across the section ------------------------------- */
.fi-comm__head { margin-bottom: clamp(16px, 2vw, 28px); }
.fi-comm__title {
    margin: 0 0 12px;
    font-size: clamp(26px, 2.8vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.01em;
    font-weight: 700;
    color: var(--fd-charcoal, #111111);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 18px;
}
.fi-comm__title-part { white-space: nowrap; }
.fi-comm__title-part.is-accent { color: var(--fd-gold, #d4a017); }
.fi-comm__sep {
    display: inline-block;
    width: 1px;
    height: 0.8em;
    background: rgba(212, 160, 23, 0.6);
}
.fi-comm__support {
    margin: 0;
    max-width: 68ch;
    font-size: 16.5px;
    line-height: 1.55;
    color: var(--fd-text-muted, #5f5a52);
}

/* ---- two columns below the head ---------------------------------------- */
.fi-comm__layout {
    display: grid;
    grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: end;
}

/* mascot */
.fi-comm__visual {
    position: relative;
    align-self: end;
    display: flex;
    justify-content: center;
}
.fi-comm__visual::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -6%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(var(--fd-champagne-rgb, 247, 240, 224), 0.9), rgba(var(--fd-ivory-rgb, 253, 251, 247), 0));
    filter: blur(28px);
    z-index: 0;
}
.fi-comm__mascot {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    height: auto;
    max-height: 360px;
    max-width: 100%;
    object-fit: contain;
    object-position: bottom center;
    /* Stopgap until mascot-point.png is cut to alpha: white box blends into the page.
       Costs the highlight on the sphere; remove this line once the cut file lands. */
    mix-blend-mode: multiply;
}

/* copy */
.fi-comm__copy { padding-bottom: clamp(40px, 5vw, 64px); }

/* quiet track record */
.fi-comm__record {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: grid;
    gap: 6px;
}
.fi-comm__record li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    line-height: 1.4;
    color: var(--fd-charcoal, #111111);
}
.fi-comm__record li i {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(212, 160, 23, 0.14);
    position: relative;
}
.fi-comm__record li i::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 3px;
    width: 4px;
    height: 7px;
    border: solid var(--fd-gold, #d4a017);
    border-width: 0 1.8px 1.8px 0;
    transform: rotate(45deg);
}

/* doors */
.fi-comm__doors {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.fi-comm__door-link {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--fd-warm-grey, #e7e2da);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.fi-comm__door-link:hover,
.fi-comm__door-link:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(212, 160, 23, 0.55);
    box-shadow: 0 14px 28px -18px rgba(17, 17, 17, 0.35);
}
.fi-comm__door-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--fd-gold, #d4a017);
    background: rgba(212, 160, 23, 0.10);
}
.fi-comm__door-text { display: grid; gap: 2px; min-width: 0; }
.fi-comm__door-title { font-weight: 600; font-size: 15.5px; color: var(--fd-charcoal, #111111); }
.fi-comm__door-line { font-size: 13.5px; line-height: 1.4; color: var(--fd-text-muted, #5f5a52); }
.fi-comm__door-cta { white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--fd-gold, #d4a017); }
.fi-comm__door-cta i { font-style: normal; display: inline-block; transition: transform 0.2s ease; }
.fi-comm__door-link:hover .fi-comm__door-cta i { transform: translateX(3px); }
.fi-comm__door[data-door="whatsapp"] .fi-comm__door-link { border-color: rgba(212, 160, 23, 0.35); }

/* desktop-only QR */
.fi-comm__qr {
    display: none;
    margin: 14px 0 0;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    color: var(--fd-text-muted, #5f5a52);
}
.fi-comm__qr img { width: 72px; height: 72px; border-radius: 8px; border: 1px solid var(--fd-warm-grey, #e7e2da); background: #fff; }
@media (min-width: 1024px) and (hover: hover) { .fi-comm__qr { display: flex; } }

/*
    WhatsApp contact panel — 20 Sep 2026.

    Replaces the WhatsApp door and the QR. The trigger deliberately reuses
    .fi-comm__door-link so it sits in the same visual family as the remaining
    doors; the overrides below only undo what a <button> brings with it
    (browser background, border, inherited font, centred text).
*/
.fi-comm__contact { margin: 10px 0 0; }

.fi-comm__contact-btn {
    width: 100%;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
    border-color: rgba(212, 160, 23, 0.35);
}

/* The dialog. Closed state is the browser default (display:none). */
.fi-comm__dialog {
    padding: 0;
    border: 0;
    background: transparent;
    max-width: min(420px, calc(100vw - 32px));
}
.fi-comm__dialog::backdrop { background: rgba(17, 17, 17, 0.55); }

/* Fallback path: no showModal, so the `open` attribute alone must centre it. */
.fi-comm__dialog[open]:not(:modal) {
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.fi-comm__dialog-box {
    position: relative;
    padding: 24px 26px 22px;
    border-radius: var(--fd-radius-md, 14px);
    border: 1px solid var(--fd-soft-border, #e5e2db);
    background: var(--fd-white, #fff);
    box-shadow: 0 18px 48px rgba(17, 17, 17, 0.18);
}

.fi-comm__dialog-close {
    position: absolute;
    top: 8px;
    right: 10px;
    padding: 2px 6px;
    border: 0;
    background: none;
    font-size: 24px;
    line-height: 1;
    color: var(--fd-text-muted, #5f5a52);
    cursor: pointer;
}

.fi-comm__dialog-title {
    margin: 0 0 12px;
    padding-right: 24px;
    font-size: 18px;
    line-height: 1.25;
    color: var(--fd-charcoal, #111111);
}

.fi-comm__dialog-name { margin: 0 0 4px; font-size: 15.5px; color: var(--fd-charcoal, #111111); }

.fi-comm__dialog-num { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.fi-comm__dialog-num a { color: var(--fd-gold-text, #8a6a0f); text-decoration: none; }
.fi-comm__dialog-num a:hover,
.fi-comm__dialog-num a:focus-visible { text-decoration: underline; }

.fi-comm__dialog-note { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--fd-text-muted, #5f5a52); }

/* ---- responsive --------------------------------------------------------- */
@media (max-width: 1023px) {
    .fi-comm__layout { grid-template-columns: minmax(0, 0.32fr) minmax(0, 0.68fr); }
    .fi-comm__mascot { max-height: 280px; }
}
@media (max-width: 767px) {
    .fi-comm { padding-top: 32px; }
    .fi-comm__title { gap: 0 12px; font-size: 24px; }
    .fi-comm__layout { grid-template-columns: 1fr; gap: 8px; }
    .fi-comm__visual { order: 2; justify-content: flex-end; }
    .fi-comm__mascot { max-height: 200px; }
    .fi-comm__copy { order: 1; padding-bottom: 0; }
    .fi-comm__door-link { grid-template-columns: 36px minmax(0, 1fr); }
    .fi-comm__door-cta { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
    .fi-comm__door-link, .fi-comm__door-cta i { transition: none; }
}
