/* Local night-school artwork shared with the Ephraim microsite.
   All effects are static except one short entrance when the home view opens. */
body:has(.home--landing) {
  background: #050d18;
}
#app:has(.home--landing) {
  --landing-ink: #edf7fb;
  --landing-muted: #b8cbd7;
  --landing-line: rgba(161, 213, 231, .22);
  --landing-cyan: #a4f1ef;
  --landing-amber: #ffcc87;
  min-height: 100vh;
  color: var(--landing-ink);
  background: radial-gradient(ellipse at 90% 88%, rgba(27, 114, 137, .14), transparent 42%), #050d18;
}
#app:has(.home--landing) .topbar {
  position: relative;
  z-index: 2;
  padding: 18px clamp(22px, 5vw, 96px);
  color: var(--landing-ink);
  border-color: var(--landing-line);
  background: #071522;
}
#app:has(.home--landing) .brand {
  color: var(--landing-ink);
  letter-spacing: -.025em;
}
#app:has(.home--landing) .brand-mark {
  color: #071522;
  background: var(--landing-cyan);
  box-shadow: 0 0 25px rgba(90, 233, 230, .2);
}
#app:has(.home--landing) .badge:not(.live) {
  color: var(--landing-muted);
  border-color: var(--landing-line);
}
#app:has(.home--landing) .badge.live {
  color: #071522;
  background: var(--landing-cyan);
  border-color: var(--landing-cyan);
}
#app:has(.home--landing) button,
#app:has(.home--landing) .button {
  border-color: rgba(160, 215, 228, .38);
  color: var(--landing-ink);
  background: rgba(9, 28, 43, .9);
}
#app:has(.home--landing) button:hover,
#app:has(.home--landing) .button:hover {
  border-color: var(--landing-cyan);
  background: #163849;
}
#app:has(.home--landing) .primary {
  color: #072127;
  border-color: var(--landing-cyan);
  background: var(--landing-cyan);
  box-shadow: 0 6px 26px rgba(60, 200, 202, .16);
}
#app:has(.home--landing) .primary:hover {
  color: #072127;
  border-color: #d0fffc;
  background: #d0fffc;
}
#app:has(.home--landing) :is(button, a, input):focus-visible {
  outline: 3px solid var(--landing-amber);
  outline-offset: 5px;
}
.home--landing {
  max-width: none;
  padding: 0 0 48px;
}
.home--landing .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 740px;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, .85fr);
  gap: clamp(36px, 5vw, 90px);
  padding: 98px max(5vw, calc((100% - 1370px) / 2)) 124px;
  background-color: #071522;
  background-image:
    radial-gradient(ellipse at 80% 28%, rgba(65, 194, 214, .2), transparent 42%),
    radial-gradient(ellipse at 49% 75%, rgba(245, 166, 74, .17), transparent 31%),
    linear-gradient(90deg, rgba(5, 13, 24, .92), rgba(5, 13, 24, .68) 38%, rgba(5, 13, 24, .28) 72%, rgba(5, 13, 24, .5)),
    url('school-background.webp');
  background-size: cover;
  background-position: center, center, center, center 60%;
}
.home--landing .hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(160, 224, 239, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 224, 239, .12) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, transparent 30%, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
}
.home--landing .hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, #050d18, transparent 30%), linear-gradient(180deg, rgba(5, 13, 24, .12), transparent 22%);
}
.home--landing .hero > div {
  min-width: 0;
  position: relative;
}
.home--landing .hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--landing-cyan);
  letter-spacing: .19em;
  font-size: .73rem;
}
.home--landing .hero .eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--landing-cyan);
  box-shadow: 0 0 18px rgba(130, 255, 244, .9);
}
.home--landing .hero h1 {
  color: #f1f7f9;
  font-size: clamp(3.25rem, 6.65vw, 6.1rem);
  line-height: 1.01;
  letter-spacing: -.05em;
  margin: 28px 0;
  text-wrap: balance;
  text-shadow: 0 3px 36px rgba(0, 0, 0, .4);
}
.home--landing .hero .lead {
  max-width: 565px;
  color: #cedde7;
  font-size: clamp(1.05rem, 1.25vw, 1.17rem);
  line-height: 1.65;
}
.home--landing .hero .row {
  margin-top: 30px;
  gap: 12px;
}
.home--landing .hero .row button {
  min-height: 52px;
  padding-inline: 20px;
}
.home--landing .fine,
.home--landing .principles p,
#app:has(.home--landing) .foot {
  color: var(--landing-muted);
}
.home--landing .hero > .social {
  width: 100%;
  max-width: 450px;
  justify-self: end;
  min-height: 440px;
  padding: clamp(24px, 3vw, 38px);
  color: #eff7fb;
  border: 1px solid rgba(159, 219, 226, .47);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(15, 42, 57, .93), rgba(6, 18, 31, .91));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .48), 0 0 64px rgba(69, 174, 195, .11), inset 0 1px rgba(214, 246, 255, .16);
  transform: rotate(3deg);
}
.home--landing .social .avatar {
  border-color: rgba(157, 234, 238, .6);
  color: var(--landing-cyan);
  background: rgba(82, 205, 210, .08);
}
.home--landing .social h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  line-height: 1.17;
}
.home--landing .social .price {
  color: var(--landing-amber);
  font-size: clamp(5.2rem, 8vw, 7.8rem);
  text-shadow: 0 0 35px rgba(252, 175, 67, .15);
}
.home--landing .social .price small {
  color: #d7e2e8;
  font-size: 1.45rem;
}
.home--landing .social .sticker {
  top: 156px;
  right: 25px;
  background: var(--landing-cyan);
  color: #08252b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.home--landing .social-footer {
  gap: 15px;
  border-color: rgba(174, 219, 233, .26);
  color: #c4d7e2;
}
.home--landing > .principles,
.home--landing > .join-card,
.home--landing > .panel,
.home--landing > .teacher-entry,
#app:has(.home--landing) .foot {
  width: min(90%, 1230px);
  margin-inline: auto;
}
.home--landing .principles {
  position: relative;
  margin-top: 0;
  margin-bottom: 50px;
  padding-top: 30px;
  gap: clamp(24px, 4vw, 65px);
  border-color: var(--landing-line);
}
.home--landing .principles .num {
  color: var(--landing-amber);
  font-size: .85rem;
}
.home--landing .principles h3 {
  color: #eff7fb;
  font-size: 1.04rem;
}
.home--landing .principles p {
  margin-top: 9px;
  line-height: 1.65;
}
.home--landing > .panel,
.home--landing .join-card {
  border-color: var(--landing-line);
  background: linear-gradient(115deg, #102536, #0a1929);
  box-shadow: 0 16px 45px rgba(0, 0, 0, .15);
}
.home--landing .join-card {
  align-items: center;
  grid-template-columns: 1fr minmax(300px, 1fr);
  gap: 40px;
  padding: 34px;
}
.home--landing .join-card h3 {
  margin-bottom: 9px;
  font-size: 1.18rem;
}
.home--landing .join-card input {
  min-width: 0;
  color: #f0f7fb;
  border-color: #658895;
  background: #071522;
}
.home--landing .join-card input::placeholder {
  color: #abc1ce;
  opacity: 1;
}
#app:has(.home--landing) .foot {
  padding-inline: 0;
  padding-top: 8px;
  padding-bottom: 34px;
  line-height: 1.7;
}
/* Safety and connection messages follow the same opaque dark surfaces. */
#app:has(.home--landing) .global-notices .screen-note {
  color: #d9eff5;
}
#app:has(.home--landing) .global-notices .warning {
  color: #ffe0ad;
}
#app:has(.home--landing) .global-notices button {
  color: #edf6fa;
  border-color: #6c8d9f;
  background: #102b3e;
}
/* The school stays subtle behind opaque classroom and maintenance surfaces. */
body:not(:has(.home--landing)) {
  --atmosphere-fade-end: min(740px, 70vw);
  background-color: #071321;
  background-image: linear-gradient(180deg, rgba(7, 19, 33, .84), #071321 var(--atmosphere-fade-end)), url('school-background.webp');
  background-repeat: no-repeat;
  /* Cover the full page so the photo cannot reappear below the fade. */
  background-size: 100% 100%, 100% auto;
  background-position: center top;
}
#app:not(:has(.home--landing)) .topbar, body > .topbar {
  border-top: 3px solid #48858b;
  background: #081a2a;
}
#app:not(:has(.home--landing)) .course-head,
#app:not(:has(.home--landing)) .teacher-title,
#app:not(:has(.home--landing)) .wall-head {
  text-shadow: 0 2px 15px rgba(0, 0, 0, .3);
}
@media (max-width: 760px) {
  body:not(:has(.home--landing)) {
    --atmosphere-fade-end: 580px;
    background-size: 100% 100%, auto 620px;
    background-position: center top, 40% top;
  }
}
@media (max-width: 1050px) {
  .home--landing .hero {
    min-height: 680px;
    grid-template-columns: minmax(0, 1.2fr) minmax(290px, .8fr);
    gap: 32px;
    padding-top: 76px;
    padding-bottom: 100px;
  }
  .home--landing .hero h1 { font-size: clamp(3.05rem, 6.2vw, 4.4rem); }
  .home--landing .hero > .social { min-height: 410px; padding: 26px; }
  .home--landing .social .sticker { right: 18px; top: 142px; }
  .home--landing .hero .row { align-items: stretch; }
}
@media (max-width: 820px) {
  .home--landing .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 46px;
    padding-top: 66px;
    padding-bottom: 92px;
    background-position: center, center, center, 43% center;
    background-image:
      radial-gradient(ellipse at 86% 55%, rgba(65, 194, 214, .18), transparent 48%),
      radial-gradient(ellipse at 25% 68%, rgba(245, 166, 74, .14), transparent 37%),
      linear-gradient(180deg, rgba(5, 13, 24, .85), rgba(5, 13, 24, .53) 42%, rgba(5, 13, 24, .62)),
      url('school-background.webp');
  }
  .home--landing .hero > div { max-width: 670px; }
  .home--landing .hero h1 { font-size: clamp(3rem, 8.7vw, 4.85rem); }
  .home--landing .hero > .social { justify-self: center; max-width: 465px; min-height: 410px; }
  .home--landing .social h2 { font-size: 2.1rem; }
  .home--landing .social .price { font-size: 6.5rem; }
  .home--landing .social .sticker { top: 144px; right: 28px; }
  .home--landing .principles { gap: 26px; margin-bottom: 34px; }
  .home--landing .join-card { grid-template-columns: minmax(0, 1fr); gap: 25px; padding: 28px; }
  .home--landing .join-card form { width: 100%; }
  .home--landing .join-card input { flex: 1; width: 165px; }
}
@media (max-width: 480px) {
  #app:has(.home--landing) .topbar { padding: 14px 20px; }
  #app:has(.home--landing) .brand-mark { width: 38px; height: 38px; }
  .home--landing .hero { padding: 52px 22px 76px; gap: 42px; }
  .home--landing .hero .eyebrow { font-size: .65rem; letter-spacing: .13em; }
  .home--landing .hero h1 { font-size: clamp(2.62rem, 10.6vw, 3.15rem); margin-block: 23px; }
  .home--landing .hero .lead { font-size: 1.02rem; }
  .home--landing .hero .row { display: grid; grid-template-columns: minmax(0, 1fr); }
  .home--landing .hero .row button { width: 100%; }
  .home--landing .hero > .social { width: calc(100% - 12px); min-height: 370px; transform: rotate(2deg); padding: 24px; }
  .home--landing .social h2 { font-size: 1.8rem; }
  .home--landing .social .price { font-size: 5.6rem; }
  .home--landing .social .price small { font-size: 1.2rem; }
  .home--landing .social .sticker { top: 137px; right: 18px; font-size: 1rem; padding: 8px 11px; }
  .home--landing .social-footer { font-size: .75rem; gap: 8px; }
  .home--landing > .principles, .home--landing > .join-card, .home--landing > .panel,
  .home--landing > .teacher-entry, #app:has(.home--landing) .foot { width: calc(100% - 44px); }
  .home--landing .principles { padding-top: 25px; }
  .home--landing .principles .num { float: none; margin-bottom: 9px; }
  .home--landing .principles p { margin-left: 0; }
  .home--landing .join-card { padding: 23px; }
  .home--landing .join-card .row { gap: 10px; }
  .home--landing .join-card input { width: 120px; }
  .home--landing .join-card button { padding-inline: 14px; }
}
@media (prefers-reduced-motion: no-preference) {
  .home--landing .hero > div { animation: landing-arrival .85s ease-out both; }
  .home--landing .hero > .social { animation: card-arrival 1.1s .12s ease-out both; }
  @keyframes landing-arrival {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes card-arrival {
    from { opacity: 0; translate: 0 20px; }
    to { opacity: 1; translate: 0 0; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .home--landing *, .home--landing *::before, .home--landing *::after { animation: none !important; transition: none !important; }
}
@media print {
  body:has(.home--landing), #app:has(.home--landing) { background: #fff; color: #192b2c; }
  .home--landing .hero { padding: 30px; min-height: 0; background: #fff; }
  .home--landing .hero h1, .home--landing .hero .lead, .home--landing .fine, .home--landing .principles h3, .home--landing .principles p { color: #192b2c; text-shadow: none; }
  .home--landing .hero > .social, .home--landing .join-card { background: #fff; color: #192b2c; box-shadow: none; transform: none; }
  .home--landing .social .price, .home--landing .social .price small, .home--landing .social-footer { color: #192b2c; }
  .home--landing .hero::before, .home--landing .hero::after { display: none; }
}
