/* ==========================================
   popbits Inc. - Corporate Website Styles
   ========================================== */

/* --- CSS Variables --- */
:root {
    --primary: #D63B2F;
    --primary-light: #E8564A;
    --primary-dark: #B82E23;
    --primary-bg: #FEF2F1;
    --text: #1A1A1A;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --bg: #FFFFFF;
    --bg-gray: #F9FAFB;
    --bg-dark: #111111;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
    --shadow-xl: 0 24px 60px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

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

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
}

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

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

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

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

/* Hamburger Menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-sans);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 16px rgba(214, 59, 47, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 24px rgba(214, 59, 47, 0.4);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 72px;
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: 
        radial-gradient(circle at 70% 30%, var(--primary-bg) 0%, transparent 50%),
        radial-gradient(circle at 90% 70%, rgba(214, 59, 47, 0.03) 0%, transparent 40%);
    z-index: 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 80px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    border-radius: 50px;
    letter-spacing: 1px;
    margin-bottom: 32px;
}

.hero-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
    color: var(--text);
}

.text-accent {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 17px;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    flex: 0 0 auto;
    position: relative;
    width: 380px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo-wrapper {
    width: 240px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-logo-wrapper::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: var(--primary-bg);
    z-index: -1;
    animation: pulse-slow 4s ease-in-out infinite;
}

.hero-logo-wrapper::after {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    border: 1px solid rgba(214, 59, 47, 0.08);
    z-index: -2;
    animation: pulse-slow 4s ease-in-out infinite reverse;
}

.hero-logo-icon {
    width: 200px;
    height: 200px;
    object-fit: contain;
    animation: float 6s ease-in-out infinite;
}

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

@keyframes pulse-slow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* Floating Dots */
.floating-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.2;
    animation: float-dot 8s ease-in-out infinite;
}

.dot-1 { top: 10%; left: 20%; animation-delay: 0s; }
.dot-2 { top: 70%; left: 10%; animation-delay: 1.5s; width: 6px; height: 6px; }
.dot-3 { top: 20%; right: 10%; animation-delay: 3s; width: 10px; height: 10px; }
.dot-4 { bottom: 20%; right: 20%; animation-delay: 4.5s; }
.dot-5 { top: 50%; right: 5%; animation-delay: 2s; width: 5px; height: 5px; }

@keyframes float-dot {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, -10px); }
    50% { transform: translate(-5px, 15px); }
    75% { transform: translate(8px, 5px); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-indicator span {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-light);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 50%;
    background: var(--primary);
    animation: scroll-down 2s ease-in-out infinite;
}

@keyframes scroll-down {
    0% { top: -50%; }
    100% { top: 100%; }
}

/* --- Section Styles --- */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* --- Services Section --- */
.services {
    padding: 120px 0;
    background: var(--bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover {
    border-color: rgba(214, 59, 47, 0.15);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: var(--radius-md);
    font-size: 22px;
    margin-bottom: 24px;
}

.service-number {
    position: absolute;
    top: 36px;
    right: 36px;
    font-size: 48px;
    font-weight: 800;
    color: var(--border-light);
    line-height: 1;
    letter-spacing: -2px;
}

.service-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-desc {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-features li {
    font-size: 13px;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
}

.service-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.6;
}

/* --- Company Section --- */
.company {
    padding: 120px 0;
    background: var(--bg-gray);
}

.company-content {
    display: flex;
    gap: 80px;
    align-items: flex-start;
}

.company-logo-area {
    flex: 0 0 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: var(--bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.company-logo {
    width: 200px;
    height: auto;
}

.company-info {
    flex: 1;
}

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

.company-table tr {
    border-bottom: 1px solid var(--border);
}

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

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

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

.company-table td {
    color: var(--text-secondary);
    line-height: 1.8;
}

.company-table td a {
    color: var(--primary);
    font-weight: 500;
}

.company-table td a:hover {
    text-decoration: underline;
}

/* --- Contact Section --- */
.contact {
    padding: 120px 0;
    background: var(--bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.contact-card {
    text-align: center;
    padding: 48px 32px;
    background: var(--bg-gray);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.contact-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.contact-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 50%;
    font-size: 24px;
    margin: 0 auto 20px;
}

.contact-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.contact-card a {
    color: var(--primary);
    font-weight: 500;
    font-size: 15px;
}

.contact-card a:hover {
    text-decoration: underline;
}

.contact-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.contact-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* --- Footer --- */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 80px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
    max-width: 320px;
}

.footer-logo {
    height: 32px;
    width: auto;
    margin-bottom: 16px;
    background: white;
    padding: 8px 16px;
    border-radius: 8px;
}

.footer-tagline {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.6;
}

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

.footer-col h4 {
    color: white;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

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

.footer-col a {
    font-size: 14px;
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col a:hover {
    opacity: 1;
    color: var(--primary-light);
}

.footer-col a i {
    font-size: 12px;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    opacity: 0.4;
    letter-spacing: 0.5px;
}

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

@media (max-width: 1024px) {
    .hero-container {
        gap: 40px;
    }

    .hero-visual {
        width: 300px;
        height: 300px;
    }

    .hero-logo-wrapper {
        width: 180px;
        height: 180px;
    }

    .hero-logo-wrapper::before {
        width: 250px;
        height: 250px;
    }

    .hero-logo-wrapper::after {
        width: 300px;
        height: 300px;
    }

    .hero-logo-icon {
        width: 150px;
        height: 150px;
    }

    .company-content {
        gap: 48px;
    }

    .company-logo-area {
        flex: 0 0 240px;
        padding: 40px 32px;
    }

    .company-logo {
        width: 160px;
    }
}

@media (max-width: 768px) {
    /* Nav */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        padding: 40px;
        box-shadow: var(--shadow-xl);
        transition: right 0.4s ease;
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-link {
        font-size: 18px;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding-top: 120px;
        padding-bottom: 80px;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        width: 260px;
        height: 260px;
        order: -1;
        margin-bottom: 24px;
    }

    .hero-logo-wrapper {
        width: 160px;
        height: 160px;
    }

    .hero-logo-wrapper::before {
        width: 220px;
        height: 220px;
    }

    .hero-logo-wrapper::after {
        width: 260px;
        height: 260px;
    }

    .hero-logo-icon {
        width: 130px;
        height: 130px;
    }

    .scroll-indicator {
        display: none;
    }

    /* Sections */
    .services,
    .company,
    .contact {
        padding: 80px 0;
    }

    .section-header {
        margin-bottom: 48px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-card {
        padding: 36px 28px;
    }

    .service-number {
        top: 28px;
        right: 28px;
        font-size: 36px;
    }

    /* Company */
    .company-content {
        flex-direction: column;
        gap: 32px;
    }

    .company-logo-area {
        flex: none;
        width: 100%;
        padding: 40px;
    }

    .company-logo {
        width: 160px;
    }

    .company-table th {
        width: 100px;
        padding-right: 20px;
        font-size: 14px;
    }

    .company-table td {
        font-size: 14px;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contact-card {
        padding: 36px 24px;
    }

    /* Footer */
    .footer {
        padding-top: 60px;
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        gap: 48px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .company-table th,
    .company-table td {
        display: block;
        width: 100%;
        padding: 0;
    }

    .company-table th {
        padding-top: 16px;
        padding-bottom: 4px;
    }

    .company-table td {
        padding-bottom: 16px;
    }

    .footer-links {
        flex-direction: column;
        gap: 32px;
    }
}
