/* Global Variables */
:root {
    --color-bg: #F8F9FA;
    --color-surface: #FFFFFF;
    --color-text-primary: #111111;
    --color-text-secondary: #555555;

    /* Gradient Accent from Logo */
    --gradient-accent: linear-gradient(135deg, #FF512F 0%, #DD2476 100%);
    --color-accent-solid: #DD2476;

    --font-jp: 'Noto Sans JP', sans-serif;
    --font-en: 'Montserrat', sans-serif;

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

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-jp);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 32px;
    width: auto;
}

.nav-desktop {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-desktop ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-link {
    font-family: var(--font-en);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-primary);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: 0.3s var(--easing);
}

.nav-link:hover::after {
    width: 100%;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-text-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 0.9rem;
    transition: 0.3s;
}

.header-cta:hover {
    background: var(--gradient-accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(221, 36, 118, 0.2);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-btn .bar {
    width: 24px;
    height: 2px;
    background: #111;
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    z-index: 2000;
    padding: 80px 40px;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    transition: 0.4s var(--easing);
    display: none;
    /* Hidden by default on desktop */
}

.mobile-nav-overlay.active {
    right: 0;
    display: block;
    /* Visible when active (but only via JS/Media Query logic usually) */
    /* Wait, if I set display: none, JS can't animate 'right'. 
       Better: 'display: block' but 'visibility: hidden' or just rely on 'right:-100%' 
       BUT the user said it shows as a list on top left.
       That means it's in the flow.
       So 'position: fixed' handles it regarding flow.
       If it WAS showing in top left, it meant it had NO styles. 
       So adding this 'position: fixed' block will fix the "ghost list" issue.
       For desktop, we want it hidden.
    */
}

/* Show mobile nav when active */
@media (max-width: 768px) {
    .mobile-nav-overlay {
        display: block;
        /* Reset display for mobile */
    }
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links li {
    margin-bottom: 30px;
}

.mobile-nav-links a {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-text-primary);
}

/* Hero Section */
#hero {
    padding: 180px 0 100px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #F8F9FA 0%, #fff 100%);
    /* Clean base */
}

/* Geometric Background */
.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    /* Behind content */
}

.hero-shapes span {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(221, 36, 118, 0.1);
    /* Accent color */
    animation: floatShape 25s linear infinite;
    bottom: -150px;
}

.hero-shapes span:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.hero-shapes span:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
    background: rgba(255, 81, 47, 0.15);
}

.hero-shapes span:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.hero-shapes span:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
    background: rgba(255, 81, 47, 0.1);
}

.hero-shapes span:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.hero-shapes span:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
    background: rgba(221, 36, 118, 0.05);
}

.hero-shapes span:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
    background: rgba(255, 81, 47, 0.05);
}

.hero-shapes span:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
}

@keyframes floatShape {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

/* Ensure content is above bg */
.hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-jp {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.05em;
}

.hero-jp .line {
    display: block;
}

.hero-en {
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin-bottom: 60px;
}

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

.hero-visual {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1);
}

.hero-img {
    width: 100%;
    transform: scale(1.1);
    transition: 1.5s var(--easing);
}

.hero-visual:hover .hero-img {
    transform: scale(1.0);
}

.visual-rect {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--gradient-accent);
    z-index: -1;
    border-radius: 10px;
}

.hero-scroll {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 0.8rem;
    color: #ccc;
}

.scroll-line {
    width: 60px;
    height: 1px;
    background: #ccc;
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-accent-solid);
    transform: translateX(-100%);
    animation: scrollSlide 2s infinite;
}

@keyframes scrollSlide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Section Headings */
.section-header {
    margin-bottom: 60px;
    position: relative;
    padding-left: 20px;
    border-left: 4px solid var(--color-accent-solid);
}

.en-title {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-accent-solid);
    display: block;
    margin-bottom: 5px;
    opacity: 0.8;
}

.jp-title {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Services */
#services {
    padding: 100px 0;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.service-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Alternating layout */
.service-item:nth-child(even) {
    direction: rtl;
    /* simple trick to swap columns visually */
}

.service-item:nth-child(even) .service-info {
    direction: ltr;
    /* reset text direction */
}

.service-img {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.service-img img {
    width: 100%;
    transition: 0.5s;
}

.service-item:hover .service-img img {
    transform: scale(1.05);
}

.service-icon {
    font-size: 2rem;
    color: var(--color-accent-solid);
    margin-bottom: 20px;
}

.service-info h3 {
    font-family: var(--font-en);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.service-desc {
    color: var(--color-text-secondary);
    margin-bottom: 30px;
    line-height: 2;
}

.service-link {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.service-link i {
    transition: 0.3s;
}

.service-link:hover i {
    transform: translateX(5px);
}

/* News Section */
#news {
    padding: 100px 0;
}

.news-list {
    margin-bottom: 40px;
    border-top: 1px solid #eee;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid #eee;
    transition: 0.3s;
}

.news-item:hover {
    background-color: white;
    padding-left: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.news-item time {
    font-family: var(--font-en);
    font-weight: 600;
    color: #888;
    width: 120px;
    flex-shrink: 0;
}

.news-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    font-size: 0.8rem;
    border-radius: 4px;
    margin-right: 30px;
    font-weight: 500;
    width: 80px;
    text-align: center;
}

.news-title {
    font-weight: 500;
    color: var(--color-text-primary);
    flex-grow: 1;
}

.news-title:hover {
    color: var(--color-accent-solid);
    text-decoration: underline;
}

.news-more {
    text-align: right;
}

.btn-text {
    font-family: var(--font-en);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-primary);
}

.btn-text:hover {
    color: var(--color-accent-solid);
    gap: 15px;
}

/* About (Company) */
#about {
    padding: 100px 0;
    background: white;
}

.about-wrapper {
    max-width: 1000px;
}

.about-lead {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 60px;
    line-height: 1.6;
}

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

.company-table th,
.company-table td {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.company-table th {
    width: 150px;
    font-weight: 700;
    color: #888;
}

/* Contact Box */
#contact {
    padding: 120px 0;
}

.contact-box {
    background: var(--gradient-accent);
    border-radius: 20px;
    padding: 80px 60px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 50px rgba(221, 36, 118, 0.3);
}

.contact-text h2 {
    font-family: var(--font-en);
    font-size: 3rem;
    margin-bottom: 20px;
}

.contact-text p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.contact-btn-large {
    display: inline-block;
    background: white;
    color: var(--color-accent-solid);
    padding: 20px 50px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-btn-large:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #fff;
    padding: 80px 0 30px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 50px;
    margin-bottom: 30px;
}

.footer-logo {
    filter: brightness(0) invert(1);
    height: 32px;
    margin-bottom: 20px;
}

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

.footer-links a {
    font-family: var(--font-en);
    font-weight: 600;
    font-size: 0.9rem;
    color: #aaa;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    color: #555;
    font-size: 0.8rem;
}

/* Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--easing);
}

.reveal-card {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--easing);
}

.reveal-image {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    /* Wipe reveal effect */
    transition: all 1s var(--easing);
}

.reveal-image.visible {
    opacity: 1;
    clip-path: inset(0 0 0 0);
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.15s;
}

.delay-2 {
    transition-delay: 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .header-cta,
    .nav-desktop {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-jp {
        font-size: 3rem;
    }

    .hero-img {
        transform: scale(1);
    }

    .service-item {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .service-item:nth-child(even) {
        direction: ltr;
    }

    .contact-box {
        padding: 40px 20px;
    }

    .contact-text h2 {
        font-size: 2.2rem;
    }
}