/* ===============================
   CSS Variables
================================= */
:root {
  --primary: #1e3a5f;
  --primary-hover: #2a4d7a;
  --accent: #e63946;
  --accent-dark: #b81c27;
  --white: #ffffff;
  --bg-light: #f8fafc;
  --bg-card: #eef4ff;
  --text-dark: #1e293b;
  --text-mid: #475569;
  --border: #e2e8f0;
  --gray-bg: #f1f5f9;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.14);
  --transition: 0.3s ease;
}

/* ===============================
   Reset & Base
================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  font-size: 100%;
}

body {
  font-family: 'Zen Maru Gothic', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===============================
   Layout Utilities
================================= */
.width100 {
  width: 100%;
}

.width860px {
  max-width: 900px;
  padding: 0 24px;
  margin: 0 auto;
}

/* ===============================
   Section Heading
================================= */
.heading--h2 {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
  margin-top: 0;
  padding-bottom: 28px;
}

.heading--h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* ===============================
   Header Top
================================= */
.header__top {
  display: flex;
  align-items: center;
  padding: 14px 28px;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__top--logo {
  flex-shrink: 0;
  margin-right: 28px;
}

.header__top--logo img {
  width: 200px;
  height: auto;
  transition: transform var(--transition);
}

.header__top--logo img:hover {
  transform: scale(1.04);
}

/* ===============================
   Navigation
================================= */
.header__nav {
  margin-left: auto;
  z-index: 20;
}

.header__nav--outer {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 40px;
}

.header__nav--outer > li {
  position: relative;
  transition: transform 0.2s ease;
}

.header__nav--outer > li:hover {
  transform: translateY(-1px);
}

.header__nav--outer > li > a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 0;
  transition: color var(--transition);
}

.header__nav--outer > li > a:hover {
  color: var(--accent);
}

.header__nav--inner {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 8px 0;
  min-width: 200px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 200;
}

.header__nav--inner .list {
  display: block;
  padding: 0;
}

.header__nav--inner .list a {
  display: block;
  padding: 10px 20px;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.88rem;
  font-weight: 400;
  transition: color var(--transition), background var(--transition);
}

.header__nav--inner .list a:hover {
  color: var(--accent);
  background: var(--bg-light);
}

.header__nav--outer > li:hover .header__nav--inner {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ===============================
   Hamburger
================================= */
.hamburger {
  display: none;
  width: 48px;
  height: 48px;
  background: url(img/hum.png) center/32px no-repeat;
  cursor: pointer;
  margin-left: auto;
  border-radius: 8px;
  transition: background-color var(--transition);
  flex-shrink: 0;
}

.hamburger:hover {
  background-color: var(--bg-light);
}

.hamburger.active {
  background-image: url(img/ばつ.png);
}

/* ===============================
   Hero
================================= */
.header__hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 560px;
  overflow: hidden;
  background: var(--white);
}

.header__hero--text {
  position: relative;
  z-index: 10;
  width: 38%;
  padding: 72px 48px 72px 56px;
}

.header__hero--text h1 {
  font-size: 2.2rem;
  line-height: 1.7;
  color: var(--text-dark);
  font-weight: 500;
}

.header__hero--text .btn--small {
  margin-top: 36px;
  display: inline-block;
}

.header__hero--text .btn--small a {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 16px 36px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--accent-dark);
  transition: transform var(--transition), box-shadow var(--transition);
}

.header__hero--text .btn--small a:hover {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--accent-dark);
}

.header__hero--image {
  position: absolute;
  right: 0;
  top: 0;
  width: 64%;
  height: 100%;
  overflow: hidden;
}

.header__hero--image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 35%;
  background: linear-gradient(to right, var(--white) 30%, transparent);
  z-index: 1;
  pointer-events: none;
}

.header__hero--image img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  animation: image-switch-animation 15s infinite;
}

.header__hero--image img:nth-of-type(1) { animation-delay: 0s; }
.header__hero--image img:nth-of-type(2) { animation-delay: 5s; }
.header__hero--image img:nth-of-type(3) { animation-delay: 10s; }

@keyframes image-switch-animation {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  30%  { opacity: 1; }
  40%  { opacity: 0; }
  100% { opacity: 0; }
}

/* ===============================
   Reason Section
================================= */
.main .reason {
  padding-top: 88px;
  padding-bottom: 0;
}

.main .reason .bg-orange {
  background: linear-gradient(135deg, var(--accent) 0%, #ff6b35 100%);
  padding: 52px 24px;
  margin-top: 56px;
}

.main .reason .bg-orange .reason--why {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reason--why--detail {
  display: flex;
  align-items: center;
  background: var(--white);
  padding: 28px 40px;
  gap: 28px;
  width: 68%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.reason--why--detail img {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

.reason--why--detail .text-large {
  font-size: 1.35rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}

.reason--why--detail .text-small {
  font-size: 0.95rem;
  color: var(--text-mid);
}

.reason--why--detail:nth-child(1) {
  border-radius: 0 40px 40px 0;
  opacity: 0;
  transform: translateX(-100px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reason--why--detail:nth-child(2) {
  border-radius: 40px 0 0 40px;
  margin-left: auto;
  opacity: 0;
  transform: translateX(100px);
  transition: opacity 0.7s ease 0.15s, transform 0.7s ease 0.15s;
}

.reason--why--detail:nth-child(3) {
  border-radius: 0 40px 40px 0;
  opacity: 0;
  transform: translateX(-100px);
  transition: opacity 0.7s ease 0.3s, transform 0.7s ease 0.3s;
}

.reason--why--detail.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ===============================
   Teacher Section
================================= */
.main .teacher {
  padding-top: 88px;
  padding-bottom: 88px;
  overflow: hidden;
  width: 100%;
}

.teacher__display {
  display: flex;
  margin-top: 56px;
  animation: scrollLoop 30s linear infinite;
  width: max-content;
}

.teacher__display--image {
  flex-shrink: 0;
  width: 220px;
  background: var(--bg-card);
  border-radius: var(--radius);
  text-align: center;
  padding: 24px 16px;
  margin-right: 20px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.teacher__display--image:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.teacher__display--image img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  border: 3px solid var(--white);
  box-shadow: var(--shadow);
}

.teacher--name {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 14px;
  color: var(--text-dark);
}

.teacher--strong,
.teacher--text {
  font-size: 0.83rem;
  color: var(--text-mid);
  line-height: 1.9;
  margin-top: 8px;
}

@keyframes scrollLoop {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===============================
   Voice Section
================================= */
.main .voice {
  padding-top: 88px;
  padding-bottom: 88px;
}

.voice--detail {
  display: flex;
  align-items: center;
  margin-top: 60px;
  gap: 28px;
}

.voice--detail:nth-of-type(1) { flex-direction: row-reverse; }
.voice--detail:nth-of-type(2) { justify-content: flex-end; }
.voice--detail:nth-of-type(3) { flex-direction: row-reverse; }

.voice--detail .text {
  flex: 1;
  max-width: 580px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 32px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--text-dark);
  font-size: 0.95rem;
  position: relative;
}

.voice--detail .profile {
  text-align: center;
  flex-shrink: 0;
}

.voice--detail .profile img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  border: 3px solid var(--bg-card);
  box-shadow: var(--shadow);
}

.voice--detail .profile p {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--text-mid);
}

.voice--detail .profile p:first-of-type {
  font-weight: 600;
  color: var(--text-dark);
}

/* Voice Bubble Arrows */
.voice--detail:nth-of-type(odd) .text::before {
  content: "";
  position: absolute;
  top: 30px;
  left: -20px;
  border-width: 12px;
  border-style: solid;
  border-color: transparent var(--bg-card) transparent transparent;
}

.voice--detail:nth-of-type(even) .text::after {
  content: "";
  position: absolute;
  top: 30px;
  right: -20px;
  border-width: 12px;
  border-style: solid;
  border-color: transparent transparent transparent var(--bg-card);
}

/* ===============================
   Plan Section
================================= */
.main .plan {
  padding-top: 88px;
  padding-bottom: 88px;
}

.plan-article {
  display: flex;
  margin-top: 56px;
  gap: 16px;
  padding: 0 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.plan__item {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  width: calc(20% - 16px);
  min-width: 176px;
  padding: 20px 16px;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.plan__item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.plan__item--header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.plan__item--header h3 {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
}

.plan__item--header p {
  font-size: 0.78rem;
  color: var(--text-mid);
}

.plan__item--price {
  padding: 12px 0;
}

.plan__item--price .price {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-dark);
}

.plan__item .btn {
  display: block;
  background: var(--accent);
  border-radius: 6px;
  box-shadow: 0 4px 0 var(--accent-dark);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.plan__item .btn:hover {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--accent-dark);
}

.plan__item .btn a {
  display: block;
  padding: 10px 6px;
  text-decoration: none;
  color: var(--white);
  font-weight: 600;
  font-size: 0.82rem;
}

.plan__item--features {
  margin-top: 16px;
  list-style: none;
  padding: 0;
}

.plan__item--features li {
  position: relative;
  font-size: 0.83rem;
  line-height: 2;
  padding-left: 20px;
  color: var(--text-mid);
}

.plan__item--features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-70%) rotate(-45deg);
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* ===============================
   Recommend Section
================================= */
.recommend {
  text-align: center;
  padding: 88px 24px;
}

.recommend h3 {
  font-size: 1.65rem;
  font-weight: 500;
  color: var(--text-dark);
}

.recommend p {
  margin-top: 16px;
  margin-bottom: 40px;
  color: var(--text-mid);
  font-size: 0.97rem;
}

.recommend .btn--large {
  display: inline-block;
  background: var(--accent);
  border-radius: 50px;
  box-shadow: 0 6px 0 var(--accent-dark);
  transition: transform var(--transition), box-shadow var(--transition);
  max-width: 520px;
  width: 100%;
}

.recommend .btn--large:hover {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--accent-dark);
}

.recommend .btn--large a {
  display: block;
  padding: 22px 40px;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.12em;
}

/* ===============================
   FAQ Section
================================= */
.main .faq {
  padding-top: 88px;
  padding-bottom: 88px;
}

.main .faq .heading--h2 {
  margin-bottom: 56px;
}

.faq__item {
  margin-bottom: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.faq__item--question {
  width: 100%;
  background: var(--accent);
  color: var(--white);
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.5;
  padding: 18px 24px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  font-family: inherit;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.faq__item--question:hover {
  background: var(--accent-dark);
}

.faq__item--question.active {
  background: var(--accent-dark);
  border-radius: var(--radius) var(--radius) 0 0;
}

.faq__item--question.active .icon--before::after {
  content: '−';
  font-size: 1.8rem;
}

.icon--before {
  flex-shrink: 0;
  margin-left: 16px;
}

.icon--before::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  display: inline-block;
  line-height: 1;
}

.faq__item--answer {
  display: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.faq__item--answer p {
  padding: 20px 24px;
  margin: 0;
  line-height: 2;
  color: var(--text-mid);
  font-size: 0.93rem;
}

/* ===============================
   Contact Section
================================= */
.main .contact {
  padding-top: 88px;
  padding-bottom: 88px;
}

.contact__table {
  margin-top: 56px;
  width: 100%;
  border-collapse: collapse;
}

.contact__table tr {
  border-bottom: 1px solid var(--border);
}

.contact__table tr:first-child {
  border-top: 1px solid var(--border);
}

.contact__item {
  padding: 16px 20px;
  background: var(--bg-light);
  width: 200px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-dark);
  vertical-align: middle;
}

.contact__body {
  padding: 12px 16px;
  vertical-align: middle;
}

.contact__sex {
  display: inline-flex;
  align-items: center;
  margin-right: 16px;
  cursor: pointer;
}

.contact__sex--text {
  margin-left: 6px;
  font-size: 0.9rem;
}

.form__text {
  width: 100%;
  max-width: 500px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.93rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form__text:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form__select {
  width: 200px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.93rem;
  font-family: inherit;
  background: var(--white);
  cursor: pointer;
  appearance: none;
}

.form__select:focus {
  outline: none;
  border-color: #2563eb;
}

.form__textarea {
  width: 100%;
  max-width: 500px;
  padding: 12px 14px;
  height: 180px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.93rem;
  font-family: inherit;
  resize: vertical;
}

.form__textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact__submit {
  display: block;
  margin: 40px auto 0;
  width: 200px;
  height: 52px;
  background: var(--accent);
  border: none;
  border-radius: 30px;
  box-shadow: 0 4px 0 var(--accent-dark);
  cursor: pointer;
  font-size: 1.05rem;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--white);
  transition: transform var(--transition), box-shadow var(--transition);
}

.contact__submit:hover {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--accent-dark);
}

/* ===============================
   Background Wrappers
================================= */
.bg {
  background: var(--bg-light);
}

.bg-gray {
  background: var(--gray-bg);
}

/* ===============================
   Footer
================================= */
.bg-gray .footer {
  padding: 56px 0 64px;
}

.footer__nav--outer {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 52px;
  flex-wrap: wrap;
}

.footer__nav--outer > li > a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.93rem;
}

.footer__nav--outer > li > a:hover {
  color: var(--accent);
}

.footer__nav--inner {
  margin-top: 16px;
  list-style: none;
  padding: 0;
}

.footer__nav--inner li {
  margin-bottom: 8px;
  transition: transform var(--transition);
}

.footer__nav--inner li:hover {
  transform: translateX(4px);
}

.footer__nav--inner li a {
  font-size: 0.85rem;
  color: var(--text-mid);
  text-decoration: none;
}

.footer__nav--inner li a:hover {
  color: var(--accent);
}

/* ===============================
   Responsive — Mobile (≤ 768px)
================================= */
@media screen and (max-width: 768px) {

  .width100,
  .width860px {
    max-width: 100%;
    padding: 0 16px;
  }

  /* Header */
  .header__top {
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    background: var(--white);
  }

  .header__top--logo img {
    width: 150px;
  }

  .header__nav {
    position: fixed;
    top: 62px;
    left: 0;
    width: 100%;
    background: var(--primary);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    z-index: 1000;
    margin-left: 0;
  }

  .header__nav.active {
    transform: translateY(0);
  }

  .header__nav--outer {
    flex-direction: column;
    padding: 20px 24px;
    gap: 0;
  }

  .header__nav--outer > li {
    margin-bottom: 18px;
  }

  .header__nav--outer > li > a {
    color: var(--white);
    font-size: 1rem;
  }

  .header__nav--inner {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 4px 0 0;
    min-width: auto;
  }

  .header__nav--inner .list a {
    color: rgba(255, 255, 255, 0.65);
    padding: 6px 16px;
    font-size: 0.85rem;
  }

  .header__nav--inner .list a:hover {
    color: var(--white);
    background: transparent;
  }

  .hamburger {
    display: block;
  }

  /* Hero */
  .header__hero {
    flex-direction: column;
    min-height: auto;
  }

  .header__hero--text {
    width: 100%;
    padding: 32px 16px 24px;
    position: static;
  }

  .header__hero--text h1 {
    font-size: 1.6rem;
  }

  .header__hero--text .btn--small a {
    font-size: 0.95rem;
    padding: 14px 24px;
  }

  .header__hero--image {
    position: relative;
    width: 100%;
    height: 260px;
  }

  .header__hero--image::before {
    display: none;
  }

  /* Reason */
  .reason--why--detail {
    width: 95% !important;
    border-radius: 16px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Teacher */
  .teacher__display {
    animation: none !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    width: auto !important;
  }

  .teacher__display--image {
    width: 46%;
    margin-right: 0;
    flex-shrink: initial;
  }

  .teacher__display--image img {
    width: 100px !important;
    height: 100px !important;
  }

  /* Voice */
  .voice--detail {
    flex-direction: column !important;
    align-items: center;
  }

  .voice--detail .text {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .voice--detail .profile {
    margin-top: 20px;
  }

  .voice--detail .text::before,
  .voice--detail .text::after {
    display: none;
  }

  /* Plan */
  .plan-article {
    flex-direction: column !important;
  }

  .plan__item {
    width: 100% !important;
    min-width: auto !important;
  }

  /* Recommend */
  .recommend {
    padding: 56px 16px;
  }

  .recommend h3 {
    font-size: 1.25rem;
  }

  .recommend .btn--large {
    width: 100%;
  }

  /* FAQ */
  .faq__item {
    margin: 0 0 14px;
  }

  /* Contact */
  .contact__table {
    display: block;
  }

  .contact__table tbody {
    display: block;
  }

  .contact__table tr {
    display: block;
    margin-bottom: 4px;
    border: none;
  }

  .contact__item,
  .contact__body {
    display: block;
    width: 100%;
  }

  .contact__item {
    padding: 10px 14px;
  }

  .form__text,
  .form__textarea {
    max-width: 100% !important;
  }

  /* Footer */
  .footer__nav--outer {
    flex-direction: column !important;
    gap: 24px !important;
  }
}
