:root {
    --apple-white: #ffffff;
    --apple-gray-light: #f5f5f7;
    --apple-gray-medium: #86868b;
    --apple-black: #000000;
    --apple-blue: #4A76C8;
    --brand-violet: #B64BF6;
    --brand-pink: #F64870;
    --brand-gradient: linear-gradient(135deg, var(--apple-blue) 0%, var(--brand-violet) 50%, var(--brand-pink) 100%);
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--apple-black);
    background-color: var(--apple-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: var(--apple-white);
}

::-webkit-scrollbar-thumb {
    background: var(--apple-gray-medium);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--apple-black);
}

/* Glassmorphism Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    transition: var(--transition-smooth);
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.nav-link {
    color: var(--apple-black) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem !important;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--apple-gray-medium) !important;
}

/* Hero Section */
.hero-section {
    padding: 160px 0 120px;
    text-align: left;
    position: relative;
    overflow: hidden;
    background-color: var(--apple-white);
    background-image: 
        linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 10%;
    right: -5%;
    width: 35%;
    height: 70%;
    background: radial-gradient(circle, rgba(74, 118, 200, 0.08) 0%, rgba(182, 75, 246, 0.06) 50%, rgba(246, 72, 112, 0) 100%);
    z-index: 0;
    filter: blur(100px);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-left: 0;
}

.hero-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    color: var(--apple-gray-medium);
    margin-bottom: 2rem;
    display: block;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.1;
    margin-bottom: 2.5rem;
    color: var(--apple-black);
}

.text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--apple-black);
    max-width: 600px;
    margin: 0 0 4rem;
    font-weight: 500;
    line-height: 1.6;
}

.hero-abstract-visual {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 35%;
    opacity: 0.4;
    filter: grayscale(100%);
    pointer-events: none;
    z-index: 1;
}

/* Service Cards */
.service-card {
    background: var(--apple-gray-light);
    border: none;
    border-radius: 20px;
    padding: 3rem;
    height: 100%;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--apple-black);
}

.service-card h3 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--apple-gray-medium);
}

/* Portfolio Section */
.portfolio-section {
    background-color: var(--apple-white);
    padding: 100px 0;
}
.form-control:focus {
    background-color: var(--apple-white) !important;
    border: 1px solid var(--apple-black) !important;
    box-shadow: none;
}

.xsmall { font-size: 0.75rem; }

/* Bento Grid Portfolio */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 24px;
    margin-top: 4rem;
}

.bento-card {
    background: var(--apple-gray-light);
    border-radius: 32px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: var(--apple-black);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0,0,0,0.03);
    overflow: hidden;
    position: relative;
}

.bento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 40px 80px rgba(0,0,0,0.08);
    background: white;
}

.bento-brand-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--apple-gray-medium);
    margin-bottom: 1rem;
    display: block;
}

.bento-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.bento-desc {
    font-size: 0.95rem;
    color: var(--apple-gray-medium);
    line-height: 1.5;
}

/* Typography & Display Classes */
.display-3 { font-size: clamp(1.8rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -0.03em; overflow-wrap: break-word; }
.display-4 { font-size: clamp(1.6rem, 5vw, 3.5rem); font-weight: 700; }
.display-5 { font-size: clamp(1.4rem, 4vw, 3rem); font-weight: 700; }
.display-6 { font-size: clamp(1.2rem, 3vw, 2.5rem); font-weight: 700; }

h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.secondary-logo {
    max-height: 50px;
    width: auto;
    object-fit: contain;
    margin-top: 2rem;
}

.bento-logo {
    height: 35px;
    width: auto;
    object-fit: contain;
    margin-top: 2rem;
    display: block;
}

.bento-venotix .bento-logo { height: 25px; }
.bento-party .bento-logo { height: 55px; }
.bento-sn .bento-logo { height: 55px; }
.bento-ms .bento-logo { height: 55px; }

/* Bento Sizing */
.bento-nijo {
    grid-column: span 8;
    background: linear-gradient(135deg, #f9f9fb 0%, #ffffff 100%);
    min-height: 450px;
}

.bento-nijo .bento-title { font-size: 2.5rem; }
.bento-nijo .bento-title { font-size: 2.5rem; }

.bento-venotix { grid-column: span 4; }
.bento-party { grid-column: span 4; }
.bento-sn { grid-column: span 5; }
.bento-ms { grid-column: span 3; }

/* About Section */
.about-section {
    background-color: var(--apple-gray-light);
    padding: 100px 0;
    border-radius: 40px;
    margin: 0 20px;
}

.about-content {
    max-width: 800px;
}

/* Footer */
footer {
    padding: 50px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-link {
    color: var(--apple-gray-medium);
    text-decoration: none;
    font-size: 0.85rem;
    margin-right: 1.5rem;
    transition: var(--transition-smooth);
}

.footer-link:hover {
    color: var(--apple-black);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 20px;
    width: 90%;
    max-width: 600px;
}

.btn-apple {
    background: var(--apple-black);
    color: white;
    border-radius: 30px;
    padding: 0.8rem 2rem;
    font-weight: 600;
    border: none;
    transition: var(--transition-smooth);
}

.btn-apple:hover {
    background: var(--brand-gradient);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(123, 97, 255, 0.2);
}

.btn-gradient {
    background: var(--brand-gradient);
    color: white;
    border-radius: 30px;
    padding: 0.8rem 2rem;
    font-weight: 600;
    border: none;
    transition: var(--transition-smooth);
}

.btn-gradient:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(123, 97, 255, 0.3);
    color: white;
}

.btn-apple-outline {
    background: transparent;
    color: var(--apple-black);
    border: 1px solid var(--apple-black);
    border-radius: 30px;
    padding: 0.8rem 2rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-apple-outline:hover {
    border-color: var(--brand-violet);
    color: var(--brand-violet);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 25px;
        padding-right: 25px;
    }
    
    .hero-content {
        padding-left: 0;
    }

    .hero-section {
        background-size: 30px 30px;
        padding: 80px 0 60px;
    }

    .hero-title {
        line-height: 1.1;
        margin-bottom: 1.5rem;
    }

    .display-3 { font-size: clamp(1.6rem, 8vw, 2.2rem) !important; }
    .display-4 { font-size: 1.8rem !important; }
    .display-5 { font-size: 1.6rem !important; }
    .display-6 { font-size: 1.4rem !important; }

    #contact .row {
        margin: 0;
    }
    
    #contact form {
        padding: 2rem !important;
    }

    .service-card {
        padding: 2rem;
    }
    
    .legal-container {
        padding-top: 100px;
    }

    .bento-grid {
        display: flex;
        flex-direction: column;
        grid-gap: 16px;
    }

    .bento-card {
        padding: 2rem;
        min-height: auto !important;
    }

    .bento-nijo .bento-title {
        font-size: 2rem;
    }
}
/* Top-Down Pyramid System */
.pyramid-block-system {
    display: flex;
    flex-direction: column; /* Top to bottom */
    align-items: center;
    gap: 60px;
    padding: 80px 0;
    position: relative;
}

.pyramid-row {
    display: flex;
    gap: 40px;
    justify-content: center;
    width: 100%;
}

.pyramid-block {
    background: white;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    text-decoration: none;
    color: var(--apple-black);
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    z-index: 5;
}

.pyramid-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

/* Peak: SN Digital (Black Box) */
.block-peak {
    width: 320px;
    min-height: 150px;
    border-radius: 20px;
    background: var(--apple-black);
    color: white;
}

.block-peak img {
    height: 80px; /* Much larger */
}

/* Diagonal Connectors */
.pyramid-connectors {
    position: absolute;
    top: 190px;
    left: 50%;
    transform: translateX(-50%);
    width: 680px;
    height: 100px;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

.pyramid-connectors path {
    stroke: #bcbcbc; /* Softer gray */
    stroke-width: 1.5;
    fill: none;
}

/* Sub-icons inside NIJO block */
.block-subs {
    display: flex;
    gap: 15px;
    margin-top: 1.2rem;
    align-items: center;
}

.block-subs img {
    height: 15px; /* Smaller sub-logos */
    opacity: 0.8;
}

.block-subs img[alt="Partymoments"] {
    height: 20px; /* Partymoments is taller */
}

/* Mobile Pyramid */
@media (max-width: 992px) {
    .pyramid-connectors { 
        width: 100%;
        max-width: 400px;
        top: 170px;
        height: 60px;
    }
    .pyramid-row { gap: 15px; }
    .block-peak { width: 100%; max-width: 320px; min-height: 120px; }
    .block-peak img { height: 50px; }
    .block-mid { width: calc(50% - 10px); min-height: 130px; }
    .block-mid img { height: 30px; }
    .block-subs { gap: 10px; margin-top: 0.8rem; }
    .block-subs img { height: 10px; }
    .block-subs img[alt="Partymoments"] { height: 15px; }
}

.block-name {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Mobile Pyramid */
@media (max-width: 768px) {
    .block-base { width: 100%; min-height: 100px; }
    .block-mid { width: calc(50% - 10px); min-height: 140px; }
    .block-peak { width: 120px; min-height: 100px; }
    
    .pyramid-block { padding: 1rem; }
    .pyramid-block img { height: 25px; }
    .block-subs img { height: 10px; }
}
/* Portfolio Tag & Badge Styles */
.project-tag {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--apple-black);
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--apple-gray-light);
    display: inline-block;
}

.sub-project-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    color: var(--apple-gray-medium);
}

.sub-project-badge span {
    font-size: 0.75rem;
    font-weight: 500;
}

.xsmall {
    font-size: 0.75rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .p-4.p-md-5 {
        padding: 1.5rem !important;
    }
    
    .project-tag {
        font-size: 0.75rem;
    }
    
    .sub-project-badge {
        padding: 6px 10px;
    }
}
