/* 1. Import the fonts directly via CSS */
@import url('https://fonts.googleapis.com/css2?family=Cabin:ital@1&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

/* 2. Custom Typography Utility Classes */
.raleway-custom {
  font-family: "Raleway", sans-serif;
  font-weight: 400; 
  font-style: normal;
}

.cabin-custom {
  font-family: "Cabin", sans-serif;
  font-weight: 400;
  font-style: italic;
  font-variation-settings: "wdth" 100;
}

/* 3. Global Variables (Dark Mode Only) */
:root {
  --bg-dark: #1d1e1f;
  --surface-dark: #2b2c2d;
  --text-dark: rgba(255, 255, 255, 0.9);
  --accent: #1d87f1;
  --radius: 14px;
}

/* 4. Global Structural Elements (Forced Dark Mode) */
html,
body,
#app {
  background: var(--bg-dark);
  color: var(--text-dark);

  font-family: "Raleway", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  padding: 0;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 5. Login View Styling & Slideshow */
#login {
  position: relative;
  overflow: hidden;
}

/* The Background Layer — scoped to login page only */
#login::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* Slightly oversized so the zoom never reveals a gap at the edges */
  transform-origin: center center;

  will-change: transform, opacity;

  /* 25s total = 5 images at 5s each */
  animation: reverseDollyBg 25s infinite linear;
}

/*
  HOW THE FADE WORKS:
  CSS can't interpolate between background-image values, so we:
    1. Zoom & hold the image with opacity: 1
    2. Fade opacity to 0 (cinematic fade out)
    3. Instantly swap the background-image while opacity is 0 (invisible hard cut)
    4. Fade opacity back to 1 (cinematic fade in)
  Each image gets 5s = 20% of the 25s animation.
  Zoom phase: 4s (16%) | Fade out: 0.5s (2%) | Fade in: 0.5s (2%)
*/
@keyframes reverseDollyBg {

  /* ── Image 1 ── */
  0%     { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/1.jpg"); transform: scale(1.05); opacity: 1; }
  16%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/1.jpg"); transform: scale(1.18); opacity: 1; }
  18%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/1.jpg"); transform: scale(1.18); opacity: 0; }

  /* swap while black */
  18.01% { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/2.jpg"); transform: scale(1.05); opacity: 0; }
  20%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/2.jpg"); transform: scale(1.07); opacity: 1; }

  /* ── Image 2 ── */
  36%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/2.jpg"); transform: scale(1.18); opacity: 1; }
  38%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/2.jpg"); transform: scale(1.18); opacity: 0; }

  38.01% { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/3.jpg"); transform: scale(1.05); opacity: 0; }
  40%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/3.jpg"); transform: scale(1.07); opacity: 1; }

  /* ── Image 3 ── */
  56%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/3.jpg"); transform: scale(1.18); opacity: 1; }
  58%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/3.jpg"); transform: scale(1.18); opacity: 0; }

  58.01% { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/4.jpg"); transform: scale(1.05); opacity: 0; }
  60%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/4.jpg"); transform: scale(1.07); opacity: 1; }

  /* ── Image 4 ── */
  76%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/4.jpg"); transform: scale(1.18); opacity: 1; }
  78%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/4.jpg"); transform: scale(1.18); opacity: 0; }

  78.01% { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/5.jpg"); transform: scale(1.05); opacity: 0; }
  80%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/5.jpg"); transform: scale(1.07); opacity: 1; }

  /* ── Image 5 ── */
  96%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/5.jpg"); transform: scale(1.18); opacity: 1; }
  98%    { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/5.jpg"); transform: scale(1.18); opacity: 0; }

  /* swap back to image 1 to loop */
  98.01% { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/1.jpg"); transform: scale(1.05); opacity: 0; }
  100%   { background-image: url("https://phoenixmedia.mouse-pierce.ts.net:8443/1.jpg"); transform: scale(1.07); opacity: 1; }
}

/* Target the "Phoenix Media" branding title text on the login page */
#login h1,
#login .title {
  font-family: "Cabin", sans-serif !important;
  font-weight: 400 !important;
  font-style: italic !important;
  font-variation-settings: "wdth" 100 !important;
  color: var(--text-dark) !important;
  
  /* Force text to stay on a single line */
  white-space: nowrap !important; 

  /* Translucent background pill for legibility */
  background: rgba(29, 30, 31, 0.70) !important;
  backdrop-filter: blur(6px);
  padding: 2px 12px !important;
  border-radius: 12px !important;
  display: inline-block !important;
  margin-bottom: 20px;
}

/* Ensure all other text on login screen is visible over the backgrounds */
#login h2, 
#login form,
#login p {
  color: var(--text-dark) !important;
}

/* Dark mode inputs with neumorphic shadow */
#login .input {
  appearance: none;
  background: var(--surface-dark);
  color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: var(--radius);
  font-family: inherit; 

  box-shadow:
    5px 5px 12px rgba(0, 0, 0, 0.4),
    -5px -5px 12px rgba(255, 255, 255, 0.04);
}

#login .button {
  background: #f35b03;
  border-radius: 12px;
  font-family: inherit; 
}

/* 6. Layout & Interface Components (Forced Dark Mode) */
header {
  background: rgba(29, 30, 31, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px); 

  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 10px 30px rgba(0, 0, 0, 0.08);
}

.action {
  border-radius: 12px;
}

.card {
  background: #1d1e1f;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Makes the login card slightly semi-transparent so the slideshow peeks through */
#login .card {
  background: rgba(29, 30, 31, 0.7);
  backdrop-filter: blur(5px);
}

/* 7. Image/Branding Fixes */
form img[alt="File Browser"] {
  width: 280px !important;    
  max-width: 100vw !important; 
  height: auto !important;    
  display: block !important;
  margin: 0 auto 20px auto !important; 
}