/**
 * Why Us Block Styles — matches ALKEMIA-Genesis WhyAlkemia.tsx
 *
 * @package AloraAlkemia
 */

/* ── Section ─────────────────────────────────────────────── */
.why-section {
    position: relative;
    background-color: oklch(0.13 0.04 260);
    background-image:
        radial-gradient(1200px 700px at 20% -10%, color-mix(in oklab, var(--color-red) 18%, transparent), transparent 55%),
        radial-gradient(900px 600px at 100% 90%, color-mix(in oklab, #092D4D 35%, transparent), transparent 60%),
        linear-gradient(180deg, oklch(0.14 0.045 260) 0%, oklch(0.11 0.04 260) 50%, oklch(0.16 0.05 260) 100%);
    padding: 112px 0;
    overflow: hidden;
}

/* ── Atmosphere ──────────────────────────────────────────── */
.why-atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.why-atmosphere__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, color-mix(in oklab, currentColor 10%, transparent) 1px, transparent 1px),
        linear-gradient(to bottom, color-mix(in oklab, currentColor 10%, transparent) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 40%, transparent 100%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 40%, transparent 100%);
}

.why-orb-1 {
    position: absolute;
    top: -8rem;
    left: 20%;
    width: 30rem;
    height: 30rem;
    border-radius: 9999px;
    background: radial-gradient(circle, color-mix(in oklab, var(--color-red) 28%, transparent), transparent 70%);
    opacity: 0.45;
}

.why-orb-2 {
    position: absolute;
    bottom: -10rem;
    right: -6rem;
    width: 34rem;
    height: 34rem;
    border-radius: 9999px;
    background: radial-gradient(circle, color-mix(in oklab, #092D4D 60%, transparent), transparent 70%);
    opacity: 0.55;
}

/* ── Container z-index ───────────────────────────────────── */
.why-section .container {
    position: relative;
    z-index: 1;
}

/* ── Header ──────────────────────────────────────────────── */
.why-header {
    max-width: 768px;
    margin-bottom: 4rem;
}

/* Badge: bar + text */
.why-badge-wrap {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.why-badge-bar {
    display: block;
    width: 2px;
    height: 16px;
    background: var(--color-red);
    flex-shrink: 0;
}

.why-badge-text {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.42em;
    color: var(--color-red);
    line-height: 1;
}

/* Title */
.why-title {
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-white);
    margin: 0 0 1.5rem;
}

.why-title .text-vermilion { color: var(--color-red); }

/* Description */
.why-description {
    font-size: var(--text-lg);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ── Card grid ───────────────────────────────────────────── */
/*
 * 6-column base lets us center orphaned last rows via CSS.
 * Each card spans 2 cols → same visual width as a 3-col grid.
 * Orphan rows (1 or 2 items) use grid-column offsets to center.
 */
.why-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* ── Card ────────────────────────────────────────────────── */
/* Each card spans 2 of 6 grid cols (= 1 of 3 visually) */
.why-card {
    grid-column: span 2;
    background: color-mix(in oklab, white 4%, transparent);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    border: 1px solid color-mix(in oklab, white 8%, transparent);
    border-radius: 8px;
    padding: 1.75rem;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

/* 2 orphans in last row: shift first to col 2 → centered [_][C][C][_] */
.why-card:nth-last-child(2):nth-child(3n + 1) {
    grid-column: 2 / span 2;
}

/* 1 orphan in last row: shift to col 3 → centered [_][_][C][_][_] */
.why-card:last-child:nth-child(3n + 1) {
    grid-column: 3 / span 2;
}

.why-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-red) 30%, transparent),
                0 20px 60px -20px color-mix(in oklab, var(--color-red) 25%, transparent);
}

/* Icon */
.why-card-icon {
    color: var(--color-red);
    margin-bottom: 1.25rem;
}

.why-icon-svg,
.why-card-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.4;
}

/* Title */
.why-card-title {
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: var(--text-lg);
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--text-white);
    margin: 0 0 0.5rem;
}

/* Description */
.why-card-desc {
    font-size: var(--text-sm);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

/* ── CTA ─────────────────────────────────────────────────── */
.why-cta {
    margin-top: 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1023px) {
    .why-section { padding: 80px 0; }
    /* 4-column base → 2 cards per row (each spans 2 of 4) */
    .why-grid { grid-template-columns: repeat(4, 1fr); }
    /* Reset orphan centering — not needed at 2-col layout */
    .why-card:nth-last-child(2):nth-child(3n + 1),
    .why-card:last-child:nth-child(3n + 1) { grid-column: span 2; }
}

@media (max-width: 767px) {
    .why-section { padding: 64px 0; }
    .why-header { margin-bottom: 2.5rem; }
    .why-grid { grid-template-columns: 1fr; }
    .why-card,
    .why-card:nth-last-child(2):nth-child(3n + 1),
    .why-card:last-child:nth-child(3n + 1) {
        grid-column: 1 / -1;
        padding: 1.5rem;
    }
}
