/*
 * Design Specification (Design Tokens)
 * ------------------------------------
 * Theme: Minimalist Modern
 * Description: A clean, modern interface focusing on typography, whitespace, and subtle shadows.
 *
 * Table of Contents:
 * 1. Variables (:root)
 * 2. Reset & Base Styles
 * 3. Typography
 * 4. Layout & Containers
 * 5. Components - Header
 * 6. Components - App List
 * 7. Components - Footer Navigation
 * 8. Components - Footer
 * 9. Components - CTA Buttons
 * 10. Utilities & Helpers
 * 11. Responsive Design
 */

/* 1. Variables (:root) */
:root {
    /* Colors */
    --color-primary: #319BBA;
    --color-primary-hover: #2A85A0;
    --color-accent: #EB7C31;
    --color-accent-hover: #D46F2B;
    --color-background: #F5F7FA;
    --color-surface: #FFFFFF;
    --color-text-main: #1F2937;
    --color-text-secondary: #6B7280;
    --color-border: #E5E7EB;

    /* Typography */
    --font-family-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    --line-height-heading: 1.2;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;

    /* Shape */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;

    /* Shadow */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Layout */
    --container-width: 960px;
}

/* 2. Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text-main);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Improved Defaults for Responsive Design */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* 3. Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: var(--line-height-heading);
    margin-bottom: var(--spacing-md);
    color: var(--color-text-main);
}

h1 { 
    font-size: 2.25rem; 
    font-weight: 700; 
    margin-bottom: var(--spacing-lg);
}

h2 { 
    font-size: 1.5rem; 
    font-weight: 600; 
    margin-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--color-primary);
}

h3 { font-size: 1.25rem; font-weight: 600; }

p { margin-bottom: var(--spacing-md); color: var(--color-text-secondary); }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover { color: var(--color-primary-hover); }

/* 4. Layout & Containers */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.container ul {
    list-style: disc;
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-xl);
}

/* 5. Components - Header */
.sticky-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    width: 100%;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
}

.sticky-header .header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
    transition: opacity 0.2s ease;
}

.header-logo-link:hover {
    opacity: 0.8;
}

.header-icon {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.header-nav {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-main);
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
    color: var(--color-primary);
    background-color: rgba(0, 0, 0, 0.05);
}

.intro-text {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
    text-align: center;
}

/* 5.1 Components - Hero Section (Slider) */
.hero-slider-container {
    position: relative;
    width: 100%;
    /* Min height to prevent layout shift */
    min-height: 400px; 
    margin-bottom: var(--spacing-xl);
    background-color: var(--color-primary); /* fallback */
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 100px 24px 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.6s ease-in-out;
    z-index: 1;
    color: #fff; /* Ensure text is white */
}

.hero-slide.active {
    transform: translateX(0);
    z-index: 2;
}

.hero-slide.prev {
    transform: translateX(-100%);
    z-index: 1;
}

.hero-slide.no-transition {
    transition: none !important;
}

/* Slide Variants */
.hero-slide-1 {
    background: linear-gradient(135deg, var(--color-primary) 0%, #60c5e3 100%);
}

.hero-slide-2 {
    /* Tenmaru (Greenish) */
    background: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
}

.hero-slide-3 {
    /* DrunkBlocker (Dark Blue/Purple) */
    background: linear-gradient(135deg, #1A237E 0%, #3F51B5 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    color: #fff;
}

.hero-lead {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
    color: #fff;
    line-height: 1.8;
}

/* 5.2 Components - About Section */
.about-section {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-xxl);
    padding: 0 var(--spacing-md);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: var(--spacing-lg);
    display: inline-block;
    border-bottom: 3px solid var(--color-accent);
    padding-bottom: 8px;
}

.about-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

/* 6. Components - App List */
.app-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--spacing-lg);
    list-style: none !important;
    padding: 0 !important;
    margin-bottom: var(--spacing-xxl);
}

.app-item {
    background-color: var(--color-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.app-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.app-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-lg);
    height: 100%;
    color: inherit;
    text-align: center;
    flex: 1;
}

.app-link:hover {
    text-decoration: none;
    color: inherit;
}

.card-action {
    margin-top: auto;
    font-weight: 600;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.card-action::after {
    content: "→";
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.app-item:hover .card-action::after {
    transform: translateX(4px);
}

.app-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: var(--spacing-md);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-sm);
    background-color: var(--color-surface); /* Fallback if transparent PNG needs bg */
}

.app-icon.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    background-color: #F0F9FF;
    border: 1px solid #E0F2FE;
}

/* Specific styles for cards with App Store badges */
.app-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-lg);
    height: 100%;
    color: inherit;
    text-align: center;
    flex: 1;
    width: 100%;
}

.app-card-inner > a:not(.app-store-badge-link):not(.card-action) {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: inherit;
    text-decoration: none;
    width: 100%;
    flex: 1; /* Occupy remaining space */
}

.app-store-badge-link {
    display: inline-block;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.app-store-badge-link:hover {
    opacity: 0.8;
}

.app-store-badge {
    width: 110px;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    cursor: pointer;
}

.app-store-badge-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 40px;
    background-color: #6B7280;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 8px;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    user-select: none;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
}

.app-item h3 {
    margin-bottom: var(--spacing-xs);
    color: var(--color-text-main);
    font-size: 1.125rem;
}

.app-item p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 0;
    line-height: 1.5;
}

/* 7. Components - Footer Navigation (Removed) */

/* 8. Components - Footer */
.footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    padding-bottom: var(--spacing-lg);
}


/* 9. Components - CTA Buttons */
.cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-accent);
    color: #fff;
    padding: 10px 24px;
    border-radius: 9999px; /* Pill shape */
    font-weight: 600;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: var(--shadow-sm);
}

.cta-button:hover {
    background-color: var(--color-accent-hover);
    text-decoration: none;
    transform: translateY(-1px);
}

.cta-button.secondary {
    background-color: var(--color-surface);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

.cta-button.secondary:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.hero-cta {
    padding: 12px 32px; /* Larger padding for hero */
    font-size: 1rem;    /* Larger font for hero */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 10. Utilities & Helpers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mobile-only {
    display: none;
}

/* 12. Components - Step Process */
.step-process {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.step-item {
    flex: 1;
    background-color: var(--color-surface);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--spacing-md);
    display: block;
}

.step-number {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: var(--spacing-sm);
}

.step-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 0;
}

/* 11. Responsive Design */
@media (max-width: 600px) {
    .mobile-only {
        display: inline;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-slide {
        padding: 60px 20px;
    }

    .step-process {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    :root {
        --spacing-lg: 16px;
        --spacing-xl: 24px;
        --spacing-xxl: 32px;
    }
    
    .container {
        padding: var(--spacing-md);
    }
    
    h1 { font-size: 1.75rem; }
    
    .app-list {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
    }

    .sticky-header .header-inner {
        padding: 0 var(--spacing-md);
        height: 60px;
    }

    .header-icon {
        height: 36px;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .cta-row {
        flex-direction: column;
        align-items: stretch; /* Stacked buttons full width */
    }
    
    .cta-button {
        width: 100%;
    }

    .cta-row .app-store-badge-link {
        align-self: center; /* Badge stays centered even if buttons stretch */
        margin-top: 0;
        margin-bottom: var(--spacing-md);
    }
}

/* Language Switcher */
.language-switcher {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--spacing-sm); /* 8px */
    margin-bottom: var(--spacing-lg); /* 24px */
    font-size: 0.9rem;
    font-weight: 500;
}

.lang-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.lang-link:hover {
    color: var(--color-primary);
}

.lang-link.active {
    color: var(--color-primary);
    font-weight: 700;
    pointer-events: none;
    cursor: default;
}

.lang-separator {
    color: var(--color-border);
}

/* About Page Specific Styles */
.page-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xxl);
    color: var(--color-primary);
}

.about-detail-section {
    max-width: 800px;
    margin: 0 auto var(--spacing-xxl);
    text-align: center;
}

.about-detail-section .section-title {
    margin-bottom: var(--spacing-md);
}

.about-detail-section .about-text {
    text-align: left;
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
}

/* Utilities */
.text-center {
    text-align: center !important;
}

/* Developer Profile Styles */
.developer-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--color-surface);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    max-width: 600px;
    margin: 0 auto;
}

.developer-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--color-primary);
}

.developer-social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

.social-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Invert colors for white logos on light background (e.g. X logo) */
.icon-x {
    filter: invert(1);
}

/* Adjust note icon size for visual balance */
.icon-note {
    transform: scale(1.2);
}
