/* Casa Lingua LP — production stylesheet
   Ported pixel-for-pixel from the approved Claude Design prototype. */

:root {
  --bg: #e8dcc8;
  --card: #f4ede0;
  --ink: #2b241d;
  --ink-soft: #4a4238;
  --muted: #8c8168;
  --border: rgba(43, 36, 29, .12);
  --nav-bg: rgba(232, 220, 200, .95);
  --hero-size: 40px;
  --contact-heading-size: 30px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #201a13;
    --card: #2b2419;
    --ink: #f1e6d3;
    --ink-soft: #cdbfa6;
    --muted: #a3906d;
    --border: rgba(241, 230, 211, .14);
    --nav-bg: rgba(32, 26, 19, .92);
  }
}

* { box-sizing: border-box; }

h1, h2, h3, p { margin: 0; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: 'Zen Kaku Gothic New', sans-serif;
}

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

a { color: inherit; }

details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* ---------- Intro ---------- */

@keyframes casaIntroBg {
  0% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes casaIntroLogo {
  0% { opacity: 0; transform: translateY(6px) scale(.96); }
  26% { opacity: 1; transform: translateY(0) scale(1); }
  72% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-4px) scale(1.01); }
}
@keyframes casaIntroLine {
  0% { opacity: 0; width: 0; }
  26% { opacity: 1; }
  72% { opacity: 1; width: 44px; }
  100% { opacity: 0; width: 44px; }
}
@keyframes casaIntroTag {
  0% { opacity: 0; }
  36% { opacity: 1; }
  72% { opacity: 1; }
  100% { opacity: 0; }
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: casaIntroBg 2.7s cubic-bezier(.45, 0, .2, 1) forwards;
}
.intro.is-hidden { display: none; }
.intro__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: casaIntroLogo 2.7s cubic-bezier(.45, 0, .2, 1) forwards;
}
.intro__logo { width: 132px; height: auto; object-fit: contain; }
.intro__line {
  height: 1px;
  background: #a8623f;
  animation: casaIntroLine 2.7s cubic-bezier(.45, 0, .2, 1) forwards;
}
.intro__tag {
  font-size: 12px;
  letter-spacing: .22em;
  color: #8c7a5f;
  font-weight: 500;
  animation: casaIntroTag 2.7s cubic-bezier(.45, 0, .2, 1) forwards;
}

/* ---------- Page shell ---------- */

#top {
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  background-image: radial-gradient(rgba(168, 98, 63, .10) 1px, transparent 1px);
  background-size: 16px 16px;
  scroll-margin-top: 0;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 64px) clamp(20px, 4vw, 40px);
}

.eyebrow {
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--muted);
  font-weight: 600;
}

.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 600;
}

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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}
.nav__logo {
  font-family: 'Noto Serif JP', serif;
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 26px);
  letter-spacing: .03em;
  color: var(--ink);
  white-space: nowrap;
  flex: none;
  text-decoration: none;
}
.nav__logo span {
  font-size: 13px;
  font-weight: 500;
  color: #a8623f;
  margin-left: 6px;
  letter-spacing: .02em;
}
.nav__right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  flex-wrap: nowrap;
  flex: none;
}
.nav__links {
  display: flex;
  gap: clamp(12px, 1.6vw, 24px);
  flex-wrap: nowrap;
}
.nav__links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.nav__cta {
  text-decoration: none;
  background: #a8623f;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 16px;
  border-radius: 2px;
  white-space: nowrap;
  letter-spacing: .02em;
  flex: none;
}
.nav__cta--mobile {
  display: none;
  padding: 11px 14px;
}
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  flex: none;
  background: none;
  border: none;
  padding: 0;
}
.nav__hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
}
.nav__mobile-menu {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  padding: 4px clamp(20px, 4vw, 40px) 18px;
  gap: 14px;
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
}
.nav__mobile-menu.is-open { display: flex; }
.nav__mobile-menu a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
}
.nav__spacer { height: 64px; }

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; margin-right: 6px; }
  .nav__cta--desktop { display: none; }
  .nav__cta--mobile { display: inline-block; }
  #aboutPara1, #aboutPara2 { max-width: none; }
}

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

.hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) clamp(20px, 4vw, 40px) clamp(24px, 4vw, 40px);
  display: flex;
  gap: clamp(24px, 4vw, 56px);
  flex-wrap: wrap;
  align-items: center;
}
.hero__text {
  flex: 1 1 480px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero__heading {
  font-family: 'Noto Serif JP', serif;
  font-size: var(--hero-size);
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: .02em;
}
.hero__body {
  font-size: 17px;
  line-height: 2;
  color: var(--ink-soft);
  max-width: 58ch;
}
.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.btn {
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 22px;
  border-radius: 2px;
  letter-spacing: .02em;
  flex: 1 1 230px;
  text-align: center;
  min-width: 230px;
  box-sizing: border-box;
}
.btn--primary { background: #a8623f; color: #fff; }
.btn--secondary {
  background: var(--card);
  border: 1px solid #a8623f;
  color: #a8623f;
  padding: 14px 22px;
}
.hero__note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}
.hero__photo {
  flex: 1 1 340px;
  min-width: 260px;
  position: relative;
}
.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(43, 36, 29, .25);
}
.hero__badge {
  position: absolute;
  left: -14px;
  bottom: -14px;
  background: #2b241d;
  color: #f0e6d6;
  padding: 14px 20px;
  border-radius: 3px;
  box-shadow: 0 10px 24px rgba(43, 36, 29, .3);
}
.hero__badge-label { font-size: 13px; letter-spacing: .08em; color: #c9a988; }
.hero__badge-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px;
  font-weight: 600;
  margin-top: 2px;
}

/* ---------- About ---------- */

.about__row {
  display: flex;
  gap: clamp(24px, 4vw, 56px);
  flex-wrap: wrap;
  align-items: flex-start;
}
.about__text {
  flex: 1 1 320px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about__title { line-height: 1.6; }
.about__text p {
  margin: 0;
  font-size: 17px;
  line-height: 2;
  color: var(--ink-soft);
  text-wrap: pretty;
  width: 100%;
}
#aboutPara1 { max-width: 473px; }
#aboutPara2 { max-width: 452px; }
.about__photo {
  flex: 1 1 320px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.about__photo img {
  width: 100%;
  aspect-ratio: 455 / 362;
  object-fit: cover;
  object-position: 50% 68%;
  border-radius: 4px;
}

/* ---------- Course ---------- */

.course__title { margin-bottom: 14px; }
.course__heading { margin-bottom: 36px; }
.course__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.course-card {
  background: var(--card);
  border-radius: 4px;
  padding: 26px 24px 8px;
  display: flex;
  flex-direction: column;
}
.course-card--dark { background: #2b241d; }
.course-card__title {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px;
  font-weight: 600;
  color: #a8623f;
  margin-bottom: 8px;
}
.course-card--dark .course-card__title { color: #e0a67f; }
.course-item {
  padding: 13px 0;
  border-top: 1px solid var(--border);
}
.course-card--dark .course-item { border-top: 1px solid rgba(233, 221, 201, .15); }
.course-item__name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}
.course-card--dark .course-item__name { color: #f4ede0; }
.course-item__desc {
  font-size: 15px;
  line-height: 1.7;
  color: #5c5346;
}
.course-card--dark .course-item__desc { color: #cabfa8; }
.course__footnote {
  font-size: 14px;
  color: var(--muted);
  margin-top: 18px;
}

/* ---------- Teachers ---------- */

.teachers__title { margin-bottom: 14px; }
.teachers__heading { margin-bottom: 8px; }
.teachers__intro {
  font-size: 17px;
  color: var(--ink-soft);
  margin-bottom: 36px;
  max-width: 76ch;
  line-height: 1.9;
}

.teacher-feature {
  background: var(--card);
  border-radius: 4px;
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
}
.teacher-feature__photo {
  width: 132px;
  height: 132px;
  object-fit: cover;
  object-position: 50% 15%;
  border-radius: 50%;
  flex: none;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(43, 36, 29, .15);
}
.teacher-feature__info {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.teacher-feature__name-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.teacher-feature__name {
  font-family: 'Noto Serif JP', serif;
  font-size: 22px;
  font-weight: 600;
}
.teacher-feature__role {
  font-size: 14px;
  color: #a8623f;
  font-weight: 600;
}
.teacher-feature__facts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  overflow-wrap: break-word;
}
.teacher-feature__facts .wrap { max-width: 415px; width: 100%; }
.teacher-feature__quote {
  flex: 1 1 220px;
  min-width: 0;
  border-left: 1px solid var(--border);
  padding: 2px 0 2px 26px;
  display: flex;
  align-items: center;
}
.teacher-feature__quote p {
  margin: 0;
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  line-height: 1.9;
  color: #5c5346;
  max-width: 320px;
  width: 100%;
}

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.teacher-card {
  background: var(--card);
  border-radius: 4px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.teacher-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.teacher-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  font-family: 'Noto Serif JP', serif;
  flex: none;
}
.teacher-card__avatar--olive { background: #8c8168; }
.teacher-card__avatar--terracotta { background: #a8623f; }
.teacher-card__avatar--ink { background: #2b241d; }
.teacher-card__name { font-weight: 600; font-size: 17px; }
.teacher-card__meta { font-size: 13px; color: var(--muted); }
.teacher-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.teacher-card__tags span {
  background: var(--card);
  color: var(--ink-soft);
  font-size: 13px;
  padding: 4px 9px;
  border-radius: 20px;
}
.teacher-card__desc {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.teacher-card details summary {
  font-size: 14px;
  color: #a8623f;
  font-weight: 600;
}
.teacher-card details .bio {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-top: 10px;
}

/* ---------- Atmosphere ---------- */

@keyframes casaScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.atmosphere__eyebrow { margin-bottom: 14px; }
.atmosphere__title { margin-bottom: 36px; }
.atmosphere__viewport {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.atmosphere__track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: casaScroll 36s linear infinite;
}
.atmosphere__track img {
  width: 300px;
  height: 230px;
  object-fit: cover;
  border-radius: 4px;
  flex: none;
}

/* ---------- Online ---------- */

.online {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px) clamp(36px, 6vw, 64px);
}
.online__card {
  background: var(--card);
  border-radius: 4px;
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  align-items: center;
}
.online__text {
  flex: 1 1 320px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.online__heading {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
}
.online__body {
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.online__actions { flex: none; display: flex; gap: 10px; flex-wrap: wrap; }
.online__actions .btn {
  flex: none;
  min-width: 0;
  font-size: 16px;
  padding: 14px 22px;
  white-space: nowrap;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px) clamp(36px, 6vw, 64px);
}
.faq__eyebrow { margin-bottom: 14px; }
.faq__title { margin-bottom: 32px; }
.faq__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.faq-item {
  background: var(--card);
  border-radius: 4px;
  padding: 18px 22px;
}
.faq-item__q { font-size: 17px; font-weight: 600; }
.faq-item__a {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ---------- Contact ---------- */

.contact {
  background: #2b241d;
  color: #e9ddc9;
  padding: clamp(44px, 7vw, 80px) clamp(20px, 4vw, 40px);
  scroll-margin-top: 80px;
}
.contact__inner { max-width: 1440px; margin: 0 auto; }
.contact__eyebrow {
  font-size: 14px;
  letter-spacing: .12em;
  color: #c9a988;
  font-weight: 600;
  margin-bottom: 14px;
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 230px;
  grid-template-areas:
    "heading qr"
    "desc qr"
    "info qr"
    "address qr";
  column-gap: clamp(24px, 4vw, 56px);
  row-gap: 0;
  align-items: start;
}
#contactHeading {
  grid-area: heading;
  font-family: 'Noto Serif JP', serif;
  font-size: var(--contact-heading-size);
  font-weight: 600;
  margin-bottom: 10px;
  color: #f4ede0;
}
#contactDesc {
  grid-area: desc;
  font-size: 17px;
  line-height: 1.9;
  color: #c9bda6;
  margin-bottom: 40px;
  max-width: 60ch;
}
#contactInfo {
  grid-area: info;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact-field__label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .05em;
}
.contact-field__value {
  font-size: 20px;
  font-weight: 600;
  color: #f4ede0;
}
.contact-field__value--email { font-size: 18px; font-weight: 400; }
.contact-field__tag {
  font-size: 13px;
  font-weight: 500;
  color: #c9a988;
  margin-left: 8px;
}
#contactQR {
  grid-area: qr;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: #33291f;
  padding: 12px;
  border-radius: 4px;
  box-sizing: border-box;
}
#contactQR img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  padding: 4px;
  box-sizing: border-box;
}
.contact-qr__caption {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}
#contactAddress {
  grid-area: address;
  margin-top: 16px;
  padding-top: 36px;
  border-top: 1px solid rgba(233, 221, 201, .12);
  scroll-margin-top: 80px;
}
.contact-address__label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
  letter-spacing: .05em;
}
.contact-address__row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.contact-address__school {
  flex: 1 1 200px;
  min-width: 180px;
}
.contact-address__school-name {
  font-size: 14px;
  color: #c9a988;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: .03em;
}
.contact-address__text {
  font-size: 16px;
  line-height: 1.9;
  color: #c9bda6;
}

@media (max-width: 700px) {
  .contact__grid {
    grid-template-columns: 1fr;
    grid-template-areas: "heading" "desc" "qr" "info" "address";
  }
  #contactQR { width: 230px; max-width: 100%; margin: 0 auto; }
}

/* ---------- Back to top ---------- */

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #a8623f;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(43, 36, 29, .35);
  z-index: 60;
}

/* ---------- Small phones ---------- */

@media (max-width: 500px) {
  :root { --hero-size: 25px; --contact-heading-size: 19px; }
  .hero__heading { letter-spacing: 0; }
}
