/* ----------------------------------------------------
   GLOBAL RESET & VARIABLES
---------------------------------------------------- */
* {
    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 (15px instead of 16px) for clean Japanese rendering */
    font-size: 93.75%; 
}

/* ----------------------------------------------------
   BASE TYPOGRAPHY & BODY (Japanese Optimized)
---------------------------------------------------- */
body {
    /* Modern, highly legible Japanese OS system font stack */
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo, sans-serif;
    line-height: 1.75;       /* Increased line height prevents complex Kanji characters from crowding */
    letter-spacing: 0.035em;  /* Proper breathing room for square CJK glyphs */
    color: var(--text-color);
    background-color: var(--white);
    
    /* Strict Japanese line-breaking rules (Kinsoku Shori: prevents punctuation at the start of lines) */
    word-break: break-word;
    overflow-wrap: break-word;
    line-break: strict;
    
    /* Advanced CSS font-rendering for kana spacing layout */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "palt" 1; /* Enables proportional Japanese metrics */
}

h1, h2, h3 {
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.4;
}

/* Typography scaled down ~2 notches */
h1 { font-size: 1.5rem; margin-bottom: 0.875rem; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 0.625rem; }
h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }
ul { margin: 0 0 1rem 1.25rem; }
li { margin-bottom: 0.375rem; }

/* ----------------------------------------------------
   HEADER & NAVIGATION
---------------------------------------------------- */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: block;
    max-width: 180px; /* Scaled down slightly to match text proportion */
    margin: 0.875rem auto;
    height: auto;
}

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; /* ~2 notches smaller navigation links */
    font-weight: 500;
    transition: 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);
}

/* ----------------------------------------------------
   LAYOUT
---------------------------------------------------- */
main {
    max-width: 1140px; /* Slightly tightened container for better readability of shorter lines */
    margin: 1.75rem auto;
    padding: 0 1rem;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

@media (min-width: 768px) {
    .two-column {
        grid-template-columns: 1fr 1fr;
    }
}

/* ----------------------------------------------------
   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: 0.25s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card p {
    font-size: 0.9375rem; /* Downscaled from 1.2rem to match default body size */
    line-height: 1.7;
}

/* Notices & Quotes scaled down to professional editorial standards */
.cookie-notice { font-size: 0.8125rem; line-height: 1.6; } /* Subtle size (~13px) for legals */
.cookie-quote { font-size: 1rem; font-weight: 500; line-height: 1.7; }

/* ----------------------------------------------------
   RESPONSIVE IMAGE FIX
---------------------------------------------------- */
.framed-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 1rem;
    border: 3px solid var(--border-color); /* Slightly thinner border for a more elegant, modern Japanese aesthetic */
    border-radius: 6px;
    box-sizing: border-box;
}

/* ----------------------------------------------------
   BUTTONS
---------------------------------------------------- */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1.125rem; /* Reduced padding for cleaner button shape */
    border-radius: 0.375rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem; /* Scaled down from 1rem */
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-top: 0.5rem;
    transition: 0.25s ease;
}

.btn:hover {
    background-color: var(--secondary-color);
}

/* ----------------------------------------------------
   FORMS
---------------------------------------------------- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-top: 1.25rem;
}

.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; /* Scaled down from 1rem */
    font-family: inherit;
    line-height: 1.6;
    transition: 0.25s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-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; /* Clean, compact footers at ~13px */
    color: #6b7280;
}

/* ----------------------------------------------------
   MOBILE OPTIMIZATION
---------------------------------------------------- */
@media (max-width: 767px) {
    h1 { font-size: 1.35rem; } /* Downscaled from 1.75rem */
    h2 { font-size: 1.15rem; } /* Downscaled from 1.25rem */
    h3 { font-size: 1rem; }
    .logo { max-width: 140px; }
    nav a { padding: 0.375rem 0.625rem; font-size: 0.8125rem; }
}

/* ----------------------------------------------------
   REDUCED MOTION
---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}