/*
Theme Name: Dekinai Theme
Theme URI: https://dekinai-lab.tech/
Author: Dekinai Lab (AntiGravity)
Author URI: https://dekinai-lab.tech/
Description: できる事こそがエラーである！できない研究所の公式無能テーマ。
Version: 1.0.0
Text Domain: dekinai-theme
*/

:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #3a86ff;
    --accent-glow: rgba(58, 134, 255, 0.4);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --font-sans: 'Inter', 'Noto Sans JP', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
}

body {
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background: transparent;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(5, 5, 5, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(58, 134, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 0, 102, 0.15) 0%, transparent 40%),
        url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?ixlib=rb-4.0.3&auto=format&fit=crop&w=2564&q=80');
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    z-index: -1;
    filter: blur(8px) contrast(1.1) brightness(0.7);
    transform: scale(1.05);
    /* Prevent blur edges */
}

.hero-content {
    max-width: 800px;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glitch-text {
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
    line-height: 1.9;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.1rem 2.8rem;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
    outline: none;
}

.primary-btn {
    background: var(--text-primary);
    color: var(--bg-color);
}

.primary-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.15);
}

/* Sections */
.section {
    padding: 10rem 2rem;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 5rem;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #555 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-image-column {
    position: relative;
}

.about-image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
}

.about-image {
    width: 100%;
    height: auto;
    border-radius: 24px;
    display: block;
    filter: grayscale(30%) contrast(1.1);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-image-wrapper:hover .about-image {
    filter: grayscale(0%) contrast(1.05);
    transform: scale(1.03);
}

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: -1;
    filter: blur(50px);
}

.director-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.quote {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    border-left: 3px solid var(--accent-color);
    padding-left: 1.5rem;
    line-height: 1.6;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.8rem;
    font-size: 1.15rem;
    line-height: 1.8;
}

/* Glass Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 3rem 2.5rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.glass-card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 2.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: -2px;
}

.glass-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.glass-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
    flex-grow: 1;
}

.status {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 45, 85, 0.1);
    color: #ff2d55;
    border: 1px solid rgba(255, 45, 85, 0.2);
    align-self: flex-start;
}

/* Contact Section */
.contact-container {
    max-width: 650px;
}

.contact-card {
    text-align: center;
    padding: 4rem 3rem;
}

.contact-desc {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.contact-desc small {
    display: block;
    margin-top: 0.8rem;
    color: #ff2d55;
    opacity: 0.9;
    font-size: 0.9rem;
}

.dummy-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.btn-container {
    position: relative;
    min-height: 60px;
    margin-top: 1rem;
}

.submit-btn {
    background: linear-gradient(135deg, var(--text-primary) 0%, #aaa 100%);
    color: var(--bg-color);
    width: 100%;
    font-size: 1.1rem;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.submit-btn:hover {
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
    border-top: 1px solid var(--card-border);
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.5);
}

.disclaimer {
    font-size: 0.85rem;
    margin-top: 0.8rem;
    opacity: 0.5;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
    position: relative;
    /* Added to fix generic tap highlight on mobile safari */
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle .bar {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
    left: 0;
}

.menu-toggle .bar:nth-child(1) {
    top: 0;
}

.menu-toggle .bar:nth-child(2) {
    top: 9px;
}

.menu-toggle .bar:nth-child(3) {
    top: 18px;
}

/* Toggle Animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        /* fallback for modern Safari */
        max-width: 100vw;
        background: rgba(5, 5, 5, 0.95);
        -webkit-backdrop-filter: blur(15px);
        backdrop-filter: blur(15px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 0;
        padding: 0;
        z-index: 1000;
        /* Hardware accelerated translate instead of right property */
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .section {
        padding: 6rem 1.5rem;
    }

    .glass-card {
        padding: 2rem 1.5rem;
    }

    .contact-card {
        padding: 2.5rem 1.5rem;
    }
}

/* Survival Timer */
.survival-banner {
    width: 100%;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem;
    text-align: center;
    position: relative;
    z-index: 50;
    transition: all 0.5s ease;
}

.survival-banner.hidden {
    display: none;
}

.survival-banner.danger {
    background: rgba(255, 45, 85, 0.15);
    border-bottom: 1px solid rgba(255, 45, 85, 0.3);
}

.timer-content {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pulse-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #32d74b;
    box-shadow: 0 0 10px #32d74b;
    animation: pulse 2s infinite;
    margin-bottom: 0.5rem;
}

.survival-banner.danger .pulse-dot {
    background-color: #ff2d55;
    box-shadow: 0 0 15px #ff2d55;
    animation: pulseFast 0.5s infinite;
}

.time-elapsed-text {
    font-size: 1.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.survival-banner.danger .time-elapsed-text {
    color: #ff2d55;
}

.timer-warning-text {
    font-size: 0.9rem;
    color: #ff2d55;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.5s;
}

.survival-banner.danger .timer-warning-text {
    opacity: 1;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(50, 215, 75, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(50, 215, 75, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(50, 215, 75, 0);
    }
}

@keyframes pulseFast {
    0% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.8);
    }

    70% {
        transform: scale(1.2);
        box-shadow: 0 0 0 15px rgba(255, 45, 85, 0);
    }

    100% {
        transform: scale(0.8);
        box-shadow: 0 0 0 0 rgba(255, 45, 85, 0);
    }
}

/* Empathy Button */
.empathy-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    outline: none;
}

.empathy-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.empathy-btn.clicked {
    pointer-events: none;
}