/* ============================================================
   CONSTRUVERSE — Home page
   ============================================================ */

/* ─── HERO ─── */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
    background: var(--bg);
}

.hero--has-bg-image {
    background-image:
        linear-gradient(rgba(7,10,16,0.76), rgba(7,10,16,0.88)),
        var(--hero-bg-image);
    background-size: cover, cover;
    background-position: center, center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 30%, rgba(245,197,24,0.12) 0%, transparent 45%),
        radial-gradient(circle at 20% 80%, rgba(96,165,250,0.05) 0%, transparent 40%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--yellow-soft), transparent);
}

/* Animated grid pattern */
.hero__grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
    pointer-events: none;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero__title {
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.hero__title-line {
    display: block;
    overflow: hidden;
}
.hero__title-line span {
    display: inline-block;
    transform: translateY(110%);
    animation: hero-line-reveal 0.9s var(--ease-out) forwards;
}
.hero__title-line:nth-child(2) span { animation-delay: 0.15s; }
.hero__title-line:nth-child(3) span { animation-delay: 0.3s; }

@keyframes hero-line-reveal {
    to { transform: translateY(0); }
}

.hero__subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 520px;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: hero-fade 0.8s var(--ease-out) 0.5s forwards;
}

@keyframes hero-fade {
    to { opacity: 1; }
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: hero-fade 0.8s var(--ease-out) 0.7s forwards;
}

.hero__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    opacity: 0;
    animation: hero-fade 0.8s var(--ease-out) 0.9s forwards;
}

/* Hero visual */
.hero__visual {
    position: relative;
    isolation: isolate;
    aspect-ratio: 4/5;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: linear-gradient(145deg, var(--surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border);
    opacity: 0;
    animation: hero-fade 1s var(--ease-out) 0.6s forwards;
}

.hero__visual-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: var(--hero-visual-bg-opacity, 0.36);
    filter: saturate(0.9) contrast(1.08);
    transform: scale(1.01);
}

.hero__visual::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(7,10,16,0.58) 0%, rgba(7,10,16,0.32) 46%, rgba(7,10,16,0.72) 100%),
        linear-gradient(135deg, transparent 50%, rgba(245,197,24,0.05) 100%),
        radial-gradient(circle at 70% 30%, rgba(245,197,24,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero__visual-frame {
    position: absolute;
    inset: 1.5rem;
    z-index: 3;
    border: 1px solid rgba(245,197,24,0.2);
    border-radius: var(--r-md);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
}

.hero__visual-corner {
    position: absolute;
    width: 20px; height: 20px;
    border: 2px solid var(--yellow);
}
.hero__visual-corner--tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.hero__visual-corner--tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.hero__visual-corner--bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.hero__visual-corner--br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.hero__visual-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-subtle);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero__visual-headset {
    position: absolute;
    z-index: 2;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 54%;
    aspect-ratio: 16/9;
    background: radial-gradient(ellipse at center, rgba(245,197,24,0.07) 0%, transparent 70%);
    display: grid;
    place-items: center;
    opacity: 0.48;
    animation: float 6s ease-in-out infinite;
}

.hero__visual-stat {
    position: absolute;
    z-index: 4;
    background: rgba(13,17,23,0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 0.75rem 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.hero__visual-stat--top {
    top: 2.5rem;
    right: 2.5rem;
    animation: float 8s ease-in-out infinite;
}
.hero__visual-stat--bot {
    bottom: 2.5rem;
    left: 2.5rem;
    animation: float 8s ease-in-out infinite reverse;
}
.hero__visual-stat__label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2px;
}
.hero__visual-stat__value {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--yellow);
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: hero-fade 1s ease-out 1.5s forwards;
}
.hero__scroll-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-subtle);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.hero__scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(180deg, var(--yellow), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50%      { opacity: 1;   transform: scaleY(1); }
}

@media (max-width: 900px) {
    .hero__inner { grid-template-columns: 1fr; gap: 3rem; }
    .hero__visual { aspect-ratio: 4/3; max-width: 500px; }
    .hero__scroll { display: none; }
}

/* ─── STATS ─── */
.stats {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 3.5rem 0;
}
.stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.stat {
    text-align: center;
    padding: 1rem 1.5rem;
    border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }

.stat__num {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4.5vw, 3.5rem);
    font-weight: 700;
    color: var(--yellow);
    line-height: 1;
    margin-bottom: 0.4rem;
    font-variant-numeric: tabular-nums;
}
.stat__label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@media (max-width: 768px) {
    .stats__grid { grid-template-columns: 1fr 1fr; }
    .stat { border-right: none; padding: 1.5rem 1rem; }
    .stat:nth-child(odd) { border-right: 1px solid var(--border); }
    .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

/* ─── PROBLEM ─── */
.problem__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}
.problem-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 2rem 1.75rem;
    transition: all var(--dur) var(--ease);
}
.problem-card:hover {
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(145deg, var(--surface) 0%, rgba(239,68,68,0.04) 100%);
}
.problem-card__icon {
    width: 48px; height: 48px;
    border-radius: var(--r);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    display: grid; place-items: center;
    margin-bottom: 1.25rem;
    color: var(--red);
}
.problem-card__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}
.problem-card__text {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}
.problem-callout {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, rgba(245,197,24,0.08), rgba(245,197,24,0.02));
    border: 1px solid rgba(245,197,24,0.2);
    border-radius: var(--r-md);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.problem-callout__label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--yellow);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.3rem;
}
.problem-callout__text {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .problem__grid { grid-template-columns: 1fr; }
    .problem-callout { flex-direction: column; text-align: center; gap: 0.5rem; }
}

/* ─── SOLUTION ─── */
.solution__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}
.solution__visual {
    position: relative;
    aspect-ratio: 5/6;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: linear-gradient(145deg, var(--surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border);
}
.solution__visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(8,10,15,0.8));
}
.solution__visual-content {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    z-index: 1;
}
.solution__pillars {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0 2.5rem;
}
.pillar {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.pillar__num {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--yellow-soft);
    border: 1px solid rgba(245,197,24,0.3);
    color: var(--yellow);
    display: grid; place-items: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}
.pillar__title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-family: var(--font-body);
}
.pillar__text {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .solution__inner { grid-template-columns: 1fr; gap: 3rem; }
    .solution__visual { max-width: 500px; margin: 0 auto; }
}

/* ─── SIMULATORS ─── */
.sims__filters {
    display: flex;
    gap: 0.5rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}
.sims__filter {
    padding: 0.55rem 1.3rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all var(--dur-fast);
}
.sims__filter:hover {
    border-color: rgba(245,197,24,0.4);
    color: var(--text);
}
.sims__filter.is-active {
    background: var(--yellow);
    border-color: var(--yellow);
    color: #000;
    font-weight: 600;
}

.sims__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.page-home .simulators__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.sim-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: all var(--dur) var(--ease);
    display: flex;
    flex-direction: column;
}
.sim-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px -20px rgba(0,0,0,0.5);
}

.page-home .sim-card__image {
    position: relative;
    height: clamp(150px, 14vw, 180px);
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1a2232 0%, #0d1117 100%);
    overflow: hidden;
}

.page-home .sim-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.page-home .sim-card:hover .sim-card__image img { transform: scale(1.05); }

.page-home .sim-card__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

.page-home .sim-card__image .sim-card__cat {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    margin: 0;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(245,197,24,0.24);
    border-radius: var(--r-sm);
    background: rgba(8,10,15,0.78);
    backdrop-filter: blur(10px);
}

.sim-card__media {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #1a2232 0%, #0d1117 100%);
    position: relative;
    overflow: hidden;
}
.sim-card__media::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(245,197,24,0.08) 0%, transparent 60%);
}
.sim-card__media-label {
    position: absolute;
    inset: 0;
    display: grid; place-items: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}
.sim-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}
.sim-card:hover .sim-card__media img { transform: scale(1.05); }

.sim-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.sim-card__cat {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--yellow);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
}
.sim-card__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}
.sim-card__title a { color: inherit; transition: color var(--dur-fast); }
.sim-card__title a:hover { color: var(--yellow); }

.sim-card__tagline {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 1rem;
    flex: 1;
}
.sim-card__hw {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 0.3rem 0.7rem;
    margin-bottom: 1rem;
    align-self: flex-start;
}
.sim-card__link {
    color: var(--yellow);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap var(--dur-fast);
    margin-top: auto;
}
.sim-card__link:hover { gap: 0.7rem; }

@media (max-width: 900px)  { .page-home .simulators__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px)  {
    .page-home .simulators__grid { grid-template-columns: 1fr; }
    .page-home .sim-card__image { height: clamp(160px, 48vw, 190px); }
}

@media (max-width: 900px)  { .sims__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px)  { .sims__grid { grid-template-columns: 1fr; } }

/* ─── SERVICES ─── */
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all var(--dur) var(--ease);
}
.service-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}
.service-card--featured {
    border-color: rgba(245,197,24,0.3);
    background: linear-gradient(145deg, rgba(245,197,24,0.06) 0%, var(--surface) 60%);
}
.service-card--featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--yellow), transparent);
}

.service-card__num {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 700;
    color: rgba(245,197,24,0.18);
    line-height: 1;
    margin-bottom: 0.75rem;
    font-variant-numeric: tabular-nums;
}
.service-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--yellow-soft);
    border: 1px solid rgba(245,197,24,0.3);
    color: var(--yellow);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    align-self: flex-start;
}
.service-card__title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    font-family: var(--font-body);
}
.service-card__desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
    flex: 1;
}
.service-card__features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.service-card__feature {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.service-card__feature::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--yellow);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 7px;
}
.service-card__audience {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}
.service-card__aud-pill {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.7rem;
    color: var(--text-subtle);
    padding: 0.25rem 0.7rem;
}

@media (max-width: 900px)  { .services__grid { grid-template-columns: 1fr; } }

/* ─── TECH ─── */
.tech__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}
.tech-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.75rem 1.5rem;
    transition: all var(--dur) var(--ease);
}
.tech-card:hover {
    border-color: var(--border-hover);
    background: linear-gradient(145deg, var(--surface), rgba(245,197,24,0.03));
}
.tech-card__icon {
    width: 44px; height: 44px;
    border-radius: var(--r);
    background: var(--yellow-soft);
    border: 1px solid rgba(245,197,24,0.2);
    display: grid; place-items: center;
    color: var(--yellow);
    margin-bottom: 1.25rem;
}
.tech-card__title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-family: var(--font-body);
}
.tech-card__text {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

@media (max-width: 900px) { .tech__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .tech__grid { grid-template-columns: 1fr; } }

/* ─── PARTNERS ─── */
.partners {
    padding: 4rem 0;
    border-top: 1px solid rgba(255,255,255,0.11);
    background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(245,197,24,0.045));
}
.partners__label {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(240,238,233,0.86);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 2.5rem;
}
.partners__list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
    opacity: 0.9;
}
.partners__item {
    height: 40px;
    display: grid; place-items: center;
    transition: opacity var(--dur-fast), filter var(--dur-fast);
}
.partners__item img {
    height: 100%;
    max-width: 160px;
    object-fit: contain;
    filter: grayscale(100%) brightness(0) invert(1) drop-shadow(0 0 18px rgba(255,255,255,0.14));
    opacity: 0.9;
}
.partners__item:hover img {
    filter: grayscale(0) brightness(1) invert(0);
    opacity: 1;
}
.partners__placeholder {
    color: rgba(240,238,233,0.88);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}
