/* ==========================================================================
   KCC Online Admission — applicant landing (campus.php)
   --------------------------------------------------------------------------
   Loaded ONLY by campus.php, so everything here is safe to scope loosely.

   Two constraints shaped this file:
   1. campus.php sends `Content-Security-Policy: default-src 'self'` — no
      external font hosts, no reliable inline <style>. Hence: system-serif
      display stack, and every rule lives here rather than in the page.
   2. `/img/` is excluded from the deploy, so no photographic hero is
      available. The background is built entirely from gradients + an inline
      SVG grain (allowed by `img-src 'self' data:`).
   ========================================================================== */

/* Navy and gold are sampled from the KCC emblem itself (img/sscLogo.png):
   #002060 and #F0E0A0 are its two dominant colours. The darker and lighter
   steps exist only to give the hero gradient depth. */
:root {
  --adm-navy-900: #00102e;
  --adm-navy-800: #002060;
  --adm-navy-700: #0d3277;
  --adm-navy-600: #16428c;
  --adm-gold-400: #e6c874;
  --adm-gold-300: #f0e0a0;
  --adm-paper: #f7f3ea;
  --adm-paper-70: rgba(247, 243, 234, .70);
  --adm-paper-45: rgba(247, 243, 234, .45);
  --adm-hairline: rgba(247, 243, 234, .16);

  --adm-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua",
                 Palatino, Georgia, "Times New Roman", serif;
  --adm-ui: "Segoe UI", ui-sans-serif, "Helvetica Neue", "Liberation Sans",
            "DejaVu Sans", sans-serif;

  --adm-ease: cubic-bezier(.22, .61, .36, 1);
}

/* --- page shell -------------------------------------------------------- */

.adm-landing,
.adm-landing .wrapper,
.adm-landing .content-wrapper {
  background: var(--adm-navy-900) !important;
}

.adm-landing .content-wrapper {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0;
}

/* Top navbar: dissolve it into the hero instead of a white bar on navy. */
.adm-landing .main-header.navbar {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--adm-hairline) !important;
  box-shadow: none !important;
  position: relative;
  z-index: 3;
  padding-top: .65rem;
  padding-bottom: .65rem;
}

.adm-landing .main-header .navbar-brand,
.adm-landing .main-header .brand-text {
  color: var(--adm-paper) !important;
  letter-spacing: .01em;
}

.adm-landing .main-header .brand-text {
  font-size: 1rem !important;
  font-weight: 600;
}

.adm-landing .main-header .brand-image {
  height: 38px !important;
  width: 38px !important;
  margin-right: .6rem;
  opacity: .95;
}

/* --- hero -------------------------------------------------------------- */

.adm-hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 66px);
  display: flex;
  align-items: center;
  padding: 3.5rem 0 4.5rem;
  isolation: isolate;
}

/* Layered light: a warm shaft from the upper right, cool depth lower left. */
.adm-hero__veil,
.adm-hero__grain,
.adm-hero__seal {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.adm-hero__veil {
  z-index: -3;
  background:
    radial-gradient(120% 90% at 88% 4%, rgba(230, 179, 82, .30) 0%, rgba(230, 179, 82, 0) 55%),
    radial-gradient(90% 80% at 8% 100%, rgba(27, 64, 118, .70) 0%, rgba(27, 64, 118, 0) 60%),
    linear-gradient(158deg, var(--adm-navy-800) 0%, var(--adm-navy-900) 48%, #030c1d 100%);
}

/* Fine diagonal pinstripe — reads as texture, not pattern, at 3% alpha. */
.adm-hero__veil::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    115deg,
    rgba(247, 243, 234, .035) 0px,
    rgba(247, 243, 234, .035) 1px,
    transparent 1px,
    transparent 9px
  );
}

.adm-hero__grain {
  z-index: -2;
  opacity: .30;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Oversized ghost seal, bled off the right edge — grid-breaking anchor. */
.adm-hero__seal {
  z-index: -1;
  left: auto;
  right: -14vw;
  top: 50%;
  width: 60vw;
  height: 60vw;
  max-width: 760px;
  max-height: 760px;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 1px solid rgba(230, 179, 82, .14);
  box-shadow:
    inset 0 0 0 1px rgba(230, 179, 82, .06),
    inset 0 0 0 60px rgba(230, 179, 82, .022),
    inset 0 0 0 61px rgba(230, 179, 82, .10);
}

.adm-hero__inner {
  position: relative;
  z-index: 2;
}

/* --- editorial copy ---------------------------------------------------- */

.adm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 1.4rem;
  font-family: var(--adm-ui);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--adm-gold-300);
}

.adm-eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--adm-gold-400);
  box-shadow: 0 0 0 0 rgba(230, 179, 82, .65);
  animation: adm-pulse 2.6s var(--adm-ease) infinite;
}

@keyframes adm-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(230, 179, 82, .55); }
  70%  { box-shadow: 0 0 0 11px rgba(230, 179, 82, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 179, 82, 0); }
}

/* Sized for the full institution name. The previous scale was built for the
   13-character "Your college,"; at that size a 32-character name wrapped badly
   and the tagline competed with it instead of supporting it. */
.adm-title {
  margin: 0 0 1.3rem;
  font-family: var(--adm-display);
  font-weight: 400;
  font-size: clamp(1.95rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -.015em;
  color: var(--adm-paper);
}

.adm-title em {
  display: block;
  margin-top: .7rem;
  font-size: clamp(.95rem, 1.7vw, 1.28rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .005em;
  color: var(--adm-gold-300);
}

.adm-lede {
  max-width: 34rem;
  margin: 0 0 2.9rem;
  font-family: var(--adm-ui);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.65;
  color: var(--adm-paper-70);
}

/* --- level cards ------------------------------------------------------- */

.adm-levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  max-width: 62rem;
}

.adm-level {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 13.5rem;
  padding: 1.6rem 1.5rem 1.35rem;
  overflow: hidden;
  text-decoration: none !important;
  background: rgba(247, 243, 234, .045);
  border: 1px solid var(--adm-hairline);
  border-radius: 3px;
  backdrop-filter: blur(2px);
  transition:
    transform .45s var(--adm-ease),
    background-color .45s var(--adm-ease),
    border-color .45s var(--adm-ease),
    box-shadow .45s var(--adm-ease);
}

/* Gold rule that draws itself across the card top on hover. */
.adm-level__rule {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--adm-gold-400), var(--adm-gold-300));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .5s var(--adm-ease);
}

.adm-level__icon {
  margin-bottom: 1.5rem;
  font-size: 1.45rem;
  color: var(--adm-gold-400);
  transition: transform .45s var(--adm-ease);
}

.adm-level__body {
  display: flex;
  flex-direction: column;
}

.adm-level__kicker {
  font-family: var(--adm-ui);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--adm-paper-45);
}

.adm-level__name {
  margin-top: .3rem;
  font-family: var(--adm-display);
  font-size: 1.6rem;
  line-height: 1.15;
  color: var(--adm-paper);
}

.adm-level__go {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: auto;
  padding-top: 1.1rem;
  font-family: var(--adm-ui);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--adm-paper-45);
  transition: color .35s var(--adm-ease);
}

.adm-level__go i {
  transition: transform .45s var(--adm-ease);
}

.adm-level:hover,
.adm-level:focus-visible {
  transform: translateY(-6px);
  background: rgba(247, 243, 234, .085);
  border-color: rgba(230, 179, 82, .40);
  box-shadow: 0 22px 48px -26px rgba(0, 0, 0, .85);
}

.adm-level:hover .adm-level__rule,
.adm-level:focus-visible .adm-level__rule { transform: scaleX(1); }

.adm-level:hover .adm-level__icon,
.adm-level:focus-visible .adm-level__icon { transform: translateY(-3px); }

.adm-level:hover .adm-level__go,
.adm-level:focus-visible .adm-level__go { color: var(--adm-gold-300); }

.adm-level:hover .adm-level__go i,
.adm-level:focus-visible .adm-level__go i { transform: translateX(5px); }

.adm-level:focus-visible {
  outline: 2px solid var(--adm-gold-400);
  outline-offset: 3px;
}

.adm-note {
  margin: 2.4rem 0 0;
  font-family: var(--adm-ui);
  font-size: .84rem;
  color: var(--adm-paper-45);
}

.adm-note i { margin-right: .45rem; color: var(--adm-gold-400); }

/* --- returning applicants ------------------------------------------------
   Applicants who already registered previously had no way in: the page only
   offered "begin application" per level, and login.php refuses to render
   without a level in the URL. This is their door.
   ----------------------------------------------------------------------- */

.adm-return {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: 62rem;
  margin: 2.4rem 0 0;
  padding: 1.05rem 1.35rem;
  background: rgba(247, 243, 234, .045);
  border: 1px solid var(--adm-hairline);
  border-left: 3px solid var(--adm-gold-400);
  border-radius: 3px;
}

.adm-return__text {
  font-family: var(--adm-ui);
  font-size: .9rem;
  line-height: 1.6;
}

.adm-return__text strong {
  display: block;
  margin-bottom: .12rem;
  font-weight: 600;
  color: var(--adm-paper);
}

.adm-return__text span {
  color: var(--adm-paper-70);
}

.adm-return__btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex: none;
  padding: .6rem 1.25rem;
  font-family: var(--adm-ui);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--adm-navy-800) !important;
  text-decoration: none !important;
  background: var(--adm-gold-300);
  border-radius: 3px;
  transition: background-color .35s var(--adm-ease), transform .35s var(--adm-ease);
}

.adm-return__btn:hover,
.adm-return__btn:focus-visible {
  background: #fff;
  transform: translateY(-2px);
}

.adm-return__btn:focus-visible {
  outline: 2px solid var(--adm-gold-400);
  outline-offset: 3px;
}

/* --- entrance ---------------------------------------------------------- */

.adm-reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: adm-rise .85s var(--adm-ease) forwards;
}

.adm-reveal-1 { animation-delay: .05s; }
.adm-reveal-2 { animation-delay: .15s; }
.adm-reveal-3 { animation-delay: .25s; }
.adm-reveal-4 { animation-delay: .35s; }
.adm-reveal-5 { animation-delay: .45s; }
.adm-reveal-6 { animation-delay: .55s; }
.adm-reveal-7 { animation-delay: .68s; }

@keyframes adm-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* --- responsive -------------------------------------------------------- */

@media (max-width: 991.98px) {
  .adm-levels { grid-template-columns: 1fr 1fr; }
  .adm-hero__seal { opacity: .55; right: -32vw; }
}

@media (max-width: 767.98px) {
  .adm-hero {
    /* Still fill the screen so the gradient does not stop short and leave a
       flat band of body colour under the fold. */
    min-height: calc(100vh - 58px);
    padding: 2.5rem 0 3rem;
    align-items: flex-start;
  }
  .adm-levels { grid-template-columns: 1fr; gap: .85rem; }
  .adm-return { flex-direction: column; align-items: stretch; gap: .9rem; }
  .adm-return__btn { justify-content: center; }
  .adm-level {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 1.1rem;
    padding: 1.1rem 1.15rem;
  }
  .adm-level__icon { margin-bottom: 0; font-size: 1.25rem; }
  .adm-level__name { font-size: 1.25rem; }
  .adm-level__go { display: none; }
  .adm-hero__seal { display: none; }
  .adm-landing .main-header .brand-text { font-size: .85rem !important; }
}

/* --- accessibility ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .adm-reveal { opacity: 1; transform: none; animation: none; }
  .adm-eyebrow__dot { animation: none; }
  .adm-level,
  .adm-level__rule,
  .adm-level__icon,
  .adm-level__go i { transition: none; }
  .adm-level:hover { transform: none; }
}
