/* ===== Custom Properties ===== */
:root {
    --bg-deep: #08080a;
    --bg-base: #0e0e12;
    --bg-surface: #16161c;
    --bg-card: #1c1c24;
    --bg-card-hover: #22222c;
    --accent: #e4a63a;
    --accent-glow: rgba(228, 166, 58, 0.25);
    --accent-soft: #f5c96e;
    --mint: #3dd68c;
    --mint-glow: rgba(61, 214, 140, 0.2);
    --violet: #a878f0;
    --violet-glow: rgba(168, 120, 240, 0.2);
    --text: #eaeaf0;
    --text-muted: #7c7c96;
    --text-dim: #55556a;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "Outfit", sans-serif;
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: "Bricolage Grotesque", sans-serif;
}

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

/* ===== Grain Overlay ===== */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px;
}

/* ===== Animations ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glowPulse {
    0%,
    100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 3rem;
    background: rgba(8, 8, 10, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    animation: fadeIn 0.8s ease both;
}

.navbar-brand {
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    color: var(--text);
}

.navbar-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.navbar-links a {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
}

.navbar-links a::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar-links a:hover {
    color: var(--text);
}

.navbar-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 3rem 6rem;
    overflow: hidden;
    background: var(--bg-deep);
}

/* Decorative grid pattern */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(
        ellipse 70% 60% at 30% 50%,
        black 20%,
        transparent 70%
    );
    -webkit-mask-image: radial-gradient(
        ellipse 70% 60% at 30% 50%,
        black 20%,
        transparent 70%
    );
}

/* Ambient glow orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
}

.hero-orb.orb-1 {
    width: 500px;
    height: 500px;
    top: -10%;
    right: -5%;
    background: var(--accent-glow);
    animation: glowPulse 6s ease-in-out infinite;
}

.hero-orb.orb-2 {
    width: 350px;
    height: 350px;
    bottom: 5%;
    left: 10%;
    background: var(--mint-glow);
    animation: glowPulse 8s ease-in-out infinite 2s;
}

.hero-orb.orb-3 {
    width: 250px;
    height: 250px;
    top: 30%;
    left: 45%;
    background: var(--violet-glow);
    animation: glowPulse 7s ease-in-out infinite 4s;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 740px;
}

.hero-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(228, 166, 58, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    margin-bottom: 2rem;
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.hero h1 .accent {
    color: var(--accent);
}

.hero-tagline {
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.hero-cta {
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-sm);
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
    background: var(--accent);
    color: #0a0a0b;
    box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-soft);
    transform: translateY(-2px);
    box-shadow: 0 8px 40px var(--accent-glow);
}

.btn-primary .arrow {
    transition: transform 0.3s;
}

.btn-primary:hover .arrow {
    transform: translateX(4px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-hover);
    margin-left: 0.75rem;
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

/* ===== Products ===== */
.products {
    position: relative;
    padding: 8rem 3rem;
    background: var(--bg-base);
}

/* Diagonal separator */
.products::before {
    content: "";
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 120px;
    background: var(--bg-base);
    clip-path: polygon(0 50%, 100% 0, 100% 100%, 0 100%);
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    text-align: center;
    margin-bottom: 0.75rem;
}

.section-heading {
    text-align: center;
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.section-subheading {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 480px;
    margin: 0 auto 4rem;
    line-height: 1.7;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Staggered vertical offset */
.product-card:nth-child(2) {
    transform: translateY(2rem);
}

.product-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Top accent line on cards */
.product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 2rem;
    right: 2rem;
    height: 2px;
    border-radius: 0 0 2px 2px;
    opacity: 0;
    transition: opacity 0.4s;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.product-card:nth-child(2):hover {
    transform: translateY(calc(2rem - 4px));
}

/* Per-card accent colors */
.product-card.card-recipehaul::before {
    background: var(--accent);
}
.product-card.card-autodiag::before {
    background: var(--mint);
}
.product-card.card-inkpilot::before {
    background: var(--violet);
}

.product-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
    overflow: hidden;
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.product-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.product-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 1.25rem;
}

.product-description {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.75;
    flex: 1;
    margin-bottom: 2rem;
}

.btn-card {
    align-self: flex-start;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-card.btn-recipehaul {
    background: rgba(228, 166, 58, 0.12);
    color: var(--accent);
    border: 1px solid rgba(228, 166, 58, 0.2);
}

.btn-card.btn-recipehaul:hover {
    background: rgba(228, 166, 58, 0.2);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-card.btn-autodiag {
    background: rgba(61, 214, 140, 0.08);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: default;
}

.btn-card.btn-inkpilot {
    background: rgba(168, 120, 240, 0.12);
    color: var(--violet);
    border: 1px solid rgba(168, 120, 240, 0.2);
}

.btn-card.btn-inkpilot:hover {
    background: rgba(168, 120, 240, 0.2);
    box-shadow: 0 4px 20px var(--violet-glow);
}

/* ===== About ===== */
.about {
    position: relative;
    padding: 8rem 3rem;
    background: var(--bg-deep);
}

.about-inner {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: start;
}

.about-rule {
    width: 3px;
    height: 100%;
    min-height: 80px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent), var(--mint));
    margin-top: 0.5rem;
}

.about-content h2 {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.about-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.85;
    max-width: 580px;
}

/* ===== Footer ===== */
.footer {
    padding: 2.5rem 3rem;
    background: var(--bg-deep);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
}

.footer-copy {
    color: var(--text-dim);
    font-size: 0.82rem;
}

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

.footer-links a {
    color: var(--text-dim);
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .products-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .product-card:nth-child(2) {
        transform: none;
    }

    .product-card:nth-child(2):hover {
        transform: translateY(-4px);
    }

    .about-inner {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .about-rule {
        width: 60px;
        height: 3px;
        min-height: auto;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 640px) {
    .navbar {
        padding: 1rem 1.5rem;
    }

    .navbar-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(8, 8, 10, 0.95);
        backdrop-filter: blur(16px);
        padding: 1.5rem;
        gap: 1.25rem;
        border-bottom: 1px solid var(--border);
    }

    .navbar-links.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: auto;
        padding: 7rem 1.5rem 4rem;
    }

    .products {
        padding: 5rem 1.5rem;
    }

    .products::before {
        top: -30px;
        height: 60px;
    }

    .about {
        padding: 4rem 1.5rem;
    }

    .footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .btn-ghost {
        margin-left: 0;
        margin-top: 0.75rem;
    }

    .hero-cta {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
}
