:root {
    --color-bg: #0a0a0a;
    --color-text: #f0f0f0;
    --color-text-muted: #888888;
    --color-primary: #00ff88;
    --color-secondary: #00ccaa;
    --color-accent: #00ffff;

    --font-sans: 'Noto Sans JP', sans-serif;
    --font-serif: 'Zen Old Mincho', serif;

    --easing: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--color-bg);
    color: var(--color-text);
    cursor: none;
    /* Custom cursor */
}

body {
    font-family: var(--font-sans);
    line-height: 1.8;
    overflow-x: hidden;
    letter-spacing: 0.05em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.4;
}

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

ul {
    list-style: none;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-primary);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Hover effects for cursor */
body.hovered .cursor-outline {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 255, 136, 0.1);
    border-color: var(--color-primary);
}

/* Utility */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 120px 0;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}

.header.scrolled {
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.nav__list {
    display: flex;
    gap: 40px;
}

.nav__link {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav__link:hover {
    opacity: 1;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--color-primary);
    transition: width 0.4s var(--easing);
}

.nav__link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 20px;
    position: relative;
    cursor: none;
}

.menu-toggle__line {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: white;
    left: 0;
    transition: 0.3s;
}

.menu-toggle__line:nth-child(1) {
    top: 0;
}

.menu-toggle__line:nth-child(2) {
    bottom: 0;
}

/* Hero */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--color-bg);
    background-image: url('../assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
}

/* Dark Overlay for Text Visibility */
.hero__bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* CSS Grid Background */
.hero__grid {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(0);
    animation: gridMove 20s linear infinite;
}

.hero__glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.15) 0%, transparent 60%);
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px);
    }
}

.hero__content {
    text-align: center;
    z-index: 1;
}

.hero__title {
    font-size: 4rem;
    /* Fallback */
    font-size: clamp(2rem, 8vw, 5rem);
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.hero__subtitle {
    font-size: 1rem;
    letter-spacing: 0.2em;
    color: var(--color-secondary);
    text-transform: uppercase;
}

/* Force CSS Animation for Hero to ensure visibility */
.hero__title-line,
.hero__subtitle {
    opacity: 0;
    /* Only hidden initially for animation */
    animation: heroReveal 1.5s var(--easing) forwards;
}

.hero__subtitle {
    animation-delay: 0.5s;
}

@keyframes heroReveal {
    0% {
        opacity: 0;
        transform: translateY(30px);
        clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
}

.scroll-text {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-primary), transparent);
}

/* Mission */
.mission__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.mission__visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    background-image: url('../assets/images/mission-visual.jpg');
    background-size: cover;
    background-position: center;
}

.visual-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, var(--color-secondary), transparent);
    filter: blur(40px);
    opacity: 0.5;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

.mission__lead {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.mission__desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Solutions */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.card {
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.4s var(--easing), border-color 0.3s;
}

.glass {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.05);
}

.card__icon {
    width: 50px;
    height: 50px;
    color: var(--color-primary);
    margin-bottom: 25px;
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.card__text {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Company */
.company__inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.company-list {
    margin-top: 40px;
}

.company-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.company-row dt {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.company-row dd {
    font-weight: 500;
}

/* Contact */
.contact__text {
    font-size: 1.5rem;
    font-family: var(--font-serif);
    margin-top: 30px;
    margin-bottom: 50px;
}

.btn {
    display: inline-block;
    padding: 15px 50px;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    position: relative;
    overflow: hidden;
    transition: color 0.4s;
    cursor: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--color-primary);
    z-index: -1;
    transition: width 0.4s var(--easing);
}

.btn:hover {
    color: var(--color-bg);
}

.btn:hover::before {
    width: 100%;
}

.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* Animations */
.reveal-text {
    opacity: 1;
    /* Fallback: Visible by default if JS fails */
    transform: translateY(0);
    /* Fallback */
    clip-path: none;
    /* Fallback */
    transition: all 1s var(--easing);
}

/* JS adds this class to initialize animation state */
.reveal-text.init {
    opacity: 0;
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    transform: translateY(20px);
}

.reveal-text.active {
    opacity: 1;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s var(--easing);
}

.fade-in-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile */
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--color-bg);
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.4s var(--easing);
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav__list {
        flex-direction: column;
        align-items: center;
    }

    .menu-toggle {
        display: block;
        z-index: 200;
    }

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

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

    .company-row {
        grid-template-columns: 100px 1fr;
    }
}