/* --- RESET & VARS --- */
:root {
    --bg-black: #000000;
    --bg-dark: #0a0a0a;
    --bg-card: #111111;
    --text-white: #ffffff;
    --text-gray: #a3a3a3;
    --text-dim: #525252;
    --border-dim: #262626;
    --border-light: rgba(255, 255, 255, 0.1);

    --font-primary: system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Product Card Aspect Ratios */
    --aspect-ratio-laptop: 4/3;
    --aspect-ratio-tablet: 1;
    --aspect-ratio-phone: 1;

    /* SPACING SYSTEM */
    --spacing-3xs: 0.25rem;
    --spacing-2xs: 0.5rem;
    --spacing-xs: 0.75rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 5rem;
    --spacing-4xl: 6rem;
    --spacing-5xl: 8rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    font-family: var(--font-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* Fallback background if vars fail */
    background: #000;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- UTILITIES --- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #e5e5e5 50%, #525252 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.label-mono {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-black);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border: 1px solid #555;
}

::-webkit-scrollbar-thumb:hover {
    background: #fff;
}

/* --- HEADER --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--border-dim);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-title {
    display: block;
    font-size: 1.25rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: -0.05em;
    margin: 0;
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav-desktop nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-gray);
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-white);
}

/* --- MOBILE MENU --- */
.menu-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: block;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    background: black;
    height: 100vh;
    padding: 2rem;
    border-top: 1px solid var(--border-dim);
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-gray);
    padding: 1rem 0;
    border-bottom: 1px solid #222;
}

.mobile-cta {
    margin-top: 2rem;
}

/* --- CHROME BUTTON --- */
.chrome-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #ffffff, #d4d4d4, #737373);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 9999px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    color: black;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.chrome-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.6);
}

.chrome-btn .shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right, transparent, rgba(255, 255, 255, 0.4), transparent);
    pointer-events: none;
}

.chrome-btn .btn-content {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chrome-btn.small {
    padding: var(--spacing-xs) var(--spacing-lg);
    font-size: 0.875rem;
}

.chrome-btn.large {
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: 1.5rem;
}

.chrome-btn.xsmall {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.75rem;
}

.chrome-btn.full-width {
    width: 100%;
    padding: var(--spacing-md);
}

.chrome-btn.disabled-btn {
    background: linear-gradient(to bottom, #555, #333);
    border-color: #555;
    color: #aaa;
    box-shadow: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chrome-btn.disabled-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(150, 150, 150, 0.4);
    cursor: pointer;
}

/* --- HERO --- */
.hero-section {
    position: relative;
    padding: var(--spacing-5xl) var(--spacing-sm) var(--spacing-3xl) var(--spacing-sm);
    border-bottom: 1px solid var(--border-dim);
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spike-target {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.spike-target.center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    position: relative;
    z-index: 20;
    text-align: center;
    max-width: 1000px;
    width: 100%;
}

.pill-container {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

.pill {
    background: rgba(23, 23, 23, 0.5);
    border: 1px solid var(--border-dim);
    color: var(--text-gray);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    backdrop-filter: blur(4px);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 0.9;
    letter-spacing: -0.05em;
    margin-bottom: var(--spacing-lg);
}

.hero-sub {
    max-width: 48rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-text {
    font-size: 1.125rem;
    color: var(--text-gray);
    font-weight: 300;
    line-height: 1.4;
    margin-bottom: 2rem;
}

.highlight-text {
    color: white;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    display: block;
    margin-top: 0.5rem;
}

.micro-copy {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-top: var(--spacing-lg);
}

.bg-gradient-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(20, 20, 20, 0.1), transparent);
    pointer-events: none;
}

/* --- SECTIONS GENERAL --- */
.section-dark {
    background: var(--bg-dark);
    padding: var(--spacing-4xl) 0;
    border-bottom: 1px solid var(--border-dim);
}

.section-black {
    background: var(--bg-black);
    padding: var(--spacing-4xl) 0;
}

.border-top {
    border-top: 1px solid var(--border-dim);
}

.border-bottom {
    border-bottom: 1px solid var(--border-dim);
}

.section-header {
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-gray);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    max-width: 40rem;
}

.section-desc-large {
    font-size: 1.25rem;
    color: var(--text-gray);
    font-weight: 300;
}

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

/* --- GRIDS & CARDS --- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.card {
    position: relative;
    background: linear-gradient(135deg, #1f1f1f, #0a0a0a, #000);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 2rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s;
}

.card-hover:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-border-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.card-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.7s ease;
    pointer-events: none;
}

.card:hover .card-shine {
    transform: translateX(100%);
}

.card-content {
    position: relative;
    z-index: 10;
}

.pill-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.card-title-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.card-logo-placeholder {
    width: 40px;
    height: 40px;
    background-color: #2a2a2a;
    border-radius: 0.5rem;
    margin-right: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #d4d4d4;
    margin-bottom: 0.5rem;
}

.card:hover .card-title {
    color: white;
}

.card-headline {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
}

.card-arrow {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    color: var(--text-dim);
    transition: all 0.3s;
}

.card:hover .card-arrow {
    color: var(--text-white);
    transform: scale(1.2);
}

.card-apps {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.app-logo {
    width: 40px;
    height: 40px;
    background-color: #2a2a2a;
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
}

.app-logo svg {
    width: 100%;
    height: 100%;
}

/* --- CARD FLIP --- */
.grid-2 {
    perspective: 1000px;
}

.card-scene {
    min-height: 300px;
    cursor: pointer;
}

.card-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-scene.flipped .card-flipper {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Safari */
    transform-style: preserve-3d;
}

.card-face.back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #262626, #171717);
}

/* --- EXPERTISE --- */
.gap-large {
    gap: 3rem;
}

.mb-large {
    margin-bottom: 5rem;
}

.expertise-item .icon-box {
    width: 3rem;
    height: 3rem;
    background: #171717;
    border: 1px solid #262626;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    border-radius: 0.5rem;
}

.expertise-title {
    font-size: 1.875rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.expertise-desc {
    color: var(--text-gray);
    font-size: 1.125rem;
    line-height: 1.6;
}

/* --- PRODUCTS SCROLL --- */
.products-container {
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-dim);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.products-header .expertise-item {
    margin-bottom: 0;
}

.scroll-controls {
    display: flex;
    gap: 0.5rem;
}

.scroll-btn {
    background: transparent;
    border: 1px solid var(--border-dim);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-btn:hover {
    background: #262626;
}

.scroll-btn.hidden {
    display: none;
}

.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding-bottom: 2rem;
    scrollbar-width: none;
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding-left: max(1.5rem, calc(50vw - 1280px / 2 + 1.5rem));
    padding-right: max(1.5rem, calc(50vw - 1280px / 2 + 1.5rem));
    scroll-snap-type: x mandatory;
    scroll-snap-stop: always;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.product-card {
    flex: 0 0 auto;
    position: relative;
    background: linear-gradient(135deg, #1f1f1f, #0a0a0a, #000);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: border-color 0.3s;
    scroll-snap-align: center;

    /* Default to phone aspect ratio */
    width: 80vw;
    max-width: 400px;
    aspect-ratio: var(--aspect-ratio-phone);
}

@media (min-width: 768px) {
    .product-card {
        width: calc(50% - 0.75rem);
        aspect-ratio: var(--aspect-ratio-tablet);
    }
}

@media (min-width: 1024px) {
    .product-card {
        width: calc(33.333% - 1rem);
        aspect-ratio: var(--aspect-ratio-laptop);
    }
}


.product-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.bg-deco {
    position: absolute;
    top: -1.5rem;
    right: -1.5rem;
    transform: rotate(12deg);
    color: #404040;
    opacity: 0.2;
    pointer-events: none;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.product-card:hover .bg-deco {
    opacity: 0.3;
}

.bg-stripes {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.05) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
    opacity: 0.5;
    pointer-events: none;
}

.card-inner {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.status-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.status-label.available {
    color: #22c55e;
}

.status-label.dev {
    color: #737373;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.product-sub {
    font-size: 0.875rem;
    font-family: var(--font-mono);
    color: #737373;
}

.card-action {
    align-self: flex-end;
}

/* --- IDENTITY --- */
.identity-card {
    position: relative;
    border-radius: 0.75rem;
    padding: 2rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.identity-card.dark {
    background: linear-gradient(135deg, #0a0a0a, #000, #171717);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.identity-card.lighter {
    background: linear-gradient(135deg, #262626, #0a0a0a, #000);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.identity-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.identity-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #d4d4d4;
}

.identity-text.white {
    color: white;
}

.identity-text.text-gradient-silver {
    background: linear-gradient(to right, #737373, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.super-power-container {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
}

.scribble-box {
    position: relative;
    display: inline-block;
}

.scribble {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.scribble path {
    stroke: #525252;
    stroke-width: 3;
    fill: none;
}

.strikethrough {
    color: #525252;
}

/* --- FILTER --- */
.filter-card {
    position: relative;
    border-radius: 0.75rem;
    padding: 3rem;
    overflow: hidden;
}

.filter-card.bad {
    background: linear-gradient(135deg, #0a0a0a, #000, #111);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-card.good {
    background: linear-gradient(135deg, #262626, #0a0a0a, #000);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bg-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    opacity: 0.05;
    padding: 1rem;
}

.filter-header {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    display: inline-block;
}

.filter-header.red {
    color: #ef4444;
    border-bottom: 1px solid rgba(127, 29, 29, 0.3);
}

.filter-header.green {
    color: #22c55e;
    border-bottom: 1px solid rgba(20, 83, 45, 0.3);
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 10;
}

.filter-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-top: 0.6rem;
    flex-shrink: 0;
}

.dot.red {
    background: #7f1d1d;
}

.dot.green {
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
}

.white-bold {
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
}

/* --- BOTTOM HERO --- */
.bottom-hero {
    position: relative;
    padding: 8rem 1.5rem;
    background: black;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bottom-content {
    position: relative;
    z-index: 20;
}

/* --- FOOTER --- */
.site-footer {
    padding: 3rem 0;
    background: black;
    border-top: 1px solid var(--border-dim);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a:hover {
    color: white;
}

.see-more-container {
    text-align: center;
    margin-top: 2rem;
}

/* --- ANIMATIONS --- */
@keyframes drawPath {
    0% {
        stroke-dashoffset: 5000;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

.animate-draw {
    animation: drawPath 1s ease-out forwards;
}

.animate-draw-delayed {
    animation: drawPath 1s ease-out 0.1s forwards;
}

/* --- RESPONSIVE --- */
@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }

    .menu-toggle {
        display: none;
    }

    .hero-title {
        font-size: 5rem;
    }

    .hero-text {
        font-size: 1.5rem;
    }

    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .footer-flex {
        flex-direction: row;
        justify-content: space-between;
    }

    .identity-card,
    .filter-card {
        padding: 3rem;
    }
}