/* ==========================================================================
   Design Tokens & Variables (Apple-style Light Theme)
   ========================================================================== */
:root {
    --bg-light: #fbfbfd; /* Apple's standard light background */
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-card-border: #d2d2d7; /* Soft light gray border */
    --bg-nav: rgba(255, 255, 255, 0.8);
    
    --primary: #0071e3; /* Apple's classic interactive blue */
    --primary-glow: rgba(0, 113, 227, 0.15);
    --ai-accent: #6366f1; /* Indigo to represent the AI essence */
    --ai-glow: rgba(99, 102, 241, 0.1);
    
    --text-main: #1d1d1f; /* Apple's main dark text */
    --text-muted: #86868b; /* Apple's muted secondary text */
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    
    --font-heading: 'Outfit', 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'Noto Sans JP', sans-serif;
    --font-body: 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', 'Noto Sans JP', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

li {
    list-style: none;
}

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

/* ==========================================================================
   Reusable Utilities & Containers
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--ai-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.25rem;
    font-weight: 400;
}

/* Buttons (Apple Style Pill) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-weight: 500;
    border-radius: 980px; /* Fully rounded pill */
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

.btn-primary {
    background-color: #1d1d1f; /* Black pill button */
    color: var(--bg-white);
    border: 1px solid #1d1d1f;
}

.btn-primary:hover {
    background-color: #333336;
    border-color: #333336;
    transform: scale(1.02);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid transparent;
}

.btn-secondary:hover {
    text-decoration: underline;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   Header / Navigation (Floating Glassmorphism)
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-fast);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px; /* Slim Apple style navbar */
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

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

.logo-sub {
    color: var(--ai-accent); /* Small touch of AI indigo */
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: var(--transition-fast);
}

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

.nav-btn {
    background-color: #1d1d1f;
    color: var(--bg-white);
    padding: 0.3rem 0.8rem;
    border-radius: 980px;
    font-weight: 500;
    font-size: 0.75rem;
    transition: var(--transition-fast);
}

.nav-btn:hover {
    background-color: #333336;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.menu-toggle .bar {
    width: 18px;
    height: 1.5px;
    background-color: var(--text-main);
    transition: var(--transition-fast);
}

/* ==========================================================================
   Hero Section (Apple-style Typography)
   ========================================================================== */
.hero {
    position: relative;
    padding: 160px 0 100px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    background-color: var(--bg-white);
}

.hero-bg-glow {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 60vw;
    height: 40vh;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: #f5f5f7;
    border-radius: 980px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--ai-accent); /* Tiny AI indicator */
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero-desc {
    font-size: 1.3rem;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 680px;
    margin: 0 auto 3.5rem auto;
    letter-spacing: -0.01em;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

/* ==========================================================================
   Services Section (Minimal White Grid)
   ========================================================================== */
.services {
    padding: 120px 0;
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    background-color: var(--bg-white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 18px;
    padding: 3rem 2.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
    transition: var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.05);
}

.service-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    margin-bottom: 2rem;
    transition: var(--transition-fast);
}

.service-card:hover .service-icon-wrapper {
    color: var(--ai-accent);
    background: rgba(99, 102, 241, 0.08);
}

.service-icon {
    width: 24px;
    height: 24px;
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================================================
   Product Section (Minimal Macbook Frame)
   ========================================================================== */
.product {
    padding: 120px 0;
    background-color: var(--bg-white);
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 5rem;
    align-items: center;
}

.product-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background-color: #f5f5f7;
    color: var(--text-muted);
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.product-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--ai-accent);
    margin-bottom: 2rem;
}

.product-description {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.75;
}

.product-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.feature-icon {
    color: var(--ai-accent);
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* App UI Mockup (Apple style Light macOS theme) */
.product-visual {
    display: flex;
    justify-content: center;
}

.macbook-frame {
    width: 100%;
    max-width: 480px;
    background-color: #f5f5f7;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.app-ui-mockup {
    background-color: #ffffff;
    width: 100%;
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica;
}

.app-header {
    background-color: #f5f5f7;
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    position: relative;
    border-bottom: 1px solid #e5e5e7;
}

.window-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.window-title {
    font-size: 0.75rem;
    color: #86868b;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    font-weight: 500;
}

.app-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.mockup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fbfbfd;
    border: 1px solid #e5e5e7;
    border-radius: 6px;
    padding: 0.6rem 0.85rem;
}

.mockup-label {
    font-size: 0.8rem;
    color: #86868b;
    font-weight: 500;
}

.mockup-value {
    font-size: 0.8rem;
    color: #1d1d1f;
    font-family: monospace;
}

.mockup-value-highlight {
    font-size: 0.8rem;
    color: var(--ai-accent);
    font-family: monospace;
    font-weight: 600;
}

.mockup-divider {
    font-size: 0.75rem;
    color: #86868b;
    letter-spacing: 0.05em;
    margin-top: 0.4rem;
    font-weight: 600;
}

.mockup-prompt-card {
    background-color: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mockup-prompt-card.active {
    border-color: var(--ai-accent);
    background-color: rgba(99, 102, 241, 0.02);
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
}

.prompt-title {
    font-weight: 600;
    color: #1d1d1f;
}

.prompt-id {
    color: #86868b;
    font-family: monospace;
}

.prompt-preview {
    font-size: 0.7rem;
    color: #86868b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mockup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

.mockup-btn {
    border: none;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
}

.mockup-btn.save {
    background-color: #0071e3;
    color: #ffffff;
}

.mockup-btn.cancel {
    background-color: transparent;
    color: #86868b;
    border: 1px solid #d2d2d7;
}

/* ==========================================================================
   Company Profile (About) Section
   ========================================================================== */
.about {
    padding: 120px 0;
    background-color: var(--bg-light);
}

.about-card {
    background-color: var(--bg-white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    padding: 4rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.01);
    max-width: 850px;
    margin: 0 auto;
}

.about-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.about-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    border-bottom: 1px solid #f5f5f7;
    padding-bottom: 1.75rem;
}

.about-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.about-label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}

.about-value {
    color: #333336;
    font-size: 1rem;
}

.about-value ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.about-value li {
    position: relative;
    padding-left: 1.25rem;
}

.about-value li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--ai-accent);
}

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

.contact-box {
    background: var(--bg-white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    padding: 4rem 3rem;
    max-width: 750px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.02);
}

.contact-box h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 1rem;
}

.contact-box p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    background-color: #fbfbfd;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ai-accent);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.footer {
    border-top: 1px solid #e5e5e7;
    padding: 3rem 0;
    background-color: var(--bg-light);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--text-main);
}

/* ==========================================================================
   Scroll Entrance Animations (CSS & JS Triggered)
   ========================================================================== */
.animate-fade-in {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.hero-title.animate-fade-in { animation-delay: 0.1s; }
.hero-desc.animate-fade-in { animation-delay: 0.2s; }
.hero-actions.animate-fade-in { animation-delay: 0.3s; }

.animate-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.animate-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

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

/* ==========================================================================
   Media Queries & Responsive Styling (スマホ・タブレット)
   ========================================================================== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .product-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .product-info {
        text-align: center;
    }
    .product-features {
        align-items: center;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .form-group-row {
        grid-template-columns: 1fr;
    }
    
    .contact-box {
        padding: 3rem 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    /* Responsive Navigation Menu */
    .menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background-color: var(--bg-white);
        border-left: 1px solid #e5e5e7;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: var(--transition-normal);
        z-index: 1000;
    }
    
    .nav.open {
        right: 0;
    }
    
    .menu-toggle.open .bar:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }
    
    .menu-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.open .bar:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }
}
