/* English & Beyond — pastel study-desk theme
   Loaded last so every public and administrative surface shares one system. */
:root {
  --bg-primary: #fffafe;
  --bg-secondary: #f6f2ff;
  --bg-tertiary: #edf8f7;
  --text-primary: #28243d;
  --text-secondary: rgba(40, 36, 61, .70);
  --text-muted: rgba(40, 36, 61, .66);
  --accent-primary: #5d52a6;
  --accent-primary-hover: #4b428d;
  --accent-primary-glow: rgba(111, 96, 188, .18);
  --accent-secondary: #66a9a0;
  --accent-secondary-hover: #4c8f87;
  --accent-secondary-glow: rgba(102, 169, 160, .20);
  --accent-tertiary: #e99ab6;
  --border-color: rgba(74, 65, 118, .14);
  --border-color-hover: rgba(93, 82, 166, .42);
  --pastel-lilac: #eee8ff;
  --pastel-sky: #e4f3ff;
  --pastel-mint: #e3f7ef;
  --pastel-peach: #ffe9df;
  --pastel-butter: #fff4c9;
  --pastel-rose: #fde7f0;
  --shadow-sm: 0 3px 12px rgba(65, 53, 105, .07);
  --shadow-md: 0 14px 34px rgba(65, 53, 105, .11);
  --shadow-lg: 0 26px 60px rgba(65, 53, 105, .16);
  --gradient-neon: linear-gradient(90deg, #7768bd 0%, #57a8bd 48%, #df89ac 100%);

  /* The base status colours were tuned for a cream page. On the pastel tints
     used by metric cards and badges they fell to ~3:1, so they are darkened
     here to clear 4.5:1 on every tint while keeping the same hue. */
  --status-success: hsl(142, 60%, 28%);
  --status-success-text: hsl(142, 62%, 24%);
  --status-error: hsl(0, 72%, 40%);
}

html { background: #fffafe; }

body {
  position: relative;
  isolation: isolate;
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(circle at 8% 12%, rgba(224, 208, 255, .62), transparent 25%),
    radial-gradient(circle at 92% 18%, rgba(205, 238, 255, .68), transparent 25%),
    radial-gradient(circle at 78% 78%, rgba(211, 244, 230, .58), transparent 28%),
    radial-gradient(circle at 18% 88%, rgba(255, 218, 229, .55), transparent 24%);
  background-attachment: fixed;
  background-size: 125% 125%;
  animation: pastel-atmosphere 24s ease-in-out infinite alternate;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .42;
  background-image: radial-gradient(rgba(93, 82, 166, .18) .7px, transparent .7px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

@keyframes pastel-atmosphere {
  0% { background-position: 0% 0%, 100% 0%, 100% 100%, 0% 100%; }
  100% { background-position: 9% 7%, 91% 9%, 93% 89%, 8% 92%; }
}

@keyframes paper-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-.35deg); }
  50% { transform: translate3d(0, -8px, 0) rotate(.35deg); }
}

header {
  background: rgba(255, 250, 254, .78) !important;
  border-bottom: 1px solid rgba(93, 82, 166, .10) !important;
  box-shadow: 0 8px 30px rgba(83, 68, 129, .05);
}

.nav-links a::after { background: linear-gradient(90deg, #6e61b5, #e390ae) !important; }
.nav-links a:hover { color: #55499e !important; }

.btn-primary,
button.btn-primary,
.auth-submit-btn,
.reader-btn-primary {
  background: linear-gradient(135deg, #6658ae, #7d70bd) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 9px 22px rgba(93, 82, 166, .22) !important;
  transition: transform .28s cubic-bezier(.16, 1, .3, 1), box-shadow .28s ease, filter .28s ease !important;
}

.btn-primary:hover,
button.btn-primary:hover,
.auth-submit-btn:hover,
.reader-btn-primary:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 15px 28px rgba(93, 82, 166, .29) !important;
  filter: saturate(1.08) brightness(1.03);
}

.btn-secondary,
.btn-google-auth,
.reader-btn-secondary {
  background: rgba(255, 255, 255, .72) !important;
  border-color: rgba(93, 82, 166, .22) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 5px 16px rgba(71, 59, 111, .06);
  transition: transform .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease !important;
}

.btn-secondary:hover,
.btn-google-auth:hover,
.reader-btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--pastel-lilac) !important;
  border-color: rgba(93, 82, 166, .38) !important;
  box-shadow: 0 11px 22px rgba(71, 59, 111, .11);
}

a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(93, 82, 166, .28) !important;
  outline-offset: 3px;
}

input, textarea, select, .form-control, .search-input {
  background: rgba(255, 255, 255, .76) !important;
  border-color: rgba(93, 82, 166, .17) !important;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease !important;
}

input:focus, textarea:focus, select:focus, .form-control:focus, .search-input:focus {
  background: #fff !important;
  border-color: #8b7acb !important;
  box-shadow: 0 0 0 4px rgba(139, 122, 203, .12) !important;
}

/* Landing: a learning sheet floating through a pastel editorial field. */
.lp-hero {
  background:
    linear-gradient(115deg, rgba(238, 232, 255, .82), rgba(228, 243, 255, .48) 48%, rgba(255, 233, 223, .62)) !important;
}
.lp-hero::after { border-color: rgba(93, 82, 166, .13) !important; }
.lp-reading-sheet {
  background: rgba(255, 255, 255, .83) !important;
  border-color: rgba(93, 82, 166, .18) !important;
  box-shadow: 0 28px 70px rgba(88, 73, 132, .16) !important;
  animation: paper-float 8s ease-in-out infinite;
}
.lp-offer-panel {
  background: linear-gradient(145deg, rgba(255,255,255,.84), rgba(238,232,255,.68)) !important;
  border-color: rgba(93,82,166,.16) !important;
}
.lp-offer-row:hover { background: rgba(255,255,255,.72) !important; }
.lp-hero h1 em::after { background: linear-gradient(90deg, #8a78cb, #e89db6) !important; }
.lp-intro, .lp-process { background: rgba(255, 255, 255, .45) !important; }
.lp-paths { background: linear-gradient(135deg, var(--pastel-lilac), var(--pastel-sky)) !important; }
.lp-choose { background: linear-gradient(135deg, var(--pastel-butter), var(--pastel-peach)) !important; }
.lp-catalog { background: rgba(255, 250, 254, .70) !important; }
.lp-about { background: linear-gradient(145deg, var(--pastel-mint), var(--pastel-sky)) !important; }
.lp-contact { background: linear-gradient(135deg, #6658ae, #7d70bd) !important; }

/* Contrast repair: these components were dark in the base theme. Their text
   must be reset when the pastel layer makes the surface light. */
.lp-path-card,
.lp-path-card h3,
.lp-path-card .lp-card-kicker,
.lp-path-card > p:not(.lp-card-kicker),
.lp-path-card .lp-path-number,
.lp-path-card .lp-path-link,
.service-path,
.service-path .service-path-title > p,
.service-path .service-path-title h2,
.service-path .service-lede,
.service-path .service-columns h3,
.service-path .service-columns p,
.service-path .service-columns li,
.service-path .service-note,
.service-path .service-note p,
.service-path .service-text-link {
  color: var(--text-primary) !important;
}
.lp-path-card .lp-card-kicker,
.lp-path-card > p:not(.lp-card-kicker),
.service-path .service-path-title > p,
.service-path .service-lede,
.service-path .service-columns p,
.service-path .service-columns li,
.service-path .service-note p { opacity: .72 !important; }
.service-path .service-note { background: rgba(255,255,255,.46) !important; border-color: rgba(93,82,166,.38) !important; }

.lp-catalog .lp-catalog-heading h2,
.lp-catalog .lp-catalog-heading .lp-section-index,
.lp-catalog .lp-catalog-heading > p:last-child { color: var(--text-primary) !important; }
.lp-catalog .catalog-toolbar { border-color: var(--border-color) !important; }
.lp-catalog .tab-btn { border-color: rgba(93,82,166,.22) !important; color: var(--text-secondary) !important; }
.lp-catalog .tab-btn.active { color: #fff !important; }
.lp-catalog .search-input { color: var(--text-primary) !important; }
.lp-catalog .search-input::placeholder { color: var(--text-muted) !important; }
.lp-catalog .search-icon { color: var(--text-muted) !important; }

.lp-contact h2,
.lp-contact > .lp-shell > div > .lp-section-index,
.lp-contact .lp-contact-direct,
.lp-contact .lp-contact-direct a { color: #fff !important; }
.lp-contact > .lp-shell > div > .lp-section-index::before { background: rgba(255,255,255,.72) !important; }
.lp-enquiry-form { background: rgba(255,255,255,.94) !important; border-radius: 18px; box-shadow: 0 20px 45px rgba(42,31,78,.18) !important; }
.lp-enquiry-form label, .lp-enquiry-submit p { color: var(--text-secondary) !important; }

.lp-path-card,
.lp-choice-card,
.resource-card,
.lp-faculty-card,
.blog-card,
.metric-card,
.chart-card,
.publish-form-card,
.publish-recent-card,
.comment-form-card,
.comment-item,
.admin-faculty-item {
  border: 1px solid rgba(93, 82, 166, .12) !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 24px rgba(70, 57, 110, .07) !important;
  transition: transform .32s cubic-bezier(.16, 1, .3, 1), box-shadow .32s ease, border-color .32s ease, background .32s ease !important;
}

/* Keep the catalog calm at rest; the existing pastel palette appears on intent. */
.lp-path-card,
.lp-choice-card,
.resource-card,
.lp-faculty-card,
.blog-card,
.format-grid article {
  background: #fff !important;
}

.lp-path-card:nth-child(4n + 1):is(:hover, :focus-visible, :focus-within),
.resource-card:nth-child(4n + 1):is(:hover, :focus-visible, :focus-within),
.blog-card:nth-child(3n + 1):is(:hover, :focus-visible, :focus-within),
.format-grid article:nth-child(3n + 1):is(:hover, :focus-within) { background: rgba(238, 232, 255, .92) !important; }

.lp-path-card:nth-child(4n + 2):is(:hover, :focus-visible, :focus-within),
.resource-card:nth-child(4n + 2):is(:hover, :focus-visible, :focus-within),
.blog-card:nth-child(3n + 2):is(:hover, :focus-visible, :focus-within),
.format-grid article:nth-child(3n + 2):is(:hover, :focus-within) { background: rgba(228, 243, 255, .94) !important; }

.lp-path-card:nth-child(4n + 3):is(:hover, :focus-visible, :focus-within),
.resource-card:nth-child(4n + 3):is(:hover, :focus-visible, :focus-within),
.blog-card:nth-child(3n + 3):is(:hover, :focus-visible, :focus-within),
.format-grid article:nth-child(3n):is(:hover, :focus-within) { background: rgba(227, 247, 239, .94) !important; }

.lp-path-card:nth-child(4n):is(:hover, :focus-visible, :focus-within),
.resource-card:nth-child(4n):is(:hover, :focus-visible, :focus-within) { background: rgba(255, 233, 223, .94) !important; }

.lp-choice-card:nth-child(odd):is(:hover, :focus-within),
.lp-faculty-card:nth-child(odd):is(:hover, :focus-within) { background: rgba(238, 232, 255, .92) !important; }

.lp-choice-card:nth-child(even):is(:hover, :focus-within),
.lp-faculty-card:nth-child(even):is(:hover, :focus-within) { background: rgba(253, 231, 240, .92) !important; }

/* Card rhythm and alignment */
.lp-path-grid,
.lp-choice-grid,
.resources-grid,
.blog-grid,
.lp-faculty-grid,
.format-grid { align-items: stretch; }

.lp-path-card {
  display: flex;
  flex-direction: column;
  min-height: 390px !important;
  padding: 34px !important;
}
.lp-path-card .lp-card-kicker { margin-bottom: 14px !important; }
.lp-path-card > p:not(.lp-card-kicker) { margin-bottom: 28px; }
.lp-path-card .lp-path-link {
  position: static !important;
  width: 100%;
  margin-top: auto;
}

.lp-choice-card { display: flex; flex-direction: column; }
.lp-choice-card > a { margin-top: auto !important; padding-top: 28px; align-self: flex-start; }

.resource-card { height: 100%; min-width: 0; }
.resource-img-wrapper { height: 270px !important; }
.resource-badge {
  position: static !important;
  align-self: flex-start;
  max-width: 100%;
  margin-bottom: 16px;
  background: rgba(255,255,255,.92) !important;
  color: var(--text-primary) !important;
  border-color: rgba(74,65,118,.18) !important;
  border-radius: 999px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resource-content { min-width: 0; padding: 26px 24px 24px !important; }
.resource-title { min-height: 3.05em; height: auto !important; margin-bottom: 12px !important; line-height: 1.28 !important; }
.resource-desc { min-height: 4.8em; height: auto !important; margin-bottom: 16px !important; -webkit-line-clamp: 3 !important; }
.resource-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 25px; margin-bottom: 12px; }
.resource-footer { gap: 14px; min-height: 56px; padding-top: 16px !important; }
.btn-card-action { min-height: 38px; white-space: nowrap; }

.blog-card { height: 100%; min-width: 0; }
.blog-card-title { min-height: 3.5em; }
.blog-card-excerpt { min-height: 4.8em; }
.format-grid article { height: 100%; }

.lp-faculty-card { height: 100%; min-height: 430px !important; grid-template-columns: minmax(180px,.82fr) minmax(0,1.18fr) !important; }
.lp-faculty-portrait { min-width: 0; overflow: hidden; }
.lp-faculty-portrait img { width: 100%; height: 100%; object-position: center top; }
.lp-faculty-content { min-width: 0; height: 100%; }
.lp-faculty-content h3 { overflow-wrap: anywhere; }
.lp-faculty-tags { margin-bottom: 18px; }

.lp-faculty-grid.is-single-profile { grid-template-columns: 1fr; }
.lp-faculty-grid.is-single-profile .lp-faculty-card {
  height: auto;
  min-height: 0 !important;
  grid-template-columns: 340px minmax(0, 1fr) !important;
}
.lp-faculty-grid.is-single-profile .lp-faculty-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  align-self: start;
}
.lp-faculty-grid.is-single-profile .lp-faculty-portrait img {
  position: absolute;
  inset: 0;
  object-position: center 65%;
}
.lp-faculty-grid.is-single-profile .lp-faculty-content {
  height: auto;
  padding: 20px 28px;
}
.lp-faculty-grid.is-single-profile .lp-faculty-content h3 {
  margin: 6px 0 10px;
  font-size: 2.5rem;
}
.lp-faculty-grid.is-single-profile .lp-faculty-content > p:not(.lp-card-kicker) {
  line-height: 1.5;
}
.lp-faculty-grid.is-single-profile .lp-faculty-tags {
  gap: 4px;
  margin: 12px 0 0;
}
.lp-faculty-grid.is-single-profile .lp-faculty-tags span { padding: 4px 7px; }
.lp-faculty-grid.is-single-profile .lp-faculty-content > a { padding-top: 12px; }

.lp-path-card:hover,
.lp-choice-card:hover,
.resource-card:hover,
.lp-faculty-card:hover,
.blog-card:hover,
.metric-card:hover,
.chart-card:hover,
.admin-faculty-item:hover {
  transform: translateY(-7px) rotate(.18deg) !important;
  border-color: rgba(93, 82, 166, .30) !important;
  box-shadow: 0 20px 42px rgba(70, 57, 110, .14) !important;
}

/* Landing card interactions: icons make each learning path recognizable,
   while motion stays focused on the card being considered. */
.lp-path-card:hover,
.lp-path-card:focus-visible,
.lp-choice-card:hover,
.lp-choice-card:focus-within {
  transform: translateY(-8px) !important;
}

.lp-path-link > span {
  display: inline-block;
  transition: transform .32s cubic-bezier(.16, 1, .3, 1);
}

.lp-path-card:hover .lp-path-link > span,
.lp-path-card:focus-visible .lp-path-link > span {
  transform: translate(4px, -4px);
}

.lp-path-card:focus-visible,
.lp-choice-card:focus-within {
  outline: 3px solid rgba(101, 88, 171, .42);
  outline-offset: 4px;
}

.lp-choice-card > a::after {
  content: ' ↗';
  display: inline-block;
  transition: transform .32s cubic-bezier(.16, 1, .3, 1);
}

.lp-choice-card:hover > a::after,
.lp-choice-card:focus-within > a::after {
  transform: translate(3px, -3px);
}

.resource-card img, .blog-card img, .lp-faculty-card img {
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), filter .5s ease !important;
}
.resource-card:hover img, .blog-card:hover img, .lp-faculty-card:hover img {
  transform: scale(1.045) !important;
  filter: saturate(1.08) !important;
}

.tab-btn:hover, .services-jump a:hover, .category-filter:hover {
  background: var(--pastel-lilac) !important;
  color: #514597 !important;
  transform: translateY(-2px);
}
.tab-btn.active, .category-filter.active { background: #6558ab !important; color: #fff !important; }

/* Services and editorial pages */
.services-hero, .blog-hero, .library-hero {
  background:
    linear-gradient(rgba(93, 82, 166, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 82, 166, .045) 1px, transparent 1px),
    linear-gradient(135deg, var(--pastel-lilac), var(--pastel-sky)) !important;
  background-size: 44px 44px, 44px 44px, auto !important;
}
.service-path {
  background: #fff !important;
  transition: background .32s ease;
}
#study-abroad:is(:hover, :focus-within) { background: var(--pastel-lilac) !important; }
#school-subjects:is(:hover, :focus-within) { background: var(--pastel-sky) !important; }
#business-communication:is(:hover, :focus-within) { background: var(--pastel-mint) !important; }
#church-workshops:is(:hover, :focus-within) { background: var(--pastel-peach) !important; }
.format-grid > *, .faq-item { transition: transform .25s ease, background .25s ease, box-shadow .25s ease; }
.format-grid > *:hover, .faq-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* Authentication and library */
.auth-page { background: linear-gradient(135deg, var(--pastel-lilac), var(--pastel-sky) 52%, var(--pastel-mint)) !important; }
.auth-brand-panel {
  background: linear-gradient(145deg, #ded5ff, #d8efff 55%, #dff6ed) !important;
  color: var(--text-primary) !important;
}
.auth-brand-panel h1, .auth-brand-panel p, .auth-feature-item, .auth-feature-list li, .auth-mini-card-text strong, .auth-mini-card-text span { color: var(--text-primary) !important; }
.auth-brand-logo img { filter: none !important; }
.auth-feature-list li .feat-icon { background: rgba(255,255,255,.68) !important; }
.auth-form-panel { background: rgba(255, 252, 255, .88) !important; backdrop-filter: blur(18px); }
.auth-mini-card { background: rgba(255,255,255,.68) !important; border-color: rgba(93,82,166,.14) !important; }
.auth-mini-card:hover { transform: translateY(-5px) rotate(-.5deg); box-shadow: var(--shadow-md); }
/* Admin pages keep operational density, with softer surfaces. */
.sidebar { background: linear-gradient(180deg, #eee8ff, #e4f3ff) !important; color: var(--text-primary) !important; }
.sidebar .nav-item { color: var(--text-secondary) !important; border-radius: 12px; }
.sidebar .nav-item:hover { background: rgba(255,255,255,.62) !important; transform: translateX(4px); }
.sidebar .nav-item.active { background: rgba(255,255,255,.88) !important; color: #52469a !important; box-shadow: var(--shadow-sm); }
.admin-main, .panel-body { background: transparent !important; }
.admin-header { background: rgba(255,250,254,.84) !important; backdrop-filter: blur(18px); }
.metric-card:nth-child(4n + 1) { background: var(--pastel-lilac) !important; }
.metric-card:nth-child(4n + 2) { background: var(--pastel-sky) !important; }
.metric-card:nth-child(4n + 3) { background: var(--pastel-mint) !important; }
.metric-card:nth-child(4n) { background: var(--pastel-peach) !important; }
.chart-card, .publish-form-card, .publish-recent-card { background: rgba(255,255,255,.78) !important; }
.modal-overlay { background: rgba(49, 42, 75, .38) !important; backdrop-filter: blur(8px); }
.modal-container { background: rgba(255, 252, 255, .96) !important; border: 1px solid rgba(93,82,166,.16) !important; box-shadow: var(--shadow-lg) !important; }

footer { background: linear-gradient(135deg, #3f385f, #514778) !important; }
footer a { transition: color .2s ease, transform .2s ease; }
footer a:hover { color: #f8d7e4 !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  body { background-position: initial !important; }
}

@media (max-width: 720px) {
  body { background-attachment: scroll; background-size: 180% 180%; }
  .lp-reading-sheet { animation-duration: 10s; }
  .lp-path-card:hover, .lp-choice-card:hover, .resource-card:hover, .blog-card:hover { transform: translateY(-3px) !important; }
  .resource-img-wrapper { height: 240px !important; }
  .resource-title, .resource-desc, .blog-card-title, .blog-card-excerpt { min-height: 0; }
  .resource-footer { align-items: stretch; flex-direction: column; }
  .btn-card-action { width: 100%; }
  .lp-faculty-card { grid-template-columns: 1fr !important; }
  .lp-faculty-grid.is-single-profile .lp-faculty-card { grid-template-columns: 1fr !important; }
  .lp-faculty-portrait { min-height: 360px !important; max-height: 460px; }
  .lp-faculty-grid.is-single-profile .lp-faculty-portrait {
    width: min(100%, 360px);
    min-height: 0 !important;
    max-height: none;
    justify-self: center;
  }
}
