/* ========================================
   東大スタディ・パートナー LP (v2)
   Mobile-First Design
   ======================================== */

:root {
    --primary: #1a1a2e;
    /* Navy */
    --secondary: #f8f9fa;
    /* Light Gray */
    --accent: #e67e22;
    /* Trustworthy Orange */
    --accent-hover: #d35400;
    --line-green: #06C755;
    --line-green-hover: #05b34c;
    --text-main: #1a1a2e;
    --text-sub: #5a5a6e;
    --white: #FFFFFF;
    --border: #e8e8ec;
    --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
    --shadow-md: 0 4px 16px rgba(26, 26, 46, 0.1);
    --shadow-lg: 0 8px 32px rgba(26, 26, 46, 0.12);
    --font-main: 'Noto Sans JP', 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --gold: #c9a227;
    --red-highlight: #e74c3c;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    font-size: 16px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.02em;
    line-height: 1.3;
    font-weight: 700;
}

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

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

/* ========================================
   Utilities
   ======================================== */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

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

.text-left {
    text-align: left;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background-color: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(230, 126, 34, 0.3);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(230, 126, 34, 0.4);
}

.btn-line {
    background-color: var(--line-green);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(6, 199, 85, 0.3);
}

.btn-line:hover {
    background-color: var(--line-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(6, 199, 85, 0.4);
}

.free-offer-text {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 1.05rem;
    background: #fff;
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: 2px solid var(--accent);
    box-shadow: var(--shadow-sm);
    line-height: 1.5;
}

.free-offer-text .highlight {
    color: var(--red-highlight);
    font-size: 1.2rem;
    background: linear-gradient(transparent 70%, #ffeb3b 70%);
    padding: 0 4px;
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
    width: 100%;
    max-width: 400px;
}

.header-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* ========================================
   Header
   ======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
}

/* ========================================
   Sections
   ======================================== */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    text-align: center;
    line-height: 1.5;
    color: var(--text-main);
}

/* ========================================
   Hero
   ======================================== */
.hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    background: #fafafa;
}

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

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Adjust if needed */
    opacity: 0.2;
    /* Fade out for mobile readability if image is busy, or use overlay */
}

/* On desktop, we want image on right, text on left. 
   For mobile, maybe image background or stacked. 
   Let's try a clean layout where image is visible but text pops. */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(2px);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-text-area {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--primary);
    line-height: 1.4;
}

.hero-line1 {
    display: block;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-sub);
    margin-bottom: 8px;
}

.hero-sub {
    font-size: 1rem;
    color: var(--text-sub);
    margin-bottom: 32px;
    font-weight: 500;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.hero-badge-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    font-size: 0.85rem;
}

.badge-icon {
    font-size: 1.1rem;
}

.badge-text strong {
    color: var(--accent);
    font-weight: 700;
}

/* ========================================
   Pain
   ======================================== */
.pain {
    background-color: var(--white);
}

.pain-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    margin-bottom: 40px;
}

.pain-image-area {
    width: 100%;
    max-width: 400px;
}

.pain-main-img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.pain-bubbles {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 500px;
}

.pain-bubble {
    background: var(--secondary);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.pain-bubble p {
    font-size: 0.95rem;
    font-weight: 500;
}

.pain-solution {
    text-align: center;
    background: var(--primary);
    color: var(--white);
    padding: 32px 20px;
    border-radius: var(--radius-lg);
    position: relative;
}

.pain-solution-lead {
    font-size: 1.1rem;
    line-height: 1.6;
}

.pain-solution-lead strong {
    color: var(--gold);
    font-size: 1.2rem;
}

.pain-arrow {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary);
    font-size: 2rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Features
   ======================================== */
.features {
    background-color: var(--secondary);
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature-card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.feature-number {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent);
    background: rgba(230, 126, 34, 0.1);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.feature-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-sub);
    line-height: 1.8;
}

/* ========================================
   Match
   ======================================== */
.match {
    background-color: var(--white);
}

.match-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.match-desc {
    font-size: 1rem;
    color: var(--text-sub);
    margin-bottom: 32px;
}

.match-tags-display {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.match-tag-group h4 {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 12px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 500;
}

.match-note {
    font-size: 0.9rem;
    color: var(--text-sub);
    background: #fffdf5;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gold);
}

.match-ui-img {
    box-shadow: var(--shadow-lg);
    border-radius: 24px;
    border: 8px solid var(--primary);
    max-width: 300px;
    margin: 0 auto;
}

/* ========================================
   Comparison
   ======================================== */
.comparison {
    background-color: var(--secondary);
}

.comparison-table-wrapper {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Ensure scroll on mobile */
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.comparison-table th {
    background: var(--secondary);
    font-weight: 700;
    color: var(--text-sub);
}

.comparison-table .th-highlight {
    background: var(--primary);
    color: var(--white);
    border-radius: 8px 8px 0 0;
}

.comparison-table .td-label {
    text-align: left;
    font-weight: 700;
    color: var(--text-main);
    background: var(--secondary);
    width: 20%;
}

.comparison-table .td-highlight {
    background: #fffdf5;
    border-left: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    font-weight: 700;
    color: var(--text-main);
}

.comparison-table tr:last-child td.td-highlight {
    border-bottom: 2px solid var(--accent);
    border-radius: 0 0 8px 8px;
}

.mark {
    display: inline-block;
    margin-left: 4px;
    font-weight: 700;
}

.td-highlight .mark {
    color: var(--accent);
    font-size: 1.2rem;
}

/* ========================================
   Testimonials
   ======================================== */
.testimonials {
    background-color: var(--white);
}

.testimonial-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.testimonial-card {
    background: var(--secondary);
    padding: 32px;
    border-radius: var(--radius-md);
    position: relative;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.testimonial-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}

.testimonial-meta h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.testimonial-meta p {
    font-size: 0.85rem;
    color: var(--text-sub);
}

.testimonial-quote {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--text-sub);
    line-height: 1.8;
}

/* ========================================
   Flow
   ======================================== */
.flow {
    background-color: var(--secondary);
}

.flow-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.flow-step {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-md);
    text-align: center;
    width: 100%;
    max-width: 320px;
    box-shadow: var(--shadow-sm);
}

.flow-number {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    margin: 0 auto 16px;
}

.flow-step h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.flow-step p {
    font-size: 0.9rem;
    color: var(--text-sub);
}

.flow-arrow {
    font-size: 1.5rem;
    color: var(--accent);
    transform: rotate(90deg);
    /* Down for mobile */
}

/* ========================================
   Final CTA
   ======================================== */
.cta-final {
    background: linear-gradient(180deg, var(--white) 0%, #fff8e1 100%);
    text-align: center;
    padding: 100px 0;
}

.cta-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 40px;
    line-height: 1.4;
    color: var(--text-main);
}

.cta-note {
    font-size: 0.9rem;
    color: var(--text-sub);
    margin-top: 20px;
}

/* ========================================
   Footer
   ======================================== */
footer {
    padding: 32px 0;
    background: var(--primary);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: fadeInUp 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* ========================================
   Tablet & Desktop Responsive
   ======================================== */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 32px;
    }

    .hero-bg-img {
        opacity: 1;
    }

    .hero-overlay {
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 40%, rgba(255, 255, 255, 0) 100%);
    }

    .hero-content {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        height: 100%;
    }

    .hero-text-area {
        text-align: left;
        margin: 0;
        max-width: 50%;
    }

    .hero-badges {
        justify-content: flex-start;
    }

    .pain-content-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 60px;
    }

    .pain-image-area {
        order: 2;
        /* Image right? or Left? Let's keep it flexible. Instruction said "center illustration". */
    }

    .feature-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .feature-card {
        flex: 1;
        min-width: 300px;
    }

    .match-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .match-text {
        flex: 1;
        max-width: 50%;
    }

    .match-image {
        flex: 1;
        display: flex;
        justify-content: center;
    }

    .testimonial-list {
        flex-direction: row;
    }

    .testimonial-card {
        flex: 1;
    }

    .flow-steps {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }

    .flow-arrow {
        transform: rotate(0deg);
        margin-top: 60px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1000px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero-line1 {
        font-size: 1.6rem;
    }
}

/* ========================================
   Header Buttons
   ======================================== */
.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 480px) {
    .header-buttons {
        gap: 4px;
    }
    .header-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
}

/* ========================================
   Modal
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-sub);
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.modal-desc {
    font-size: 0.9rem;
    color: var(--text-sub);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: var(--font-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}

.form-group input::placeholder {
    color: #aaa;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 8px;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success View */
.success-icon {
    width: 64px;
    height: 64px;
    background: var(--line-green);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 20px;
}

#success-view {
    text-align: center;
}

#success-view .modal-title {
    text-align: center;
}

#success-view .modal-desc {
    text-align: center;
}