/* ==========================================================================
   Variables & Reset
   ========================================================================== */
:root {
    /* Brand Colors (from AppColors) */
    --color-primary: #1C3F33;
    /* 濃いミント (Header, Blackboard) */
    --color-primary-light: #E8F5E9;
    /* 薄いミント */
    --color-primary-dark: #1F9C57;
    /* Deep Green (Buttons) */

    --color-secondary: #87CEEB;
    /* Sky Blue */

    --color-background: #F5F5F5;
    /* App Background */
    --color-surface: #FFFFFF;
    /* Cards */

    --color-text-primary: #333333;
    /* Main Text */
    --color-text-title: #2C2C2C;
    /* Titles */
    --color-text-secondary: #888888;
    /* Subtitles */
    --color-text-white: #FFFFFF;
    /* White Text on Dark Bg */

    --color-warning: #FFC107;
    /* Chalk Yellow */
    --color-error: #FF6B6B;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Layout */
    --max-width: 1200px;
    --header-height: 60px;
    --border-radius: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
.text-center {
    text-align: center;
}

.color-white {
    color: var(--color-text-white) !important;
}

/* Responsive Fonts */
h1,
h2,
h3 {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    color: var(--color-text-title);
    font-weight: 700;
}

.section__title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

/* Blackboard underline effect for titles */
.section__title::after {
    content: '';
    display: block;
    width: 60%;
    height: 3px;
    background-color: var(--color-primary-dark);
    margin: 0.5rem auto 0;
    opacity: 0.6;
    border-radius: 2px;
}

.section__subtitle {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
}

.btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.125rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    opacity: 1;
    /* Reset default hover opac */
}

.btn--primary {
    background-color: var(--color-primary-dark);
    color: white;
}

.btn__sub {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.9;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */
.section {
    padding: var(--spacing-lg) var(--spacing-sm);
}

.section__container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    background-color: var(--color-primary);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-sm);
}

.header__logo img {
    height: 32px;
    width: auto;
}

.header__nav {
    display: none;
    /* Mobile first hidden */
}

/* Desktop Nav */
@media (min-width: 768px) {
    .header__nav {
        display: block;
    }

    .header__list {
        display: flex;
        align-items: center;
        gap: var(--spacing-md);
    }

    .header__link {
        color: var(--color-text-white);
        font-size: 0.9rem;
        font-weight: 500;
    }

    .header__link--cta {
        background-color: rgba(255, 255, 255, 0.15);
        padding: 0.5rem 1rem;
        border-radius: 4px;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    .header__hamburger {
        display: none;
    }
}

/* Mobile Nav Overlay */
.header__nav.is-open {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-primary);
    padding: var(--spacing-md);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.header__nav.is-open .header__list {
    flex-direction: column;
    gap: var(--spacing-sm);
}

.header__nav.is-open .header__link {
    color: white;
    display: block;
    padding: 10px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hamburger Button */
.header__hamburger {
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.header__hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    position: absolute;
    transition: all 0.3s;
}

.header__hamburger span:nth-child(1) {
    top: 0;
}

.header__hamburger span:nth-child(2) {
    top: 11px;
}

.header__hamburger span:nth-child(3) {
    bottom: 0;
}

.header__hamburger.is-active span:nth-child(1) {
    transform: rotate(45deg);
    top: 11px;
}

.header__hamburger.is-active span:nth-child(2) {
    opacity: 0;
}

.header__hamburger.is-active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 11px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    background-color: var(--color-primary-light);
    padding: var(--spacing-lg) var(--spacing-sm);
    position: relative;
    overflow: hidden;
}

/* Chalk dust effect decoration (optional) */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(31, 156, 87, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero__container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    align-items: center;
}

@media (min-width: 1024px) {
    .hero__container {
        flex-direction: row;
        text-align: left;
        padding: var(--spacing-md) 0;
    }

    .hero__content {
        flex: 1;
        padding-right: var(--spacing-md);
    }

    .hero__visual {
        flex: 1;
    }
}

.hero__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.3;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.hero__lead {
    font-size: 1.1rem;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
}

.hero__actions {
    margin-top: var(--spacing-md);
    text-align: center;
}

@media (min-width: 1024px) {
    .hero__actions {
        text-align: left;
    }
}

.hero__gif-placeholder {
    position: relative;
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background-color: #ddd;
}

.hero__image {
    width: 100%;
    height: auto;
    display: block;
    /* Removed aspect-ratio and object-fit to prevent cropping */
}

/* ==========================================================================
   Concept Section
   ========================================================================== */
.concept {
    background-color: var(--color-surface);
}

.concept__grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

@media (min-width: 768px) {
    .concept__grid {
        gap: var(--spacing-xl);
    }
}

.concept__text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

.concept__text p+p {
    margin-top: var(--spacing-md);
}

.concept__features-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .concept__features-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.concept__item {
    background-color: var(--color-primary-light);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    text-align: center;
}

.concept__item-title {
    color: var(--color-primary);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

/* ==========================================================================
   Features App Section
   ========================================================================== */
.features {
    background-color: var(--color-background);
}

.features__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

@media (min-width: 768px) {
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-card {
    background-color: var(--color-surface);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid var(--color-primary-light);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.feature-card__icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.feature-card__title {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-primary);
}

.feature-card__desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* ==========================================================================
   Screenshots Section
   ========================================================================== */
.screenshots {
    background-color: var(--color-primary);
    /* Blackboard Theme */
    color: white;
    padding-bottom: var(--spacing-xl);
}

.screenshots .section__title::after {
    background-color: var(--color-warning);
    /* Yellow chalk */
}

/* Horizontal Scroll Container */
.screenshots__scroll-area {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: var(--spacing-md) 0;
    margin: 0 calc(var(--spacing-sm) * -1);
    /* Full width on mobile */
    padding-left: var(--spacing-sm);

    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.screenshots__scroll-area::-webkit-scrollbar {
    display: none;
}

.screenshots__track {
    display: flex;
    gap: var(--spacing-md);
    width: max-content;
}

.screenshot-item {
    width: 260px;
    /* Mobile Screenshot width */
    flex-shrink: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border: 4px solid #333;
    /* Phone bezel look */
    background-color: #000;
}

/* For larger screens, maybe verify grid or just keep the carousel for consistency */
@media (min-width: 1024px) {
    .screenshots__scroll-area {
        overflow-x: hidden;
        /* Disable scroll, layout grid or center */
        margin: 0;
        padding-left: 0;
        display: flex;
        justify-content: center;
    }

    .screenshots__track {
        flex-wrap: wrap;
        /* or grid */
        justify-content: center;
        width: 100%;
    }
}

/* ==========================================================================
   Download Section
   ========================================================================== */
.download {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-sm);
}

.download__title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

.download__text {
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
}

.download__app-icon-wrapper {
    margin-bottom: var(--spacing-md);
}

.download__app-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: inline-block;
}

.download__buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .download__buttons {
        flex-direction: row;
        gap: var(--spacing-md);
    }
}

.store-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    background-color: #000;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    width: 200px;
    height: 60px;
    transition: opacity 0.3s;
    gap: 12px;
}

.store-btn__icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.store-btn__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* .store-btn.ios and .store-btn.android can be customized here if needed */

.store-btn__sub {
    font-size: 0.7rem;
    line-height: 1.2;
    margin-bottom: 0;
}

.store-btn__main {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
}

.store-btn:hover {
    opacity: 0.8;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact {
    background-color: var(--color-surface);
    border-top: 1px solid #eee;
}

.contact__text {
    margin-bottom: var(--spacing-sm);
}

.contact__email {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-primary-dark);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--spacing-md) var(--spacing-sm);
    font-size: 0.875rem;
}

.footer__container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

@media (min-width: 768px) {
    .footer__container {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer__links {
    display: flex;
    gap: var(--spacing-md);
}

.footer__links a {
    color: white;
}

/* Utility for PC only line breaks */
.pc-only {
    display: none;
}

@media (min-width: 768px) {
    .pc-only {
        display: inline;
    }
}

/* ==========================================================================
   Forms & Alerts (for subpages)
   ========================================================================== */
.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 700;
    color: var(--color-text-title);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--color-text-secondary);
    /* or a lighter border variable */
    border-radius: 8px;
    background-color: var(--color-surface);
    margin-bottom: var(--spacing-xs);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(28, 63, 51, 0.2);
}

.form-text {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
}

.text-danger {
    color: var(--color-error);
}

.mb-3 {
    margin-bottom: var(--spacing-md);
}

.alert {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
    border: 1px solid transparent;
}

.alert-info {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.alert-secondary {
    background-color: #e2e3e5;
    color: #41464b;
    border-color: #d3d6d8;
}

/* Button overrides for forms */
.btn-block {
    display: block;
    width: 100%;
}
