/* ==========================================================================
   Japanese-Optimized Responsive Stylesheet
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --light-bg: #f9fafb;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

html {
    /* Set base size ~2 notches smaller for Japanese density (15px instead of 16px) */
    font-size: 93.75%; /* 15px */
}

body {
    /* Modern Japanese System Font Stack */
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo, sans-serif;
    font-size: 0.9375rem; /* ~14px - 15px equivalent */
    line-height: 1.75;    /* Essential for complex Kanji legibility */
    letter-spacing: 0.035em; /* Breathing room for dense glyphs */
    color: var(--text-color);
    background-color: var(--white);
    
    /* Japanese line-breaking rules (Kinsoku Shori) */
    word-break: break-word;
    overflow-wrap: break-word;
    line-break: strict;
    
    /* Font rendering optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "palt" 1; /* Proportional metric adjustments for Kana */
}

/* Header Styles */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: block;
    max-width: 180px;
    height: auto;
    margin: 0.875rem auto;
    padding: 0 1rem;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.5rem;
    gap: 0.375rem;
    border-top: 1px solid var(--border-color);
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    padding: 0.4rem 0.85rem;
    border-radius: 0.375rem;
    font-size: 0.875rem; /* Compact nav text */
    font-weight: 500;
    transition: all 0.25s ease;
}

nav a:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

nav a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Main Content */
main {
    max-width: 1140px;
    margin: 1.75rem auto;
    padding: 0 1rem;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

@media (min-width: 768px) {
    .two-column {
        grid-template-columns: 1fr 1fr;
    }
}

.column {
    min-width: 0;
}

/* Typography (Scaled down ~2 notches) */
h1 {
    font-size: 1.5rem; /* Reduced from 2.0rem */
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.875rem;
    color: var(--text-color);
}

h2 {
    font-size: 1.25rem; /* Reduced from 1.5rem */
    font-weight: 700;
    line-height: 1.45;
    margin-top: 1.5rem;
    margin-bottom: 0.625rem;
    color: var(--text-color);
}

h3 {
    font-size: 1.05rem; /* Reduced from 1.25rem */
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

p {
    margin-bottom: 1rem;
}

ul {
    margin-left: 1.25rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.375rem;
}

/* Cards */
.card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card p {
    font-size: 0.9375rem; /* Reduced from 1.2rem to match standard body */
    line-height: 1.7;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Notices & Quotes (Scaled down proportionally) */
.cookie-notice {
    font-size: 0.8125rem; /* Reduced from 1.2rem; standard auxiliary notice size */
    line-height: 1.6;
}

.cookie-quote {
    font-size: 1rem; /* Reduced from 1.3rem; subtle highlight size */
    font-weight: 500;
    line-height: 1.7;
}

.eval-notice {
    font-size: 0.875rem; /* Reduced from 1.2rem */
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1.125rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.25s ease;
    border: none;
    cursor: pointer;
    font-size: 0.875rem; /* Clean, compact Japanese UI button */
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-top: 0.5rem;
}

.btn:hover {
    background-color: var(--secondary-color);
}

/* Forms */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-top: 1.25rem;
}

.contact-form label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.6;
    transition: border-color 0.25s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Articles */
article {
    margin-bottom: 1.5rem;
}

/* Links */
a {
    color: var(--primary-color);
    transition: color 0.25s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Footer */
footer {
    background-color: var(--light-bg);
    text-align: center;
    padding: 1.75rem 1rem;
    margin-top: 3.5rem;
    border-top: 1px solid var(--border-color);
}

footer p {
    margin: 0;
    font-size: 0.8125rem; /* ~13px for footer copyright */
    color: #6b7280;
}

/* Mobile Optimization */
@media (max-width: 767px) {
    h1 {
        font-size: 1.35rem; /* Reduced from 1.75rem */
    }
    
    h2 {
        font-size: 1.15rem; /* Reduced from 1.25rem */
    }

    h3 {
        font-size: 1rem;
    }
    
    .logo {
        max-width: 140px;
    }
    
    nav a {
        padding: 0.375rem 0.625rem;
        font-size: 0.8125rem;
    }
}

/* Performance: Reduce animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}