/*
Theme Name: Balance7
Theme URI: https://example.com/balance7
Author: Balance Seven LLC
Author URI: https://example.com
Description: 自動車整備・内装用品販売、インターネット通信販売事業向けコーポレートテーマ
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: balance7
Tags: one-column, custom-menu, featured-images, translation-ready, corporate
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --color-primary: #1e3a5f;
    --color-secondary: #0d2137;
    --color-accent: #e74c3c;
    --color-accent-dark: #c0392b;
    --color-white: #ffffff;
    --color-light: #f5f7fa;
    --color-gray: #6c757d;
    --color-gray-light: #e9ecef;
    --color-dark: #212529;
    --font-primary: 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
    --font-accent: 'Oswald', 'Helvetica Neue', Arial, sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
}

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

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

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.8;
    color: var(--color-dark);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

ul, ol {
    list-style: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-accent);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
    position: relative;
}

.section--dark {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: var(--color-white);
}

.section--gray {
    background-color: var(--color-light);
}

.section__header {
    margin-bottom: 60px;
}

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

.section__label {
    display: inline-block;
    font-family: var(--font-accent);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-accent);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.section__title {
    position: relative;
    margin-bottom: 1rem;
}

.section__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--color-accent);
    margin-top: 1rem;
}

.section__header--center .section__title::after {
    margin-left: auto;
    margin-right: auto;
}

.section__description {
    font-size: 1rem;
    color: var(--color-gray);
    max-width: 600px;
}

.section__header--center .section__description {
    margin-left: auto;
    margin-right: auto;
}

.section--dark .section__description {
    color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    background-color: transparent;
    transition: var(--transition);
}

.site-header.scrolled {
    background-color: var(--color-white);
    padding: 0.75rem 0;
    box-shadow: var(--shadow);
}

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

.site-logo {
    font-family: var(--font-accent);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.site-header.scrolled .site-logo {
    color: var(--color-primary);
}

.site-logo span {
    color: var(--color-accent);
}

/* Navigation */
.main-nav ul {
    display: flex;
    gap: 2.5rem;
}

.main-nav a {
    position: relative;
    font-family: var(--font-accent);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-white);
    padding: 0.5rem 0;
}

.site-header.scrolled .main-nav a {
    color: var(--color-primary);
}

.main-nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.main-nav a:hover::before,
.main-nav a.active::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-white);
    transition: var(--transition);
}

.site-header.scrolled .menu-toggle span {
    background-color: var(--color-primary);
}

/* ==========================================================================
   Hero Section - Split Layout
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--color-secondary);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
}

.hero__container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero__content {
    color: var(--color-white);
    padding-right: 2rem;
}

.hero__label {
    display: inline-block;
    font-family: var(--font-accent);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-accent);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.1s backwards;
}

.hero__title span {
    color: var(--color-accent);
}

.hero__description {
    font-size: 1.125rem;
    line-height: 1.8;
    opacity: 0.85;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

.hero__graphic {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.hero__graphic-main {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__graphic-main svg {
    width: 50%;
    height: 50%;
    color: var(--color-white);
}

.hero__graphic-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.hero__graphic-ring::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    background-color: var(--color-accent);
    border-radius: 50%;
}

.hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-white);
    font-family: var(--font-accent);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.6;
}

.hero__scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
    animation: scrollLine 2s ease infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes scrollLine {
    0%, 100% { opacity: 0.6; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(0.6); }
}

/* ==========================================================================
   About Section - Image Right
   ========================================================================== */
.about__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about__text {
    order: 1;
}

.about__image-wrapper {
    order: 2;
    position: relative;
}

.about__image {
    position: relative;
    overflow: hidden;
}

.about__image::before {
    content: '';
    position: absolute;
    top: 20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--color-accent);
    z-index: -1;
}

.about__image img,
.about__image-placeholder {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.about__image-placeholder {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-family: var(--font-accent);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.about__features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.about__feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.about__feature-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-accent);
    color: var(--color-white);
    font-family: var(--font-accent);
    font-size: 1rem;
    font-weight: 700;
}

.about__feature-text h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    text-transform: none;
}

.about__feature-text p {
    font-size: 0.8125rem;
    color: var(--color-gray);
    margin-bottom: 0;
}

/* ==========================================================================
   Business Section - Numbered Cards
   ========================================================================== */
.business__list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.business__item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    padding: 2.5rem;
    background-color: var(--color-white);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.business__item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--color-accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.business__item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-hover);
}

.business__item:hover::before {
    transform: scaleY(1);
}

.business__number {
    font-family: var(--font-accent);
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-gray-light);
    line-height: 1;
    transition: var(--transition);
}

.business__item:hover .business__number {
    color: var(--color-accent);
}

.business__content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    text-transform: none;
}

.business__content p {
    color: var(--color-gray);
    margin-bottom: 0;
    line-height: 1.8;
}

.business__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--color-light);
    color: var(--color-accent);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.business__item:hover .business__icon {
    background-color: var(--color-accent);
    color: var(--color-white);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact__wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.contact__form {
    background-color: var(--color-white);
    padding: 3rem;
    box-shadow: var(--shadow);
}

.section--dark .contact__form {
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    font-family: var(--font-accent);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.section--dark .form__label {
    color: var(--color-white);
}

.form__label span {
    color: var(--color-accent);
    margin-left: 0.25rem;
}

.form__input,
.form__textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    border: 2px solid var(--color-gray-light);
    background-color: var(--color-white);
    transition: var(--transition);
}

.section--dark .form__input,
.section--dark .form__textarea {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
}

.form__input:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form__textarea {
    min-height: 150px;
    resize: vertical;
}

.form__submit {
    width: 100%;
    padding: 1.25rem 2rem;
    font-family: var(--font-accent);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-white);
    background-color: var(--color-accent);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.form__submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--color-accent-dark);
    transition: left 0.3s ease;
    z-index: 0;
}

.form__submit:hover::before {
    left: 0;
}

.form__submit span {
    position: relative;
    z-index: 1;
}

#form-message {
    margin-top: 1rem;
    padding: 1rem;
    text-align: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 50px 0 25px;
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__logo {
    font-family: var(--font-accent);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer__logo span {
    color: var(--color-accent);
}

.footer__nav ul {
    display: flex;
    gap: 2rem;
}

.footer__nav a {
    font-family: var(--font-accent);
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.7;
}

.footer__nav a:hover {
    opacity: 1;
    color: var(--color-accent);
}

.footer__copyright {
    text-align: center;
    padding-top: 25px;
    font-size: 0.8125rem;
    opacity: 0.5;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .section {
        padding: 80px 0;
    }

    h1, .hero__title { font-size: 2.75rem; }
    h2 { font-size: 2rem; }

    .hero__container {
        gap: 2rem;
    }

    .hero__graphic {
        max-width: 300px;
    }

    .about__content {
        gap: 40px;
    }

    .business__item {
        padding: 2rem;
    }

    .business__number {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--color-secondary);
        padding: 100px 2rem 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }

    .main-nav a {
        font-size: 1rem;
        color: var(--color-white);
    }

    .site-header.scrolled .main-nav a {
        color: var(--color-white);
    }

    /* Hero */
    .hero {
        padding-top: 80px;
    }

    .hero::before {
        width: 100%;
        height: 50%;
        top: auto;
        bottom: 0;
        clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 100%);
    }

    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .hero__content {
        padding-right: 0;
    }

    .hero__title {
        font-size: 2.25rem;
    }

    .hero__visual {
        order: -1;
        margin-bottom: 2rem;
    }

    .hero__graphic {
        max-width: 200px;
    }

    /* About */
    .about__content {
        grid-template-columns: 1fr;
    }

    .about__text {
        order: 2;
    }

    .about__image-wrapper {
        order: 1;
    }

    .about__features {
        grid-template-columns: 1fr;
    }

    /* Business */
    .business__item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .business__number {
        font-size: 2.5rem;
    }

    /* Contact */
    .form__row {
        grid-template-columns: 1fr;
    }

    .contact__form {
        padding: 2rem;
    }

    /* Footer */
    .footer__content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer__nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 60px 0;
    }

    h2 { font-size: 1.75rem; }

    .hero__title {
        font-size: 1.875rem;
    }

    .business__item {
        padding: 1.5rem;
    }
}
