/*
 * demo39 "Connect · Bento" — the Connect page as a precise bento grid over the dark DEPO
 * background: rounded photo tiles with glass captions, one 12 px gap everywhere, Poppins for the
 * names, Lato for the editorial captions, Lazurski for the big numerals.
 */
@font-face { font-family: "Lazurski"; src: url("/demo39/fonts/LazurskiRegular.woff2") format("woff2"), url("/demo39/fonts/LazurskiRegular.woff") format("woff"); font-weight: 400; font-display: swap; }

.bx {
    --gap: 12px;
    --r: 18px;
    --row: clamp(200px, 21vw, 300px);
    --glass: rgb(22 21 25 / 0.46);
    --glass-line: rgb(255 255 255 / 0.13);
    --ink-2: rgb(255 255 255 / 0.68);
    --ink-3: rgb(255 255 255 / 0.5);
    --spot-c: rgb(83 245 126);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    padding-top: 16px;
}
.main { padding-bottom: 96px; }

/* ── the grid ──────────────────────────────────────────────────────────────────────────────── */
.bento { display: grid; gap: var(--gap); grid-auto-flow: dense; }
.bento--hero { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, var(--row)); }
.bento--partners { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: var(--row); }
.bento--free { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bento--people { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: calc(var(--row) * 0.94); }

.bt { position: relative; display: block; min-width: 0; overflow: hidden; border-radius: var(--r); color: #fff; text-decoration: none; isolation: isolate; background: rgb(255 255 255 / 0.04); }
.bt--feat, .bt--big { grid-column: span 2; grid-row: span 2; }
.bt--tall { grid-row: span 2; }
.bt--wide { grid-column: span 2; }
.bt--mini { aspect-ratio: 4 / 5; }

.bt--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 1.1s var(--ease), filter 0.6s ease; }
.bt--photo::before { content: ""; position: absolute; inset: 45% 0 0; z-index: 1; background: linear-gradient(transparent, rgb(10 10 12 / 0.55)); pointer-events: none; }
.bt--photo::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07); pointer-events: none; transition: box-shadow 0.4s ease; }
.bt--photo:hover img { transform: scale(1.045); }
.bt--photo:hover::after { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.22); }
.bt:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

/* glass caption */
.cap {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    display: grid;
    gap: 3px;
    padding: 12px 14px 13px;
    border: 1px solid var(--glass-line);
    border-radius: calc(var(--r) - 8px);
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
}
.cap__kicker { font: 700 10.5px/1.3 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap__name { font: 600 20px/1.15 var(--font-head); letter-spacing: -0.01em; }
.cap__line { max-width: 44ch; font: 400 14px/1.45 var(--font); color: var(--ink-2); }
.cap__meta { margin-top: 4px; padding-top: 7px; border-top: 1px solid var(--glass-line); font: 400 12px/1.2 var(--font); letter-spacing: 0.06em; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cap--sm { left: 8px; right: 8px; bottom: 8px; padding: 9px 11px 10px; border-radius: calc(var(--r) - 9px); }
.cap--sm .cap__name { font-size: 15px; }
.cap--sm .cap__kicker { font-size: 10px; letter-spacing: 0.14em; }
.cap--lg { left: 14px; right: auto; bottom: 14px; max-width: min(460px, calc(100% - 28px)); padding: 18px 20px 18px; gap: 6px; }
.cap--lg .cap__name { font-size: clamp(30px, 3.2vw, 46px); line-height: 1; letter-spacing: -0.025em; }
.bt--wide .cap { right: auto; max-width: min(380px, calc(100% - 20px)); }

/* corner badges, as on the live cards */
.bxb { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 9px 4px; border-radius: 999px; font: 700 10px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bxb--paid { background: rgb(255 181 0 / 0.9); color: #18171a; }
.bxb--free { background: rgb(22 21 25 / 0.5); color: #fff; border: 1px solid var(--glass-line); }
.bxb--creator { background: rgb(22 21 25 / 0.5); color: var(--spot-c); border: 1px solid rgb(83 245 126 / 0.35); }

/* the featured partner: its next three issues stacked in the corner */
.bt__issues { position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; gap: 6px; padding: 6px; border: 1px solid var(--glass-line); border-radius: 12px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.bt__issue { position: relative; width: clamp(38px, 3.6vw, 54px); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; }
.bt__issue img { position: static; transform: none; }
.bt--featured:hover .bt__issue img { transform: none; }

/* text tiles */
.bt--text { display: flex; flex-direction: column; padding: clamp(20px, 2.4vw, 34px); border: 1px solid var(--glass-line); background: rgb(30 29 34 / 0.5); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
.bt--cta { justify-content: space-between; transition: background-color 0.4s ease, border-color 0.4s ease; }
.bt--cta:hover { background: rgb(40 39 45 / 0.62); border-color: rgb(255 255 255 / 0.24); }
.cta__num { font: 400 clamp(48px, 5vw, 76px)/0.9 "Lazurski", Georgia, serif; color: var(--yellow); letter-spacing: -0.02em; }
.cta__txt { max-width: 26ch; font: 400 15px/1.45 var(--font); color: var(--ink-2); }
.cta__go { font: 600 15px/1 var(--font-head); }
.cta__go span { display: inline-block; transition: transform 0.4s var(--ease); }
.bt--cta:hover .cta__go span { transform: translateX(5px); }
.bt--mini.bt--cta { padding: 16px; }
.bt--mini .cta__num { font-size: clamp(36px, 3.4vw, 54px); }
.bt--mini .cta__txt { font-size: 13px; }
.bt--mini .cta__go { font-size: 13px; }

/* ── banner ────────────────────────────────────────────────────────────────────────────────── */
.bt--hero-text { grid-column: span 2; grid-row: span 2; justify-content: flex-end; gap: 18px; }
.bt--hero-tall { grid-row: span 2; }
.bx-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 auto; font: 700 11px/1 var(--font); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2); }
.bx-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--spot-c); box-shadow: 0 0 12px rgb(83 245 126 / 0.8); }
.bx-title { font: 600 clamp(64px, 9.2vw, 148px)/0.86 var(--font-head); letter-spacing: -0.055em; margin-left: -0.04em; }
.bx-lead { max-width: 44ch; margin: 0; font: 400 clamp(16px, 1.3vw, 19px)/1.5 var(--font); color: var(--ink-2); }
.bx-stats { display: flex; gap: clamp(18px, 3vw, 44px); margin: 6px 0 0; padding-top: 16px; border-top: 1px solid var(--glass-line); }
.bx-stats div { display: grid; gap: 4px; }
.bx-stats dt { order: 2; font: 700 10.5px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.bx-stats dd { margin: 0; font: 400 34px/1 "Lazurski", Georgia, serif; font-variant-numeric: tabular-nums; }
.bx-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bx-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--glass-line); border-radius: 999px; color: #fff; font: 500 15px/1 var(--font-head); text-decoration: none; transition: background-color 0.3s ease, border-color 0.3s ease; }
.bx-btn:hover { border-color: rgb(255 255 255 / 0.4); }
.bx-btn--solid { border-color: var(--green); background: var(--green); }
.bx-btn--solid:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.bx-btn:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.bt--hero-note { justify-content: space-between; }
.bx-note__num { margin: 0; font: 400 clamp(56px, 6vw, 92px)/0.85 "Lazurski", Georgia, serif; color: var(--yellow); }
.bx-note__txt { max-width: 26ch; margin: 0; font: 400 14px/1.45 var(--font); color: var(--ink-2); }

/* ── section heads ─────────────────────────────────────────────────────────────────────────── */
.bx-sec { margin-top: clamp(64px, 8vw, 120px); }
.bx-head { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 0 clamp(16px, 2vw, 28px); margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line-strong); }
.bx-head__no { margin: 0 0 -6px; font: 400 clamp(56px, 6vw, 88px)/0.8 "Lazurski", Georgia, serif; color: rgb(255 255 255 / 0.22); font-variant-numeric: tabular-nums; }
.bx-head__kicker { margin: 0 0 8px; font: 700 11px/1 var(--font); letter-spacing: 0.24em; text-transform: uppercase; color: var(--yellow); }
.bx-head__title { font: 600 clamp(28px, 3vw, 44px)/1 var(--font-head); letter-spacing: -0.03em; }
.bx-head__all { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--glass-line); border-radius: 999px; color: #fff; font: 500 14px/1 var(--font-head); text-decoration: none; white-space: nowrap; transition: border-color 0.3s ease, background-color 0.3s ease; }
.bx-head__all:hover { border-color: rgb(255 255 255 / 0.4); background: rgb(255 255 255 / 0.05); }
.bx-head__all:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

/* ── reveal (only with JS, never with reduced motion) ──────────────────────────────────────── */
.bx-js .bento .bt { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.6s var(--ease), background-color 0.4s ease, border-color 0.4s ease; }
.bx-js .bento .bt.is-in { opacity: 1; transform: none; }

/* ── responsive ────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .bx { --row: clamp(190px, 30vw, 300px); }
    .bento--hero { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto var(--row) var(--row); }
    .bt--hero-text { grid-column: 1 / -1; grid-row: auto; min-height: 380px; }
    .bento--free { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .bento--free .bt--cta { grid-column: span 3; } /* 77 tiles + 3 = 80: no hole at 4 columns */
    .bento--people { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: calc(var(--row) * 1.1); }
}
@media (max-width: 900px) {
    .bento--partners { grid-template-columns: repeat(2, minmax(0, 1fr)); --row: clamp(170px, 46vw, 340px); }
}
@media (max-width: 640px) {
    .bx { --gap: 8px; --r: 14px; --row: clamp(150px, 44vw, 260px); padding-top: 4px; }
    .bento--hero { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto var(--row) var(--row); }
    .bt--hero-text { min-height: 0; padding-top: 28px; }
    .bt--hero-tall { grid-row: span 2; }
    .bx-stats dd { font-size: 28px; }
    .bento--free { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bento--free .bt--cta { grid-column: span 1; }
    .bento--people { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: calc(var(--row) * 1.25); }
    .bx-head { grid-template-columns: auto 1fr; }
    .bx-head__all { grid-column: 1 / -1; justify-self: start; margin-top: 14px; }
    .cap { left: 7px; right: 7px; bottom: 7px; padding: 9px 10px; }
    .cap__name { font-size: 16px; }
    .cap__meta, .bt--wide .cap__line { display: none; }
    .bt--wide .cap { right: 7px; max-width: none; }
    .cap--lg { left: 10px; right: 10px; bottom: 10px; max-width: none; padding: 14px; }
    .cap--lg .cap__line { font-size: 13px; }
    .cap--sm .cap__name { font-size: 13px; }
    .cap--sm .cap__kicker { font-size: 9px; letter-spacing: 0.1em; }
    .bento--free .cap--sm .cap__kicker { display: none; }
    .bxb { top: 8px; left: 8px; font-size: 9px; padding: 4px 7px 3px; }
    .bento--free .bxb { display: none; }
    .bt__issues { top: 10px; right: 10px; padding: 4px; gap: 4px; }
    .bt--mini.bt--cta { padding: 10px; }
    .bt--mini .cta__txt { display: none; }
    .bt--text.bt--sq { padding: 16px; }
    .bt--sq .cta__txt { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .bt--photo img, .bt--photo::after, .bt--cta, .cta__go span { transition: none; }
    .bt--photo:hover img { transform: none; }
}
