/* Global Variables */
:root {
    --bg-color: #050505;
    --primary-color: #00F0FF;
    /* Electric Blue */
    --secondary-color: #003366;
    /* Deep Dragon Blue */
    --accent-color: #FFD700;
    /* Lightning Gold */
    --text-color: #F5F5F5;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Cinzel', serif;
    --font-body: 'Noto Sans JP', sans-serif;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image: url('../images/hero_dragon.png');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Background Overlay for Texture/Noise if needed */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 80%);
    pointer-events: none;
    z-index: -1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: background 0.3s;
}

header.scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.btn-contact {
    border: 1px solid var(--primary-color);
    padding: 8px 20px;
    border-radius: 4px;
    color: var(--primary-color);
}

.btn-contact:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.btn-sound {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-color);
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
    font-family: var(--font-body);
}

.btn-sound:hover,
.btn-sound.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    /* Background moved to body */
    text-align: center;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Overlay to make text readable */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
    color: #fff;
    position: relative;
    display: inline-block;
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: white;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(14px, 9999px, 81px, 0);
        transform: skew(0.8deg);
    }

    5% {
        clip: rect(72px, 9999px, 83px, 0);
        transform: skew(0.3deg);
    }

    10% {
        clip: rect(5px, 9999px, 93px, 0);
        transform: skew(0.1deg);
    }

    15% {
        clip: rect(98px, 9999px, 4px, 0);
        transform: skew(0.3deg);
    }

    20% {
        clip: rect(48px, 9999px, 47px, 0);
        transform: skew(0.9deg);
    }

    25% {
        clip: rect(25px, 9999px, 44px, 0);
        transform: skew(0.8deg);
    }

    30% {
        clip: rect(61px, 9999px, 35px, 0);
        transform: skew(0.04deg);
    }

    35% {
        clip: rect(98px, 9999px, 86px, 0);
        transform: skew(0.7deg);
    }

    40% {
        clip: rect(58px, 9999px, 31px, 0);
        transform: skew(0.5deg);
    }

    45% {
        clip: rect(10px, 9999px, 60px, 0);
        transform: skew(0.06deg);
    }

    50% {
        clip: rect(51px, 9999px, 98px, 0);
        transform: skew(0.8deg);
    }

    55% {
        clip: rect(77px, 9999px, 35px, 0);
        transform: skew(0.2deg);
    }

    60% {
        clip: rect(29px, 9999px, 42px, 0);
        transform: skew(0.5deg);
    }

    65% {
        clip: rect(96px, 9999px, 2px, 0);
        transform: skew(0.01deg);
    }

    70% {
        clip: rect(7px, 9999px, 58px, 0);
        transform: skew(0.5deg);
    }

    75% {
        clip: rect(49px, 9999px, 97px, 0);
        transform: skew(0.9deg);
    }

    80% {
        clip: rect(20px, 9999px, 61px, 0);
        transform: skew(0.2deg);
    }

    85% {
        clip: rect(38px, 9999px, 7px, 0);
        transform: skew(0.9deg);
    }

    90% {
        clip: rect(31px, 9999px, 90px, 0);
        transform: skew(0.5deg);
    }

    95% {
        clip: rect(16px, 9999px, 95px, 0);
        transform: skew(0.9deg);
    }

    100% {
        clip: rect(99px, 9999px, 34px, 0);
        transform: skew(0.6deg);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
        transform: skew(0.2deg);
    }

    5% {
        clip: rect(52px, 9999px, 74px, 0);
        transform: skew(0.5deg);
    }

    10% {
        clip: rect(79px, 9999px, 85px, 0);
        transform: skew(0.3deg);
    }

    15% {
        clip: rect(75px, 9999px, 5px, 0);
        transform: skew(1deg);
    }

    20% {
        clip: rect(67px, 9999px, 61px, 0);
        transform: skew(0.3deg);
    }

    25% {
        clip: rect(14px, 9999px, 79px, 0);
        transform: skew(0.6deg);
    }

    30% {
        clip: rect(1px, 9999px, 66px, 0);
        transform: skew(0.9deg);
    }

    35% {
        clip: rect(86px, 9999px, 30px, 0);
        transform: skew(0.1deg);
    }

    40% {
        clip: rect(23px, 9999px, 98px, 0);
        transform: skew(0.9deg);
    }

    45% {
        clip: rect(85px, 9999px, 72px, 0);
        transform: skew(0.5deg);
    }

    50% {
        clip: rect(71px, 9999px, 97px, 0);
        transform: skew(0.1deg);
    }

    55% {
        clip: rect(2px, 9999px, 95px, 0);
        transform: skew(0.6deg);
    }

    60% {
        clip: rect(61px, 9999px, 67px, 0);
        transform: skew(0.8deg);
    }

    65% {
        clip: rect(57px, 9999px, 93px, 0);
        transform: skew(0.4deg);
    }

    70% {
        clip: rect(37px, 9999px, 86px, 0);
        transform: skew(0.5deg);
    }

    75% {
        clip: rect(50px, 9999px, 4px, 0);
        transform: skew(1deg);
    }

    80% {
        clip: rect(52px, 9999px, 77px, 0);
        transform: skew(0.1deg);
    }

    85% {
        clip: rect(4px, 9999px, 91px, 0);
        transform: skew(0.5deg);
    }

    90% {
        clip: rect(28px, 9999px, 20px, 0);
        transform: skew(0.3deg);
    }

    95% {
        clip: rect(23px, 9999px, 94px, 0);
        transform: skew(1deg);
    }

    100% {
        clip: rect(63px, 9999px, 30px, 0);
        transform: skew(0.05deg);
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.hero-desc {
    font-size: 1rem;
    color: #ddd;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: #fff;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scrollMove 2s infinite;
}

@keyframes scrollMove {
    0% {
        top: 10px;
        opacity: 1;
    }

    100% {
        top: 30px;
        opacity: 0;
    }
}

/* Common Section Styles */
.section {
    padding: 100px 0;
    position: relative;
    background-color: rgba(5, 5, 5, 0.5);
    /* Semi-transparent background */
    backdrop-filter: blur(5px);
    margin: 20px 0;
    /* Add separation between sections if desired, or keep 0 */
}

.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 10px auto 0;
}

/* About Section */
/* About Section */
/* #about uses default .section styles */

.about-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-text h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Services glassmorphism */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 40px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.1);
    border-color: var(--primary-color);
}

.icon-box {
    font-size: 3rem;
    margin-bottom: 20px;
}

.service-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Services Images */
.service-img-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.service-card:hover .service-img {
    transform: scale(1.1);
}

.service-card .icon-box {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Works Grid */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.work-card {
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.work-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.work-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.work-card:hover .work-img img {
    transform: scale(1.1);
}

.work-info {
    padding: 20px;
}

.work-info h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-family: var(--font-heading);
}

.work-info p {
    font-size: 0.9rem;
    color: #ccc;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #ccc;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: #000;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.btn-submit:hover {
    background: #fff;
    box-shadow: 0 0 20px var(--primary-color);
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: #666;
}

.footer-social {
    margin-bottom: 20px;
}

.social-icon {
    width: 45px;
    height: 55px;
    object-fit: fill;
    /* Allows stretching to create the vertically elongated look */
    transition: 0.3s;
    opacity: 0.8;
}

.social-icon:hover {
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px var(--primary-color));
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        right: 0;
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 5, 0.95);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-bottom: 100px;
        backdrop-filter: blur(10px);
        transition: 0.3s;
        border-top: 1px solid var(--glass-border);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 20px 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hamburger {
        display: block;
        cursor: pointer;
        z-index: 1001;
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 2px;
        margin: 5px;
        background-color: var(--primary-color);
        transition: 0.3s;
    }

    /* Hamburger Animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}