/* ========================================
   YANMAR LAB — Global Styles
   ======================================== */

:root {
    --bg: #fcfcfa;
    --fg: #1c1c1a;
    --fg-mid: #4a4a46;
    --fg-muted: #7a7a74;
    --fg-subtle: #a3a39c;
    --accent: #3a6b4a;
    --accent-soft: #eaf2ed;
    --border: #eaeae5;
    --border-dark: #d4d4ce;
    --surface: #f4f4f0;
    --radius: 6px;
    --max-w: 680px;
    --font-body: 'Noto Sans JP', 'DM Sans', -apple-system, sans-serif;
    --font-display: 'DM Sans', 'Noto Sans JP', sans-serif;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.85;
    font-size: 15px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover { opacity: 0.7; }

/* Layout */
.wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 28px;
}

/* Header */
.site-header {
    padding: 44px 0 0;
    animation: fadeDown 0.6s ease both;
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    text-decoration: none;
    color: var(--fg);
}

.logo {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.logo .sub {
    font-weight: 400;
    color: var(--fg-subtle);
    margin-left: 6px;
    letter-spacing: 0.06em;
}

.lang-toggle {
    display: flex;
    gap: 2px;
    background: var(--surface);
    border-radius: 20px;
    padding: 3px;
}

.lang-toggle button {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 4px 12px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: var(--fg-muted);
    cursor: pointer;
    transition: all 0.25s;
}

.lang-toggle button.active {
    background: #fff;
    color: var(--fg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.lang-toggle button:hover:not(.active) {
    color: var(--fg-mid);
}

/* Navigation */
.site-nav {
    margin-top: 32px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    animation: fadeDown 0.6s 0.1s ease both;
}

.site-nav .wrap {
    display: flex;
    gap: 28px;
    font-size: 13px;
}

.site-nav a {
    color: var(--fg-muted);
    font-weight: 400;
    letter-spacing: 0.01em;
    position: relative;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s;
}

.site-nav a:hover {
    color: var(--fg);
    opacity: 1;
}

.site-nav a:hover::after { width: 100%; }

/* Sections */
.section {
    padding: 52px 0;
    border-bottom: 1px solid var(--border);
    animation: fadeUp 0.5s ease both;
}

.section:last-of-type { border-bottom: none; }

.section-tag {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--fg-subtle);
    margin-bottom: 18px;
    display: block;
}

h1 {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: -0.005em;
    margin-bottom: 16px;
}

h2 {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 12px;
}

h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
}

p {
    color: var(--fg-mid);
    font-weight: 300;
    margin-bottom: 10px;
}

p:last-child { margin-bottom: 0; }

/* App Card */
.app-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-top: 16px;
    display: block;
    color: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

a.app-card:hover {
    border-color: var(--border-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    opacity: 1;
}

.app-card .app-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4a3a6b, #6b4a8a);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.app-card .app-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 6px;
}

.app-card .app-desc {
    font-size: 14px;
    color: var(--fg-muted);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 16px;
}

.app-card .card-arrow {
    font-size: 13px;
    color: var(--accent);
    font-weight: 400;
}

.badge-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--fg-muted);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    transition: all 0.2s;
}

.store-badge:hover {
    color: var(--fg);
    border-color: var(--border-dark);
    opacity: 1;
}

/* Contact */
.email-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 400;
    color: var(--accent);
    padding: 10px 0;
}

.email-link::before {
    content: '→';
    font-size: 14px;
    transition: transform 0.2s;
}

.email-link:hover::before { transform: translateX(3px); }

/* Footer */
.site-footer {
    padding: 32px 0 48px;
    animation: fadeUp 0.5s 0.3s ease both;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 12px;
}

.footer-links a { color: var(--fg-subtle); }
.footer-links a:hover { color: var(--fg-muted); }

.copyright {
    font-size: 11px;
    color: var(--fg-subtle);
    font-weight: 300;
}

/* Legal Pages */
.legal-header {
    padding: 52px 0 0;
    animation: fadeDown 0.5s ease both;
}

.legal-header h1 {
    font-size: 20px;
    margin-bottom: 4px;
}

.legal-header .updated {
    font-size: 13px;
    color: var(--fg-subtle);
    font-weight: 300;
}

.legal-body {
    padding: 40px 0 60px;
    animation: fadeUp 0.5s 0.1s ease both;
}

.legal-body h2 {
    font-size: 15px;
    font-weight: 500;
    margin-top: 32px;
    margin-bottom: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.legal-body h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.legal-body p {
    font-size: 14px;
    line-height: 1.9;
}

.legal-body ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 12px;
}

.legal-body li {
    font-size: 14px;
    color: var(--fg-mid);
    font-weight: 300;
    line-height: 1.9;
    padding-left: 16px;
    position: relative;
}

.legal-body li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--fg-subtle);
    font-weight: 600;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--fg-muted);
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.back-link::before {
    content: '←';
    transition: transform 0.2s;
}

.back-link:hover {
    opacity: 1;
    color: var(--fg);
}

.back-link:hover::before { transform: translateX(-3px); }

/* Table */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.info-table th,
.info-table td {
    text-align: left;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    font-weight: 300;
    color: var(--fg-mid);
    line-height: 1.7;
}

.info-table th {
    width: 160px;
    font-weight: 500;
    color: var(--fg);
    padding-right: 20px;
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 600px) {
    .wrap { padding: 0 20px; }
    h1 { font-size: 19px; }
    .site-nav .wrap { gap: 18px; font-size: 12px; }
    .info-table th { width: 120px; }
    .footer-links { gap: 14px; }
}

/* Language toggle */
[lang="en"] .ja, [lang="ja"] .en { display: none; }
