/* CSS Custom Properties */
:root {
    --primary-black: #0a0a0a;
    --primary-white: #ffffff;
    --accent-red: #d32f2f;
    --text-gray: #424242;
    --border-light: #e0e0e0;
    --warning-orange: #ff9800;
    --font-primary: 'Noto Sans JP', sans-serif;
    --font-serif: 'Noto Serif JP', serif;
    --spacing-unit: 1rem;
    --container-width: 1100px;
    --background-color: var(--primary-white);
    --text-color: var(--primary-black);
}

[data-theme='dark'] {
    --background-color: #121212;
    --text-color: #e0e0e0;
    --primary-black: #e0e0e0;
    --primary-white: #121212;
    --border-light: #2a2a2a;
    --text-gray: #a0a0a0;
}

/* Base Styles */
body {
    font-family: var(--font-primary);
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 1.5);
}

/* Header */
.header {
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-light);
    padding: var(--spacing-unit) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-button {
    background: none;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    margin-left: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
}

.nav-button:hover {
    background-color: var(--text-color);
    color: var(--background-color);
}

/* Urgency Banner */
.urgency-banner {
    background-color: var(--warning-orange);
    color: var(--primary-black);
    text-align: center;
    padding: 0.75rem;
    font-weight: 500;
}

.urgency-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.urgency-countdown {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-left: 1rem;
}

/* Hero Section */
.hero {
    padding: calc(var(--spacing-unit) * 3) 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit) * 3);
    align-items: center;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    line-height: 1.4;
    margin-bottom: var(--spacing-unit);
}

.hero-subtitle-small {
    font-size: 1.2rem;
    font-weight: 500;
    display: block;
    color: var(--text-gray);
}

.hero-subtitle {
    font-size: 1.1rem;
    max-width: 600px;
}

.book-cover {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    display: block;
}

/* CTA Buttons (General) */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    margin: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.primary-cta {
    background-color: var(--accent-red);
    color: var(--primary-white);
}

.secondary-cta {
    background-color: transparent;
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
}

/* Section Styles */
.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.problem-analysis,
.solution-framework,
.testimonials,
.cta-section,
.self-check {
    padding: calc(var(--spacing-unit) * 5) 0;
}

/* Grid Layout */
.grid {
    display: grid;
    gap: var(--spacing-unit) * 1.5;
}

.grid--2-col {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3-col {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Data Card */
.data-card {
    border: 1px solid var(--border-light);
    padding: calc(var(--spacing-unit) * 2);
    text-align: center;
    border-radius: 8px;
}

.data-highlight {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent-red);
}

.data-source {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* Solution Card */
.solution-card {
    border: 1px solid var(--border-light);
    padding: calc(var(--spacing-unit) * 2);
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.solution-icon {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-red);
    margin-bottom: var(--spacing-unit);
}

.gakushukansho-link {
    text-align: center;
    margin-top: calc(var(--spacing-unit) * 3);
}

/* Testimonials */
.testimonial-card {
    background-color: var(--background-color);
    border: 1px solid var(--border-light);
    padding: calc(var(--spacing-unit) * 1.5);
    border-radius: 8px;
    margin-bottom: var(--spacing-unit);
}

.testimonial-card blockquote {
    margin: 0 0 1rem 0;
    font-style: italic;
}

.testimonial-card cite {
    text-align: right;
    display: block;
    color: var(--text-gray);
}

.rating {
    font-size: 1.2rem;
    color: var(--warning-orange);
    text-align: right;
    margin-top: 0.5rem;
}

/* Self Check Quiz */
.quiz-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.question {
    font-weight: 700;
    margin: 1.5rem 0 0.5rem 0;
}

.answers label {
    display: block;
    margin-bottom: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.answers label:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

#quiz-results {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
}

/* CTA Section */
.cta-section {
    background-color: var(--text-gray);
    color: var(--primary-white);
    text-align: center;
}

.cta-section-enhanced {
    background-color: var(--primary-white);
    color: var(--primary-black);
    padding: calc(var(--spacing-unit) * 3);
    border-radius: 12px;
    text-align: center;
}

[data-theme='dark'] .cta-section-enhanced {
    background-color: #1c1c1c;
}

.main-cta h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-top: 0;
}

.cta-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-primary,
.btn-secondary,
.btn-outline {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    /* ボタン内のテキストを中央揃えにするために追加 */
}

.btn-text {
    display: block;
}

.btn-subtext {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.9;
    display: block;
}

.btn-primary {
    background-color: var(--accent-red);
    color: white;
}

.btn-primary:hover {
    background-color: #a72424;
}

.btn-secondary {
    background-color: #333;
    color: white;
}

.btn-secondary:hover {
    background-color: #000;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.btn-outline:hover {
    background-color: var(--accent-red);
    color: white;
}

.sample-offer {
    margin-top: 2rem;
    border-top: 1px solid var(--border-light);
    padding-top: 2rem;
}

.sample-offer h4 {
    margin-top: 0;
    font-size: 1.2rem;
}

.guarantee-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 3rem;
    color: var(--primary-white);
}

.guarantee-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

/* Footer */
.footer {
    background-color: var(--primary-black);
    color: var(--primary-white);
    padding: calc(var(--spacing-unit) * 2) 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-unit);
}

.author-info a {
    color: var(--primary-white);
    text-decoration: none;
    font-weight: 700;
}

.social-icon-x {
    display: inline-block;
    width: 24px;
    height: 24px;
    color: var(--primary-white);
}

.social-icon-x svg {
    width: 100%;
    height: 100%;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-red);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    text-decoration: none;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (min-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .cta-buttons {
        flex-direction: row;
    }

    .guarantee-section {
        grid-template-columns: repeat(3, 1fr);
    }
}