/* ========================================= */
/*  VISIOGRADE — Product Page                */
/*  Builds on home.css design system         */
/* ========================================= */

/* ---------- Hero ---------- */
.vg-hero {
    position: relative;
    z-index: 2;
    padding-top: clamp(140px, 16vw, 190px);
    padding-bottom: clamp(40px, 6vw, 64px);
    text-align: center;
    overflow: hidden;
}

.vg-hero::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1000px;
    height: 620px;
    background: radial-gradient(ellipse at center,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 35%,
        transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.vg-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vg-logo {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--bg-elev-2);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    margin-bottom: 24px;
    object-fit: cover;
}

.vg-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.03em;
    color: var(--text-soft);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 0 22px rgba(255, 255, 255, 0.06);
    margin-bottom: 26px;
}

.vg-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.vg-hero-title {
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.038em;
    background: linear-gradient(180deg, #ffffff 0%, #9a9a9a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    max-width: 16ch;
}

.vg-hero-sub {
    margin-top: 22px;
    max-width: 560px;
    color: var(--text-muted);
    font-size: 1.06rem;
    line-height: 1.65;
}

.vg-hero-actions {
    margin-top: 34px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

/* ---------- Phone deck (cohesive side-by-side gallery) ---------- */
.phone-deck-section {
    position: relative;
    z-index: 2;
    padding: clamp(20px, 4vw, 40px) 0 clamp(60px, 8vw, 90px);
}

.phone-deck {
    display: flex;
    gap: 18px;
    justify-content: center;
    align-items: flex-end;
    padding: 20px 8px 30px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    perspective: 1400px;
}

.phone-deck::-webkit-scrollbar { height: 8px; }
.phone-deck::-webkit-scrollbar-track { background: transparent; }
.phone-deck::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
}

.phone {
    position: relative;
    flex: 0 0 auto;
    width: clamp(150px, 17vw, 210px);
    aspect-ratio: 9 / 19;
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 8px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    overflow: hidden;
    scroll-snap-align: center;
    transition: transform 0.5s var(--ease), border-color 0.4s var(--ease),
        box-shadow 0.5s var(--ease);
    transform-origin: bottom center;
    will-change: transform;
}

/* Slight staggered tilt for a cohesive fan — straightens on hover */
.phone:nth-child(1) { transform: translateY(14px) rotate(-4deg); }
.phone:nth-child(2) { transform: translateY(4px)  rotate(-2deg); }
.phone:nth-child(3) { transform: translateY(0)    rotate(0deg);   z-index: 3; }
.phone:nth-child(4) { transform: translateY(4px)  rotate(2deg);  }
.phone:nth-child(5) { transform: translateY(14px) rotate(4deg);  }

.phone:hover {
    transform: translateY(-14px) rotate(0deg) scale(1.04);
    border-color: var(--border-hover);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    z-index: 5;
}

.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: #050505;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease);
}

.phone:hover .phone-screen img {
    transform: scale(1.05);
}

/* Notch */
.phone-notch {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 58%;
    height: 18px;
    background: #000;
    border-radius: 0 0 12px 12px;
    z-index: 4;
}

.phone-deck-hint {
    text-align: center;
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    text-transform: uppercase;
}

/* ---------- Stat strip ---------- */
.vg-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 28px 0;
}

.vg-stat {
    text-align: center;
}

.vg-stat-num {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(180deg, #ffffff 0%, #8a8a8a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.vg-stat-label {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* ---------- Features bento ---------- */
.vg-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.vg-feature {
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 30px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease),
        transform 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.vg-feature::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
        rgba(255, 255, 255, 0.05), transparent 45%);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
    pointer-events: none;
}

.vg-feature:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    background: var(--bg-elev-3);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.vg-feature:hover::after { opacity: 1; }

.vg-feature .vf-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--text-faint);
}

.vg-feature .vf-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--bg-elev-1);
    display: grid;
    place-items: center;
    color: var(--text);
    font-size: 22px;
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.vg-feature:hover .vf-icon {
    border-color: var(--border-hover);
}

.vg-feature h3 {
    font-size: 1.22rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.vg-feature p {
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.65;
}

/* ---------- Score highlight ---------- */
.vg-score {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(36px, 5vw, 56px);
    align-items: center;
}

.vg-score-text h2 {
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.12;
}

.vg-score-text p {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 1.04rem;
    line-height: 1.7;
    max-width: 480px;
}

.vg-score-list {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.vg-score-row {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.vg-score-row-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.9rem;
}

.vg-score-row-head .label { color: var(--text-soft); }
.vg-score-row-head .val {
    font-family: var(--font-mono);
    color: var(--text);
    font-weight: 600;
}

.vg-score-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--bg-elev-3);
    border: 1px solid var(--border);
    overflow: hidden;
}

.vg-score-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, #ffffff 0%, #888 100%);
    transition: width 1.2s var(--ease);
}

/* Score card visual */
.score-card {
    background: var(--bg-elev-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.score-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.score-card-head .sc-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.score-card-head .sc-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #4ade80;
}

.score-card-head .sc-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
    animation: blink 2.4s ease-in-out infinite;
}

.score-big {
    font-size: clamp(3rem, 7vw, 4.6rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    background: linear-gradient(180deg, #ffffff 0%, #8a8a8a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.score-big .sc-unit {
    font-size: 1.2rem;
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
    font-weight: 500;
}

.sc-stars {
    margin-top: 12px;
    display: flex;
    gap: 5px;
    color: #fff;
    font-size: 1.2rem;
}

.sc-stars .empty { color: var(--text-faint); }

.sc-divider {
    height: 1px;
    background: var(--border);
    margin: 22px 0;
}

.sc-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}

.sc-meta-row .ml { color: var(--text-muted); }
.sc-meta-row .mr {
    font-family: var(--font-mono);
    color: var(--text);
    font-weight: 600;
}

/* ---------- CTA ---------- */
.vg-cta {
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg-elev-1);
}

.vg-cta-inner {
    max-width: 620px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vg-cta h2 {
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.vg-cta p {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 1.04rem;
    max-width: 460px;
}

.vg-cta-actions {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.vg-cta-note {
    margin-top: 18px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .vg-features { grid-template-columns: 1fr; }
    .vg-score { grid-template-columns: 1fr; }
    .vg-stats { grid-template-columns: repeat(2, 1fr); gap: 22px 16px; }
}

@media (max-width: 560px) {
    .vg-stats { grid-template-columns: 1fr 1fr; }
    .vg-hero-actions .btn,
    .vg-cta-actions .btn { flex: 1 1 auto; }
    .phone {
        width: 170px;
    }
    /* Flatten the fan on small screens for cleaner scroll */
    .phone:nth-child(1),
    .phone:nth-child(2),
    .phone:nth-child(3),
    .phone:nth-child(4),
    .phone:nth-child(5) {
        transform: translateY(0) rotate(0deg);
    }
    .phone:hover {
        transform: translateY(-10px) scale(1.03);
    }
}
