:root {
    --primary: #0F172A;
    /* Deep Navy */
    --accent: #10B981;
    /* Emerald Green */
    --accent-light: #ECFDF5;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --bg-dark: #0F172A;
    --border: #E2E8F0;
    --font-heading: 'Noto Sans JP', sans-serif;
    --font-body: 'Inter', 'Noto Sans JP', sans-serif;
    --container-width: 1100px;
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.7;
    background-color: var(--bg-white);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.3;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.25rem 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    padding: 10rem 2rem 6rem;
    background: linear-gradient(135deg, #F1F5F9 0%, #FFFFFF 100%);
    overflow: hidden;
}

.hero-grid {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.75rem;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--bg-dark);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-image-box {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hero-image-box img {
    width: 100%;
    display: block;
}

/* Section Common */
section {
    padding: 8rem 2rem;
    position: relative;
}

.section-container {
    max-width: var(--container-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-tag {
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 800;
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    color: var(--bg-dark);
}

/* Markdown Content Styling */
.md-content {
    font-size: 1.1rem;
}

.md-content h3 {
    font-size: 1.75rem;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.md-content h3::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    background: var(--accent);
    display: block;
}

.md-content p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.md-content strong {
    color: var(--bg-dark);
}

.md-content ul {
    list-style: none;
    margin-bottom: 2rem;
}

.md-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.md-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 800;
}

.md-content img {
    width: 100%;
    border-radius: 12px;
    margin: 3rem 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Problem Section Improvement */
.problem-item {
    margin-bottom: 6rem;
}

.problem-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.problem-item:nth-child(even) .problem-grid {
    grid-template-columns: 1fr 1.2fr;
}

.problem-item:nth-child(even) .problem-text {
    order: 2;
}

.problem-item:nth-child(even) .problem-image {
    order: 1;
}

.problem-text p:last-child {
    margin-bottom: 0;
}

.problem-image img {
    margin: 0 !important;
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 900px) {
    .problem-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .problem-text {
        order: 1 !important;
    }

    .problem-image {
        order: 2 !important;
    }

    .problem-item {
        margin-bottom: 4rem;
    }
}

/* Specific Section Layouts */
.bg-light {
    background-color: var(--bg-light);
}

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

.bg-dark .section-title {
    color: white;
}

.bg-dark .md-content p {
    color: #94A3B8;
}

/* Grid for Partners/Images */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Lesson / Class Style Layout */
.lesson-category {
    margin-bottom: 6rem;
}

.category-title {
    font-size: 2rem;
    color: var(--bg-dark);
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.lesson-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

/* Shared Card Styles */
.lesson-card,
.partner-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: left;
}

.lesson-card:hover,
.partner-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.lesson-card h3,
.partner-card h3 {
    margin-top: 0;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--accent);
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.lesson-card .card-body,
.partner-card .card-body {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Fix lists inside cards to be cleaner */
.card-body ul {
    margin-top: 1rem;
    margin-bottom: 0;
    list-style: none;
    /* Remove default list markers */
    padding-left: 0;
    /* Remove default padding */
}

.card-body li {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
    /* Add space for custom marker */
}

.card-body li::before {
    content: '•';
    /* Custom bullet point */
    position: absolute;
    left: 0;
    color: var(--accent);
    /* Accent color for bullet */
    font-weight: 800;
    font-size: 1.1em;
    line-height: 1;
}

.lesson-card img,
.partner-card img {
    margin: 2rem 0 0;
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
}

/* Lesson Grid */
.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 3rem;
}

/* Partner Grid - Updated to 2 columns for better overview */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 3rem;
}

.partner-card h4 {
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* Image Grid for sections with consecutive images */
.image-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-row img {
    margin: 0 !important;
    height: 200px !important;
    object-fit: cover;
    width: 100% !important;
}

/* Scrollytelling Layout (Horizontal scroll on Vertical) */
.scrolly-section {
    padding: 0 !important;
    overflow: visible;
}

/* Class Section Timeline */
.scrolly-container-class {
    height: 700vh;
    view-timeline: --scrolly-timeline-class block;
}

/* DIY Section Timeline */
.scrolly-container-diy {
    height: 600vh;
    view-timeline: --scrolly-timeline-diy block;
}

.scrolly-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Flow from top */
    overflow: hidden;
    background: var(--bg-light);
}

.scrolly-header {
    margin-bottom: 0 !important;
    padding: 6rem 5vw 2rem;
    /* Give space for the nav/top */
    width: 100%;
    z-index: 10;
    flex-shrink: 0;
}

.scrolly-track-class {
    display: flex;
    gap: 4rem;
    padding: 2rem 20vw 10vh 10vw;
    /* Adjust padding for the new flow */
    width: max-content;
    align-items: flex-start;
    flex-grow: 1;
    will-change: transform;
    animation: linear move-horizontal-class;
    animation-timeline: --scrolly-timeline-class;
    animation-range: contain 5% exit 0%;
    animation-fill-mode: both;
}

@keyframes move-horizontal-class {
    to {
        transform: translateX(calc(-100% + 80vw));
    }
}

.scrolly-track-diy {
    display: flex;
    gap: 4rem;
    padding: 2rem 20vw 10vh 10vw;
    width: max-content;
    align-items: flex-start;
    flex-grow: 1;
    will-change: transform;
    animation: linear move-horizontal-diy;
    animation-timeline: --scrolly-timeline-diy;
    animation-range: contain 5% exit 0%;
    animation-fill-mode: both;
}

@keyframes move-horizontal-diy {
    to {
        transform: translateX(calc(-100% + 80vw));
    }
}

/* Partner Section Timeline */
.scrolly-container-partner {
    height: 600vh;
    view-timeline: --scrolly-timeline-partner block;
}

.scrolly-track-partner {
    display: flex;
    gap: 4rem;
    padding: 2rem 20vw 10vh 10vw;
    width: max-content;
    align-items: flex-start;
    flex-grow: 1;
    will-change: transform;
    animation: linear move-horizontal-partner;
    animation-timeline: --scrolly-timeline-partner;
    animation-range: contain 5% exit 0%;
    animation-fill-mode: both;
}

@keyframes move-horizontal-partner {
    to {
        transform: translateX(calc(-100% + 80vw));
    }
}

/* Partner Intro Card (Large text) */
.partner-intro-card {
    flex: 0 0 500px;
    height: 66vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: white;
    padding: 3rem;
    border-radius: 32px;
    border: 2px solid var(--accent);
    box-shadow: var(--card-shadow);
    text-align: left;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.8;
}

/* Horizontal Partner Card Layout */
.partner-horizontal {
    flex: 0 0 1200px;
    height: 66vh;
    background: white;
    padding: 3.5rem;
    border-radius: 32px;
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 4rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.partner-horizontal:hover {
    transform: translateY(-8px);
}

.partner-col-left {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding-right: 1.5rem;
}

.partner-col-left::-webkit-scrollbar {
    width: 6px;
}

.partner-col-left::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.partner-header {
    margin-bottom: 2rem;
}

.partner-header h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.partner-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.partner-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    height: 100%;
}

.partner-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.partner-col-right {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.partner-col-right::-webkit-scrollbar {
    width: 6px;
}

.partner-col-right::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.partner-col-right h4 {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--primary);
}

.scrolly-track .bento-item {
    min-width: 750px;
    max-width: 750px;
    flex-shrink: 0;
    height: 66vh;
    justify-content: flex-start;
    overflow-y: hidden;
}

/* Category structure within the track */
.scrolly-track .lesson-category {
    display: flex;
    align-items: flex-start;
    gap: 4rem;
}

.scrolly-track .scrolly-grid {
    display: flex;
    gap: 4rem;
}

/* Redesign category titles as horizontal intro blocks */
.scrolly-track .category-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    background: white;
    padding: 4rem;
    border-radius: 32px;
    border: 2px solid var(--accent);
    min-width: 400px;
    max-width: 400px;
    height: 66vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    margin: 0;
    box-shadow: var(--card-shadow);
}

/* DIY Section specific image heights */
.scrolly-container-diy .bento-item img {
    max-width: 90%;
    max-height: 45vh;
    width: auto;
    height: auto;
    display: block;
    margin: 2rem auto 0;
    object-fit: contain;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(150px, auto);
    gap: 1.5rem;
}

.bento-item {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.bento-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

/* Bento Variants */
.bento-large {
    grid-column: span 8;
    grid-row: span 2;
}

.bento-tall {
    grid-column: span 4;
    grid-row: span 2;
}

.bento-wide {
    grid-column: span 8;
    grid-row: span 1;
}

.bento-small {
    grid-column: span 4;
    grid-row: span 1;
}

.bento-item h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.bento-item p {
    color: var(--text-muted);
}

/* --- Concept Section Redesign (Forced Horizontal) --- */
section#concept .concept-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.5rem !important;
    margin-top: 3rem !important;
    width: 100% !important;
}

section#concept .concept-card {
    background: white !important;
    padding: 2.5rem 1.5rem !important;
    border-radius: 24px !important;
    border: 1px solid var(--border) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    height: 100% !important;
}

section#concept .concept-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--card-shadow) !important;
}

section#concept .concept-card .bento-logo {
    width: 120px !important;
    height: 120px !important;
    margin-bottom: 2rem !important;
    object-fit: contain !important;
    mix-blend-mode: multiply !important;
    display: block !important;
}

section#concept .concept-card h3 {
    margin-top: 0 !important;
    font-size: 1.25rem !important;
    color: var(--accent) !important;
    margin-bottom: 1.25rem !important;
    line-height: 1.4 !important;
    word-break: keep-all !important;
}

section#concept .concept-card p {
    font-size: 0.95rem !important;
    color: var(--text-muted) !important;
    line-height: 1.6 !important;
}


/* Step Timeline (Phase 03: The Process) */
.step-timeline {
    position: relative;
    max-width: 800px;
    margin: 4rem auto;
}

.step-item {
    position: relative;
    display: flex;
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-number-wrapper {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

.step-connector {
    position: absolute;
    top: 60px;
    left: 30px;
    bottom: -4rem;
    width: 2px;
    background: var(--border);
    z-index: 0;
}

.step-item:last-child .step-connector {
    display: none;
}

.step-content {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    flex-grow: 1;
    transition: all 0.3s ease;
}

.step-content:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.step-content-grid {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 2rem;
    align-items: center;
}

.step-img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (max-width: 800px) {
    .step-content-grid {
        grid-template-columns: 1fr;
    }

    .step-img {
        order: -1;
        max-width: 300px;
        margin-bottom: 1.5rem;
    }
}

.step-content h3 {
    margin-top: 0;
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.step-content p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.step-visual {
    margin-top: 5rem;
    text-align: center;
}

.step-visual img {
    max-width: 100%;
    border-radius: 32px;
    box-shadow: var(--card-shadow);
}

.step-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
    font-size: 1.15rem;
    color: var(--text-muted);
}


/* Impact Section (Phase 04: Future Impact) */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 4rem;
}

.impact-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.impact-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
}

.impact-card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.impact-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.impact-card:hover .impact-card-image img {
    transform: scale(1.05);
}

.impact-card-content {
    padding: 2.5rem;
    flex-grow: 1;
}

.impact-card h3 {
    font-size: 1.4rem;
    color: white;
    margin-bottom: 1.25rem;
    line-height: 1.4;
    font-weight: 800;
}

.impact-card p {
    font-size: 0.95rem;
    color: #94A3B8;
    line-height: 1.7;
    margin-bottom: 0;
}

/* Update Responsive for Impact Grid */
@media (max-width: 900px) {
    .impact-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 1240px) {
    section#concept .concept-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 1000px) {
    .lesson-grid {
        grid-template-columns: 1fr;
    }

    .carousel-grid .concept-card {
        min-width: 85vw;
        max-width: 85vw;
    }
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

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

    .section-title {
        font-size: 2rem;
    }

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

    section#concept .concept-grid {
        grid-template-columns: 1fr !important;
    }
}