/* ==========================================================================
   sections.css - industry photo strip, custom feature icons, and the
   "Custom JavaScript & games" 3D section. Every rule is scoped to classes
   that only exist in the new markup, so loading this file next to style.css
   changes nothing else on the page.
   ========================================================================== */

:root {
    --mmas-warm: #f2a65a;
    --mmas-warm-soft: rgba(242, 166, 90, 0.14);
    --mmas-blue: #4a90d9;
}

/* === Industry strip (replaces the emoji proof row) === */
.industries {
    padding: 56px 0 64px;
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.industries-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.industries-head .section-tag { margin-bottom: 0; }
.industries-head p {
    font-size: 0.95rem; color: #8486a8; margin: 0;
}
.industry-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}
.industry-card {
    position: relative; overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    background: #0c0c12;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
    isolation: isolate;
}
.industry-card picture, .industry-card img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
}
.industry-card img {
    object-fit: cover; object-position: 50% 55%;
    transform: scale(1.01);
    transition: transform 0.9s cubic-bezier(.2,.7,.2,1), filter 0.6s ease;
    filter: saturate(0.95) brightness(0.92);
}
.industry-card::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(5,5,8,0) 45%, rgba(5,5,8,0.55) 72%, rgba(5,5,8,0.92) 100%);
    pointer-events: none;
}
.industry-label {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    padding: 14px 14px 13px;
    display: flex; flex-direction: column; gap: 2px;
}
.industry-name {
    font-size: 0.95rem; font-weight: 700; color: #fff; letter-spacing: -0.01em;
    line-height: 1.25;
}
.industry-sub {
    font-size: 0.76rem; color: #b4b6cc; line-height: 1.35;
}
.industry-card:hover img { transform: scale(1.06); filter: saturate(1.05) brightness(1); }

@media (max-width: 1023px) {
    .industry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
    .industry-card { aspect-ratio: 5 / 4; }
}
@media (max-width: 640px) {
    .industries { padding: 44px 0 48px; }
    .industries-head { margin-bottom: 16px; }
    .industries-head p { font-size: 0.88rem; }
    .industry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .industry-card { aspect-ratio: 1 / 1; border-radius: 12px; }
    .industry-label { padding: 10px 11px 10px; }
    .industry-name { font-size: 0.86rem; }
    .industry-sub { font-size: 0.7rem; }
}

/* === Feature icons: same tile + stroke treatment as the How It Works step icons === */
.feature-icon.feature-icon-svg {
    width: 64px; height: 64px; border-radius: 16px;
    background: rgba(74, 144, 217, 0.08);
    border: 1px solid rgba(74, 144, 217, 0.15);
    display: flex; align-items: center; justify-content: center;
    color: #4a90d9; font-size: 0; line-height: 0;
    margin: 0 0 20px;
}
.feature-icon.feature-icon-svg svg { display: block; }

/* === Custom JavaScript & games (3D) === */
.play3d {
    padding: 110px 0 100px;
    position: relative;
}
.play3d-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    gap: 56px; align-items: center;
}
.play3d-copy h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800; color: #fff; line-height: 1.08;
    letter-spacing: -0.02em; margin-bottom: 18px;
}
.play3d-copy h2 em {
    font-style: normal; color: var(--mmas-warm);
}
.play3d-lede {
    font-size: 1.1rem; color: #9a9cbc; line-height: 1.65;
    margin-bottom: 26px; max-width: 30em;
}
.play3d-list {
    list-style: none; margin: 0 0 32px; padding: 0;
    display: flex; flex-direction: column; gap: 12px;
}
.play3d-list li {
    display: flex; align-items: baseline; gap: 12px;
    font-size: 0.98rem; color: #c8c9dc;
}
.play3d-list li::before {
    content: ""; flex: 0 0 auto;
    width: 8px; height: 8px; transform: translateY(-1px) rotate(45deg);
    background: var(--mmas-warm);
    box-shadow: 0 0 0 3px var(--mmas-warm-soft);
}
.play3d-list li span { color: #7e80a2; }
.play3d-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.play3d-note { font-size: 0.85rem; color: #6f7194; }

.play3d-stage {
    position: relative; overflow: hidden;
    aspect-ratio: 5 / 4;
    border-radius: 22px;
    background: #09090f;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,0,0,0.4) inset;
    user-select: none; -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.play3d-poster, .play3d-canvas {
    position: absolute; inset: 0; width: 100%; height: 100%;
}
.play3d-poster { object-fit: cover; }
.play3d-canvas {
    display: block; opacity: 0;
    transition: opacity 0.6s ease;
    touch-action: manipulation;
}
.play3d-stage.is-live .play3d-canvas { opacity: 1; }
.play3d-stage.is-hovering .play3d-canvas { cursor: pointer; }
.play3d-vignette {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* HUD */
.play3d-hud {
    position: absolute; top: 14px; left: 16px; right: 16px;
    display: flex; justify-content: space-between; align-items: flex-start;
    pointer-events: none;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    opacity: 0; transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.play3d-stage[data-mode="play"] .play3d-hud,
.play3d-stage[data-mode="over"] .play3d-hud { opacity: 1; transform: none; }
.play3d-label {
    display: block; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: #8486a8; margin-bottom: 2px;
}
.play3d-score-val, .play3d-time-val {
    font-size: 1.6rem; font-weight: 500; color: #fff; line-height: 1;
    font-variant-numeric: tabular-nums;
    display: inline-block;
}
.play3d-time { text-align: right; padding-right: 44px; }
.play3d-time.is-low .play3d-time-val { color: var(--mmas-warm); }
.play3d-score-val.bump { animation: play3dBump 0.22s ease-out; }
@keyframes play3dBump { 0% { transform: scale(1.25); color: var(--mmas-warm); } 100% { transform: scale(1); } }
.play3d-combo {
    display: inline-block; margin-left: 10px; vertical-align: 4px;
    font-size: 0.78rem; font-weight: 500; color: #120a02;
    background: var(--mmas-warm); border-radius: 6px; padding: 2px 6px;
    opacity: 0; transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.play3d-combo.on { opacity: 1; transform: scale(1); }

/* Sound toggle (top right, always available once live) */
.play3d-sound {
    position: absolute; top: 12px; right: 12px; z-index: 3;
    width: 36px; height: 36px; border-radius: 10px;
    display: none; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05); color: #9a9cbc;
    border: 1px solid rgba(255,255,255,0.08); cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.play3d-stage.is-live .play3d-sound { display: flex; }
.play3d-sound:hover { color: #fff; background: rgba(255,255,255,0.09); }
.play3d-sound[aria-pressed="true"] { color: var(--mmas-warm); border-color: rgba(242,166,90,0.35); }
.play3d-sound .s-on { display: none; }
.play3d-sound[aria-pressed="true"] .s-on { display: block; }
.play3d-sound[aria-pressed="true"] .s-off { display: none; }

/* Score pops */
.play3d-pops { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.play3d-pop {
    position: absolute; transform: translate(-50%, -50%);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 1rem; font-weight: 500; color: #fff; white-space: nowrap;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    animation: play3dPop 0.75s ease-out forwards;
}
.play3d-pop.gold { color: #ffd36b; font-size: 1.2rem; }
.play3d-pop small { font-size: 0.72em; color: var(--mmas-warm); margin-left: 4px; }
@keyframes play3dPop {
    0% { opacity: 0; transform: translate(-50%, -30%) scale(0.7); }
    15% { opacity: 1; transform: translate(-50%, -60%) scale(1.08); }
    100% { opacity: 0; transform: translate(-50%, -190%) scale(1); }
}

/* Overlays */
.play3d-overlay {
    position: absolute; left: 0; right: 0; bottom: 18px;
    display: flex; justify-content: center; pointer-events: none;
}
.play3d-overlay[hidden] { display: none; }
.play3d-start {
    pointer-events: auto;
    display: inline-flex; align-items: center; gap: 10px;
    font-family: inherit; font-size: 0.92rem; font-weight: 600; color: #fff;
    padding: 11px 18px 11px 14px; border-radius: 100px; cursor: pointer;
    background: rgba(12, 12, 18, 0.72);
    border: 1px solid rgba(242, 166, 90, 0.35);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.play3d-start:hover { transform: translateY(-2px); border-color: rgba(242,166,90,0.7); }
.play3d-start .dot {
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--mmas-warm); color: #160c02;
}
.play3d-stage[data-mode="play"] .play3d-overlay[data-overlay="start"],
.play3d-stage[data-mode="over"] .play3d-overlay[data-overlay="start"] { display: none; }

.play3d-end { top: 0; bottom: 0; align-items: center; background: rgba(5,5,8,0.35); }
.play3d-end-card {
    pointer-events: auto; text-align: center;
    min-width: 260px; max-width: calc(100% - 32px);
    padding: 24px 26px 22px; border-radius: 18px;
    background: rgba(12, 12, 18, 0.82);
    border: 1px solid rgba(255,255,255,0.09);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: play3dCardIn 0.35s cubic-bezier(.2,.8,.2,1);
}
@keyframes play3dCardIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
.play3d-end-label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: #8486a8;
}
.play3d-end-score { font-size: 2.6rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; line-height: 1.15; margin: 4px 0 2px; }
.play3d-end-score small { font-size: 0.45em; font-weight: 600; color: #8486a8; margin-left: 4px; }
.play3d-end-best { font-size: 0.88rem; color: #9a9cbc; min-height: 1.4em; margin-bottom: 16px; }
.play3d-end-best.is-new { color: var(--mmas-warm); font-weight: 600; }
.play3d-end-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.play3d-end-actions .btn { padding: 11px 24px; font-size: 0.95rem; }
.play3d-end-link { font-size: 0.85rem; color: #b4b6cc; border-bottom: 1px solid rgba(180,182,204,0.3); padding-bottom: 1px; }
.play3d-end-link:hover { color: #fff; border-color: #fff; }

/* Fallback (no WebGL or the library failed to load): keep the still, explain briefly */
.play3d-fallback-note {
    display: none;
    position: absolute; left: 0; right: 0; bottom: 14px; text-align: center;
    font-size: 0.8rem; color: #b4b6cc; text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}
.play3d-stage.is-fallback .play3d-fallback-note { display: block; }
.play3d-stage.is-fallback .play3d-overlay,
.play3d-stage.is-fallback .play3d-hud,
.play3d-stage.is-fallback .play3d-canvas { display: none; }

@media (max-width: 900px) {
    .play3d { padding: 90px 0 80px; }
    .play3d-inner { grid-template-columns: 1fr; gap: 36px; }
    .play3d-copy { max-width: 560px; }
}
@media (max-width: 640px) {
    .play3d { padding: 72px 0 64px; }
    .play3d-stage { aspect-ratio: 4 / 5; border-radius: 18px; }
    .play3d-lede { font-size: 1rem; }
    .play3d-list li { font-size: 0.93rem; }
    .play3d-score-val, .play3d-time-val { font-size: 1.35rem; }
    .play3d-end-score { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) {
    .play3d-pop { animation-duration: 0.4s; }
    .play3d-end-card { animation: none; }
    .industry-card img { transition: none; }
}
