/* 
 * HakoDesign - Premium Design System
 * Theme: Dark Neon (Black, White, Red Glow)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Core Colors */
    --bg-dark: #000000;
    --bg-surface: #0a0a0a;
    --bg-card: #0f0f0f;
    --bg-elevated: #151515;

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;

    /* Accent - Logo Burgundy */
    --accent: #93191d;
    --accent-bright: #b01e22;
    --accent-glow: rgba(147, 25, 29, 0.4);
    --accent-subtle: rgba(147, 25, 29, 0.1);

    /* Borders */
    --border: #1a1a1a;
    --border-hover: #333333;

    /* Sizing */
    --container-max: 1200px;
    --nav-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: 0.3s var(--ease-out);
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Grain Effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Spotlight Effect */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(800px circle at var(--cursor-x, 50%) var(--cursor-y, 50%), rgba(147, 25, 29, 0.12), transparent 40%);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    /* Hidden by default, shown via JS class */
    transition: opacity 0.5s ease;
}

body.has-spotlight::after {
    opacity: 1;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== NAVIGATION ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    box-shadow: 0 0 20px var(--accent-glow);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px var(--accent-glow);
    }

    50% {
        box-shadow: 0 0 30px var(--accent-glow), 0 0 50px var(--accent-subtle);
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s var(--ease-out);
    box-shadow: 0 0 10px var(--accent-glow);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

/* Logo in title */
.title-logo {
    height: 1.1em;
    width: auto;
    vertical-align: middle;
    margin-right: 0;
    margin-bottom: 0.1em;
}

/* Animated background */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0.3;
    animation: breathe 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes breathe {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }
}

/* Grid pattern */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    text-align: left;
}

.hero-visual {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 500px;
}

/* Bento Cloud Layout */
.bento-cloud {
    position: relative;
    width: 500px;
    height: 500px;
}

.cloud-item {
    position: absolute;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 100px;
    /* Pill shape */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    animation: float 6s ease-in-out infinite;
    cursor: default;
    white-space: nowrap;
}

.cloud-item:hover {
    background: rgba(147, 25, 29, 0.15);
    border-color: var(--accent);
    transform: scale(1.05);
    z-index: 10;
}

/* Sizes */
.cloud-lg {
    font-size: 24px;
    padding: 24px 48px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cloud-md {
    font-size: 16px;
    padding: 16px 32px;
    z-index: 1;
    color: var(--text-secondary);
}

.cloud-sm {
    font-size: 13px;
    padding: 10px 20px;
    opacity: 0.8;
    z-index: 0;
    color: var(--text-muted);
}

/* Positioning (Organic Cloud) */
.item-typo {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.item-colors {
    bottom: 20%;
    right: 5%;
    animation-delay: 1.5s;
}

.item-gradients {
    top: 10%;
    right: 15%;
    animation-delay: 0.5s;
}

.item-patterns {
    bottom: 15%;
    left: 15%;
    animation-delay: 2s;
}

.item-contrast {
    top: 45%;
    left: 0%;
    animation-delay: 1s;
}

.item-icons {
    top: 40%;
    right: 0%;
    animation-delay: 2.5s;
}

.item-favicon {
    bottom: 40%;
    left: 25%;
    animation-delay: 3s;
}

.item-fonts {
    bottom: 45%;
    right: 25%;
    animation-delay: 0.8s;
}


@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .bento-grid-8 {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero-visual {
        order: -1;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--accent-subtle);
    border: 1px solid rgba(255, 45, 45, 0.3);
    border-radius: 100px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 32px;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.hero-title {
    font-size: clamp(48px, 10vw, 100px);
    font-weight: 800;
    line-height: 0.95;
    margin-bottom: 24px;
    letter-spacing: -0.04em;
}

.hero-title .highlight {
    color: #93191d;
    -webkit-text-fill-color: #93191d;
    position: relative;
}

.hero-title .outline {
    -webkit-text-stroke: 2px var(--text-primary);
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 500px;
    line-height: 1.7;
    margin-bottom: 48px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-bright);
    box-shadow: 0 0 40px var(--accent-glow), 0 4px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ========== APPS SECTION ========== */
.apps-section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 40px;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ========== APP CARDS ========== */
.app-card {
    background: linear-gradient(145deg, #1c0506 0%, #0a0a0a 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    padding: 32px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.app-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-subtle) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.app-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 40px var(--accent-subtle);
}

.app-card:hover::before {
    opacity: 1;
}

.card-number {
    position: absolute;
    top: 24px;
    right: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
}



.card-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.card-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.card-title {
    font-size: 32px;
    margin-bottom: 16px;
    line-height: 1.2;
    color: var(--accent);
    font-weight: 700;
}

.card-desc {
    font-size: 14px;
    color: #ffffff;
    line-height: 1.6;
    opacity: 0.9;
}

.card-arrow {
    position: absolute;
    bottom: 32px;
    right: 32px;
    width: 40px;
    height: 40px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.app-card:hover .card-arrow {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ========== SCROLL REVEAL ========== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== FAT FOOTER ========== */
.fat-footer {
    border-top: 1px solid var(--border);
    padding: 80px 0 40px;
    background: var(--bg-surface);
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand .brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 14px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 40px;
    text-align: center;
}

.footer-bottom p {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-brand .brand-row {
        justify-content: center;
    }

    .footer-brand p {
        margin: 0 auto;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeInUp 0.8s var(--ease-out) forwards;
    opacity: 0;
}

.d-1 {
    animation-delay: 0.1s;
}

.d-2 {
    animation-delay: 0.2s;
}

.d-3 {
    animation-delay: 0.3s;
}

.d-4 {
    animation-delay: 0.4s;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 48px;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }
}