/* Global Variables */
:root {
    /* 4 Core Colors */
    --color-red: #e36c58;
    --color-green: #6cbb77;
    --color-blue: #6bbaee;
    --color-orange: #f09048;
    --color-black: #333333;

    /* Neutrals */
    --text-main: #333333;
    --text-light: #666666;
    --bg-white: #ffffff;
    --bg-light: #f9f9f9;

    /* Typography */
    --font-main: 'Noto Sans JP', sans-serif;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
    word-break: keep-all;
    overflow-wrap: anywhere;
    /* Optimization for CJK: keep-all prevents mid-word breaks. anywhere prevents overflow. */
}

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

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

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

/* Layout Utilities */
.sp-br {
    display: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Mobile Typography Fixes */
@media (max-width: 768px) {

    .company-info,
    .services,
    .news-section {
        padding: 60px 0;
    }

    .about-text,
    .section-desc,
    .hero p {
        word-break: normal;
        /* Let words break naturally */
        overflow-wrap: break-word;
        padding: 0 10px;
    }

    /* Hide manual breaks on mobile for better flow */
    .about-text br,
    .section-desc br {
        display: none;
    }
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    /* Reduced from 60px for tighter divider */
    position: relative;
}



/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-inner {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-green);
    /* Using Green as primary brand color based on logo */
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    /* Adjust based on header height */
    width: auto;
}

.logo span {
    color: var(--text-main);
    margin-left: 5px;
}

/* Desktop Nav */
.nav-desktop ul {
    display: flex;
    gap: 30px;
}

.nav-desktop a {
    font-weight: 500;
    font-size: 0.95rem;
}

.lang-switch {
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 30px;
}

.lang-switch a.active {
    color: var(--color-green);
}

/* Hamburger Menu (Mobile) */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

.mobile-menu {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    /* User Request: Visual center, avoid large bottom gap */
    padding-top: 80px;
    /* Account for fixed header */
    /* Account for fixed header */
    padding-bottom: 120px;
    /* Increased to prevent button overlap with scroll indicator */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Option 2: Subtle Curved Lines (Waves) */
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' viewBox='0 0 1600 800' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(0,0,0,0.03)' stroke-width='1'%3E%3Cpath d='M0 400 C 400 300, 800 600, 1600 400' /%3E%3Cpath d='M0 450 C 400 350, 800 650, 1600 450' /%3E%3Cpath d='M0 500 C 400 400, 800 700, 1600 500' /%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

.hero-content {
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.4;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: -10px;
    /* User request: Move button up another 30px (total 50px from original) */
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    /* Watercolor Gradient */
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    /* Larger text match */
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(132, 250, 176, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(132, 250, 176, 0.6);
    opacity: 1;
}

/* Option 1: Scroll Down Indicator */
.scroll-down {
    position: absolute;
    bottom: 20px;
    /* Moved slightly lower */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-light);
    font-size: 0.9rem;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.scroll-down i {
    font-size: 1.2rem;
    margin-top: 5px;
    color: var(--color-green);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* News Section */
.news-section {
    background: #fff;
    padding: 60px 0;
}

.news-list {
    max-width: 900px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    transition: background-color 0.2s;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover .news-title {
    color: var(--color-green);
}

.news-meta {
    display: flex;
    align-items: center;
    min-width: 200px;
    /* Fixed width for alignment */
    gap: 15px;
}

.news-date {
    font-size: 0.9rem;
    color: #888;
    font-family: 'Roboto', sans-serif;
    /* Monospace-ish for date alignment */
}

.news-category {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-release {
    background-color: #3498db;
}

.category-media {
    background-color: #2ecc71;
}

.category-event {
    background-color: #ff9f1c;
    /* Orange */
}

.category-global {
    background-color: var(--color-blue);
    /* Cyan/Blue */
}

.category-japan {
    background-color: var(--color-red);
    /* Red/Pink */
}

.news-title {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
    flex-grow: 1;
    line-height: 1.5;
    transition: color 0.2s;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Fallback for safety */
    max-height: 3.2em;
    /* ~1.5 line-height * 2 lines + buffer */
    line-height: 1.5;
}

@media (max-width: 768px) {

    /* Keep row layout for news item, but maybe adjust padding */
    .news-item {
        align-items: flex-start;
        /* Align top so arrow matches title line roughly */
    }

    .news-meta {
        /* On mobile, meta might need to wrap if very long, but our new layout handles it in a div */
        min-width: auto;
    }

    /* Standard Mobile Padding */
    .services,
    .news-section,
    .company-info {
        padding: 40px 0;
    }

    /* Reduce Gap between News and About */
    .news-section {
        padding-bottom: 20px;
    }

    .company-info {
        padding-top: 10px;
        /* 20px padding + 30px button margin = 50px gap */
    }

    /* Mobile Typography Fixes */
    .about-text,
    .section-desc,
    .circle-card p {
        word-wrap: break-word;
        /* Standard wrap */
        overflow-wrap: break-word;
        /* Safer than anywhere */
        line-break: strict;
        /* Enforce Kinsoku */
    }

    /* Add padding only to main text blocks */
    .about-text,
    .section-desc {
        padding: 0 10px;
    }

    /* Hide manual breaks on mobile for better flow in body text */
    .about-text br,
    .section-desc br {
        display: none;
    }

    /* Widen Service Cards for better text flow */
    .circle-card {
        width: 100%;
        max-width: 340px;
        /* Wider than 280px */
        padding: 0 10px;
        /* Prevent edge touching */
    }

    .circle-card p {
        padding: 0;
        /* Use full width of card */
    }

    /* Slightly larger titles for services on mobile */
    .circle-card h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
        /* Ensure spacing */
    }
}

@keyframes pulseFade {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.9);
    }

    50% {
        opacity: 0.9;
        transform: scale(1.15);
    }
}

/* Background Blobs (4 Colors) */
.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    animation: pulseFade 6s infinite ease-in-out;
    /* Faster speed (6s) */
}

.blob-red {
    width: 400px;
    height: 400px;
    background: var(--color-red);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob-green {
    width: 500px;
    height: 500px;
    background: var(--color-green);
    bottom: -100px;
    right: -100px;
    animation-delay: -1.5s;
    /* Staggered for 6s cycle */
}

.blob-blue {
    width: 300px;
    height: 300px;
    background: var(--color-blue);
    top: 20%;
    right: 10%;
    animation-delay: -3s;
    /* Staggered for 6s cycle */
}

.blob-orange {
    width: 350px;
    height: 350px;
    background: var(--color-orange);
    bottom: 10%;
    left: 10%;
    animation-delay: -4.5s;
    /* Staggered for 6s cycle */
}

/* Company Info (Table Layout) */
.company-info {
    background: var(--bg-white);
    padding: 100px 0;
    /* More spacing */
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--color-green);
    margin: 20px auto 40px;
    border-radius: 2px;
}

.about-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 2.2;
    color: var(--text-main);
    font-weight: 500;
}

/* Company Info (Table Layout) */
.company-info {
    background: var(--bg-white);
    padding: 100px 0;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--color-green);
    margin: 0 auto 60px;
    border-radius: 2px;
}

.section-desc {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
    line-height: 2.2;
    color: var(--text-main);
    font-weight: 500;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    max-width: 800px;
    margin: 0 auto;
}

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

.info-table th {
    width: 30%;
    font-weight: 700;
    color: var(--text-main);
}

.info-table td {
    color: var(--text-light);
}

/* Services */
.services {
    background: var(--bg-light);
}

/* Focus Area 1: Bubbles */
.service-area-1 {
    margin-bottom: 80px;
}

.service-bubbles {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.bubble {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.bubble:hover {
    transform: scale(1.05);
}

.bubble h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.bubble p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.bubble.red {
    background: var(--color-red);
}

.bubble.green {
    background: var(--color-green);
}

.bubble.blue {
    background: var(--color-blue);
}

.bubble.orange {
    background: var(--color-orange);
}

/* Focus Area 2: Circles */
.service-area-2 {
    text-align: center;
}

.circle-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.circle-card {
    width: 280px;
    text-align: center;
}

.circle-icon {
    width: 223px;
    /* Reduced to 95% of 235px (was 235px) */
    height: 223px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    overflow: hidden;
    background: #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Stronger float animation */
    animation: floatIcon 3s ease-in-out infinite;
}

.circle-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.circle-icon.red {
    background: var(--color-red);
}

.circle-icon.green {
    background: var(--color-green);
}

.circle-icon.blue {
    background: var(--color-blue);
}

.circle-icon.orange {
    background: var(--color-orange);
}

.circle-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.circle-card p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Major Projects (Glassmorphism) */
.major-projects {
    background: var(--bg-white);
    padding: 100px 0;
}

.projects-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.project-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 30px;
    width: 300px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.1);
}

.project-number {
    background: linear-gradient(135deg, var(--color-green), var(--color-blue));
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 20px;
}

.project-card h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-main);
    line-height: 1.5;
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 60px 0 30px;
    text-align: center;
}

.footer-content h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-contact {
    margin-bottom: 40px;
    color: #aaa;
}

/* --- News Tabs (Home) --- */
.news-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.news-tab-btn {
    padding: 10px 30px;
    border-radius: 30px;
    border: 2px solid #ddd;
    background: #fff;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.news-tab-btn.active {
    background: var(--color-black);
    color: #fff;
    border-color: var(--color-black);
}

.news-tab-btn:hover:not(.active) {
    border-color: var(--color-black);
    color: var(--color-black);
}

.news-tab-btn.tab-global.active {
    background: var(--color-blue);
    border-color: var(--color-blue);
}

.news-tab-btn.tab-japan.active {
    background: var(--color-red);
    border-color: var(--color-red);
}

/* --- News Archive Page (Accordion) --- */
.news-page-title {
    text-align: center;
    padding-top: 160px;
    /* Increased to clear fixed header clearly */
    margin-bottom: 50px;
    font-size: 2rem;
    color: var(--color-black);
}



.load-more-btn {
    display: block;
    margin: 30px auto 0;
    padding: 10px 30px;
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 25px;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background-color: #f8fbff;
    border-color: #b0c4de;
    color: #333;
    transform: translateY(-2px);
}

.footer-contact p {
    margin-bottom: 10px;
}

.copyright {
    border-top: 1px solid #444;
    padding-top: 20px;
    font-size: 0.8rem;
    color: #777;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
        /* Hide desktop nav */
    }

    .hamburger {
        display: block;
        /* Show hamburger */
    }

    /* Mobile Menu Overlay */
    .mobile-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        display: none;
        /* Hidden by default */
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

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

    .hero h1 {
        font-size: 1.8rem;
    }

    .sp-br {
        display: block;
    }

    .info-table th,
    .info-table td {
        display: block;
        width: 100%;
    }

    .info-table th {
        background: #f5f5f5;
        padding-bottom: 5px;
    }

    .service-bubbles {
        gap: 20px;
    }

    .bubble {
        width: 140px;
        height: 140px;
        padding: 10px;
    }

    .bubble h3 {
        font-size: 0.9rem;
    }

    .bubble p {
        display: none;
        /* Hide text on small bubbles if needed */
    }
}

/* AI Visual Section */
.ai-parallax {
    position: relative;
    height: 430px;
    /* Increased by 30px */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 110%;
    /* Taller for parallax */
    background-size: cover;
    background-position: center;
    z-index: 0;
    will-change: transform;
}

@media (max-width: 768px) {
    .ai-parallax {
        height: 260px;
        /* Fine-tuned to 260px (User requested slightly less than 280px, but > 250px) */
        min-height: auto;
    }

    .parallax-bg {
        background-size: cover;
        background-position: center center;
    }
}





@media (max-width: 768px) {
    .ai-icons-container {
        gap: 30px;
    }

    .icon-circle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Contact Section */
.contact-section {
    background: var(--bg-light);
}

/* Modal Styles */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    margin: 20px;
    padding: 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 30px;
    transition: color 0.3s;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--text-main);
    text-decoration: none;
}

.modal h2 {
    margin-bottom: 10px;
    color: var(--text-main);
}

.modal p {
    margin-bottom: 30px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-green);
}

/* Watercolor Button Style */
.submit-btn {
    width: 100%;
    padding: 18px;
    /* Larger click area */
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    /* Soft watercolor gradient */
    color: white;
    font-size: 1.3rem;
    /* Larger Text */
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(132, 250, 176, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(132, 250, 176, 0.6);
}

@media (max-width: 768px) {

    /* Reduce blob size for mobile to allow white space */
    .blob-red {
        width: 300px;
        height: 300px;
        filter: blur(60px);
        opacity: 0.9;
    }

    .blob-green {
        width: 320px;
        height: 320px;
        filter: blur(60px);
        opacity: 0.9;
    }

    .blob-blue {
        width: 220px;
        height: 220px;
        filter: blur(50px);
        opacity: 0.9;
    }

    .blob-orange {
        width: 250px;
        height: 250px;
        filter: blur(50px);
        opacity: 0.9;
    }
}