/* ===== Integrations Catalog (re-themed to Zensia's light palette) ===== */
.ic-section {
    --ic-bg: #f8fafc;
    --ic-panel: #ffffff;
    --ic-line: rgba(15,23,42,.08);
    --ic-text: #0f172a;
    --ic-muted: #64748b;
    --ic-dim: #94a3b8;
    --ic-accent: #00A896;
    /* front-row icon size; everything on the shelf scales from it */
    --u: clamp(40px, 7.2vw, 84px);
    background: var(--ic-bg);
    color: var(--ic-text);
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

.ic-section button, .ic-section input { font: inherit; color: inherit; }
.ic-section a { color: inherit; text-decoration: none; }

/* ---------- hero ---------- */
.ic-hero {
    text-align: center;
    padding: clamp(48px, 9vh, 88px) 20px 0;
}

.ic-hero h2 {
    margin: 0;
    font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;   /* same as the hero title */
    font-weight: 500;
    font-size: clamp(28px, min(4.3vw, 6.2vh), 46px);
    line-height: 1.08;
    letter-spacing: -0.022em;
    color: var(--ic-text);
}

.ic-lede {
    margin: 18px auto 0;
    max-width: 34em;
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.5;
    color: var(--ic-muted);
}

/* ---------- 3D icon shelf ---------- */
.ic-shelf {
    position: relative;
    height: calc(var(--u) * 3.75);
    margin: clamp(24px, 5vh, 44px) auto 0;
    --px: 0;
    --py: 0;
}

/* soft grounding shadow beneath the front row (light-theme version of the
   original's glow — a bright pool doesn't read on a light background) */
.ic-shelf::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(var(--u) * .7);
    width: calc(var(--u) * 11);
    height: calc(var(--u) * 3);
    translate: -50% 0;
    background: radial-gradient(50% 50% at 50% 60%, rgba(15,23,42,.07), transparent 70%);
    pointer-events: none;
}

.ic-row {
    position: absolute;
    left: 50%;
    bottom: calc(var(--u) * 1.15);
    width: 0;
    height: var(--u);
    transform-origin: 50% 100%;
    transform:
        translateX(calc(var(--px) * (4 - var(--z)) * 7px))
        translateY(calc(var(--z) * var(--u) * -.62 + var(--py) * (4 - var(--z)) * 3px))
        scale(calc(1 - var(--z) * .2));
    filter: blur(calc(var(--z) * 1px)) brightness(calc(1 - var(--z) * .08));
    transition: transform .6s cubic-bezier(.16,1,.3,1);
}

.ic-bob {
    position: absolute;
    left: calc(var(--x) * var(--u) * 1.72);
    bottom: 0;
    translate: -50% calc(var(--x) * var(--x) * var(--z, 0) * var(--u) * .035);
}

.ic-row .ic-tile { animation: ic-bob 5.5s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -1); }

@keyframes ic-bob {
    from { transform: translateY(0); }
    to   { transform: translateY(calc(var(--u) * -.06)); }
}

/* blurred mirror of the front row */
.ic-reflection {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--u) * 1.15);
    pointer-events: none;
    -webkit-mask: linear-gradient(180deg, rgba(0,0,0,.18), transparent 85%);
            mask: linear-gradient(180deg, rgba(0,0,0,.18), transparent 85%);
}

.ic-reflection .ic-row {
    top: calc(var(--u) * .08);
    bottom: auto;
    transform: translateX(calc(var(--px) * 28px)) scaleY(-1);
    transform-origin: 50% 50%;
    filter: blur(5px) brightness(.96);
}

.ic-reflection .ic-tile { animation: none; }

.ic-tile {
    position: relative;
    display: grid;
    place-items: center;
    width: var(--t, var(--u));
    aspect-ratio: 1;
    border-radius: 23%;
    background: var(--bg);
    box-shadow:
        0 calc(var(--t, var(--u)) * .1) calc(var(--t, var(--u)) * .24) rgba(15,23,42,.16),
        0 1px 0 rgba(15,23,42,.04),
        inset 0 1px 0 rgba(255,255,255,.5),
        inset 0 calc(var(--t, var(--u)) * -.05) calc(var(--t, var(--u)) * .1) rgba(0,0,0,.1);
}

.ic-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 48%);
    pointer-events: none;
}

.ic-tile svg {
    width: 54%;
    height: 54%;
    fill: var(--fg);
    position: relative;
    z-index: 1;
}

/* ---------- catalog ---------- */
.ic-catalog {
    width: min(1060px, calc(100% - 32px));
    margin: clamp(28px, 5vh, 48px) auto 0;
    padding-bottom: 80px;
}

.ic-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.ic-tabs {
    display: flex;
    gap: 2px;
    padding: 4px;
    border-radius: 10px;
    background: #eef2f6;
    border: 1px solid var(--ic-line);
    overflow-x: auto;
    scrollbar-width: none;
}

.ic-tabs::-webkit-scrollbar { display: none; }

.ic-tab {
    flex: none;
    padding: 6px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ic-dim);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.ic-tab:hover { color: var(--ic-text); }
.ic-tab[aria-pressed="true"] { background: var(--ic-accent); color: #ffffff; }
.ic-tab:focus-visible { outline: 2px solid var(--ic-accent); outline-offset: 2px; }

.ic-search { position: relative; width: min(186px, 100%); }

.ic-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    translate: 0 -50%;
    width: 16px;
    height: 16px;
    stroke: var(--ic-dim);
    pointer-events: none;
}

.ic-search input {
    width: 100%;
    padding: 9px 12px 9px 34px;
    border-radius: 8px;
    border: 1px solid var(--ic-line);
    background: var(--ic-panel);
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.ic-search input::placeholder { color: var(--ic-dim); }
.ic-search input:focus { border-color: rgba(0,168,150,.5); box-shadow: 0 0 0 3px rgba(0,168,150,.08); }

.ic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
    gap: clamp(12px, 2vw, 26px);
}

.ic-card {
    position: relative;
    padding: 16px 16px 20px;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid var(--ic-line);
    box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 16px 32px -24px rgba(15,23,42,.18);
    overflow: hidden;
    transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s ease, box-shadow .3s ease;
}

/* teal light that follows the pointer */
.ic-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(0,168,150,.09), transparent 70%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}

.ic-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0,168,150,.3);
    box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 20px 40px -20px rgba(15,23,42,.22);
}

.ic-card:hover::before { opacity: 1; }

.ic-card header { display: flex; align-items: center; gap: 12px; }

.ic-tile--sm { --t: 36px; border-radius: 9px; }

.ic-card h3 {
    margin: 0;
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--ic-text);
}

.ic-card p {
    margin: 16px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ic-muted);
}

.ic-card[hidden] { display: none; }

.ic-empty {
    margin: 40px 0;
    text-align: center;
    color: var(--ic-muted);
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
    .ic-toolbar { flex-direction: column; align-items: stretch; }
    .ic-search { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .ic-row .ic-tile { animation: none; }
    .ic-row, .ic-card { transition: none; }
}
