:root {
  --twis-navy: #183451;
  --twis-navy-deep: #0e2035;
  --twis-orange: #ec7f2d;
  --twis-orange-deep: #c95f1f;
  --twis-sky: #eaf5fb;
  --twis-blue: #2e6f9f;
  --twis-cream: #fffaf3;
  --twis-green: #2f7f6f;
  --twis-ink: #17202a;
  --twis-muted: #637082;
  --twis-line: rgba(24, 52, 81, .14);
  --twis-shadow: 0 24px 70px rgba(14, 32, 53, .14);
  --twis-radius: 8px;
  --twis-serif: "Fraunces", Georgia, serif;
  --twis-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--twis-ink);
  font-family: var(--twis-sans);
  background: #ffffff;
  line-height: 1.6;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  background: var(--twis-navy);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--twis-line);
  box-shadow: 0 12px 34px rgba(14, 32, 53, .08);
}
.topline {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 7px 20px;
  background: var(--twis-navy);
  color: rgba(255,255,255,.88);
  font-size: 13px;
}
.topline a { text-decoration: none; }
.nav-shell {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--twis-navy);
}
.brand img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}
.brand strong {
  display: block;
  font-family: var(--twis-serif);
  font-size: 20px;
  line-height: 1;
}
.brand small {
  display: block;
  color: var(--twis-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.menu {
  display: flex;
  align-items: center;
  gap: 3px;
  list-style: none;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(24, 52, 81, .1);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #f6fbff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 24px rgba(14,32,53,.05);
}
.menu li {
  position: relative;
}
.menu a {
  color: var(--twis-navy);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 999px;
  transition: color .16s ease, background .16s ease;
}
.menu a:hover,
.menu .current-menu-item > a,
.menu .current-menu-ancestor > a {
  color: var(--twis-orange-deep);
  background: linear-gradient(180deg, #fff8f0, #fff);
  box-shadow: inset 0 0 0 1px rgba(236, 127, 45, .18), 0 8px 18px rgba(236, 127, 45, .08);
}
.menu .menu-item-has-children > a::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .65;
}
.menu .sub-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 30;
  min-width: 230px;
  list-style: none;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--twis-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--twis-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.menu .sub-menu .sub-menu {
  top: -10px;
  left: calc(100% + 8px);
}
.menu li:hover > .sub-menu,
.menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.menu .sub-menu a {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--twis-navy);
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
}
.menu .sub-menu a:hover,
.menu .sub-menu a:focus {
  background: var(--twis-sky);
  color: var(--twis-orange-deep);
}
.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.nav-cta,
.button-primary {
  background: linear-gradient(135deg, #f78b34, #df6d22);
  color: #fff;
  box-shadow: 0 10px 26px rgba(236, 127, 45, .25);
}
.button-ghost {
  border: 1px solid rgba(24, 52, 81, .2);
  color: var(--twis-navy);
  background: #fff;
}
.button-ghost-light {
  border: 1px solid rgba(255, 255, 255, .5);
  color: #fff;
}
.button:hover,
.nav-cta:hover {
  transform: translateY(-2px);
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--twis-line);
  border-radius: 6px;
  background: #fff;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--twis-navy);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, .98fr);
  gap: 42px;
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  min-height: calc(100vh - 118px);
  padding: 72px 0 58px;
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 28px auto auto -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(236,127,45,.17), transparent 67%);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--twis-serif);
  color: var(--twis-navy-deep);
  font-size: clamp(29px, 2.5vw, 36px);
  line-height: 1.08;
  margin: 0 0 24px;
  max-width: 620px;
}
.hero p {
  margin: 0;
  color: var(--twis-muted);
  font-size: 20px;
  line-height: 1.65;
  max-width: 650px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0;
}
.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 700px;
}
.hero-proof span {
  padding: 14px;
  border: 1px solid var(--twis-line);
  border-radius: var(--twis-radius);
  background: #fff;
  color: var(--twis-muted);
  box-shadow: 0 12px 28px rgba(24, 52, 81, .06);
}
.hero-proof strong {
  display: block;
  color: var(--twis-navy);
  font-size: 18px;
}
.hero-media {
  position: relative;
  min-height: 560px;
}
.hero-photo {
  position: absolute;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--twis-shadow);
}
.hero-carousel {
  position: absolute;
  inset: 0 0 auto auto;
  width: 78%;
  height: 72%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--twis-shadow);
  background: var(--twis-sky);
}
.hero-photo-main {
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .8s ease, transform 5s ease;
  box-shadow: none;
}
.hero-photo-main.is-active {
  opacity: 1;
  transform: scale(1);
}
.hero-photo-secondary {
  left: 0;
  bottom: 8px;
  width: 54%;
  height: 44%;
  border: 8px solid #fff;
}
.hero-secondary-carousel {
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 54%;
  height: 44%;
  border: 8px solid #fff;
  border-radius: 8px;
  overflow: hidden;
  background: var(--twis-sky);
  box-shadow: var(--twis-shadow);
}
.hero-secondary-carousel .hero-photo-secondary {
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  box-shadow: none;
  opacity: 0;
  animation: twisSecondaryPhoto 25s infinite;
}
.hero-secondary-carousel .hero-photo-secondary:nth-child(2) { animation-delay: 5s; }
.hero-secondary-carousel .hero-photo-secondary:nth-child(3) { animation-delay: 10s; }
.hero-secondary-carousel .hero-photo-secondary:nth-child(4) { animation-delay: 15s; }
.hero-secondary-carousel .hero-photo-secondary:nth-child(5) { animation-delay: 20s; }
@keyframes twisSecondaryPhoto {
  0%, 16% { opacity: 1; transform: scale(1); }
  22%, 100% { opacity: 0; transform: scale(1.05); }
}
.hero-card {
  position: absolute;
  right: 22px;
  bottom: 26px;
  width: 220px;
  padding: 18px;
  border-radius: 8px;
  background: var(--twis-navy);
  color: #fff;
  box-shadow: var(--twis-shadow);
}
.hero-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 14px;
}
.hero-card span {
  font-family: var(--twis-serif);
  font-size: 22px;
  line-height: 1.1;
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 92px 0;
}
.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}
.section-heading span,
.promise-copy span {
  display: block;
  margin-bottom: 10px;
  color: var(--twis-orange-deep);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.section-heading h2,
.intro-band h2,
.promise-copy h2,
.admissions-band h2,
.contact-panel h2,
.page-hero h1 {
  margin: 0;
  color: var(--twis-navy-deep);
  font-family: var(--twis-serif);
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.1;
}
.section-heading p,
.intro-band p,
.promise-copy p,
.admissions-band p,
.contact-panel p {
  color: var(--twis-muted);
  font-size: 18px;
}
.intro-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
  padding: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--twis-sky), #fff);
  border: 1px solid var(--twis-line);
}
.text-link {
  color: var(--twis-orange-deep);
  font-weight: 800;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

.program-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--twis-line);
  border-radius: 8px;
  overflow: hidden;
}
.program-card {
  min-height: 310px;
  padding: 28px 22px;
  background: #fff;
  border-right: 1px solid var(--twis-line);
}
.program-card:last-child {
  background: var(--twis-navy);
  color: #fff;
  border-right: 0;
}
.program-card span {
  color: var(--twis-orange);
  font-weight: 900;
}
.program-card h3 {
  margin: 42px 0 10px;
  font-family: var(--twis-serif);
  font-size: 27px;
  line-height: 1.05;
}
.program-card p {
  margin: 0 0 10px;
  color: var(--twis-muted);
}
.program-card:last-child p { color: rgba(255,255,255,.76); }
.program-age {
  font-weight: 800;
  color: var(--twis-blue) !important;
}

.promise-section {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 38px;
  align-items: start;
}
.promise-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.promise-list article {
  padding: 26px;
  border-radius: 8px;
  background: var(--twis-cream);
  border: 1px solid rgba(236, 127, 45, .2);
}
.promise-list h3 {
  margin: 0 0 10px;
  color: var(--twis-navy);
}
.promise-list p { margin: 0; color: var(--twis-muted); }

.calendar-home,
.news-section {
  border-top: 1px solid var(--twis-line);
}
.admissions-band {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  padding: 46px;
  border-radius: 8px;
  background: var(--twis-navy);
  color: #fff;
}
.admissions-band h2,
.admissions-band p { color: #fff; }
.admissions-band p { max-width: 680px; color: rgba(255,255,255,.78); }
.admissions-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gallery-mosaic {
  display: grid;
  grid-template-columns: 1.2fr .8fr 1fr;
  grid-auto-rows: 190px;
  gap: 12px;
  margin-bottom: 20px;
}
.gallery-mosaic figure {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--twis-sky);
}
.gallery-mosaic figure:nth-child(1),
.gallery-mosaic figure:nth-child(5) { grid-row: span 2; }
.gallery-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.gallery-mosaic figure:hover img { transform: scale(1.04); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.news-card {
  border: 1px solid var(--twis-line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 16px 42px rgba(24,52,81,.07);
}
.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.news-card time,
.news-card h3,
.news-card h2,
.news-card p {
  display: block;
  margin-left: 22px;
  margin-right: 22px;
}
.news-card time {
  margin-top: 20px;
  color: var(--twis-orange-deep);
  font-size: 13px;
  font-weight: 800;
}
.news-card h3,
.news-card h2 {
  margin-top: 8px;
  margin-bottom: 10px;
  color: var(--twis-navy);
  font-size: 21px;
  line-height: 1.2;
}
.news-card a { text-decoration: none; }
.news-card p {
  margin-bottom: 22px;
  color: var(--twis-muted);
}

.reviews-section {
  padding: 64px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, var(--twis-sky));
  border: 1px solid var(--twis-line);
}
.reviews-placeholder {
  border: 1px dashed rgba(24,52,81,.24);
  border-radius: 8px;
  padding: 24px;
  color: var(--twis-muted);
  background: rgba(255,255,255,.66);
}
.contact-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 44px 0 72px;
}
.contact-panel a {
  display: block;
  color: var(--twis-navy);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.page-hero {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 78px 0 38px;
}
.page-kicker {
  margin: 0 0 10px;
  color: var(--twis-orange-deep);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.page-hero-gallery {
  padding-bottom: 28px;
}
.page-hero p {
  max-width: 740px;
  color: var(--twis-muted);
  font-size: 20px;
}
.page-content {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 90px;
}
.page-content-wide {
  width: min(1180px, calc(100% - 36px));
}
.page-content :where(h2,h3) {
  color: var(--twis-navy);
  font-family: var(--twis-serif);
}
.page-content img {
  border-radius: 8px;
}
.twis-rich-page {
  display: grid;
  gap: 28px;
}
.twis-page-intro,
.twis-media-band,
.twis-callout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr);
  gap: 34px;
  align-items: center;
}
.twis-page-intro img,
.twis-media-band img,
.twis-page-gallery img {
  width: 100%;
  height: 100%;
  max-height: 460px;
  object-fit: cover;
}
.twis-page-copy {
  padding: 34px;
  border-radius: 8px;
  border: 1px solid var(--twis-line);
  background: #fff;
  box-shadow: 0 16px 50px rgba(24,52,81,.07);
}
.twis-page-copy p {
  color: var(--twis-muted);
  font-size: 18px;
}
.twis-feature-grid,
.twis-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.twis-feature-grid article,
.twis-card-grid article,
.twis-linked-list a {
  padding: 24px;
  border-radius: 8px;
  border: 1px solid var(--twis-line);
  background: #fff;
  box-shadow: 0 14px 42px rgba(24,52,81,.06);
}
.twis-feature-grid h2,
.twis-card-grid h2,
.twis-feature-grid h3,
.twis-card-grid h3 {
  margin-top: 0;
}
.twis-feature-grid p,
.twis-card-grid p,
.twis-linked-list p {
  color: var(--twis-muted);
}
.twis-callout {
  padding: 34px;
  border-radius: 8px;
  background: var(--twis-navy);
  color: #fff;
}
.twis-callout h2,
.twis-callout p {
  color: #fff;
}
.twis-callout p {
  color: rgba(255,255,255,.8);
}
.twis-linked-list {
  display: grid;
  gap: 12px;
}
.twis-linked-list a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  color: var(--twis-navy);
  text-decoration: none;
  font-weight: 900;
}
.twis-page-gallery {
  display: grid;
  grid-template-columns: 1.2fr .8fr 1fr;
  grid-auto-rows: 220px;
  gap: 12px;
}
.twis-page-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--twis-sky);
}
.twis-page-gallery figure:nth-child(1),
.twis-page-gallery figure:nth-child(4) {
  grid-row: span 2;
}
.single-featured {
  width: min(1000px, calc(100% - 36px));
  margin: 0 auto 32px;
}
.single-featured img {
  border-radius: 8px;
  width: 100%;
}
.archive-grid {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 90px;
}

.site-footer {
  background: var(--twis-navy-deep);
  color: rgba(255,255,255,.78);
}
.footer-grid {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 64px 0 42px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, .8fr));
  gap: 32px;
}
.footer-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-family: var(--twis-serif);
  font-size: 22px;
  line-height: 1.1;
}
.footer-brand img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}
.site-footer h2 {
  color: #fff;
  font-size: 16px;
}
.site-footer a {
  display: block;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  margin: 8px 0;
}
.site-footer a:hover { color: #fff; }
.footer-bottom {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 26px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.58);
  font-size: 13px;
}

@media (max-width: 1120px) {
  .topline { display: none; }
  .nav-toggle { display: block; }
  .primary-nav {
    position: fixed;
    inset: 91px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--twis-line);
    border-radius: 8px;
    box-shadow: var(--twis-shadow);
  }
  .primary-nav.is-open { display: flex; }
  .menu {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .menu a {
    justify-content: space-between;
    padding: 10px 2px;
  }
  .menu .sub-menu,
  .menu .sub-menu .sub-menu {
    position: static;
    min-width: 0;
    padding: 0 0 0 16px;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .menu .sub-menu a {
    white-space: normal;
    padding: 8px 2px;
    font-size: 13px;
  }
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero-media { min-height: 460px; }
  .program-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-card { border-bottom: 1px solid var(--twis-line); }
  .promise-section,
  .intro-band,
  .twis-page-intro,
  .twis-media-band,
  .twis-callout,
  .footer-grid { grid-template-columns: 1fr; }
  .news-grid,
  .twis-feature-grid,
  .twis-card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .hero {
    width: min(100% - 28px, 1180px);
    padding: 44px 0;
  }
  .hero h1 { font-size: 30px; }
  .hero-proof,
  .promise-list,
  .program-grid,
  .gallery-mosaic,
  .twis-page-gallery {
    grid-template-columns: 1fr;
  }
  .hero-media { min-height: 390px; }
  .hero-carousel { width: 100%; height: 68%; }
  .hero-photo-secondary,
  .hero-secondary-carousel { width: 56%; height: 34%; }
  .hero-card { right: 0; width: 190px; }
  .section { padding: 58px 0; }
  .intro-band,
  .admissions-band,
  .reviews-section {
    padding: 26px;
  }
  .admissions-band,
  .contact-panel,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
