/* =========================================
   Variables
========================================= */
:root {
  /* Colors - Cambly Refined Tone */
  --c-primary: #fce116; /* Slightly softer, more elegant yellow */
  --c-text: #363432;    /* Dark warm gray */
  --c-text-light: #736d64; /* Softer text light for better contrast and elegance */
  --c-white: #ffffff;
  
  --c-bg-light: #fcf9f2; /* Cleaner, brighter cream for elegant feel */
  --c-bg-gray: #1b4b36;  /* Sophisticated deep forest green */
  --c-bg-gray-dark: #403e3c; /* Softer dark gray for cards, less harsh */
  --c-bg-dark: #2c2a29;  /* Very dark warm gray */
  --c-placeholder: #efe9e1; /* Cleaner placeholder/border background */
  
  --c-border: #e6dfd8;   /* Subtle warm border */

  /* Typography */
  --font-main: 'Noto Sans JP', sans-serif;
  
  /* Spacing */
  --space-s: 16px;
  --space-m: 32px;
  --space-l: 48px;
  --space-xl: 80px;
  
  /* Border Radius */
  --radius-s: 8px; 
  --radius-m: 16px;
  --radius-l: 24px;
  
  /* Shadow */
  --shadow-sm: 0 6px 16px rgba(54, 52, 50, 0.06); /* Lighter, more elegant shadow */
  --shadow-md: 0 12px 32px rgba(54, 52, 50, 0.1);
}

/* =========================================
   Reset & Base
========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s;
}
a:hover {
  opacity: 0.7;
}

ul, ol {
  list-style: none;
}

/* =========================================
   Utility Classes
========================================= */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-xl) 0;
}
.maxWidth-m { max-width: 800px; }
.maxWidth-s { max-width: 600px; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-white { color: var(--c-white); }
.d-block { display: block; }
.mt-l { margin-top: var(--space-l); }
.mt-xl { margin-top: var(--space-xl); }
.mb-l { margin-bottom: var(--space-l); }
.mb-xl { margin-bottom: var(--space-xl); }

.bg-light { background-color: var(--c-bg-light); }
.bg-gray { background-color: var(--c-bg-gray); }
.bg-gray-dark { background-color: var(--c-bg-gray-dark); }
.bg-dark { background-color: var(--c-bg-dark); }
.bg-placeholder { 
  background-color: var(--c-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-white);
}

.placeholder-icon {
  font-size: 2rem;
  color: #d8d1c7; /* Refined soft warm gray */
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-m);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-2-equal { grid-template-columns: 1fr 1fr; }
.grid-2-aside { grid-template-columns: 1fr 2fr; align-items: start; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-2-3 { grid-template-columns: repeat(3, 1fr); }

.align-center { align-items: center; }
.align-center-vertical { align-items: center; }
.align-stretch { align-items: stretch; }
.flex-between { display: flex; justify-content: space-between; }

@media (max-width: 768px) {
  .grid-2-equal, .grid-2-aside, .grid-2-3 {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}
.btn-primary {
  background-color: var(--c-primary);
  color: var(--c-text);
  font-weight: 700;
}
.btn-primary:hover {
  background-color: #ebd115; /* Sophisticated darker yellow */
  color: var(--c-text);
  box-shadow: var(--shadow-sm);
}
.btn-outline-white {
  background-color: transparent;
  color: var(--c-white);
  border: 2px solid var(--c-white);
}
.btn-outline-white:hover {
  background-color: var(--c-white);
  color: var(--c-text);
}
.btn-block {
  display: block;
  width: 100%;
}

/* Section Common */
.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: var(--space-s);
}
.section-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: var(--space-m);
}
.section-title-large {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-m);
}
.section-text {
  font-size: 1rem;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .section-title { font-size: 1.55rem; }
  .section-title-large { font-size: 1.85rem; }
  .section-text { font-size: 0.95rem; }
}

/* =========================================
   Layout & Components
========================================= */

/* Header */
.header {
  position: sticky;
  top: 0;
  background-color: var(--c-white);
  box-shadow: var(--shadow-sm);
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 5%;
  height: 70px;
}
.header-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  font-style: italic;
  position: relative;
  z-index: 101; /* ハンバーガー展開時も上に出るように */
}

/* メニューボタン (PCで表示) */
.btn-menu {
  display: block;
}

/* ハンバーガーボタン (SPで表示) */
.hamburger {
  display: none;
  position: relative;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
}
.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--c-text);
  border-radius: 4px;
  transition: all 0.3s ease;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 11px; }
.hamburger span:nth-child(3) { bottom: 0; }

/* ハンバーガー メニューオープン時の×印 */
.hamburger.is-active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* オーバーレイ (背景暗転) */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  z-index: 99;
}
.nav-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* グローバルナビゲーション (SP: ドロワーメニュー) */
.global-nav {
  position: fixed;
  top: 0;
  right: -100%; /* 初期状態は画面外 */
  width: 100%;
  height: 100vh;
  background-color: var(--c-white);
  transition: right 0.4s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}
.global-nav.is-active {
  right: 0;
}

/* PC版のドロワー幅制限 */
@media (min-width: 769px) {
  .global-nav {
    width: 35%; /* 1/3より少し余裕を持たせて35% */
    right: -35%;
  }
}

.global-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  text-align: center;
  padding: 0;
}
.global-nav a {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-text);
}
.global-nav .nav-contact {
  margin-top: var(--space-s);
}
.global-nav .nav-contact a {
  font-size: 1rem;
}

/* メニュー内閉じるボタン（PC専用） */
.nav-close {
  display: none; /* SPでは非表示（ハンバーガーの×で代用） */
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--c-text);
  cursor: pointer;
  transition: transform 0.3s ease;
}
.nav-close:hover {
  transform: scale(1.1);
  opacity: 0.7;
}
@media (min-width: 769px) {
  .nav-close {
    display: block; /* PCのみ表示 */
  }
}

/* PC版のヘッダーレイアウトとナビゲーション */
@media (min-width: 769px) {
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* 子要素の絶対配置などの基準に必要 */
  }
  
  .header-left-nav {
    flex: 1;
    display: flex;
    justify-content: flex-start;
  }

  .header-left-nav ul {
    display: flex;
    gap: var(--space-m);
    padding: 0;
    margin: 0;
  }
  
  .header-left-nav a {
    font-size: 0.95rem;
    font-weight: 500;
  }
  
  .header-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
  }
  
  .header-action {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }
}

/* SP版での表示切り替え */
@media (max-width: 768px) {
  .header-left-nav {
    display: none;
  }
  .btn-menu {
    display: none;
  }
  .hamburger {
    display: block;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: 140px 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../img/hero_visual.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* パララックス風の効果 */
  color: var(--c-white);
}
@media (max-width: 768px) {
  .hero { 
    padding: 80px 0;
    background-attachment: scroll; /* モバイルでは固定を解除 */
  }
}
.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}
.hero-subtitle {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-m);
}
.hero-text {
  font-size: 1rem;
  margin-bottom: var(--space-l);
}

@media (max-width: 768px) {
  .hero { padding: 80px 0; }
  .hero-title { font-size: 2.1rem; }
  .hero-subtitle { font-size: 1.6rem; }
  .hero-text { font-size: 0.9rem; }
}
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-m);
}

/* Target & Issues Cards */
.card {
  background: var(--c-white);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .card-img img {
  transform: scale(1.05);
}
.card-img-large {
  aspect-ratio: 4 / 3;
}
.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: var(--space-s) 0;
}
.card-title-large {
  font-size: 1.25rem;
  font-weight: 700;
  margin: var(--space-s) 0;
}
.card-text {
  font-size: 0.9rem;
  color: var(--c-text-light);
}

@media (max-width: 768px) {
  .card-title { font-size: 1rem; }
  .card-title-large { font-size: 1.1rem; }
  .card-text { font-size: 0.85rem; }
}

/* Issues Side Header */
.issues-header .section-label {
  display: block;
}

/* Concept */
.concept-text p {
  margin-bottom: var(--space-s);
}

/* Approach (CEFR x JLPT) */
.approach-img {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-m);
}

/* Feature Box */
.feature-box {
  background: var(--c-white);
  border-radius: var(--radius-m);
  padding: var(--space-l) var(--space-m);
  box-shadow: var(--shadow-sm);
}
.feature-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-s);
}
.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-s);
}

/* Design 6 Blocks */
.design-card {
  padding: 40px;
  border-radius: var(--radius-m);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 460px; /* 全体的により統一感のある比率に */
}
.design-label {
  font-size: 0.8rem;
  margin-bottom: var(--space-s);
  opacity: 0.8;
  position: relative;
  z-index: 2;
}
.design-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-m);
  line-height: 1.5;
  position: relative;
  z-index: 2;
}
.design-text {
  font-size: 0.95rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .design-title { font-size: 1.25rem; }
  .design-text { font-size: 0.9rem; }
  .design-icon-bg { font-size: 8rem; }
}
/* 透かしアイコンの中央配置 */
.design-icon-bg {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12rem;
  color: rgba(255, 255, 255, 0.05); /* より薄い透かしに修正 */
  z-index: 1;
  pointer-events: none;
}
/* 左上の小さなアイコン */
.design-icon-top {
  font-size: 2rem;
  margin-bottom: var(--space-m);
  position: relative;
  z-index: 2;
}

@media (min-width: 769px) {
  /* Wireframe specific layout structure (Masonry roughly) */
  .design-6 .grid-2-3 {
     display: grid;
     grid-template-columns: repeat(3, 1fr);
     align-items: start;
     gap: var(--space-m);
     padding-top: 50px; /* 中央の列を上にずらす分の余白を確保 */
  }
  
  /* カード2列目 (2番目と5番目) をTransformで視覚的にズラす（レイアウト崩れを防ぐ） */
  .design-card:nth-child(5) { 
     transform: translateY(-90px);
     min-height: 600px;
  }
    .design-card:nth-child(2) { 
     min-height: 300px;
     padding: 20px 40px;
  }
}

/* Course Card */
.course-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.course-img {
  aspect-ratio: 16 / 9;
}
.course-content {
  padding: var(--space-m);
}
.course-level {
  font-size: 0.8rem;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}
.course-title {
  font-size: 1.25rem;
  font-weight: 700;
  border-bottom: 2px solid var(--c-text);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.course-desc {
  font-size: 0.95rem;
  margin-bottom: var(--space-m);
}

@media (max-width: 768px) {
  .course-title { font-size: 1.1rem; }
  .course-desc { font-size: 0.88rem; }
  .course-target, .course-note, .course-info { font-size: 0.85rem; }
}
.course-target {
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.course-target ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--c-text-light);
  margin-top: 4px;
}
.course-note {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: var(--space-m);
}
.course-info p {
  font-size: 0.85rem;
  color: var(--c-text-light);
  line-height: 1.4;
}

/* Teacher Card */
.teacher-card {
  margin-bottom: var(--space-l);
}
.teacher-img {
  aspect-ratio: 4 / 3;
  margin-bottom: var(--space-s);
}
.teacher-name {
  font-size: 1.25rem;
  font-weight: 700;
}
.teacher-role {
  font-size: 0.85rem;
  color: var(--c-text-light);
  margin-bottom: var(--space-s);
}
.teacher-desc, .teacher-message {
  font-size: 0.9rem;
  margin-bottom: var(--space-s);
}
.teacher-social a {
  display: inline-block;
  margin-right: 12px;
  font-size: 1.2rem;
  color: var(--c-text-light);
}

@media (min-width: 769px) {
  .teachers .grid-2 {
    grid-template-columns: 1fr 1fr;
    column-gap: 60px;
    row-gap: 80px;
  }
}

/* FAQ Accordion */
.accordion {
  border-top: 1px solid var(--c-border);
}
.accordion-item {
  border-bottom: 1px solid var(--c-border);
}
.accordion-header {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 24px 0;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--c-text);
  font-family: inherit;
}
.accordion-icon {
  font-size: 1.25rem;
  transition: transform 0.3s;
}
.accordion-header.active .accordion-icon {
  transform: rotate(45deg); /* Plus to Cross */
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.accordion-content p {
  padding-bottom: 24px;
  color: var(--c-text-light);
}

/* Contact Form */
.contact-form {
  text-align: left;
}
.form-group {
  margin-bottom: var(--space-m);
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-s);
  font-family: inherit;
  font-size: 1rem;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--c-bg-gray);
}
.form-check {
  margin-bottom: var(--space-m);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.form-submit {
  margin-top: var(--space-m);
}

/* Footer */
.footer {
  padding: 60px 0 20px;
  border-top: 1px solid var(--c-border);
}
.footer-logo a {
  font-size: 2rem;
  font-weight: 700;
  font-style: italic;
}
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
  font-size: 0.9rem;
  font-weight: 500;
}
@media (max-width: 768px) {
  .footer-nav ul {
    justify-content: center;
  }
}
.company-name-large {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: -1px;
}
.footer-links {
  border-top: 1px solid var(--c-border);
  padding-top: 20px;
  font-size: 0.8rem;
  color: var(--c-text-light);
}
.legal-links a {
  margin-right: 16px;
}
@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    gap: var(--space-m);
  }
  .company-name-large { 
    font-size: 2.5rem; 
  }
  .footer-links { 
    flex-direction: column; gap: 16px; 
  }
}

/* =============================================
   SP（スマートフォン）専用スタイル追加調整
============================================= */
@media (max-width: 768px) {

  /* コンテナの余白を縮小 */
  .container {
    padding: 60px 0;
    width: 92%;
  }

  /* ヒーローボタンを縦並びに */
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  /* カードのパディングを縮小 */
  .card {
    padding: 0;
  }
  .card-title,
  .card-title-large {
    padding: 12px 16px 4px;
  }
  .card-text {
    padding: 0 16px 16px;
  }

  /* 課題セクション：カードの大きさを統一 */
  .card-img-large {
    aspect-ratio: 16 / 9;
  }

  /* コンセプトセクション */
  .concept-text {
    text-align: left;
  }
  .concept-text p {
    margin-bottom: 12px;
  }

  /* アプローチセクション */
  .approach-img {
    aspect-ratio: 16 / 9;
    width: 100%;
  }

  /* Design-6カード：テキスト視認性の向上 */
  .design-card {
    min-height: 220px !important;
    padding: 28px 24px;
  }
  .design-title {
    text-shadow: 0 1px 8px rgba(0,0,0,0.6);
  }
  .design-text {
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  }

  /* 設計カード: 2列→1列 */
  .grid-2-3 {
    grid-template-columns: 1fr !important;
  }

  /* コース：カードの余白調整 */
  .course-content {
    padding: 20px 16px;
  }

  /* 講師カード */
  .teacher-card {
    border-bottom: 1px solid var(--c-border);
    padding-bottom: var(--space-m);
  }
  .teacher-img {
    aspect-ratio: 4 / 3;
    width: 100%;
  }
  .teacher-name {
    margin-top: 12px;
  }

  /* フッターナビ */
  .footer-nav ul {
    gap: 12px 20px;
    font-size: 0.85rem;
  }
  .footer-logo a {
    font-size: 1.5rem;
  }

  /* FAQ：文字サイズ調整 */
  .accordion-header {
    font-size: 1rem;
    padding: 20px 0;
  }

  /* お問い合わせフォーム */
  .contact .container {
    padding: 60px 0;
  }
}