/* 
 * Rich LP Rebuild - Style
 * Theme: Premium, Trust, Motion
 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Noto+Serif+JP:wght@600;700;900&display=swap');

:root {
    /* Colors */
    --c-primary: #0f172a;    /* Navy Dark */
    --c-secondary: #334155;  /* Navy Light */
    --c-accent: #dc2626;     /* Red */
    --c-gold: #b45309;       /* Gold/Bronze */
    --c-bg-light: #f1f5f9;   /* Light Gray */
    --c-white: #ffffff;
    --c-text: #1e293b;
    --c-text-muted: #64748b;

    /* Spacing */
    --sp-xs: 0.5rem;
    --sp-sm: 1rem;
    --sp-md: 2rem;
    --sp-lg: 4rem;
    --sp-xl: 6rem;

    /* Animation */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
}

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

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--c-text);
    background: var(--c-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Noto Serif JP', serif;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Loader */
.loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--c-primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}

.loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader__spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--c-white);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-sm);
}

.container--narrow { max-width: 800px; }
.section { padding: var(--sp-lg) 0; }
.text-center { text-align: center; }
.bg-light { background-color: var(--c-bg-light); }
.text-accent { color: var(--c-accent); font-weight: 700; }
.text-xl { font-size: 1.5rem; }
.text-sm { font-size: 0.875rem; }
.sp-only { display: block; }
@media(min-width: 768px) { .sp-only { display: none; } }

/* Header */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    padding: var(--sp-sm) 0;
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.header.is-scrolled {
    background: rgba(255, 255, 255, 0.95);
    padding: var(--sp-xs) 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    backdrop-filter: blur(5px);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo img {
    height: 44px;
    transition: transform 0.3s ease;
}

.header__logo:hover img {
    transform: scale(1.05);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 100px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
    border: none;
}

.btn--primary {
    background: var(--c-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn--primary:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.btn--white {
    background: white;
    color: var(--c-text);
}

.btn--white:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

.btn--nav {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    gap: 0.5rem;
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: white;
    padding-top: 80px; /* Header space */
}

.hero__bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.hero__bg-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scale(1.1); /* For parallax potential */
}

.hero__overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 100%);
}

.hero__container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-lg);
    align-items: center;
}

@media(min-width: 992px) {
    .hero__container { grid-template-columns: 1.2fr 0.8fr; }
}

.hero__subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--sp-sm);
    letter-spacing: 0.1em;
    color: #94a3b8;
}

.hero__title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--sp-md);
}

@media(min-width: 768px) { .hero__title { font-size: 4.5rem; } }

.hero__title-line {
    display: block;
}

/* Premium Visual Card */
.hero__visual-card--premium {
    position: relative;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05); /* Very subtle glass */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); /* Deep shadow */
    transition: transform 0.5s var(--ease-out);
}

.hero__visual-card--premium:hover {
    transform: translateY(-5px);
}

.hero__img-premium {
    border-radius: 8px;
    width: 100%;
    display: block;
}



.hero__scroll {
    position: absolute;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
}

.hero__scroll-line {
    width: 1px; height: 60px;
    background: rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.hero__scroll-line::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 50%;
    background: white;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* Sections Global */
.section-header {
    text-align: center;
    margin-bottom: var(--sp-lg);
}

.section-header__sub {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    font-weight: 700;
    display: block;
    margin-bottom: var(--sp-xs);
}

.section-header__title {
    font-size: 2rem;
    position: relative;
    display: inline-block;
}

@media(min-width: 768px) { .section-header__title { font-size: 2.5rem; } }

/* Points Grid */
.points__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-md);
}

@media(min-width: 768px) { .points__grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width: 992px) { .points__grid { grid-template-columns: repeat(3, 1fr); } }

.point-card {
    background: white;
    padding: var(--sp-md);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
    display: flex;
    flex-direction: column;
}

.point-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--c-primary);
}

.point-card__num {
    font-size: 4rem;
    font-weight: 900;
    color: #f1f5f9;
    position: absolute;
    top: -10px; right: 0;
    line-height: 1;
    z-index: 1;
}

.point-card__content {
    position: relative;
    z-index: 2;
}

.point-card__title {
    font-size: 1.25rem;
    margin-bottom: var(--sp-sm);
    color: var(--c-primary);
    border-bottom: 2px solid var(--c-accent);
    display: inline-block;
}

.point-card__desc {
    font-weight: 500;
    font-size: 1.1rem;
}

/* Pricing */
.pricing__basic-wrapper {
    max-width: 900px;
    margin: 0 auto var(--sp-lg);
}

.pricing__basic {
    background: var(--c-primary);
    color: white;
    border-radius: 20px;
    padding: var(--sp-md);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-md);
    align-items: center;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
}

@media(min-width: 768px) {
    .pricing__basic {
        grid-template-columns: auto auto 1fr;
        padding: var(--sp-lg);
    }
}

.pricing__basic-head h3 { font-size: 1.5rem; }

.pricing__basic-price {
    display: flex;
    align-items: flex-start;
    color: #fbbf24;
}

.pricing__basic-price .currency { font-size: 1.5rem; margin-top: 10px; }
.pricing__basic-price .amount { font-size: 3.5rem; font-weight: 900; line-height: 1; }

.pricing__basic-note {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: var(--sp-sm);
}
@media(min-width: 768px) {
    .pricing__basic-note {
        border-top: none;
        border-left: 1px solid rgba(255,255,255,0.2);
        padding-top: 0;
        padding-left: var(--sp-md);
    }
}

.pricing__basic-note .highlight {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

.pricing__examples {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-md);
    justify-content: center;
    margin-bottom: var(--sp-lg);
}

/* Pricing Case (Calculation Examples) */
.pricing-case {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    padding: var(--sp-md);
    position: relative;
    max-width: 400px;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.pricing-case:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-color: var(--c-primary);
}

.pricing-case__badge {
    display: inline-block;
    background: var(--c-primary);
    color: white;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    margin-bottom: var(--sp-sm);
}

.pricing-case__title {
    font-size: 1.1rem;
    margin-bottom: var(--sp-sm);
    padding-bottom: var(--sp-sm);
    border-bottom: 2px dashed #e2e8f0;
    line-height: 1.5;
}

.pricing-case__calc {
    background: var(--c-bg-light);
    border-radius: 8px;
    padding: var(--sp-sm);
    margin-bottom: var(--sp-sm);
    font-family: 'Noto Sans JP', monospace; /* Monospace for numbers alignment feel */
}

.calc-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.calc-line:last-child { margin-bottom: 0; }

.calc-line--result {
    border-top: 1px solid #cbd5e1;
    padding-top: 0.5rem;
    font-weight: 700;
}

.calc-op { color: var(--c-text-muted); padding: 0 5px; }

.pricing-case__conclusion {
    text-align: center;
    background: #fffbeb; /* Light yellow for emphasis */
    padding: var(--sp-sm);
    border-radius: 8px;
    border: 1px solid #fcd34d;
}

.conclusion-text {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.conclusion-text .highlight {
    color: var(--c-text);
    background: #fde047;
    padding: 0 4px;
}

.conclusion-price {
    color: var(--c-accent);
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.conclusion-price .label { font-size: 0.9rem; font-weight: 700; color: var(--c-text); }
.conclusion-price .price { font-size: 1.8rem; font-weight: 900; line-height: 1; }
.conclusion-price .tax { font-size: 0.8rem; color: var(--c-text-muted); }

/* Ensure images in examples still work or hide if replaced */
.pricing__examples img {
    max-width: 400px;
    border-radius: 12px;
}
.table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 1.2rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background: #f8fafc;
    color: var(--c-secondary);
    font-weight: 700;
}

@media (max-width: 767px) {
    .table-wrapper {
        border-radius: 8px;
    }
    
    .table th, .table td {
        padding: 0.8rem 0.4rem; /* Reduce padding significantly */
        font-size: 0.9rem;
    }
    
    .table th {
        font-size: 0.85rem;
        white-space: nowrap; /* Keep headers on one line if possible, or let them wrap naturally */
    }
}

.row-highlight { background: #fffbeb; }

.badge-ondemand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--c-gold);
    font-weight: 700;
}

.badge-recommend {
    background: linear-gradient(135deg, #ef4444 0%, #b45309 100%);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.unit-price__footer {
    margin-top: var(--sp-md);
    background: white;
    padding: var(--sp-md);
    border-radius: 12px;
}

/* Contact */
.contact__intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.msg-bubble {
    display: inline-block;
    background: var(--c-primary);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    margin-bottom: var(--sp-md);
    position: relative;
}

@media (max-width: 767px) {
    .msg-bubble {
        font-size: 0.85rem;
        padding: 0.6rem 1.5rem;
    }
}

.msg-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: var(--c-primary) transparent transparent;
}

.tel-box {
    margin-bottom: var(--sp-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tel-box__number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--c-primary);
    line-height: 1;
    margin: 0.5rem 0;
}

.tel-box__img {
    width: 20%; /* Mobile size */
    max-width: 150px;
    margin-top: var(--sp-sm);
}

@media (min-width: 768px) {
    .tel-box__img {
        width: 10%; /* Desktop: half of mobile size */
    }
}

.contact-form-wrapper {
    background: white;
    padding: var(--sp-md);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-top: 5px solid var(--c-accent);
}

@media(min-width: 768px) { .contact-form-wrapper { padding: var(--sp-lg); } }

.form-row { margin-bottom: 1.5rem; }
.form-row label { display: block; margin-bottom: 0.5rem; font-weight: 700; }
.required { color: var(--c-accent); font-size: 0.8rem; margin-left: 5px; }

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus {
    border-color: var(--c-primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1);
}

.btn--submit {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.4);
    position: relative;
    overflow: hidden;
}

.btn--submit::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn--submit:hover::before {
    left: 100%;
}

.btn--submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.5);
}

/* Company */
.office-grid {
    display: grid;
    gap: var(--sp-md);
    margin-top: var(--sp-lg);
}

@media(min-width: 600px) { .office-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width: 992px) { .office-grid { grid-template-columns: repeat(3, 1fr); } }

.office-item {
    background: var(--c-bg-light);
    padding: var(--sp-md);
    border-radius: 12px;
    border-left: 4px solid #cbd5e1;
    transition: all 0.3s ease;
}

.office-item:hover {
    border-left-color: var(--c-primary);
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Footer */
.footer-main {
    background: var(--c-primary);
    color: #94a3b8;
    padding: var(--sp-md) 0;
}

/* =========================================
   ANIMATIONS & STATES
   ========================================= */

/* Base states for JS to toggle */
[class*="js-fade-"],
[class*="js-scale-"],
[class*="js-zoom-"] {
    opacity: 0;
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
    will-change: opacity, transform;
}

.js-fade-up { transform: translateY(30px); }
.js-fade-left { transform: translateX(30px); }
.js-scale-up { transform: scale(0.95); }
.js-zoom-in { transform: scale(0.9); }

/* Active states */
.is-active {
    opacity: 1 !important;
    transform: none !important;
}

/* Text Split Animation */
.char {
    opacity: 0;
    transform: translateY(20px);
    display: inline-block;
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.char.is-active {
    opacity: 1;
    transform: translateY(0);
}

/* Title Lines */
.js-title-anim {
    opacity: 0;
    transform: translateY(50px) rotate(2deg);
    transition: all 1s var(--ease-out);
}
.js-title-anim.is-active {
    opacity: 1;
    transform: none;
}

/* Stagger Children */
/* Stagger Children */
.js-scroll-stagger {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s var(--ease-out);
}
.js-scroll-stagger.is-active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   USER ADJUSTMENTS (Layout Tweaks)
   ========================================= */

/* 1. Process Chart: 60% width on PC (Reduced from 70%) */
.process__img-wrapper img {
    /* Default for mobile is 100% via reset */
    width: 100%;
}
@media (min-width: 768px) {
    .process__img-wrapper img {
        width: 60%;
        margin: 0 auto;
        display: block;
    }
}

/* 2. Contact Footer Message & Privacy Note: Center aligned */
.contact__footer-msg,
.privacy-note {
    display: block;
    text-align: center;
    margin-top: var(--sp-md);
    font-weight: 700;
}

/* 3. Company Footer Logo: 20% width, Centered, Spacing */
.company__footer {
    text-align: center;
    margin-top: 5rem; /* Large spacing from office grid */
    margin-bottom: var(--sp-md);
}

.company__link-logo {
    display: inline-block;
    width: 20%; /* Logo size reduced to 20% */
}


/* =========================================
   CONFIRMATION MODAL
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    padding: var(--sp-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.is-open .modal {
    transform: translateY(0);
}

.modal__title {
    font-size: 1.5rem;
    margin-bottom: var(--sp-md);
    text-align: center;
    color: var(--c-primary);
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.confirm-list {
    margin-bottom: var(--sp-lg);
}

.confirm-item {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.8rem 0;
}

.confirm-item label {
    width: 35%;
    font-weight: 700;
    color: var(--c-text-muted);
}

.confirm-item p {
    width: 65%;
    word-break: break-all;
}

.modal__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn--gray {
    background: #94a3b8;
    color: white;
}

.btn--gray:hover { background: #64748b; }

