/*
 * Y style Yokohama - Mobile-First Responsive Stylesheet
 * Rebuilt for perfect display on iPhone / Galaxy / all smartphones
 */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --red:        #E60012;
  --dark:       #1a1a1a;
  --beige-light:#FBF9F7;
  --beige:      #F5EFEB;
  --beige-mid:  #E8DDD5;
  --brown:      #C8B6A6;
  --brown-dark: #A58B74;
  --text:       #333333;
  --muted:      #666666;
  --white:      #FFFFFF;
  --font-serif: 'Cormorant Garamond', 'Noto Serif JP', serif;
  --font-body:  'Noto Serif JP', serif;
  --shadow:     0 4px 20px rgba(0,0,0,0.07);
  --shadow-lg:  0 10px 40px rgba(0,0,0,0.12);
  --radius:     10px;
  --transition: all 0.3s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--beige-light);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%; /* iOSのフォント自動拡大を防ぐ */
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-red    { color: var(--red); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; }

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  color: var(--dark);
  margin-bottom: 1rem;
}
.section-desc {
  color: var(--muted);
  font-size: clamp(0.9rem, 3vw, 1rem);
  line-height: 1.9;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem; /* スマホで左右に十分な余白 */
}

.section { padding: 4rem 0; }

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
  .section { padding: 6rem 0; }
}

/* ============================================================
   NAVBAR - モバイルファースト
   ============================================================ */
.glass-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--beige-mid);
  box-shadow: var(--shadow);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: 64px;
  max-width: 1300px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .nav-container { padding: 0 2rem; height: 72px; }
}

/* ロゴ */
.logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}
@media (min-width: 768px) {
  .logo img { height: 54px; }
}

/* ハンバーガーボタン */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: transparent;
  z-index: 1100;
}
.menu-toggle .bar {
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: var(--transition);
  border-radius: 2px;
}
.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* モバイルメニュー */
.nav-links {
  position: fixed;
  top: 0; right: -100%;
  width: min(80vw, 300px);
  height: 100vh;
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: -5px 0 30px rgba(0,0,0,0.1);
  z-index: 1050;
}
.nav-links.active { right: 0; }

/* メニューオーバーレイ */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1040;
}
.nav-overlay.active { display: block; }

.nav-item {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--dark);
  padding: 0.5rem 0;
  position: relative;
  white-space: nowrap;
  transition: color 0.3s;
}
.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width 0.3s;
}
.nav-item:hover, .nav-item.active { color: var(--red); }
.nav-item:hover::after, .nav-item.active::after { width: 100%; }

/* PCではインラインメニュー */
@media (min-width: 1024px) {
  .menu-toggle { display: none; }
  .nav-links {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    gap: 1.5rem;
    background: transparent;
    box-shadow: none;
    justify-content: flex-end;
  }
  .nav-item { font-size: 0.95rem; }
}

/* ============================================================
   PAGE HEADER（下層ページのタイトルバー）
   ============================================================ */
.page-header {
  padding: 100px 1.25rem 3rem;
  background: var(--beige);
  text-align: center;
}
.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 7vw, 3.5rem);
  color: var(--dark);
  letter-spacing: 0.05em;
}
.page-header p {
  color: var(--red);
  font-weight: 500;
  margin-top: 0.5rem;
  font-size: clamp(0.8rem, 3vw, 0.95rem);
  letter-spacing: 0.1em;
}
@media (min-width: 768px) {
  .page-header { padding: 120px 2rem 4rem; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
  border: 2px solid var(--red);
  cursor: pointer;
  text-align: center;
  min-width: 180px;
}
.btn-primary:hover {
  background: transparent;
  color: var(--red);
}

/* ============================================================
   HERO（トップページのみ）
   ============================================================ */
.hero {
  min-height: 100svh; /* iOSのsafe-area対応 */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('assets/img_academy.png') center/cover no-repeat;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.3) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  text-align: center;
  padding: 6rem 1.5rem 3rem;
  width: 100%;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 8vw, 4.5rem);
  line-height: 1.25;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.hero-subtitle {
  font-size: clamp(0.9rem, 3.5vw, 1.2rem);
  letter-spacing: 0.08em;
  margin-bottom: 2.5rem;
  opacity: 0.92;
  line-height: 1.9;
}
.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.hero-stat-num {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 7vw, 3rem);
  display: block;
  line-height: 1;
}
.hero-stat-label {
  font-size: clamp(0.7rem, 2.5vw, 0.8rem);
  opacity: 0.85;
  margin-top: 0.3rem;
  letter-spacing: 0.1em;
}

/* ============================================================
   SECTION COLORS
   ============================================================ */
.bg-white  { background: var(--white); }
.bg-light  { background: var(--beige-light); }
.bg-beige  { background: var(--beige); }
.bg-dark   { background: var(--dark); color: var(--white); }

/* ============================================================
   GRID LAYOUTS - モバイルは1カラム、PCで複数カラム
   ============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

/* ============================================================
   COURSE ITEMS
   ============================================================ */
.course-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
@media (min-width: 640px) {
  .course-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .course-list { grid-template-columns: repeat(3, 1fr); }
}

.course-item {
  background: var(--beige);
  padding: 1.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--red);
  transition: var(--transition);
}
.course-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.course-title {
  font-size: clamp(1rem, 4vw, 1.2rem);
  margin-bottom: 0.5rem;
  color: var(--dark);
}
.course-price {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  display: inline-block;
  padding-bottom: 0.4rem;
  border-bottom: 1px dotted var(--brown);
  margin-bottom: 0.8rem;
}
.course-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
  vertical-align: middle;
  margin-left: 8px;
}

/* ============================================================
   IMAGE WITH BORDER
   ============================================================ */
.img-border-beige {
  border: 6px solid var(--beige);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: auto;
}

/* ============================================================
   BOX WITH BORDER
   ============================================================ */
.box-border-brown {
  border: 2px solid var(--brown);
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--white);
}
@media (min-width: 768px) {
  .box-border-brown { padding: 2.5rem; }
}

/* ============================================================
   STEP CARDS（受講の流れ）
   ============================================================ */
.step-flow { max-width: 560px; margin: 0 auto; }

.step-card {
  background: var(--white);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--beige-mid);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.step-card.step-final { border: 2px solid var(--red); }

.step-number {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}
.step-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}
.step-arrow {
  text-align: center;
  font-size: 1.5rem;
  color: var(--brown);
  padding: 0.25rem 0;
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-form {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (min-width: 768px) {
  .contact-form { padding: 2.5rem; }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.form-group label .req { color: var(--brown-dark); }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--beige-mid);
  background: #fcfaf8;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem; /* iOSのズームインを防ぐため16px以上 */
  color: var(--text);
  transition: var(--transition);
  -webkit-appearance: none; /* iOSのデフォルトスタイルをリセット */
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brown-dark);
  background: var(--white);
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.btn-submit {
  width: 100%;
  padding: 15px;
  background: var(--beige-light);
  border: 1px solid var(--beige-mid);
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  font-family: inherit;
}
.btn-submit:hover { background: var(--beige); }

/* ============================================================
   INFO ROWS（アクセス情報）
   ============================================================ */
.info-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.info-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border: 1px solid var(--brown);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: var(--white);
}
.info-text h4 {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 3px;
}
.info-text p {
  font-size: 0.95rem;
  color: var(--dark);
  line-height: 1.7;
}

/* ============================================================
   FOOTER - モバイルは1カラム
   ============================================================ */
.footer {
  background: #0f0c0b;
  color: #999;
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; text-align: left; }
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr; }
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1rem;
}
@media (min-width: 640px) {
  .footer-brand .footer-logo { justify-content: flex-start; }
}
.footer-brand .footer-logo img { height: 36px; }
.logo-text {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--brown);
  letter-spacing: 0.1em;
}
.footer-catchphrase { color: #ddd; font-size: 0.9rem; margin-bottom: 1rem; }
.footer-address { font-size: 0.8rem; color: #777; line-height: 1.8; }

.footer-heading {
  font-family: var(--font-serif);
  color: var(--brown);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  font-style: italic;
  font-weight: 400;
}
.footer-links ul { padding: 0; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a {
  color: #888;
  font-size: 0.85rem;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--brown); }
.footer-phone { color: var(--brown); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.footer-hours { font-size: 0.8rem; color: #777; }

.copyright {
  border-top: 1px solid #222;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: #555;
}
@media (min-width: 640px) { .copyright { text-align: left; } }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-in.appear { opacity: 1; transform: translateY(0); }

/* ============================================================
   SAFE AREA（iPhone Xなどのノッチ対応）
   ============================================================ */
@supports (padding: env(safe-area-inset-bottom)) {
  .footer {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }
}

/* ============================================================
   SECTION BADGE
   ============================================================ */
.section-badge {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(230,0,18,0.08);
  color: var(--red);
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

/* ============================================================
   PRODUCTS PAGE
   ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (min-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

.product-card {
  background: var(--white);
  border: 2px solid var(--beige-mid);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: var(--transition);
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  margin-bottom: 1rem;
  border-radius: 4px;
}
.product-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
}
.product-price {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.4rem;
}
