/* ============================================
   EdgeBase Next - Three.js + GSAP Theme
   ============================================ */

:root {
    --accent: #3366ff;
    --accent-light: #5588ff;
    --accent-orange: #f05a2a;
    --accent-glow: rgba(51, 102, 255, 0.15);
    --text: #0f0f0f;
    --text-2: #555;
    --text-3: #999;
    --bg: #fafafa;
    --bg-dark: #0a0a0a;
    --border: rgba(0, 0, 0, 0.08);
    --font: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    overflow-x: hidden;
}

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

::selection {
    background: var(--accent);
    color: #fff;
}

/* ============================================
   Header
   ============================================ */

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 0 clamp(24px, 5vw, 64px);
    transition: all 0.5s var(--ease);
}

.site-header.scrolled {
    background: rgba(250, 250, 250, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 1px 0 var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.site-branding a,
.site-logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    transition: color 0.4s;
}

.site-header.scrolled .site-branding a,
.site-header.scrolled .site-logo-text {
    color: var(--text);
}

.site-branding img { height: 36px; width: auto; }

.nav-list {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
}

.nav-list a {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.65);
    transition: color 0.3s;
}

.nav-list a:hover { color: #fff; }

.site-header.scrolled .nav-list a { color: var(--text-2); }
.site-header.scrolled .nav-list a:hover { color: var(--accent); }

.nav-cta {
    padding: 8px 28px !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 100px;
    transition: all 0.3s !important;
}

.nav-cta:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}

.site-header.scrolled .nav-cta {
    border-color: var(--border) !important;
}

/* Mobile toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: #fff;
    transition: all 0.4s var(--ease);
    border-radius: 2px;
}

.site-header.scrolled .menu-toggle span { background: var(--text); }

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5.5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5.5px); }

/* ============================================
   Hero
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 60% at 50% 50%, transparent 0%, rgba(10,10,10,0.4) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.hero-logo {
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(30px);
}

.hero-logo-img {
    width: clamp(80px, 12vw, 140px);
    height: auto;
    filter: drop-shadow(0 4px 24px rgba(51, 102, 255, 0.3));
    animation: logo-float 4s ease-in-out infinite;
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-label {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(30px);
}

.hero-title {
    font-size: clamp(3.5rem, 9vw, 8rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: #fff;
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    padding-bottom: 0.1em;
}

.hero-char {
    display: inline-block;
    opacity: 0;
    position: relative;
}

.hero-char.shimmer {
    animation: char-shimmer 3s ease-in-out infinite;
}

.hero-char.shimmer:nth-child(1) { animation-delay: 0s; }
.hero-char.shimmer:nth-child(2) { animation-delay: 0.15s; }
.hero-char.shimmer:nth-child(3) { animation-delay: 0.3s; }
.hero-char.shimmer:nth-child(4) { animation-delay: 0.45s; }
.hero-char.shimmer:nth-child(5) { animation-delay: 0.6s; }
.hero-char.shimmer:nth-child(6) { animation-delay: 0.75s; }
.hero-char.shimmer:nth-child(7) { animation-delay: 0.9s; }
.hero-char.shimmer:nth-child(8) { animation-delay: 1.05s; }

@keyframes char-shimmer {
    0%, 100% {
        color: #fff;
        text-shadow: none;
    }
    30% {
        color: #5588ff;
        text-shadow: 0 0 20px rgba(51, 102, 255, 0.6), 0 0 40px rgba(51, 102, 255, 0.3);
    }
    50% {
        color: #f05a2a;
        text-shadow: 0 0 20px rgba(240, 90, 42, 0.6), 0 0 40px rgba(240, 90, 42, 0.3);
    }
    70% {
        color: #5588ff;
        text-shadow: 0 0 20px rgba(51, 102, 255, 0.6), 0 0 40px rgba(51, 102, 255, 0.3);
    }
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    background: linear-gradient(135deg, #3366ff 0%, #5588ff 50%, #f05a2a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
    letter-spacing: 0.06em;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(30px);
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(30px);
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
}

.hero-scroll span {
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
}

.scroll-dot {
    width: 20px;
    height: 32px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.scroll-dot::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 6px;
    border-radius: 2px;
    background: var(--accent-light);
    animation: scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(10px); opacity: 0.3; }
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 36px;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.4s var(--ease);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 24px rgba(51, 102, 255, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 8px 40px rgba(51, 102, 255, 0.5);
    transform: translateY(-3px);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.btn-outline-dark {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-outline-dark:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
}

.btn-lg { padding: 18px 44px; font-size: 0.9375rem; }

/* ============================================
   Sections
   ============================================ */

.section {
    padding: clamp(100px, 14vw, 180px) clamp(24px, 5vw, 64px);
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-tag {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 64px;
}

/* ============================================
   Vision
   ============================================ */

.vision {
    background: var(--bg-dark);
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

#vision-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.vision-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}

.vision .section-tag { color: var(--accent-light); }
.vision .section-heading { color: #fff; }

.vision-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(10rem, 22vw, 24rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, rgba(51, 102, 255, 0.07), rgba(240, 90, 42, 0.07));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.vision-content {
    margin-top: 48px;
}

.vision-line-wrap {
    margin-bottom: 8px;
    overflow: hidden;
}

.vision-text {
    display: block;
    font-size: clamp(1.375rem, 3.2vw, 2.5rem);
    font-weight: 400;
    line-height: 2.2;
    letter-spacing: 0.04em;
}

.vision-text strong {
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vision-line-accent {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-orange));
    margin: 48px auto 0;
    border-radius: 2px;
    transform: scaleX(0);
}

/* ============================================
   Business
   ============================================ */

.business {
    background: var(--bg-dark);
    color: #fff;
    position: relative;
    overflow: hidden;
}

#business-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.business-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}

.business .section-tag {
    color: var(--accent-light);
}

.business .section-heading {
    color: #fff;
}

.business-lead {
    font-size: clamp(0.9375rem, 2vw, 1.125rem);
    color: rgba(255, 255, 255, 0.5);
    line-height: 2;
    margin-bottom: 64px;
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    text-align: left;
}

.business-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: default;
}

.business-card-bg {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.6s var(--ease);
}

.business-card:hover .business-card-bg {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 0 60px rgba(51, 102, 255, 0.08),
        0 0 120px rgba(240, 90, 42, 0.05);
}

.business-card-content {
    position: relative;
    z-index: 1;
    padding: 48px 40px;
}

.business-icon {
    width: 56px;
    height: 56px;
    color: var(--accent-light);
    margin-bottom: 28px;
    transition: transform 0.5s var(--ease);
}

.business-card:hover .business-icon {
    transform: scale(1.1) rotate(-3deg);
}

.business-icon svg {
    width: 100%;
    height: 100%;
}

.business-card-label {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 12px;
    padding: 4px 12px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
}

.business-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 60%, var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.business-card p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.9;
    margin-bottom: 24px;
}

.business-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    list-style: none;
}

.business-tags li {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s;
}

.business-card:hover .business-tags li {
    border-color: rgba(51, 102, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Company
   ============================================ */

.company {
    background: var(--bg-dark);
    color: #fff;
    position: relative;
    overflow: hidden;
}

#company-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.company-inner {
    position: relative;
    z-index: 2;
}

.company .section-tag {
    color: var(--accent-light);
}

.company .section-heading {
    color: #fff;
}

.company-table-wrap {
    max-width: 800px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 16px 40px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.company-table {
    width: 100%;
    border-collapse: collapse;
}

.company-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.company-table tr:last-child {
    border-bottom: none;
}

.company-table th,
.company-table td {
    padding: 22px 0;
    text-align: left;
    font-size: 0.9375rem;
    vertical-align: top;
}

.company-table th {
    width: 140px;
    font-weight: 600;
    color: var(--accent-light);
    padding-right: 40px;
    white-space: nowrap;
}

.company-table td {
    color: rgba(255, 255, 255, 0.65);
}

.company-table td a {
    color: var(--accent-light);
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.company-table td a:hover {
    border-color: var(--accent-light);
    color: #fff;
}

/* ============================================
   CEO
   ============================================ */

.ceo {
    background: var(--bg-dark);
    color: #fff;
    position: relative;
    overflow: hidden;
}

#ceo-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.ceo-inner {
    position: relative;
    z-index: 2;
}

.ceo .section-tag { color: var(--accent-light); }
.ceo .section-heading { color: #fff; }

.ceo-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: center;
}

.ceo-photo-wrap {
    position: relative;
}

.ceo-photo-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1;
}

.ceo-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(20%);
    transition: filter 0.6s ease;
}

.ceo-photo-wrap:hover .ceo-photo {
    filter: grayscale(0%);
}

.ceo-photo-accent {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-orange)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}

.ceo-info {
    padding: 20px 0;
}

.ceo-position {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-light);
    padding: 6px 16px;
    border: 1px solid rgba(51, 102, 255, 0.3);
    border-radius: 100px;
    margin-bottom: 20px;
}

.ceo-name {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
    line-height: 1.3;
}

.ceo-name-en {
    display: block;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 8px;
}

.ceo-message p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 2;
    margin-bottom: 16px;
}

.ceo-message p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Contact
   ============================================ */

.contact {
    text-align: center;
    background: var(--bg-dark);
    color: #fff;
    position: relative;
    overflow: hidden;
    padding-top: clamp(60px, 8vw, 100px);
    padding-bottom: clamp(60px, 8vw, 100px);
}

#contact-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.contact-inner {
    position: relative;
    z-index: 2;
}

.contact .section-tag {
    color: var(--accent-light);
}

.contact .section-heading {
    color: #fff;
    margin-bottom: 24px;
}

.contact-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 40px;
    line-height: 2;
}

.contact-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact .btn-glass {
    border-color: rgba(255, 255, 255, 0.12);
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.6);
    padding-top: 80px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 64px);
    display: flex;
    justify-content: space-between;
    gap: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    display: inline-block;
    margin-bottom: 12px;
}

.footer-desc {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.3);
}

.footer-links { display: flex; gap: 80px; }

.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    font-size: 0.8125rem;
    transition: color 0.3s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px clamp(24px, 5vw, 64px);
}

.footer-bottom p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.2);
    text-align: center;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    /* Disable heavy effects on mobile */
    .site-header.scrolled {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(250, 250, 250, 0.97);
    }

    .business-card-bg,
    .company-table-wrap {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .site-nav {
        position: fixed;
        inset: 0;
        background: rgba(10, 10, 10, 0.98);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s var(--ease);
    }

    .site-nav.active { opacity: 1; visibility: visible; }
    .site-nav.active ~ .menu-toggle span { background: #fff !important; }

    .nav-list { flex-direction: column; gap: 28px; }
    .nav-list a { font-size: 1.375rem !important; color: rgba(255,255,255,0.8) !important; }

    .business-grid { grid-template-columns: 1fr; gap: 24px; }

    .ceo-grid { grid-template-columns: 1fr; gap: 40px; }
    .ceo-photo-frame { max-width: 320px; margin: 0 auto; }
    .ceo-photo-accent { top: -8px; right: -8px; }
    .ceo-info { text-align: center; }
    .business-card-content { padding: 36px 28px; }

    .company-table-wrap { padding: 16px 24px; }
    .company-table th {
        display: block;
        width: 100%;
        padding-bottom: 2px;
    }
    .company-table td {
        display: block;
        padding-top: 0;
        padding-bottom: 20px;
    }
    .company-table tr { display: block; padding: 8px 0; }

    .footer-inner { flex-direction: column; gap: 40px; }
    .footer-links { gap: 48px; }
    .contact-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.25rem; }
    .section { padding: 80px 20px; }
}
