/* public/css/styles.css (Final Version - Mobile Optimized) */

/* --- Global Styles & Variables --- */
:root {
  --uw-purple: #4B2E83;
  --uw-gold: #B7A57A;
  --dark-text: #2c2c2c;
  --light-text: #5a5a5a;
  --bg-color: #ffffff;
  --light-gray-bg: #f8f9fa;
  --border-color: #e0e0e0;
  --heading-font: 'Poppins', 'system-ui', sans-serif;
  --body-font: 'Poppins', 'Noto Sans JP', 'system-ui', sans-serif;
  --header-height: 80px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body { font-family: var(--body-font); line-height: 1.7; color: var(--dark-text); background-color: var(--bg-color); padding-top: var(--header-height); }
h1, h2, h3, h4, h5, h6 { font-family: var(--heading-font); font-weight: 700; color: var(--uw-purple); line-height: 1.5; text-wrap: balance; }

/* --- Utility Classes --- */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.section { padding: 100px 0; }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 2.8rem; margin-bottom: 10px; }
.section-title p, .section-title .english-sub { font-size: 1.1rem; color: var(--light-text); max-width: 600px; margin: 0 auto; }
.section-title .english-sub { display: block; font-family: var(--body-font); font-weight: 400; margin-top: 8px; }
.btn { display: inline-block; padding: 14px 32px; border-radius: 50px; text-decoration: none; font-weight: 600; font-family: var(--heading-font); transition: all 0.3s ease; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background-color: var(--uw-purple); color: white; }
.btn-primary:hover { background-color: #3a236a; transform: translateY(-3px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.btn-secondary { background-color: var(--uw-gold); color: #333; }
.btn-secondary:hover { background-color: #a6956d; transform: translateY(-3px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.bg-light { background-color: var(--light-gray-bg); }

/* --- Header & Navigation --- */
.header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; height: var(--header-height); background-image: linear-gradient(to bottom, rgba(255, 255, 255, 1) 40%, rgba(255, 255, 255, 0.8) 70%, rgba(255, 255, 255, 0) 100%); background-color: transparent; box-shadow: none; transition: background-color 0.4s ease, box-shadow 0.4s ease; }
.header.scrolled { background-image: none; background-color: rgba(255, 255, 255, 0.98); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }
.navbar { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo img { height: 40px; transition: filter 0.4s ease; }
.nav-links { list-style: none; display: flex; } .nav-links li { margin-left: 35px; }
.nav-links a { text-decoration: none; font-weight: 500; position: relative; padding: 5px 0; color: var(--dark-text); }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 2px; background-color: var(--uw-gold); transition: width 0.3s ease; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.hamburger { display: none; } .hamburger .bar { background-color: var(--uw-purple); }

/* --- Footer --- */
.footer { background-color: var(--uw-purple); color: #e0e0e0; padding: 60px 0 30px; }
.footer-container { display: flex; flex-wrap: wrap; gap: 40px; margin-bottom: 40px; }
.footer-about, .footer-links, .footer-social { flex: 1; min-width: 220px; }
.footer h4 { color: white; font-size: 1.2rem; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--uw-gold); }
.footer a { color: #ccc; text-decoration: none; transition: color 0.3s; } .footer a:hover { color: white; }
.footer ul { list-style: none; } .footer ul li { margin-bottom: 10px; }
.social-icons { display: flex; gap: 20px; } .social-icons a { font-size: 1.5rem; }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid #5a5a5a; font-size: 0.9rem; color: #aaa; }

/* --- Home: Hero & Features --- */
.hero { position: relative; height: 90vh; min-height: 600px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 20px; color: white; background-color: var(--uw-purple); background-image: linear-gradient(rgba(43, 21, 84, 0.7), rgba(43, 21, 84, 0.7)), url('../images/hero-background.jpg'); background-size: cover; background-position: center center; background-attachment: fixed; }
.hero-content { max-width: 800px; }
.hero h1 { font-size: 3.5rem; color: white; margin-bottom: 20px; font-weight: 700; overflow: hidden; }
.hero h1 .word-span-wrapper { display: inline-block; overflow: hidden; }
.hero h1 .word-span { display: inline-block; transform: translateY(100%); opacity: 0; transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1); }
.hero.is-active h1 .word-span { transform: translateY(0); opacity: 1; }
.hero.is-active h1 .word-span:nth-child(1) { transition-delay: 0.1s; } .hero.is-active h1 .word-span:nth-child(2) { transition-delay: 0.2s; } .hero.is-active h1 .word-span:nth-child(3) { transition-delay: 0.3s; }
.hero p.english-sub { font-size: 1.3rem; color: rgba(255, 255, 255, 0.9); margin-bottom: 40px; }
.hero p, .hero .btn { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out 0.5s, transform 0.6s ease-out 0.5s; }
.hero.is-active p, .hero.is-active .btn { opacity: 1; transform: translateY(0); }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.feature-card { background: white; padding: 40px 30px; border-radius: 10px; text-align: center; box-shadow: 0 4px 25px rgba(0, 0, 0, 0.07); transform-style: preserve-3d; }
.feature-card .icon { font-size: 3rem; color: var(--uw-gold); margin-bottom: 20px; }
.feature-card h3 { margin-bottom: 15px; font-size: 1.4rem; }
.feature-card p { color: var(--light-text); }
.feature-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 10px; background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 60%); opacity: 0; transition: opacity 0.4s ease-out; pointer-events: none; }
.feature-card:hover::before { opacity: 1; }

/* --- About Page --- */
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-content h3 { font-size: 2rem; margin-bottom: 20px; } .about-content p { margin-bottom: 20px; } .about-content ul { list-style: none; }
.about-content li { padding-left: 30px; position: relative; margin-bottom: 10px; font-weight: 500; }
.about-content li::before { content: '✓'; color: var(--uw-gold); position: absolute; left: 0; font-size: 1.2rem; }
.parallax-image-container { overflow: hidden; border-radius: 10px; }
.parallax-image { width: 100%; height: auto; transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); }

/* --- Members / Team Section --- */
.team-layout-flex { display: flex; gap: 20px; max-width: 1400px; margin: 0 auto; }
.member-card-flex { flex: 1; min-width: 250px; background-color: white; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.member-card-flex:hover { transform: translateY(-8px); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1); }
.member-photo { position: relative; width: 100%; height: 350px; overflow: hidden; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.member-card-flex:hover .member-photo img { transform: scale(1.05); }
.member-role-badge { position: absolute; top: 15px; left: 15px; z-index: 2; background-color: rgba(255, 255, 255, 0.9); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); color: var(--uw-gold); font-weight: 600; font-size: 0.8rem; padding: 5px 12px; border-radius: 7px; }
.member-info { padding: 25px; text-align: center; }
.member-info .name { font-size: 1.5rem; margin-bottom: 15px; color: var(--dark-text); font-weight: 700; }
.member-info .bio { font-size: 0.9rem; color: var(--light-text); line-height: 1.6; }
.overview-container { max-width: 800px; margin: 0 auto; background: white; border: 1px solid var(--border-color); border-radius: 12px; padding: 20px 40px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07); }
.overview-item { display: flex; align-items: flex-start; gap: 25px; padding: 30px 0; }
.overview-item:not(:last-child) { border-bottom: 1px solid var(--border-color); }
.overview-icon { font-size: 2rem; color: var(--uw-purple); padding-top: 5px; }
.overview-content { flex: 1; } .overview-label { font-size: 0.9rem; color: var(--light-text); margin-bottom: 5px; font-weight: 500; }
.overview-data { font-size: 1.3rem; color: var(--dark-text); font-weight: 600; line-height: 1.4; }

/* --- Forms & CTA --- */
.form-container { max-width: 700px; margin: 0 auto; background: white; padding: 40px; border-radius: 8px; box-shadow: 0 4px 25px rgba(0, 0, 0, 0.07); }
.form-group { margin-bottom: 25px; } .form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group textarea { width: 100%; padding: 15px; border-radius: 5px; border: 1px solid var(--border-color); font-family: inherit; font-size: 1rem; transition: border-color 0.3s, box-shadow 0.3s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--uw-purple); box-shadow: 0 0 0 3px rgba(75, 46, 131, 0.15); }
textarea { resize: vertical; min-height: 150px; }
.google-form-container { max-width: 800px; margin: 40px auto; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.google-form-container iframe { width: 100%; height: 850px; border: 0; }
.cta-section { background-color: #311b5b; background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MCIgaGVpZ2h0PSI1MCI+PGZpbHRlciBpZD0iYSI+PGZlVHVyYnVsZW5jZSB0eXBlPSJmcmFjdGFsTm9pc2UiIGJhc2VGcmVxdWVuY3k9Ii43NSIgc3RpdGNoVGlsZXM9InN0aXRjaCIvPjwvZmlsdGVyPjxwYXRoIGZpbHRlcj0idXJsKCNhKSIgb3BhY2l0eT0iLjA2NSIgZD0iTTAgMGg1MHY1MEgweiIvPjwvc3ZnPg=='); position: relative; padding: 80px 0; }
.cta-section::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(30, 15, 60, 0.2); }
.cta-section .container { position: relative; z-index: 1; text-align: center; color: white; }
.cta-section h2 { color: white; } .cta-section .english-sub { color: rgba(255, 255, 255, 0.7); margin-bottom: 25px; }
.cta-text { font-size: 1.1rem; line-height: 1.8; max-width: 600px; margin: 0 auto 40px; }
.cta-section .btn-secondary { color: var(--dark-text); font-weight: 700; background-color: var(--uw-gold); }
.cta-section .btn-secondary:hover { background-color: #c9b88d; color: black; }
.mobile-break { display: none; }

/* --- Animation & Text Wrapping --- */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.is-visible { opacity: 1; transform: translateY(0); }
.no-wrap { display: inline-block; white-space: nowrap; }

/*
==============================================
  Responsive Design (Mobile First Approach)
==============================================
*/

/* --- Tablet & Smaller Screens (max-width: 992px) --- */
@media (max-width: 992px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .about-content { grid-template-columns: 1fr; gap: 40px; }
  .team-layout-flex { display: grid; grid-template-columns: repeat(2, 1fr); }
  .member-photo { height: 350px; }
  .member-info .name { font-size: 1.5rem; }
}

/* --- Mobile Screens (max-width: 768px) --- */
@media (max-width: 768px) {
  :root { --header-height: 70px; }
  body { padding-top: var(--header-height); }
  
  .section { padding: 80px 0; }
  .section-title { margin-bottom: 40px; }
  .section-title h2 { font-size: 2.2rem; }
  .section-title p, .section-title .english-sub { font-size: 1rem; }
  
  /* Header & Navigation for Mobile */
  .header { height: var(--header-height); }
  .logo img { height: 35px; }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--bg-color);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 40px 40px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  }
  .nav-links.active { transform: translateX(0); }
  .nav-links li { margin: 20px 0; width: 100%; }
  .nav-links a { font-size: 1.2rem; }
  .nav-links a, .header.scrolled .nav-links a { color: var(--dark-text); }
  
  .hamburger {
    display: flex;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001; /* メニューより手前に */
    padding: 10px;
  }
  .hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--uw-purple);
    border-radius: 5px;
    transition: all 0.3s ease;
  }
  .hamburger.active .bar { background-color: var(--dark-text); } /* メニュー展開時は常に黒 */
  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  
  /* Hero Section for Mobile */
  .hero { height: 80vh; min-height: 500px; }
  .hero h1 { font-size: 2.3rem; line-height: 1.4; }
  .hero p.english-sub { font-size: 1.1rem; }
  
  /* Layouts for Mobile */
  .features-grid { grid-template-columns: 1fr; }
  .team-layout-flex { grid-template-columns: 1fr; }
  
  /* About Page for Mobile */
  .about-content { text-align: center; }
  .about-content .about-image { order: -1; margin-bottom: 30px; } /* 画像を上にする */
  .overview-container { padding: 10px 25px; }
  .overview-item { gap: 15px; }
  .overview-data { font-size: 1.1rem; }
  
  /* CTA Section for Mobile */
  .cta-section { padding: 60px 0; }
  .cta-text { font-size: 1rem; }
  .mobile-break { display: block; }
}
