/*
Theme Name: Flavor Motors
Theme URI: https://example.com/flavor-motors
Author: Your Name
Author URI: https://example.com
Description: 車両販売店向け高品質WordPressテーマ。在庫管理プラグインと完全連携。軽量・高速・レスポンシブ。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flavor-motors
Tags: car-dealership, automotive, custom-logo, custom-menu, featured-images
*/

/* ==========================================================
   DESIGN TOKENS
   ========================================================== */
:root {
    /* Palette — deep navy + warm gold */
    --fm-dark:       #0d0f1a;
    --fm-navy:       #141729;
    --fm-slate:      #1e2140;
    --fm-steel:      #2a2d4a;
    --fm-gold:       #daa520;
    --fm-gold-light: #f0c040;
    --fm-gold-pale:  #f5dfa0;
    --fm-white:      #fafaf7;
    --fm-off-white:  #f2f1ec;
    --fm-border:     #e0dfda;
    --fm-text:       #1a1a2e;
    --fm-text-mid:   #5c5b58;
    --fm-text-muted: #8c8a85;
    --fm-danger:     #dc2626;
    --fm-success:    #16a34a;

    /* Type */
    --fm-font:       'Noto Sans JP', 'Hiragino Kaku Gothic ProN', -apple-system, BlinkMacSystemFont, sans-serif;
    --fm-font-en:    'DM Sans', var(--fm-font);
    --fm-font-mono:  'JetBrains Mono', monospace;

    /* Layout */
    --fm-max-w:      1280px;
    --fm-gap:        24px;
    --fm-radius:     10px;
    --fm-radius-lg:  16px;
    --fm-radius-sm:  6px;

    /* Transitions */
    --fm-ease:       cubic-bezier(.4, 0, .2, 1);
    --fm-dur:        0.25s;
}

/* ==========================================================
   RESET / BASE
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}
body {
    font-family: var(--fm-font);
    color: var(--fm-text);
    background: var(--fm-off-white);
    line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.fm-container {
    max-width: var(--fm-max-w);
    margin: 0 auto;
    padding: 0 var(--fm-gap);
}

/* ==========================================================
   HEADER
   ========================================================== */
.fm-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--fm-navy);
    border-bottom: 2px solid var(--fm-gold);
    transition: box-shadow var(--fm-dur) var(--fm-ease);
}
.fm-header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.fm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo */
.fm-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.fm-logo-mark {
    width: 40px;
    height: 40px;
    background: var(--fm-gold);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fm-font-en);
    font-size: 20px;
    font-weight: 900;
    color: var(--fm-navy);
    flex-shrink: 0;
}
.fm-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.fm-logo-name {
    font-family: var(--fm-font-en);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}
.fm-logo-tagline {
    font-size: 10px;
    color: var(--fm-gold-pale);
    letter-spacing: 0.15em;
    font-weight: 500;
}

/* Navigation */
.fm-nav ul {
    display: flex;
    gap: 4px;
    list-style: none;
}
.fm-nav a {
    display: block;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    border-radius: var(--fm-radius-sm);
    transition: all var(--fm-dur) var(--fm-ease);
    position: relative;
}
.fm-nav a:hover,
.fm-nav .current-menu-item a,
.fm-nav .current_page_item a {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.fm-nav .current-menu-item a::after,
.fm-nav .current_page_item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--fm-gold);
    border-radius: 1px;
}
.fm-header-cta {
    padding: 9px 22px;
    background: var(--fm-gold);
    color: var(--fm-navy);
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--fm-radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--fm-dur) var(--fm-ease);
    letter-spacing: 0.02em;
}
.fm-header-cta:hover {
    background: var(--fm-gold-light);
    transform: translateY(-1px);
}

/* Mobile menu toggle */
.fm-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.fm-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    border-radius: 1px;
    transition: all 0.3s;
}

/* ==========================================================
   HERO
   ========================================================== */
.fm-hero {
    position: relative;
    background: var(--fm-dark);
    overflow: hidden;
    min-height: 520px;
    display: flex;
    align-items: center;
}
.fm-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 70% 50%, rgba(218,165,32,0.08) 0%, transparent 70%),
        radial-gradient(ellipse 50% 80% at 20% 80%, rgba(30,33,64,0.6) 0%, transparent 60%);
    z-index: 1;
}
.fm-hero::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, transparent 30%, rgba(218,165,32,0.04) 100%);
    z-index: 1;
}
.fm-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 80px 0;
}
.fm-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--fm-gold);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.fm-hero-eyebrow::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--fm-gold);
    border-radius: 1px;
}
.fm-hero h1 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}
.fm-hero h1 em {
    font-style: normal;
    color: var(--fm-gold-light);
}
.fm-hero-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.55);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 440px;
}
.fm-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.fm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--fm-radius);
    border: none;
    cursor: pointer;
    transition: all var(--fm-dur) var(--fm-ease);
    letter-spacing: 0.02em;
}
.fm-btn-primary {
    background: var(--fm-gold);
    color: var(--fm-navy);
}
.fm-btn-primary:hover {
    background: var(--fm-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(218,165,32,0.25);
}
.fm-btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.2);
}
.fm-btn-outline:hover {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.06);
}

/* Hero stats */
.fm-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}
.fm-hero-stat {
    padding: 28px 24px;
    text-align: center;
    background: rgba(13,15,26,0.7);
    backdrop-filter: blur(10px);
}
.fm-hero-stat-num {
    font-family: var(--fm-font-en);
    font-size: 36px;
    font-weight: 800;
    color: var(--fm-gold-light);
    line-height: 1;
    margin-bottom: 6px;
}
.fm-hero-stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    font-weight: 600;
}

/* ==========================================================
   SECTION COMMON
   ========================================================== */
.fm-section {
    padding: 80px 0;
}
.fm-section-header {
    text-align: center;
    margin-bottom: 48px;
}
.fm-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--fm-gold);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.fm-section-eyebrow::before,
.fm-section-eyebrow::after {
    content: '';
    width: 20px;
    height: 1.5px;
    background: var(--fm-gold);
    border-radius: 1px;
}
.fm-section-title {
    font-size: clamp(24px, 3.5vw, 34px);
    font-weight: 800;
    color: var(--fm-text);
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.fm-section-subtitle {
    font-size: 14px;
    color: var(--fm-text-muted);
    margin-top: 10px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================
   FEATURES / USP
   ========================================================== */
.fm-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.fm-feature-card {
    background: #fff;
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-lg);
    padding: 32px 24px;
    transition: all var(--fm-dur) var(--fm-ease);
    position: relative;
    overflow: hidden;
}
.fm-feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--fm-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--fm-ease);
}
.fm-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}
.fm-feature-card:hover::before {
    transform: scaleX(1);
}
.fm-feature-icon {
    width: 48px;
    height: 48px;
    background: var(--fm-off-white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 22px;
}
.fm-feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--fm-text);
}
.fm-feature-card p {
    font-size: 13px;
    color: var(--fm-text-muted);
    line-height: 1.7;
}

/* ==========================================================
   INVENTORY SECTION (Shortcode wrapper)
   ========================================================== */
.fm-inventory-section {
    background: var(--fm-off-white);
}

/* ==========================================================
   ABOUT / CTA
   ========================================================== */
.fm-about {
    background: var(--fm-navy);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.fm-about::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(218,165,32,0.06) 0%, transparent 70%);
}
.fm-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.fm-about h2 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    margin-bottom: 18px;
    line-height: 1.3;
}
.fm-about p {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 14px;
}
.fm-about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 28px;
}
.fm-about-feat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
}
.fm-about-feat-dot {
    width: 8px;
    height: 8px;
    background: var(--fm-gold);
    border-radius: 50%;
    flex-shrink: 0;
}
.fm-about-img {
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--fm-slate);
}
.fm-about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================
   CONTACT / FORM
   ========================================================== */
.fm-contact {
    background: #fff;
}
.fm-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}
.fm-contact-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}
.fm-contact-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--fm-border);
}
.fm-contact-item-icon {
    width: 40px;
    height: 40px;
    background: var(--fm-off-white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.fm-contact-item-label {
    font-size: 11px;
    color: var(--fm-text-muted);
    font-weight: 600;
    letter-spacing: 0.06em;
}
.fm-contact-item-val {
    font-size: 15px;
    font-weight: 600;
    color: var(--fm-text);
    margin-top: 2px;
}
.fm-contact-map {
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    margin-top: 24px;
    aspect-ratio: 16/9;
    background: var(--fm-off-white);
}
.fm-contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.fm-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--fm-text-mid);
    margin-bottom: 4px;
}
.fm-form input,
.fm-form select,
.fm-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-sm);
    font-size: 14px;
    font-family: var(--fm-font);
    color: var(--fm-text);
    background: var(--fm-off-white);
    outline: none;
    transition: border-color var(--fm-dur);
    margin-bottom: 16px;
}
.fm-form input:focus,
.fm-form select:focus,
.fm-form textarea:focus {
    border-color: var(--fm-gold);
    box-shadow: 0 0 0 3px rgba(218,165,32,0.12);
}
.fm-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.fm-footer {
    background: var(--fm-dark);
    color: rgba(255,255,255,0.5);
    padding: 50px 0 28px;
}
.fm-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}
.fm-footer-brand {
    max-width: 280px;
}
.fm-footer-brand .fm-logo {
    margin-bottom: 14px;
}
.fm-footer-brand p {
    font-size: 13px;
    line-height: 1.8;
}
.fm-footer h4 {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.fm-footer ul {
    list-style: none;
}
.fm-footer li {
    margin-bottom: 8px;
}
.fm-footer li a {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    transition: color var(--fm-dur);
}
.fm-footer li a:hover {
    color: var(--fm-gold-light);
}
.fm-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

/* ==========================================================
   PAGE TEMPLATE
   ========================================================== */
.fm-page-hero {
    background: var(--fm-navy);
    padding: 48px 0;
    text-align: center;
    border-bottom: 2px solid var(--fm-gold);
}
.fm-page-hero h1 {
    color: #fff;
    font-size: 28px;
    font-weight: 800;
}
.fm-page-hero p {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    margin-top: 6px;
}
.fm-page-content {
    padding: 60px 0;
}
.fm-page-content .fm-container {
    max-width: 800px;
}

/* ==========================================================
   BLOG / POSTS
   ========================================================== */
.fm-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.fm-post-card {
    background: #fff;
    border: 1px solid var(--fm-border);
    border-radius: var(--fm-radius-lg);
    overflow: hidden;
    transition: all var(--fm-dur) var(--fm-ease);
}
.fm-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.fm-post-thumb {
    aspect-ratio: 16/9;
    background: var(--fm-off-white);
    overflow: hidden;
}
.fm-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--fm-ease);
}
.fm-post-card:hover .fm-post-thumb img {
    transform: scale(1.03);
}
.fm-post-body {
    padding: 20px;
}
.fm-post-meta {
    font-size: 11px;
    color: var(--fm-text-muted);
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.fm-post-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--fm-text);
    line-height: 1.4;
    margin-bottom: 8px;
}
.fm-post-excerpt {
    font-size: 13px;
    color: var(--fm-text-muted);
    line-height: 1.7;
}
.fm-post-content {
    font-size: 16px;
    line-height: 1.9;
}
.fm-post-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 36px 0 12px;
}
.fm-post-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 28px 0 10px;
}
.fm-post-content p {
    margin-bottom: 18px;
}
.fm-post-content img {
    border-radius: var(--fm-radius);
    margin: 24px 0;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1024px) {
    .fm-features-grid { grid-template-columns: repeat(2, 1fr); }
    .fm-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
    .fm-menu-toggle { display: block; }
    .fm-nav { display: none; }
    .fm-nav.open {
        display: block;
        position: absolute;
        top: 72px; left: 0; right: 0;
        background: var(--fm-navy);
        border-top: 1px solid rgba(255,255,255,0.06);
        padding: 16px;
        box-shadow: 0 12px 24px rgba(0,0,0,0.3);
    }
    .fm-nav.open ul {
        flex-direction: column;
        gap: 2px;
    }
    .fm-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 50px 0 60px;
    }
    .fm-hero { min-height: auto; }
    .fm-about-grid { grid-template-columns: 1fr; }
    .fm-contact-grid { grid-template-columns: 1fr; }
    .fm-features-grid { grid-template-columns: 1fr; }
    .fm-footer-grid { grid-template-columns: 1fr; }
    .fm-header-cta { display: none; }
}

/* ==========================================================
   ANIMATION (reveal on scroll)
   ========================================================== */
.fm-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--fm-ease), transform 0.6s var(--fm-ease);
}
.fm-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================
   WORDPRESS DEFAULTS
   ========================================================== */
.alignleft { float: left; margin: 0 24px 12px 0; }
.alignright { float: right; margin: 0 0 12px 24px; }
.aligncenter { display: block; margin: 0 auto 24px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--fm-text-muted); margin-top: 6px; }
.screen-reader-text {
    clip: rect(1px,1px,1px,1px);
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
}

/* Admin bar adjustment */
.admin-bar .fm-header { top: 32px; }
@media (max-width: 782px) {
    .admin-bar .fm-header { top: 46px; }
}
