/* Yokoso — warm pastel Japanese school aesthetic */
:root {
  --bg-cream: #f8f1dc;
  --bg-soft: #fff6d8;
  --bg-warm: #f6e7b2;
  --accent: #f3e3a1;
  --accent-deep: #e8d48a;
  --text: #3a3428;
  --text-muted: #6b6356;
  --text-light: #8a8274;
  --white: #fffef9;
  --overlay: rgba(42, 36, 28, 0.48);
  --glass: rgba(255, 246, 216, 0.72);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 12px 40px rgba(58, 52, 40, 0.08);
  --shadow-hover: 0 20px 50px rgba(58, 52, 40, 0.12);
  --font-en: "DM Sans", system-ui, sans-serif;
  --font-jp: "Noto Sans JP", "Hiragino Sans", sans-serif;
  --container: min(1120px, 92vw);
  --section-pad: clamp(4rem, 10vw, 7rem);
  --nav-height: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Offset fixed navbar when scrolling to section anchors */
.hero,
.section[id],
.footer {
  scroll-margin-top: calc(var(--nav-height) + 0.75rem);
}

body:has(.site-notice) .hero,
body:has(.site-notice) .section[id],
body:has(.site-notice) .footer {
  scroll-margin-top: calc(var(--nav-height) + 2.75rem);
}

body {
  margin: 0;
  font-family: var(--font-jp);
  font-weight: 400;
  color: var(--text);
  background: var(--bg-cream);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-jp);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.25s ease, color 0.25s ease;
}

a:hover {
  opacity: 0.75;
}

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

.container {
  width: var(--container);
  margin-inline: auto;
}

/* Notice bar */
.site-notice {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: var(--accent);
  color: var(--text);
  font-size: 0.8rem;
  text-align: center;
  padding: 0.4rem 1rem;
}

body:has(.site-notice) .navbar {
  top: 2rem;
}

/* Navbar — always readable (glass at top, cream when scrolled) */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  transition:
    background 0.45s ease,
    box-shadow 0.45s ease,
    backdrop-filter 0.45s ease,
    color 0.45s ease;
}

.navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(58, 52, 40, 0.08);
  color: var(--text);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar__brand {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 1.1rem;
  color: inherit;
  padding: 0.25rem 0;
  flex-shrink: 0;
}

.navbar__name {
  color: inherit;
}

.navbar__logo {
  height: 40px;
  width: auto;
  max-width: min(200px, 42vw);
  object-fit: contain;
  display: block;
}

.navbar__list {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar__link {
  font-family: var(--font-en);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.92;
  transition: opacity 0.25s ease, color 0.45s ease;
}

.navbar__link:hover {
  opacity: 1;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
}

.navbar__lang {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-en);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.navbar__lang-link {
  color: inherit;
  opacity: 0.75;
  text-decoration: none;
  transition: opacity 0.25s ease, color 0.45s ease;
}

.navbar__lang-link:hover,
.navbar__lang-link.is-active {
  opacity: 1;
}

.navbar__lang-sep {
  color: inherit;
  opacity: 0.4;
  user-select: none;
}

.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.navbar__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: background 0.45s ease, transform 0.3s ease;
}

@media (max-width: 768px) {
  .navbar__logo {
    height: 34px;
    max-width: min(160px, 50vw);
  }

  .navbar__toggle {
    display: flex;
  }

  .navbar__nav {
    position: fixed;
    inset: var(--nav-height) 0 auto 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
    color: var(--text);
  }

  .navbar__nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .navbar__list {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .navbar__nav {
    flex-direction: column;
    align-items: center;
  }

  .navbar__lang {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(58, 52, 40, 0.12);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-family: var(--font-jp);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  cursor: pointer;
}

.btn:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn--primary {
  background: var(--white);
  color: var(--text);
}

.btn--secondary {
  background: var(--accent);
  color: var(--text);
}

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

.hero .btn--outline {
  border-color: var(--white);
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero .btn--primary,
.hero .btn--secondary {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__image,
.hero__image--fallback {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.hero__image--fallback {
  background: linear-gradient(135deg, #d4c4a0 0%, #8a7d68 50%, #5c5348 100%);
  background-attachment: scroll;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.65) 0%,
      rgba(0, 0, 0, 0.45) 45%,
      rgba(0, 0, 0, 0.55) 100%
    ),
    rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  padding: calc(var(--nav-height) + 2rem) 1rem 4rem;
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
}

.hero__panel {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero__title {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 500;
  margin: 0 0 1.25rem;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.6),
    0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 300;
  opacity: 0.95;
  margin: 0 0 2rem;
  line-height: 1.9;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.6),
    0 4px 20px rgba(0, 0, 0, 0.35);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--white);
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  animation: float 2.5s ease-in-out infinite;
}

@media (max-width: 768px) {
  .hero__image,
  .hero__image--fallback {
    background-attachment: scroll;
    background-position: center center;
  }

  .hero__panel {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius);
  }
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Sections */
.section {
  padding: var(--section-pad) 0;
}

.section--alt {
  background: var(--bg-soft);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 640px;
  margin-inline: auto;
}

.section-header__eyebrow {
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  margin: 0 0 0.75rem;
}

.section-header__title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin: 0 0 0.75rem;
}

.section-header__subtitle {
  color: var(--text-muted);
  margin: 0;
  font-size: 1rem;
}

.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Highlights */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.highlight-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

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

.highlight-card__icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.highlight-card__value {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0.25rem 0;
}

.highlight-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about__kominka {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent-deep);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: normal;
  color: var(--text-muted);
}

.about__placeholder {
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, var(--bg-warm), var(--accent));
  border-radius: var(--radius-lg);
}

.about__image {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  width: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
}

.feature-card__icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.75rem;
}

.feature-card__title {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.feature-card__desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

/* Courses */
.courses-grid {
  display: grid;
  gap: 2rem;
}

.course-card {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.35s ease;
}

.course-card:hover {
  box-shadow: var(--shadow-hover);
}

.course-card__image {
  min-height: 220px;
  background-size: cover;
  background-position: center;
}

.course-card__image--placeholder {
  background: linear-gradient(145deg, var(--bg-warm), var(--accent));
}

.course-card__body {
  padding: 2rem;
}

.course-card__meta {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.course-card__meta li {
  margin-bottom: 0.35rem;
}

.course-card__meta span {
  display: inline-block;
  min-width: 4em;
  color: var(--text-light);
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .course-card {
    grid-template-columns: 1fr;
  }
}

/* Tuition tables */
.tuition-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tuition-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 0.9rem;
}

.tuition-table th,
.tuition-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--bg-cream);
}

.tuition-table th {
  background: var(--bg-soft);
  font-weight: 500;
}

.tuition-table__total td {
  font-weight: 600;
  background: var(--bg-warm);
}

.tuition-block {
  margin-bottom: 2.5rem;
}

.tuition-block__title {
  margin-bottom: 1rem;
}

/* Life */
.life-block {
  margin-bottom: 2rem;
}

.life-block__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: center;
}

.life-block__image {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.living-costs__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}

.living-costs__table th,
.living-costs__table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--bg-cream);
}

.living-costs__title {
  margin: 2.5rem 0 1rem;
}

.part-time {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius);
}

@media (max-width: 768px) {
  .life-block__grid {
    grid-template-columns: 1fr;
  }
}

/* Support */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.support-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.support-card__icon {
  font-size: 1.5rem;
}

/* Culture */
.culture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.culture-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.culture-card__image {
  height: 160px;
  background-size: cover;
  background-position: center;
}

.culture-card__image--placeholder {
  background: linear-gradient(160deg, var(--accent), var(--bg-warm));
}

.culture-card h3,
.culture-card p {
  padding: 0 1.25rem;
}

.culture-card h3 {
  margin: 1rem 0 0.5rem;
}

.culture-card p {
  padding-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Access */
.access-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.access-grid .access__train {
  color: var(--text-muted);
}

.access__image {
  border-radius: var(--radius);
  margin-top: 1.5rem;
}

.access__map {
  margin-top: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.access__map iframe {
  width: 100%;
  min-height: clamp(280px, 50vw, 450px);
  height: 450px;
  border: 0;
  display: block;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.gallery-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  background: var(--white);
}

/* News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.news-card__thumb {
  display: block;
  height: 160px;
  background-size: cover;
  background-position: center;
}

.news-card__body {
  padding: 1.25rem;
}

.news-card time {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* CTA */
.cta-banner {
  position: relative;
  padding: 5rem 0;
  text-align: center;
  overflow: hidden;
}

.cta-banner__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.cta-banner__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(248, 241, 220, 0.88);
}

.cta-banner__inner {
  position: relative;
  z-index: 1;
}

.cta-banner h2 {
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  margin-bottom: 1rem;
}

/* FAQ */
.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}

.faq-item summary {
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item__answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Parallax sections */
.parallax-section {
  background-attachment: fixed;
  background-size: cover;
}

.section--about {
  background: var(--bg-soft);
}

.section--life {
  background: linear-gradient(180deg, var(--bg-cream), var(--bg-soft));
}

/* Footer */
.footer {
  background: var(--text);
  color: var(--bg-soft);
  padding: 4rem 0 2rem;
}

.footer a {
  color: var(--bg-warm);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer__title {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.footer__en {
  font-family: var(--font-en);
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer__heading {
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer li {
  margin-bottom: 0.4rem;
}

.footer__copy {
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.7;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
}

/* Page hero */
.page-hero {
  padding: calc(var(--nav-height) + 3rem) 0 2rem;
  background: var(--bg-soft);
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

/* Apply page */
.steps {
  display: grid;
  gap: 1rem;
}

.step-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.5rem;
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step-card__num {
  grid-row: span 2;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 50%;
  font-weight: 600;
}

.step-card h3 {
  margin: 0;
  align-self: end;
}

.step-card p {
  margin: 0;
  grid-column: 2;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.requirements-list {
  padding-left: 1.25rem;
}

.requirements-list li {
  margin-bottom: 0.75rem;
}

.housing-meta {
  list-style: none;
  padding: 0;
}

.housing-meta li {
  margin-bottom: 0.5rem;
}

/* Article */
.article {
  max-width: 720px;
  padding-top: calc(var(--nav-height) + 2rem);
}

.article h1 {
  margin: 0.5rem 0 1.5rem;
}

.article__thumb {
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.back-link {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.news-list-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--accent);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__image,
  .hero__image--fallback { background-attachment: scroll; }
  .cta-banner__bg { background-attachment: scroll; }
}
