/* ==========================================================================
   Design System & Root CSS Variables
   Japanese Minimalist Aesthetic - Sakura Red Theme
   ========================================================================== */

:root {
  --sakura-red: #E05A47;
  --sakura-red-hover: #C84534;
  --sakura-pink-light: #FDF4F2;
  --sakura-pink-soft: #F9E2DD;
  --bg-paper: #FAF8F5;
  --bg-card: #FFFFFF;
  --text-dark: #2C2A29;
  --text-muted: #6B6663;
  --border-color: #E8E2DD;
  --wood-accent: #C69C6D;
  --wood-light: #F4ECE1;
  --shadow-sm: 0 4px 12px rgba(44, 42, 41, 0.04);
  --shadow-md: 0 8px 24px rgba(224, 90, 71, 0.08);
  --shadow-lg: 0 16px 36px rgba(44, 42, 41, 0.1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans SC', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-paper);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Background Floating Canvas */
#sakura-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* Typography Helpers */
.text-center { text-align: center; }
.section-subtitle {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--sakura-red);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-sakura {
  background-color: var(--sakura-red);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(224, 90, 71, 0.25);
}

.btn-sakura:hover {
  background-color: var(--sakura-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(224, 90, 71, 0.35);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-dark);
}

.btn-outline:hover {
  border-color: var(--sakura-red);
  color: var(--sakura-red);
  background-color: var(--sakura-pink-light);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-dark);
}

.logo-emblem {
  width: 40px;
  height: 40px;
  background-color: var(--sakura-red);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(224, 90, 71, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title-cn {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-sub-cn {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--sakura-red);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.lang-btn {
  background: none;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  transition: var(--transition);
}

.lang-btn.active {
  color: var(--sakura-red);
}

.lang-divider {
  color: var(--border-color);
  font-size: 0.8rem;
}

/* Hero Section */
.hero-section {
  padding: 60px 0 80px 0;
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--sakura-pink-light);
  border: 1px solid var(--sakura-pink-soft);
  color: var(--sakura-red);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.highlight-text {
  color: var(--sakura-red);
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  background-color: var(--bg-card);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sakura-red);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 36px;
  background-color: var(--border-color);
}

/* Hero Teacher Image Wrapper */
.hero-image-wrapper {
  position: relative;
}

.image-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background-color: var(--bg-card);
  border: 8px solid var(--bg-card);
}

.teacher-hero-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: var(--transition);
}

.teacher-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(224, 90, 71, 0.15);
}

.badge-icon {
  font-size: 1.5rem;
}

.badge-text {
  display: flex;
  flex-direction: column;
}

.badge-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.badge-role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sakura-decoration-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--sakura-red);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(224, 90, 71, 0.3);
}

/* Feature Highlights Bar */
.features-bar {
  padding: 40px 0;
  background-color: #ffffff;
  border-y: 1px solid var(--border-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background-color: var(--bg-paper);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--sakura-pink-soft);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Programs Section */
.programs-section {
  padding: 80px 0;
}

.section-header {
  margin-bottom: 40px;
}

.program-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.tab-btn.active {
  background-color: var(--sakura-red);
  color: #ffffff;
  border-color: var(--sakura-red);
  box-shadow: 0 4px 14px rgba(224, 90, 71, 0.25);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.course-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.course-card.featured {
  border: 2px solid var(--sakura-red);
  box-shadow: var(--shadow-md);
}

.course-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background-color: #EEE;
  color: var(--text-muted);
}

.sakura-tag {
  background-color: var(--sakura-pink-light);
  color: var(--sakura-red);
  border: 1px solid var(--sakura-pink-soft);
}

.course-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.course-level {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sakura-red);
  margin-bottom: 16px;
}

.course-body {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.course-features {
  list-style: none;
  margin-bottom: 28px;
  margin-top: auto;
}

.course-features li {
  font-size: 0.88rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

/* About Section */
.about-section {
  padding: 80px 0;
  background-color: #ffffff;
  border-y: 1px solid var(--border-color);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.about-image-col {
  position: relative;
}

.about-img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: block;
}

.about-quote-card {
  position: absolute;
  bottom: -24px;
  right: -20px;
  background-color: var(--bg-card);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--sakura-red);
  max-width: 340px;
}

.about-quote-card p {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.quote-author {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sakura-red);
}

.about-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.about-desc p {
  margin-bottom: 12px;
}

.qualifications-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qual-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.qual-icon {
  font-size: 1.4rem;
  background-color: var(--sakura-pink-light);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qual-item h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.qual-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Testimonials Section */
.reviews-section {
  padding: 80px 0;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.review-card {
  background-color: var(--bg-card);
  padding: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.review-stars {
  color: #F59E0B;
  font-size: 1rem;
  margin-bottom: 14px;
}

.review-text {
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 24px;
  font-style: italic;
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.avatar-circle {
  width: 42px;
  height: 42px;
  background-color: var(--sakura-pink-light);
  color: var(--sakura-red);
  border: 1px solid var(--sakura-pink-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.reviewer-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.reviewer-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Contact Section */
.contact-section {
  padding: 80px 0;
}

.contact-card-main {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.contact-details {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.detail-icon {
  font-size: 1.4rem;
}

.detail-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.detail-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.detail-item a {
  color: var(--sakura-red);
  text-decoration: none;
  font-weight: 600;
}

.contact-qr-col {
  display: flex;
  justify-content: center;
}

.qr-box {
  background-color: var(--sakura-pink-light);
  border: 2px dashed var(--sakura-pink-soft);
  border-radius: var(--radius-md);
  padding: 36px 24px;
  text-align: center;
  max-width: 280px;
}

.qr-placeholder,
.qr-img {
  width: 150px;
  height: 150px;
  margin: 0 auto 16px auto;
  background-color: #ffffff;
  border-radius: 12px;
  display: block;
  box-shadow: var(--shadow-sm);
  padding: 6px;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qr-img:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
}

.qr-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: #ffffff;
  padding: 48px 0 32px 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand .brand-title-cn {
  color: #ffffff;
}

.footer-tagline {
  font-size: 0.85rem;
  color: #A09D9A;
  margin-top: 6px;
}

.footer-copy {
  text-align: right;
  font-size: 0.82rem;
  color: #A09D9A;
}

.icp-text {
  margin-top: 4px;
  opacity: 0.7;
}

.icp-text a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.icp-text a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Interactive Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(44, 42, 41, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: var(--bg-card);
  width: 90%;
  max-width: 480px;
  padding: 36px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-backdrop.open .modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-sakura {
  font-size: 2rem;
  display: block;
  margin-bottom: 6px;
}

.modal-header h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.modal-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sakura-red);
  box-shadow: 0 0 0 3px rgba(224, 90, 71, 0.15);
}

.modal-success {
  text-align: center;
  padding: 20px 0;
}

.modal-qr-img {
  width: 140px;
  height: 140px;
  margin: 14px auto;
  display: block;
  border-radius: 12px;
  background-color: #ffffff;
  padding: 6px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-container,
  .about-grid,
  .contact-card-main {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .features-grid,
  .courses-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

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

  .about-quote-card {
    position: static;
    max-width: 100%;
    margin-top: 16px;
  }

  .nav-links {
    display: none;
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-copy {
    text-align: center;
  }
}
