/* ── Local Blacksword Font ── */
@font-face {
  font-family: 'Blacksword';
  src: url('../fonts/Blacksword.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ═══════════════════════════════════════════════════════
   TAILORED BAY — Landing Page CSS
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow-x: hidden; }
body {
  font-family: 'Open Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Fallback matches the darkest point of the gradient */
  background: #04000a;
}

/* ══════════════════════════════════════════════════════
   STATIC CODED GRADIENT BACKGROUND
   Precisely matched to Background.png:
   - Purple covers 45% width, 92% height from top-left
   - Blue covers 37% width, 76% height from bottom-right
   - Both colours use accent hues amplified from raw samples
   ══════════════════════════════════════════════════════ */
#landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  /* overflow: hidden removed — was clipping the footer */
}

.landing-bg {
  position: fixed; inset: 0; z-index: 0;
  background-color: #020001;
}

/* Purple — anchored top-left, stretches 45% across & 92% down.
   Using amplified purple #aa2ca5 tones to match hue of Background.png */
.landing-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(
    ellipse 90% 185% at -5% -5%,
    rgba(170, 44, 165, 0.82)  0%,
    rgba(130, 28, 125, 0.65) 18%,
    rgba( 85, 12,  82, 0.45) 32%,
    rgba( 50,  6,  48, 0.28) 45%,
    rgba( 22,  2,  20, 0.12) 58%,
    transparent               100%
  );
}

/* Blue — anchored bottom-right, stretches 37% from right & 76% from bottom.
   Using amplified blue #05afff tones to match hue of Background.png */
.landing-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(
    ellipse 74% 152% at 105% 105%,
    rgba(  5, 175, 255, 0.78)  0%,
    rgba(  3, 135, 210, 0.60) 18%,
    rgba(  1,  90, 155, 0.42) 32%,
    rgba(  0,  55, 100, 0.25) 45%,
    rgba(  0,  25,  50, 0.10) 60%,
    transparent                100%
  );
}

/* ── Header ── */
.landing-header {
  position: relative; z-index: 10;
  padding: 1.5rem 5% 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  text-align: center;
}
.landing-logo {
  height: 54px; width: auto;
  object-fit: contain;
}

/* ── Hero text ── */
/* ── Blacksword spans inside hero h1 ── */
.landing-hero h1 .blacksword {
  font-family: 'Blacksword', cursive;
  font-weight: normal;
  font-style: normal;
  letter-spacing: 2px;
}

.landing-hero {
  position: relative; z-index: 10;
  text-align: center;
  padding: 0.5rem 5% 0.56rem;
}
.landing-hero h1 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.375rem, 3.125vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.landing-hero h1 .purple { color: #b040bb; }
.landing-hero h1 .blue   { color: #05afff; }

/* ── Mobile line break in hero h1 ── */
.mobile-break { display: none; }
.landing-hero p {
  color: rgba(255,255,255,0.5);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto;
  font-family: 'Open Sans', sans-serif;
}

/* ── Cards wrapper ── */
.choices {
  position: relative; z-index: 10;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.375rem;
  padding: 0 5% 4rem;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════
   GLASSMORPHISM CHOICE CARDS
   Key fix: backdrop-filter on ::after pseudo-element
   NOT on the card itself — prevents blur on 3D tilt
   ══════════════════════════════════════════ */
.choice-card {
  position: relative;
  width: 432px;
  min-height: 575px;
  border-radius: 22px;
  padding: 2.7rem 2.5rem 0.36rem;
  text-decoration: none; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  cursor: pointer;

  /* 3D tilt — NO transform-style:preserve-3d here as it forces
     a new stacking context that breaks backdrop-filter anyway.
     The tilt JS applies rotateX/Y directly and it works fine. */
  will-change: transform;

  /* NO backdrop-filter here — moved to ::after pseudo-element */
  background: rgba(255,255,255,0.06);

  /* Uniform 1.5px border — identical at rest and on hover */
  border: 1.5px solid rgba(255,255,255,0.13);

  opacity: 0;
  transition:
    opacity 1.4s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease,
    background 0.4s ease;
}

/* ── Glass blur pseudo-element — stays behind all content ── */
/* This is the KEY fix: backdrop-filter on a child pseudo-element
   is unaffected by the parent's 3D transform, so content stays sharp */
.choice-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 0;
  pointer-events: none;
}

/* Slide-in: transform included during entrance only */
.choice-card.slide-transitioning {
  transition:
    opacity 1.4s ease,
    transform 1.4s cubic-bezier(0.22,1,0.36,1),
    box-shadow 0.4s ease,
    border-color 0.4s ease,
    background 0.4s ease;
}

/* Smooth tilt return */
.choice-card.tilt-reset {
  transition:
    opacity 1.4s ease,
    transform 0.55s cubic-bezier(0.22,1,0.36,1),
    box-shadow 0.4s ease,
    border-color 0.4s ease,
    background 0.4s ease;
}

/* ── Floating bounce animation ── */
/* Each card gets its own named animation so they alternate */
@keyframes floatEng {
  0%,  100% { transform: translateY(0px);   }
  50%        { transform: translateY(-14px); }
}
@keyframes floatDig {
  0%,  100% { transform: translateY(-14px); }
  50%        { transform: translateY(0px);   }
}

/* Applied only when card is visible and NOT being hovered or tilted */
.choice-card.engineering.floating { animation: floatEng 3s ease-in-out infinite; }
.choice-card.digital.floating     { animation: floatDig 3s ease-in-out infinite; }

/* Pause float when hovered — JS tilt takes over */
.choice-card:hover { animation-play-state: paused; }

/* Engineering slides from LEFT */
.choice-card.engineering { transform: translateX(-120px); }
/* Digital slides from RIGHT */
.choice-card.digital     { transform: translateX(120px); }

.choice-card.visible { opacity: 1; }
.choice-card.visible.slide-transitioning {
  transform: translateX(0);
}

/* Hover — border colour change only, thickness stays 1.5px */
.choice-card:hover {
  background: rgba(255,255,255,0.09);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.choice-card.engineering:hover {
  border-color: rgba(5,175,255,0.7);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 60px rgba(5,175,255,0.2);
}
.choice-card.digital:hover {
  border-color: rgba(176,64,187,0.7);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 60px rgba(176,64,187,0.2);
}

/* ── Card background photo ── */
.card-photo {
  position: absolute;
  top: 0; left: 0; right: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  opacity: 0.72;
  transition: opacity 0.5s ease;
  z-index: 1;
}
.choice-card:hover .card-photo { opacity: 0.90; }

/* Bottom fade gradient — text readability */
.choice-card::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 48%;
  background: linear-gradient(
    to top,
    rgba(4,0,10,0.97)  0%,
    rgba(4,0,10,0.92)  30%,
    rgba(4,0,10,0.55)  65%,
    transparent         100%
  );
  pointer-events: none;
  z-index: 2;   /* above photo, below content */
}

/* Coloured top-edge glow line */
.card-glow-line {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s ease;
  z-index: 4;
}
.engineering .card-glow-line { background: linear-gradient(90deg, transparent, #05afff, transparent); }
.digital     .card-glow-line { background: linear-gradient(90deg, transparent, #b040bb, transparent); }
.choice-card:hover .card-glow-line { transform: scaleX(1); }

/* ── Card content — must sit above all pseudo-elements ── */
.card-content { position: relative; z-index: 3; }

/* "Tailored Bay" in Blacksword — normal weight (the font has no bold variant) */
.card-title-script {
  font-family: 'Blacksword', cursive;
  font-size: 2.8rem;
  font-weight: normal;    /* Blacksword is a display face — no bold */
  font-style: normal;
  line-height: 1.1;
  letter-spacing: 1.5px;
  display: block;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,0.7);
}

/* Department name — bold uppercase below script */
.card-title-dept {
  font-family: 'Oswald', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  display: block;
  margin-top: 0.1rem;
  margin-bottom: 0.85rem;
}
.engineering .card-title-dept { color: #05afff; }
.digital     .card-title-dept { color: #b040bb; }

.card-desc {
  font-size: 0.85rem; line-height: 1.65; opacity: 0.65;
  margin-bottom: 1.2rem;
  font-family: 'Open Sans', sans-serif;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.4rem; }
.card-tags span {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.5px;
  padding: 4px 11px; border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  font-family: 'Open Sans', sans-serif;
}
.digital     .card-tags span { border-color: rgba(176,64,187,0.35); }
.engineering .card-tags span { border-color: rgba(5,175,255,0.35); }

.card-enter {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.5px;
  font-family: 'Oswald', sans-serif;
  transition: gap 0.2s;
}
.digital     .card-enter { color: #b040bb; }
.engineering .card-enter { color: #05afff; }
.choice-card:hover .card-enter { gap: 10px; }

/* ── Footer ── */
/* .landing-footer replaced by .main-footer */

/* ── Responsive ── */
@media (max-width: 1060px) {
  .choices { gap: 2.8125rem; }
  /* Both cards same height at 600px */
  .choice-card { width: 380px; min-height: 600px; padding: 2.7rem 2.5rem 0.32rem; }
  /* Engineering: naturally taller image pushes content to right level */
  /* Digital: add padding to description to fill extra height, same visual bottom */
  .choice-card.digital .card-desc { padding-bottom: 2.2rem; }
  .landing-hero { padding: 0.5rem 5% 0.28rem; }
  .card-enter   { margin-bottom: 1.5rem; }
}
@media (max-width: 880px) {
  .choices {
    flex-direction: column; align-items: center;
    padding-bottom: 3rem; gap: 2.25rem;
  }
  /* Engineering: 1% up from image bottom */
  .choice-card.engineering { width: 100%; max-width: 432px; min-height: 575px; padding: 2.7rem 2.5rem 0; }
  /* Digital: same start height, card can be shorter */
  .choice-card.digital     { width: 100%; max-width: 432px; min-height: 545px; padding: 2.7rem 2.5rem 0; }
  .choice-card.engineering,
  .choice-card.digital { transform: translateY(80px); }
  .choice-card.visible.slide-transitioning { transform: translateY(0); }
  .choice-card.engineering.floating,
  .choice-card.digital.floating { animation-name: floatEng; }
  .landing-hero { padding: 0.5rem 5% 2.128rem; }
  .mobile-break { display: inline; }
  .card-enter   { margin-bottom: 1.5rem; }
  /* Remove digital desc extra padding on mobile */
  .choice-card.digital .card-desc { padding-bottom: 0; }
}
@media (max-width: 520px) {
  .choice-card.engineering { min-height: 503px; padding: 2.2rem 1.6rem 0; }
  .choice-card.digital     { min-height: 480px; padding: 2.2rem 1.6rem 0; }
  .card-title-script { font-size: 2.2rem; }
  .card-title-dept   { font-size: 0.9rem; letter-spacing: 3px; }
  .card-enter        { margin-bottom: 1.5rem; }
}
