/* ==========================================================================
   Shoko's Japanese Lessons — shared styles
   ========================================================================== */

:root {
  --cream: #fefcf8;
  --dark: #1a1a1a;
  --gray: #5c5c5c;
  --gray-light: #8c8c8f;
  --blue: #306fa9;
  --blue-light: #e8eef6;
  --border: #e5e3db;
  --link-blue: #1a6bde;
  --error: #c1603e;
  --max-width: 1360px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--dark);
  font-family: "Noto Sans JP", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

.handwritten {
  font-family: "Patrick Hand", cursive;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
}

/* ---------- Header / Nav ---------- */

.site-header {
  padding: 32px 0 20px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.logo {
  font-size: 26px;
  line-height: 26px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 48px;
  font-weight: 700;
  font-size: 17px;
  flex-wrap: wrap;
}

.nav-links a.plain-link {
  padding: 8px 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--dark);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--blue);
  color: #fff;
  padding: 18px 52px;
  font-size: 19px;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  padding: 12px 26px;
  font-size: 17px;
}

.btn-outline-dark {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
  padding: 12px 26px;
  font-size: 17px;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

.nav-cta {
  padding: 13px 38px;
  font-size: 17px;
}

.back-link {
  font-weight: 700;
  font-size: 17px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 100px 0 190px;
}

.hero .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-copy {
  flex: 1 1 480px;
  max-width: 614px;
}

.hero-headline {
  font-size: 64px;
  line-height: 1.2;
  letter-spacing: 3.84px;
  margin: 0 0 41px;
  position: relative;
  display: inline-block;
}

/* "enjoy" sits in its own inline wrapper so the hand-drawn underline
   tracks the word itself, regardless of how the headline wraps. */
.word-enjoy {
  position: relative;
  display: inline-block;
}

.word-enjoy .underline-deco {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  opacity: 0.9;
  pointer-events: none;
  z-index: -1;
}

.hero-subtext {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 76px;
  max-width: 520px;
}

.hero-visual {
  flex: 1 1 460px;
  max-width: 620px;
}

.hero-visual img {
  width: 100%;
  height: auto;
}

/* ---------- What you can get ---------- */

.section-features {
  position: relative;
  padding: 90px 0 150px;
  margin-top: -40px;
}

.features-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

.section-heading {
  text-align: center;
  font-size: 40px;
  line-height: 1;
  margin: 0 0 56px;
  position: relative;
  display: block;
}

.heading-tracked {
  letter-spacing: 2.4px;
}

.section-heading .underline-deco {
  display: block;
  margin: -4px auto 0;
  width: 260px;
  opacity: 0.9;
}

.features-grid {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
  text-align: center;
}

.feature-item {
  width: 250px;
}

.feature-item img.feature-icon {
  height: 80px;
  margin: 0 auto 20px;
}

.feature-item h3 {
  font-size: 19px;
  margin: 0 0 10px;
}

.feature-item p {
  font-size: 16px;
  color: var(--gray);
  margin: 0;
  line-height: 1.5;
}

/* ---------- Recommended for / video ---------- */

.section-recommended {
  padding: 150px 0 90px;
}

.section-recommended .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.recommended-video {
  position: relative;
  flex: 1 1 480px;
  max-width: 620px;
}

.recommended-video::before {
  content: "";
  position: absolute;
  inset: -6% -4% -4% -6%;
  background: var(--blue-light);
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  z-index: 0;
}

.recommended-video .video-frame {
  position: relative;
  z-index: 1;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.recommended-video .video-frame iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.recommended-copy {
  flex: 1 1 380px;
  max-width: 460px;
}

.recommended-copy h2 {
  font-size: 40px;
  margin: 0 0 32px;
  position: relative;
  display: inline-block;
}

.recommended-copy h2 .underline-deco {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  opacity: 0.9;
}

.recommended-copy h2 .spark {
  position: absolute;
  opacity: 0.9;
}

.recommended-copy h2 .spark-1 { width: 11px; left: -38px; top: 2px; }
.recommended-copy h2 .spark-2 { width: 8px; left: -22px; top: -20px; }
.recommended-copy h2 .spark-3 { width: 9px; left: 6px; top: -40px; }

.recommended-mark-right {
  position: absolute;
  width: 44px;
  right: -74px;
  top: -22px;
  pointer-events: none;
}

.recommended-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.recommended-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 18px;
  line-height: 1.55;
}

.recommended-list img { width: 24px; height: 24px; margin-top: 3px; flex-shrink: 0; }

.recommended-list span {
  flex: 1;
  color: var(--gray);
}

.recommended-list strong {
  color: var(--dark);
  font-weight: 700;
}

/* ---------- Student voices ---------- */

.section-reviews {
  position: relative;
  padding: 100px 0 160px;
  overflow: visible;
}

.review-card--koi {
  position: relative;
  overflow: visible;
}

.koi-sticker {
  position: absolute;
  top: -58px;
  right: -40px;
  width: 170px;
  z-index: 2;
  pointer-events: none;
}

.section-divider {
  position: absolute;
  height: auto;
  opacity: 0.95;
}

.divider-top-main {
  top: 30px;
  left: 5%;
  width: 88%;
}

.divider-top-kink {
  top: 30px;
  left: calc(5% + 88% - 1.5%);
  width: 5%;
}

.divider-bottom {
  bottom: 20px;
  left: 5%;
  width: 88%;
}

.section-heading .spark {
  position: absolute;
  opacity: 0.9;
}

.rv-spark-1 { width: 8px;  right: -40px; top: -12px; }
.rv-spark-2 { width: 46px; right: -55px; top: -2px; }
.rv-spark-3 { width: 21px; right: -46px; top: 30px; }
.rv-spark-4 { width: 7px;  left: -28px; top: 3px; }
.rv-spark-5 { width: 3px;  left: -15px; top: -8px; }

.voices-heading-inner {
  position: relative;
  display: inline-block;
}

.word-voices {
  position: relative;
  display: inline-block;
}

.word-voices .underline-deco {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  opacity: 0.9;
  pointer-events: none;
  z-index: -1;
}

.voices-mark {
  position: absolute;
  pointer-events: none;
}

.voices-mark-left {
  width: 17px;
  left: -22px;
  top: -14px;
}

.voices-mark-right {
  width: 36px;
  right: -42px;
  top: -18px;
}

.reviews-divider {
  display: block;
  width: 100%;
}

.reviews-divider-top {
  width: 50%;
  margin: 0 auto 56px;
}

.reviews-divider-bottom {
  max-width: 620px;
  margin: 67px auto 0;
}

.reviews-grid {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}

.review-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  width: 380px;
  min-height: 380px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.review-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  flex-shrink: 0;
}

.review-name { font-weight: 700; font-size: 19px; margin: 0; }
.review-date { color: var(--gray-light); font-size: 15px; margin: 2px 0 0; }

.review-stars { display: flex; gap: 6px; }
.review-stars img { width: 22px; height: 22px; }

.review-text {
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-text.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.review-links {
  margin-top: auto;
}

.show-more-btn {
  color: var(--link-blue);
  text-decoration: underline;
  font-size: 16px;
  display: inline-block;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.show-more-btn:focus {
  outline: none;
}

.show-more-btn:focus-visible {
  outline: 2px solid var(--link-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Review modal ---------- */

.review-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.review-modal-overlay.is-open {
  display: flex;
}

.review-modal {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.review-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--blue-light);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--dark);
}

.review-modal .review-text {
  font-size: 17px;
  white-space: pre-wrap;
}

.review-reply-block {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  padding: 16px;
  background: #f5f6f8;
  border-radius: 12px;
}

.review-reply-block .reply-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.review-reply-block .review-name {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px;
}

.review-reply-block .review-date {
  font-size: 13px;
  margin: 0 0 6px;
}

.review-reply-block .review-text {
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- Footer / Tail ---------- */

.footer-cta {
  position: relative;
  color: #fff;
  padding: 150px 0 90px;
  text-align: center;
  margin-top: 40px;
  overflow: visible;
  z-index: 0;
}

.footer-cta-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
  overflow: visible;
}

.footer-cta .tail-icon {
  position: absolute;
  left: 10.8%;
  top: 1px;
  width: 208px;
  z-index: 1;
}

.footer-cta h2 {
  font-size: 40px;
  margin: 0 0 32px;
}

.site-footer-base {
  padding: 18px 0;
  text-align: left;
  border-top: 1px solid var(--border);
}

.footer-base-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  max-width: 1204px;
  margin: 0 auto;
}

.site-footer-base .footer-brand {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--dark);
  margin: 0;
  text-decoration: none;
  white-space: nowrap;
}

.footer-contact-item img {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--dark);
  border-radius: 50%;
  flex: 0 0 auto;
}

.footer-social-btn img {
  width: 18px;
  height: 18px;
}

/* ---------- Booking page ---------- */

.booking-hero {
  padding: 70px 0 40px;
  text-align: center;
}

.booking-hero h1 { font-size: 56px; margin: 0 0 18px; letter-spacing: 1.8px; }
.booking-hero p { font-size: 19px; font-weight: 500; margin: 0; }

.booking-cards {
  padding: 40px 0 150px;
}

.booking-cards .wrap {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
}

.booking-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 88px 48px 88px 58px;
  flex: 1 1 460px;
  max-width: 592px;
}

.booking-card .card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.booking-card .card-icon-wrap {
  flex: 0 0 90px;
  display: flex;
  justify-content: center;
}

.booking-card .card-icon {
  height: auto;
}

.booking-card .card-icon.card-icon-pot { width: 74px; }
.booking-card .card-icon.card-icon-ground { width: 88px; }

.booking-card .card-body {
  display: flex;
  flex-direction: column;
}

.booking-card h3 {
  font-size: 22px;
  margin: 0 0 12px;
}

.booking-card p {
  font-size: 17px;
  line-height: 1.5;
  color: var(--dark);
  margin: 0 0 40px;
}

.booking-note {
  position: relative;
  color: #fff;
  padding: 60px 0;
  margin-top: 20px;
  overflow: visible;
  z-index: 0;
}

.booking-note-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

.booking-note-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

.booking-note-smiley { width: 64px; height: auto; flex: 0 0 auto; }

.booking-note-text { flex: 0 1 auto; }

.booking-note h2 { font-size: 30px; margin: 0 0 8px; }
.booking-note p { font-size: 18px; margin: 0; }

.booking-note-btn { flex: 0 0 auto; }

/* ---------- Booking code page ---------- */

.code-hero {
  padding: 70px 0 90px;
  text-align: center;
}

.code-panel {
  max-width: 560px;
  margin: 0 auto;
}

.code-panel-wide { max-width: 760px; }

.code-hero-tight { padding-bottom: 40px; }

.code-panel h1 {
  font-size: 44px;
  margin: 0;
}

.code-underline {
  width: 150px;
  height: 5px;
  border-radius: 3px;
  background: var(--blue);
  margin: 18px auto 28px;
  transition: background 0.15s ease;
}

.code-panel.is-error .code-underline { background: var(--error); }

.code-subtitle {
  font-size: 17px;
  margin: 0 0 36px;
}

.code-input {
  width: 100%;
  padding: 18px 26px;
  border-radius: 999px;
  border: 2px solid var(--blue);
  font-size: 17px;
  font-family: inherit;
  color: var(--dark);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease;
}

.code-input::placeholder { color: #9fb3c8; }

.code-input.error { border-color: var(--error); }
.code-input.error::placeholder { color: var(--error); opacity: 0.65; }

.code-error-text {
  color: var(--error);
  font-size: 15px;
  margin: 12px 0 0;
}

.code-actions {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.code-actions[hidden] { display: none; }

.code-helper { font-size: 15px; margin: 0; }

.code-helper-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  margin-left: 4px;
}

.code-helper-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.code-helper-error[hidden] { display: none; }

.code-or { font-size: 14px; color: var(--gray-light); }

/* ---------- Steps (What happens next) ---------- */

.steps-section { padding: 20px 0 150px; }

.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  text-align: center;
}

.step-item { width: 260px; }

.step-arrow {
  width: 126px;
  height: auto;
  flex: 0 0 auto;
  margin-top: 30px;
  opacity: 0.9;
}

.step-icon-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 20px;
}

.step-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.step-badge {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px var(--cream);
}

.step-item h3 { font-size: 19px; margin: 0 0 10px; }

.step-item p {
  font-size: 16px;
  color: var(--gray);
  margin: 0;
  line-height: 1.5;
}

.steps-cta {
  text-align: center;
  margin-top: 64px;
}

/* ---------- Responsive ---------- */

@media (min-width: 861px) and (max-width: 1250px) {
  .footer-cta { padding-top: 260px; }
  .footer-cta .tail-icon { left: 50%; transform: translateX(-50%); }
}

@media (max-width: 1220px) {
  .step-arrow { display: none; }
}

@media (max-width: 860px) {
  .wrap { padding: 0 24px; }

  /* header / nav -> hamburger */
  .site-header { padding: 20px 0 16px; }
  .site-header .wrap { justify-content: space-between; text-align: left; position: relative; }
  .logo { font-size: 17px; line-height: 19px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    z-index: 50;
    font-size: 16px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a.plain-link {
    padding: 14px 12px;
    text-align: center;
    border-radius: 10px;
  }
  .nav-links a.plain-link:active { background: var(--blue-light); }
  .nav-links .nav-cta { width: 100%; margin-top: 6px; }

  .hero { padding: 48px 0 128px; }
  .hero-headline { font-size: 38px; }
  .hero .wrap { flex-direction: column; }
  .hero-copy, .hero-visual, .recommended-video, .recommended-copy { max-width: 100%; flex-basis: auto; }
  .hero-copy { text-align: center; }
  .hero-subtext { margin: 0 auto 28px; }
  .section-heading, .recommended-copy h2, .footer-cta h2 { font-size: 30px; }

  .section-features { padding: 56px 0 72px; }
  .features-grid { gap: 40px; }
  .hero-visual { max-width: 420px; margin: 0 auto; }

  .section-recommended { padding: 64px 0 56px; }
  /* heading / video / list are laid out as three siblings via CSS Grid
     so mobile can reorder them (heading above video) independently of
     the desktop flex layout above, which is untouched. .recommended-copy
     becomes display:contents so its children (h2, ul) become direct
     grid items without changing the desktop DOM/CSS at all. */
  .section-recommended .wrap {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "heading" "video" "list";
    gap: 28px;
  }
  .recommended-copy { display: contents; text-align: center; }
  .recommended-copy h2 { grid-area: heading; margin-bottom: 16px; }
  .recommended-copy h2 .underline-deco,
  .recommended-mark-right { display: none; }
  .recommended-video { grid-area: video; max-width: none; width: calc(100% + 32px); margin: 0 -16px; }
  .recommended-list { grid-area: list; }
  .recommended-list li {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
  .recommended-list img { margin-top: 0; }

  .section-reviews { padding: 56px 0 80px; }
  .review-card { width: 100%; max-width: 420px; min-height: 0; }
  .show-more-btn { padding: 12px 0; }

  .booking-hero h1 { font-size: 38px; }
  .footer-cta { padding: 190px 0 64px; }
  .footer-cta .tail-icon { left: 50%; transform: translateX(-50%); width: 130px; }
  .booking-card { padding: 40px 24px; gap: 20px; min-width: 0; }
  .booking-card .card-body { min-width: 0; }
  .booking-card .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    padding: 14px 20px;
    font-size: 17px;
  }
  .booking-note-row { gap: 24px; }
  .booking-note-text { text-align: center; }

  .footer-base-row { gap: 16px; }
  .footer-brand { order: 1; }
  .footer-social { order: 2; }
  a.footer-contact-item { order: 3; flex: 0 0 100%; }
  p.footer-contact-item { order: 4; flex: 0 0 100%; }
}
