/* 
 * IKIGAI 2026 Official Certificate Verification System
 * Global Styles & Design System
 */

/* --- Variables & Themes --- */
:root {
    /* Color Palette - Light Mode (Default) */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --accent: #f59e0b;
    --success: #10b981;
    --error: #ef4444;
    
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.8);
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-inv: #ffffff;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-body: #020617;
    --bg-card: #0f172a;
    --bg-nav: rgba(2, 6, 23, 0.8);
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    
    --border-color: #1e293b;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
}

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

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; background: none; border: none; outline: none; }
button { cursor: pointer; }

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container.narrow { max-width: 800px; }

section { padding: 5rem 0; }

.align-center { text-align: center; }

/* --- Typography --- */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 3rem;
}

.align-center .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* --- Header & Navigation --- */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.site-header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4.5rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.brand-name .year { color: var(--primary); }
.brand-tagline { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.nav-links { display: flex; gap: 2rem; }
.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.nav-link:hover { color: var(--primary); }

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

.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.theme-btn:hover { background-color: var(--border-color); }

.mobile-menu-toggle { display: none; font-size: 1.5rem; color: var(--text-main); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

.btn-primary {
    background-color: var(--primary);
    color: var(--text-inv);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    border: 2px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--border-color);
}

/* --- Global Utilities --- */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

[data-theme="dark"] .badge { background-color: rgba(37, 99, 235, 0.2); }

/* --- Components --- */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s forwards;
}

.toast.error { border-left-color: var(--error); }
.toast.success { border-left-color: var(--success); }

/* --- Animations --- */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.anim-float { animation: float 4s ease-in-out infinite; }

/* --- Footer --- */
.site-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo-area { margin-bottom: 1rem; }
.footer-desc { color: var(--text-muted); max-width: 300px; }

.footer-links h4 { margin-bottom: 1.5rem; font-size: 1rem; }
.footer-links ul li { margin-bottom: 0.75rem; }
.footer-links ul li a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links ul li a:hover { color: var(--primary); }

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.social-links { display: flex; gap: 1.25rem; font-size: 1.25rem; }

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 99;
}

.back-to-top.visible { opacity: 1; visibility: visible; }

/* --- Scroll Reveal Animations --- */
.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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