:root {
  --bg: #f6f3ee;
  --bg-alt: #ece7df;
  --text: #1a1715;
  --muted: #4c433d;
  --accent: #069;
  --accent-strong: #960;
  --card: #fffdf9;
  --line: #d4c7b8;
  --focus: #1347c7;
  --radius: 20px;
  --shadow: 0 10px 28px rgba(46, 30, 12, 0.12);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 90% 0%, #e8f5ff 0%, var(--bg) 40%), var(--bg);
  line-height: 1.6;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--focus);
  color: #fff;
  padding: 0.6rem 0.9rem;
  z-index: 999;
}

.skip-link:focus-visible {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(1080px, 92vw);
  margin-inline: auto;
}

.site-header {
  min-height: 100svh;
  border-bottom: 1px solid #567b18;
  background:
    radial-gradient(circle at 12% 20%, rgba(0, 153, 204, 0.22) 0%, rgba(0, 153, 204, 0) 34%),
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(175deg, #99cc00 0%, #7cab1b 50%, #4d6e10 100%);
  color: #fff;
}

.topbar {
  position: fixed;
  top: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  width: min(1080px, 92vw);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  pointer-events: none;
}

.topbar .lang-switch {
  pointer-events: auto;
}

.lang-switch {
  display: inline-flex;
  background: rgba(11, 15, 22, 0.48);
  border-radius: 999px;
  padding: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: #e9eef3;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-btn.is-active {
  background: #fff;
  color: #1f2228;
}

.hero {
  min-height: calc(100svh - 68px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 4.2rem 0 0;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  line-height: 1.1;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  max-width: 100%;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-top: clamp(3rem, 14vh, 7rem);
  color: #ffffff;
  width: 100%;
  text-align: center;
  align-self: center;
  font-size: clamp(2.2rem, 7vw, 4.4rem);
}

.hero-title [data-i18n="hero.titlePrefix"] {
  display: block;
  line-height: 1.05;
}

.hero-rotator-wrap {
  position: relative;
  display: block;
  min-width: 18ch;
  line-height: 1.05;
}

#hero-rotator {
  color: #069;
  transition: opacity 0.55s ease;
}

#hero-rotator.is-fading {
  opacity: 0;
}

.hero-meta {
  margin: 0.35rem 0 0;
  color: #f0f3f6;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-logo-link {
  display: inline-flex;
  margin-top: 0.85rem;
}

.hero-logo {
  width: clamp(88px, 9vw, 120px);
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.28));
}

.hero-tagline {
  margin: auto 0 0.95rem;
  color: #ecf4ff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-gallery {
  position: relative;
  width: min(620px, 92%);
  flex: 1 1 auto;
  min-height: 180px;
  max-height: 40vh;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
  margin: 0.9rem 0 0.55rem;
}

.hero-logo-link { order: 1; }
.hero-meta { order: 2; }
.hero-title { order: 3; }
.hero-gallery { order: 4; }
.hero-tagline { order: 5; }

.hero-gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.85s ease;
}

.hero-gallery-img.is-active {
  opacity: 1;
}

@media (min-width: 900px) {
  .hero-gallery {
    width: min(620px, 86%);
    min-height: 210px;
    max-height: 42vh;
    margin: 1rem 0 0.65rem;
  }
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

h3 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.lead {
  font-size: clamp(1.02rem, 2.5vw, 1.25rem);
  color: var(--muted);
  max-width: 66ch;
}

.section-lead {
  margin: 0 0 1.15rem;
}

.section {
  padding: 3.4rem 0;
}

.section-alt {
  background: linear-gradient(180deg, #069 0%, #0479ad 100%);
  border-top: 1px solid #046089;
  border-bottom: 1px solid #046089;
  color: #ffffff;
}

.section-alt h2 {
  color: #9c0;
}

.section-alt p {
  color: #ffffff;
  font-size: clamp(1.08rem, 2.1vw, 1.24rem);
  line-height: 1.72;
  max-width: 68ch;
}

@media (min-width: 1024px) {
  .section-alt .container {
    width: min(860px, 92vw);
  }

  .faq-list {
    margin-inline: auto;
  }
}

.section-intro {
  margin-top: 0.2rem;
  color: var(--muted);
}

.post-hero-title {
  color: #567b18;
  text-align: center;
  margin-bottom: 0.95rem;
}

.post-hero-text {
  max-width: 88ch;
  margin-inline: auto;
  text-align: left;
}

.beat-link,
.beat-link:visited {
  color: var(--accent);
}

.card-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.faq-list {
  max-width: 860px;
  margin-top: 1rem;
}

.project-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.project-note {
  margin: 0.8rem 0 0;
  font-weight: 600;
  color: var(--accent);
}

.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}

.faq-item + .faq-item {
  margin-top: 0.7rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.faq-item p {
  margin: 0.7rem 0 0;
  color: var(--muted);
}

.teacher-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.teacher-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 18%;
  border-bottom: 1px solid var(--line);
}

.card-body {
  padding: 1rem;
}

.role {
  color: var(--accent-strong);
  font-weight: 700;
  margin: 0 0 0.6rem;
}

.meta {
  margin: 0.55rem 0;
  color: var(--muted);
}

.actions {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.actions a,
#next-quote {
  text-decoration: none;
  border: 1px solid var(--accent);
  color: var(--accent-strong);
  background: #fff;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-weight: 700;
  font-size: 0.94rem;
}

.actions a:hover,
#next-quote:hover {
  background: #e8f8ff;
}

.actions a:focus-visible,
#next-quote:focus-visible,
.lang-btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.quotes {
  text-align: center;
  background: linear-gradient(180deg, #7cab1b 0%, #6c9a17 100%);
  color: #ffffff;
  border-top: 1px solid #5b8512;
}

.quote-box {
  margin: 1rem auto 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  padding: 1.4rem 1.1rem;
  max-width: 760px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

#quote-text {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  color: #ffffff;
}

#quote-author {
  margin-top: 0.7rem;
  color: #ecf4ff;
  font-weight: 600;
}

#next-quote {
  cursor: pointer;
}

.site-footer {
  padding: 2.6rem 0 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(180deg, #6c9a17 0%, #4d6e10 100%);
  color: #ffffff;
}

.site-footer p {
  margin: 0;
}

.site-footer .small {
  margin-top: 0.7rem;
  color: #e7f3d2;
  font-size: 0.94rem;
  text-align: center;
}

@media (min-width: 1024px) {
  .quotes .container,
  .site-footer .container {
    width: min(860px, 92vw);
  }
}

@media (max-width: 640px) {
  .topbar {
    top: 0.45rem;
  }

  .hero {
    padding-top: 0.7rem;
    padding-bottom: 0;
  }

  .hero-logo-link {
    margin-top: 1.35rem;
  }

  .hero-meta {
    margin-top: 0.25rem;
    font-size: 0.95rem;
  }

  .hero-title {
    margin-top: clamp(2rem, 10vh, 3.8rem);
    width: 100%;
    font-size: clamp(2rem, 10.5vw, 3.2rem);
  }

  .hero-gallery {
    width: min(78vw, 420px);
    min-height: 200px;
    max-height: 46vh;
    margin-top: 0.75rem;
  }

  .section {
    padding: 2.6rem 0;
  }
}
