:root {
  --bg-page: #f4f0e8;
  --bg-header: #070707;
  --bg-hero-button: #b5853e;
  --bg-soft-button: #f2e3bd;
  --bg-feature: #ddebf1;
  --bg-feature-card: #dfc486;
  --bg-school: #f4f1ec;
  --bg-carousel: #f6f4f2;
  --bg-footer: #1e1814;
  --bg-footer-button: #d9c184;
  --ink-light: #f6f0e5;
  --ink-dim: #d8d2c4;
  --ink-dark: #2d241b;
  --ink-copy: #6a604f;
  --ink-brand: #5a7398;
  --ink-school: #31485a;
  --ink-gold: #d7b56b;
  --line-soft: rgba(255, 245, 224, 0.22);
  --shadow-deep: 0 28px 60px rgba(15, 10, 5, 0.28);
  --shadow-card: 0 18px 34px rgba(49, 35, 18, 0.18);
  --container: min(1440px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink-dark);
  font-family: "Inter", sans-serif;
}

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

button {
  font: inherit;
}

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

.page-shell {
  overflow-x: hidden;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-row {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-light);
  flex-shrink: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #c47a1e;
  box-shadow: inset 0 0 0 4px rgba(255, 238, 215, 0.18);
}

.brand-text {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.05;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  flex: 1;
  min-width: 0;
}

.main-nav a {
  font-family: "Noto Serif SC", serif;
  font-size: 17px;
  color: var(--ink-dim);
  transition: color 180ms ease;
  white-space: nowrap;
}

.main-nav a.is-active,
.main-nav a:hover {
  color: #ffffff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #f0e5cf;
  font-family: "IBM Plex Mono", monospace;
  font-size: 15px;
  flex-shrink: 0;
}

.header-actions span {
  color: #8a7a5a;
}

.hero {
  position: relative;
  min-height: 730px;
  isolation: isolate;
}

.hero-background,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-background {
  background: center/cover no-repeat url("./images/generated-1773250989829.png");
}

.hero-overlay {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.08) 30%, rgba(12, 8, 4, 0.28) 82%, rgba(12, 8, 4, 0.5)),
    radial-gradient(circle at 50% 40%, rgba(255, 223, 162, 0.12), transparent 40%);
}

.hero-content {
  position: relative;
  min-height: 730px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding-bottom: 26px;
}

.hero-ribbon {
  width: 520px;
  height: 34px;
  border-radius: 14px;
  background: transparent;
}

.hero-actions {
  display: flex;
  gap: 38px;
}

.button {
  min-width: 200px;
  height: 48px;
  padding: 0 26px;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Noto Serif SC", serif;
  font-size: 20px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, filter 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px) scale(1.035);
  filter: brightness(1.08);
}

.cta-chip:hover,
.cta-chip:focus-visible,
.school-tab:hover,
.school-tab:focus-visible,
.carousel-arrow:hover,
.carousel-arrow:focus-visible {
  transform: translateY(-2px);
}

.button-secondary {
  background: var(--bg-soft-button);
  color: #8d7146;
  box-shadow: 0 10px 22px rgba(49, 35, 18, 0.16);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  box-shadow: 0 16px 30px rgba(49, 35, 18, 0.24);
}

.button-primary {
  background: var(--bg-hero-button);
  color: #fff7e8;
  box-shadow: 0 16px 30px rgba(80, 48, 8, 0.34);
}

.button-primary:hover,
.button-primary:focus-visible {
  box-shadow: 0 20px 36px rgba(80, 48, 8, 0.42);
}

.button-enter {
  width: 332px;
  height: 58px;
  border-radius: 16px;
  font-size: 24px;
}

.features-section {
  padding: 28px 0 42px;
  background: var(--bg-feature);
}

.section-title {
  margin: 0;
  text-align: center;
  color: var(--ink-brand);
  font-family: "Noto Serif SC", serif;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.features-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.feature-card {
  perspective: 1200px;
  min-height: 620px;
}

.feature-card-inner {
  position: relative;
  min-height: 620px;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 520ms ease;
}

.feature-card:hover .feature-card-inner,
.feature-card:focus-within .feature-card-inner {
  transform: rotateY(180deg);
}

.feature-card-face {
  position: absolute;
  inset: 0;
  min-height: 620px;
  backface-visibility: hidden;
  overflow: hidden;
}

.feature-card-front,
.feature-card-visual .feature-card-front {
  background: #445c92;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 22px 16px;
  text-align: center;
}

.feature-card-front img {
  width: 160px;
  height: 150px;
  object-fit: cover;
  margin-top: 6px;
}

.feature-card-front h3 {
  margin: 54px 0 0;
  color: #f5e7c6;
  font-family: "Noto Serif SC", serif;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 800;
}

.feature-card-back {
  background: var(--bg-feature-card);
  padding: 18px 22px 24px;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feature-card-back h3 {
  margin: 0;
  color: #6a5534;
  text-align: center;
  font-family: "Noto Serif SC", serif;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 800;
  width: 100%;
}

.feature-card-back p {
  margin: 34px 0 0;
  color: var(--ink-copy);
  font-size: 12px;
  line-height: 1.5;
}

.feature-detail-button {
  margin-top: auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 122px;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: #445c92;
  color: #f5e7c6;
  font-family: "Noto Serif SC", serif;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(44, 56, 89, 0.22);
}

.feature-card-visual .feature-card-front {
  justify-content: flex-start;
  padding-top: 28px;
}

.feature-card-visual .feature-card-front img {
  margin-top: 0;
}

.feature-card-visual .feature-card-front h3 {
  margin-top: 54px;
  font-size: 26px;
}

.schools-section {
  padding: 18px 0 46px;
  background: var(--bg-school);
}

.schools-heading {
  position: relative;
  z-index: 3;
  min-height: 190px;
}

.school-category-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  position: relative;
  z-index: 4;
}

.school-category-tab {
  border: 0;
  padding: 0 4px 6px;
  background: transparent;
  color: #7e97a9;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(28px, 3vw, 34px);
  font-weight: 700;
  cursor: pointer;
  position: relative;
  z-index: 5;
  pointer-events: auto;
  transition: color 180ms ease, text-shadow 180ms ease, border-color 180ms ease;
  border-bottom: 2px solid transparent;
}

.school-category-tab.is-active {
  color: var(--ink-brand);
  border-bottom-color: rgba(114, 144, 160, 0.42);
  text-shadow: 0 2px 10px rgba(114, 144, 160, 0.12);
}

.school-tabs {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 26px;
  position: relative;
  z-index: 4;
}

.school-tab {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink-school);
  font-size: 16px;
  cursor: pointer;
  position: relative;
  z-index: 5;
  pointer-events: auto;
  transition: color 180ms ease, opacity 180ms ease;
}

.school-tab.is-active {
  color: #1b2d3b;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.schools-panel {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 650px;
}

.schools-visual {
  width: 100%;
  height: 620px;
  overflow: hidden;
}

.schools-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  box-shadow: none;
  display: block;
}

.carousel-section {
  padding: 20px 0 56px;
  background: var(--bg-carousel);
}

.carousel-section .container {
  width: min(1440px, 100vw);
}

.carousel-shell {
  position: relative;
  margin-top: 24px;
  min-height: 590px;
}

.carousel-arrow {
  position: absolute;
  top: 212px;
  z-index: 3;
  border: 0;
  background: transparent;
  color: #f3e6c7;
  font-size: 44px;
  font-weight: 700;
  cursor: pointer;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.carousel-arrow[data-direction="prev"] {
  left: 44px;
}

.carousel-arrow[data-direction="next"] {
  right: 44px;
}

.carousel-track {
  position: relative;
  width: 100%;
  min-height: 590px;
}

.carousel-card {
  position: relative;
}

.carousel-card-side {
  position: absolute;
  top: 90px;
  width: 260px;
  height: 400px;
  overflow: hidden;
  box-shadow: none;
  z-index: 1;
}

.carousel-card-side:first-child {
  left: 12px;
}

.carousel-card-side:last-child {
  right: 12px;
}

.carousel-card-side::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.carousel-card-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-card-main {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(976px, calc(100% - 464px));
  height: 540px;
  z-index: 2;
}

.carousel-card-shadow {
  position: absolute;
  top: 10px;
  left: 14px;
  width: calc(100% - 30px);
  height: 510px;
  background: #a9986c;
}

.carousel-card-main img {
  position: relative;
  width: calc(100% - 30px);
  height: 510px;
  object-fit: cover;
  box-shadow: none;
}

.final-cta {
  background: var(--bg-footer);
  padding: 18px 0 0;
}

.final-actions {
  width: min(868px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px 1fr 230px;
  gap: 20px;
}

.cta-chip {
  position: relative;
  min-height: 64px;
  background: var(--bg-footer-button);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #46331d;
  box-shadow: var(--shadow-card);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.cta-chip::before,
.cta-chip::after {
  content: "";
  position: absolute;
  top: 19px;
  width: 26px;
  height: 26px;
  background: var(--bg-footer);
  transform: rotate(45deg);
}

.cta-chip::before {
  left: -13px;
}

.cta-chip::after {
  right: -13px;
}

.cta-chip strong {
  font-family: "Noto Serif SC", serif;
  font-size: 18px;
  font-weight: 800;
}

.cta-chip-wide strong {
  font-size: 19px;
}

.cta-chip span {
  margin-top: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  color: #7a6036;
  letter-spacing: 0.1em;
}

.cta-chip:hover,
.cta-chip:focus-visible {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.08);
  box-shadow: 0 18px 34px rgba(102, 78, 34, 0.3);
}

.site-footer {
  margin-top: 32px;
  min-height: 140px;
  background: #000000;
  padding: 16px 24px 20px;
  text-align: center;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.footer-brand {
  margin: 0;
  color: var(--ink-gold);
  font-family: "Playfair Display", serif;
  font-size: 24px;
  font-weight: 700;
}

.footer-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 28px;
}

.footer-links a {
  color: #eaeaea;
  font-size: 14px;
}

.footer-legal {
  max-width: 960px;
  margin: 18px auto 0;
  color: #a8a8a8;
  font-size: 11px;
  line-height: 1.7;
}

@media (max-width: 1180px) {
  .main-nav {
    gap: 20px;
  }

  .features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-card,
  .feature-card-inner,
  .feature-card-face {
    min-height: 320px;
  }

  .feature-card-visual .feature-card-front h3 {
    margin-top: 32px;
  }

  .feature-card-front h3 {
    margin-top: 32px;
  }

  .carousel-track {
    min-height: 520px;
  }

  .carousel-card-side {
    width: 180px;
    height: 320px;
  }

  .carousel-card-side:first-child {
    left: 8px;
  }

  .carousel-card-side:last-child {
    right: 8px;
  }

  .carousel-card-main {
    width: min(976px, calc(100% - 332px));
    height: 500px;
  }

  .carousel-card-shadow,
  .carousel-card-main img {
    height: 460px;
  }

  .final-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .site-header {
    position: relative;
  }

  .header-row {
    flex-wrap: wrap;
    justify-content: center;
    padding: 14px 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .hero {
    min-height: 640px;
  }

  .school-category-tab {
    font-size: 24px;
  }

  .hero-content {
    min-height: 640px;
  }

  .hero-ribbon {
    width: min(100%, 520px);
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .button,
  .button-enter {
    width: min(100%, 332px);
  }

  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .carousel-shell {
    min-height: 360px;
  }

  .carousel-track {
    min-height: 360px;
  }

  .carousel-card-side {
    display: none;
  }

  .carousel-card-main {
    position: relative;
    top: 0;
    left: auto;
    transform: none;
    width: 100%;
    height: 320px;
  }

  .carousel-card-shadow,
  .carousel-card-main img {
    width: calc(100% - 20px);
    height: 320px;
  }

  .carousel-arrow {
    top: 126px;
  }

  .carousel-arrow[data-direction="prev"] {
    left: 8px;
  }

  .carousel-arrow[data-direction="next"] {
    right: 8px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100vw - 20px, 100%);
  }

  .features-section,
  .schools-section,
  .carousel-section {
    padding-left: 0;
    padding-right: 0;
  }

  .hero-ribbon {
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .feature-card-inner,
  .feature-card-face {
    min-height: auto;
  }

  .schools-panel {
    min-height: auto;
  }

  .schools-visual {
    height: 320px;
  }

  .schools-visual img {
    height: 100%;
  }

  .carousel-card-main {
    height: auto;
  }

  .carousel-card-shadow {
    left: 8px;
    width: calc(100% - 16px);
    height: 320px;
  }

  .carousel-card-main img {
    width: calc(100% - 16px);
    height: 320px;
  }

  .site-footer {
    padding-left: 14px;
    padding-right: 14px;
  }
}
