/* 
  Design System for "Iwate Education mixture" NPO
  Colors: Warm Off-White (Bg), Sage Green (Brand), Soft Terracotta (Accent), Charcoal (Text)
*/

:root {
    /* Colors */
    --color-bg: #FAF9F6;
    /* Warm Off-White */
    --color-primary: #8BA888;
    /* Sage Green */
    --color-primary-dark: #769374;
    --color-primary-light: #e6efe5;
    --color-accent: #E07A5F;
    /* Soft Terracotta */
    --color-accent-dark: #cc6043;
    --color-text-main: #333333;
    --color-text-light: #666666;
    --color-white: #FFFFFF;

    /* Typography */
    --font-heading: 'Zen Maru Gothic', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;

    /* Spacing & Layout */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 32px;
    --border-radius-blob: 40% 60% 70% 30% / 40% 50% 60% 50%;

    /* Shadows */
    --shadow-soft: 0 10px 30px rgba(139, 168, 136, 0.15);
    --shadow-hover: 0 15px 40px rgba(139, 168, 136, 0.25);

    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-main);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    position: relative;
    display: block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--color-accent);
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-lg);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(224, 122, 95, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 122, 95, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(250, 249, 246, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition-normal);
    padding: 1rem 0;
}

.header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    flex-direction: column;
}

.logo-sub {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text-light);
    letter-spacing: 0.05em;
}

.logo-main {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu ul {
    display: flex;
    gap: 1.5rem;
}

.nav-menu a:not(.btn) {
    font-weight: 500;
    position: relative;
    padding-bottom: 0.25rem;
}

.nav-menu a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition-fast);
}

.nav-menu a:not(.btn):hover::after {
    width: 100%;
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.hamburger-menu span {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--color-text-main);
    left: 0;
    transition: var(--transition-fast);
}

.hamburger-menu span:nth-child(1) {
    top: 0;
}

.hamburger-menu span:nth-child(2) {
    top: 9px;
}

.hamburger-menu span:nth-child(3) {
    bottom: 0;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 120px;
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--color-bg);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-bg::before,
.hero-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    /* Large light blur */
    opacity: 0.6;
    animation: floatAnimation 15s infinite alternate ease-in-out;
}

.hero-bg::before {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(224, 122, 95, 0.4) 0%, rgba(224, 122, 95, 0) 70%);
    /* Terracotta */
    top: -10%;
    left: -10%;
}

.hero-bg::after {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(139, 168, 136, 0.4) 0%, rgba(139, 168, 136, 0) 70%);
    /* Sage Green */
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
    animation-duration: 18s;
}

@keyframes floatAnimation {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 5%) scale(1.1);
    }
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    animation: fadeUp 1s ease-out forwards;
}

.hero-badge {
    display: inline-block;
    background-color: var(--color-primary-light);
    color: var(--color-primary-dark);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
}

.hero-text {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image-wrapper {
    flex: 1;
    position: relative;
    animation: fadeLeft 1s ease-out 0.2s forwards;
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 115%;
    max-width: 800px;
    z-index: 2;
    position: relative;
    transform: scale(1.15) translateX(5%);
}

.hero-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.placeholder-image {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: var(--color-primary);
    border-radius: var(--border-radius-blob);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 2;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
}

.placeholder-icon {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Hero Decorative Elements */
.decor-circle {
    position: absolute;
    border-radius: 50%;
    z-index: 1;
}

.decor-1 {
    width: 300px;
    height: 300px;
    background-color: var(--color-accent);
    opacity: 0.1;
    top: -50px;
    right: -50px;
}

.decor-2 {
    width: 150px;
    height: 150px;
    background-color: var(--color-primary-dark);
    opacity: 0.05;
    bottom: -20px;
    left: -20px;
}

/* Wave Divider */
.wave-divider-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.wave-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.wave-divider-bottom .shape-fill {
    fill: var(--color-white);
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-image-wrapper {
        width: 100%;
        max-width: 600px;
        margin-top: 2rem;
    }

    .hero-image {
        width: 100%;
        max-width: 100%;
        transform: none;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-image img {
        max-width: 300px;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--color-white);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition-normal);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg);
        top: 9px;
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg);
        bottom: 9px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
}

/* -------------------------------------
   About Section
------------------------------------- */
.about {
    background-color: var(--color-white);
    padding-bottom: 8rem;
    /* Space for the wave */
}

.about-container {
    padding-top: var(--spacing-md);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text-box {
    flex: 1;
}

.about-lead {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary-dark);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.about-text {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: var(--color-text-light);
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image img {
    width: 100%;
    max-width: 450px;
    height: auto;
    object-fit: contain;
}

.about-wave {
    transform: rotate(0deg);
}

.about-wave .shape-fill {
    fill: var(--color-bg);
}

/* -------------------------------------
   Activities Section
------------------------------------- */
.activities {
    background-color: var(--color-bg);
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: var(--spacing-lg);
}

.activity-card {
    background-color: var(--color-white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-normal);
}

.activity-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.activity-card:hover::before {
    transform: scaleX(1);
}

.activity-icon {
    width: 80px;
    height: 80px;
    background-color: var(--color-primary-light);
    color: var(--color-primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    transition: var(--transition-normal);
}

.activity-card:hover .activity-icon {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.1);
}

.activity-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-text-main);
}

.activity-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* -------------------------------------
   Projects Section
------------------------------------- */
.projects {
    background-color: var(--color-bg);
    padding-top: 0;
    /* Activities section is above it with the same bg */
}

.projects-lead {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
    color: var(--color-text-main);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.project-image {
    width: 100%;
    height: 200px;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-image i {
    transform: scale(1.1);
}

.project-card:hover .project-image img {
    transform: scale(1.12);
    /* Richer zoom */
}

.project-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-tag {
    display: inline-block;
    align-self: flex-start;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

/* finished: sage green (default) */
.project-tag.tag-finished {
    background-color: var(--color-primary);
}

/* planning: calm gray */
.project-tag.tag-planning {
    background-color: #9e9e9e;
}

/* recruiting: terracotta */
.project-tag.tag-recruiting {
    background-color: var(--color-accent);
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    transition: var(--transition-fast);
}

.project-card:hover .project-content h3 {
    color: var(--color-primary-dark);
}

.project-content p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.project-link-text {
    font-weight: 600;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.project-card:hover .project-link-text {
    gap: 0.8rem;
}

/* -------------------------------------
   Mobile Sticky Actions
------------------------------------- */
.mobile-sticky-actions {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    flex-direction: column;
    gap: 15px;
}

.sticky-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-white);
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.sticky-btn.mail-btn {
    background-color: var(--color-accent);
}

.sticky-btn.insta-btn {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.sticky-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .mobile-sticky-actions {
        display: flex;
        animation: fadeUp 0.5s ease-out forwards;
    }
}

/* -------------------------------------
   Outline Section
------------------------------------- */
.outline {
    background-color: var(--color-white);
}

.outline-box {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--color-bg);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-soft);
}

.outline-table {
    width: 100%;
    border-collapse: collapse;
}

.outline-table th,
.outline-table td {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: left;
    vertical-align: top;
}

.outline-table tr:last-child th,
.outline-table tr:last-child td {
    border-bottom: none;
}

.outline-table th {
    width: 30%;
    font-weight: 600;
    color: var(--color-primary-dark);
}

.outline-table td {
    color: var(--color-text-light);
}

@media (max-width: 600px) {

    .outline-table th,
    .outline-table td {
        display: block;
        width: 100%;
    }

    .outline-table th {
        padding-bottom: 0.5rem;
        border-bottom: none;
    }
}

/* -------------------------------------
   CTA Section
------------------------------------- */
.cta {
    background-color: var(--color-primary);
    color: var(--color-white);
    text-align: center;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background-color: var(--color-white);
    opacity: 0.05;
    border-radius: 50%;
    top: -200px;
    right: -100px;
}

.cta::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background-color: var(--color-white);
    opacity: 0.05;
    border-radius: 50%;
    bottom: -100px;
    left: 50px;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta h2 {
    color: var(--color-white);
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.cta p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-actions .btn-primary {
    background-color: var(--color-white);
    color: var(--color-primary-dark);
}

.cta-actions .btn-primary:hover {
    background-color: var(--color-bg);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* -------------------------------------
   Footer
------------------------------------- */
.footer {
    background-color: var(--color-text-main);
    color: var(--color-white);
    padding: 4rem 0 1.5rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo .logo-sub {
    color: rgba(255, 255, 255, 0.7);
}

.footer-logo .logo-main {
    color: var(--color-white);
    font-size: 1.25rem;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-representative {
    margin-top: 1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-white);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive adjustments for new sections */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }
}

/* -------------------------------------
   Scroll Reveal Animations
------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

/* -------------------------------------
   Specific Overrides
------------------------------------- */
.mixture-text {
    font-family: 'Outfit', sans-serif;
    text-transform: lowercase;
}