/* ====================================
   Molloy University Canvas Landing Page
   Optimized Stylesheet
   ==================================== */

/* Reset and Base Styles */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Molloy Brand Colors */
  --molloy-maroon: #473D34;
  --molloy-maroon-dark: #473D34;
  --molloy-gold: #d4af37;
  --molloy-cream: #f5f5f0;

  /* UI Colors */
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #dee2e6;
  --color-background: #ffffff;

  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 20px;
  --spacing-lg: 28px;
  --spacing-xl: 40px;

  /* Layout */
  --container-max-width: 920px;
  --panel-width: 460px;
  --panel-height: 724px;

  /* Common Values */
  --transition-base: 0.3s ease;
  --border-radius: 4px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-container: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Base Styles */
html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: #f5f5f5;
  line-height: 1.5;
  min-height: 100vh;
  height: 100%;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Accessibility: Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--molloy-maroon);
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 var(--border-radius) 0;
}

.skip-link:focus {
  top: 0;
}

/* Main Container */
.container {
  display: flex;
  width: var(--container-max-width);
  height: var(--panel-height);
  background: white;
  box-shadow: var(--shadow-container);
  border-radius: 8px;
  overflow: hidden;
  margin: auto;
}

/* Branding Panel */
.branding-panel {
  width: var(--panel-width);
  height: var(--panel-height);
  background: linear-gradient(
    180deg,
    var(--molloy-maroon) 0%,
    var(--molloy-maroon-dark) 100%
  );
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--spacing-xl);
  padding-top: 170px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}


.branding-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  width: 100%;
  padding: 0 20px;
}

.logo-container {
  width: 256px;
  height: 116px;
  padding: 8px 20px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: content-box;
}

.institution-logo {
  width: 200px;
  height: auto;
  display: block;
}

/* Authentication Panel */
.auth-panel {
  width: var(--panel-width);
  height: var(--panel-height);
  background: var(--color-background);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  position: relative;
  flex-shrink: 0;
}

.auth-content {
  width: 100%;
  max-width: 372px;
  margin: 0 auto;
}

/* Authentication Header */
.auth-header {
  margin-bottom: var(--spacing-lg);
}

.auth-header h1 {
  font-size: 36px;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  color: #555;
  font-size: 16px;
  font-weight: 400;
  width: 372px;
  line-height: 24px;
  margin: 0 auto 30px;
}

/* Authentication Options */
.auth-options {
  margin-bottom: var(--spacing-lg);
}

.auth-option {
  width: 372px;
  padding: 0;
  background: transparent;
  margin: 0 auto 40px auto;
  position: relative;
  border: none;
}

.option-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 15px;
}

/* Buttons */
.btn {
  display: block;
  width: 372px;
  height: 48px;
  line-height: 46px;
  padding: 0;
  font-size: 17px;
  font-weight: 400;
  text-align: center;
  text-decoration: none;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  transition: all var(--transition-base);
  cursor: pointer;
  font-family: var(--font-primary);
  background: white;
  color: var(--color-text);
  margin: 20px auto 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn:hover,
.btn:focus {
  background: #f8f8f8;
  border-color: #aaa;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
  transition: all var(--transition-base);
}

.btn:active {
  background: #eeeeee;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Alternative Login Link */
.alternative-login {
  text-align: center;
  margin: var(--spacing-md) 0;
}

.alternative-login p {
  color: #333;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.alt-login-link {
  color: var(--molloy-maroon);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-base);
}

.alt-login-link:hover,
.alt-login-link:focus {
  color: #2d1f19;
  text-decoration: underline;
}

/* Footer */
.auth-footer {
  text-align: center;
  padding-top: var(--spacing-md);
  margin-top: auto;
}

.footer-nav {
  margin-bottom: var(--spacing-xs);
}

.footer-link {
  color: #555;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition-base);
}

.footer-link:hover,
.footer-link:focus {
  color: var(--molloy-maroon);
  text-decoration: underline;
}

.separator {
  margin: 0 var(--spacing-sm);
  color: #555;
  font-weight: 500;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--molloy-maroon);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  margin-top: var(--spacing-md);
  color: var(--color-text);
  font-size: 14px;
}

/* NoScript Warning */
.noscript-warning {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--molloy-maroon);
  color: white;
  padding: var(--spacing-md);
  text-align: center;
  z-index: 10000;
}


/* Mobile Responsive Design */
@media (max-width: 935px) {
  body {
    padding: 10px;
  }

  .container {
    width: 95%;
    height: auto;
    min-height: 600px;
  }

  .branding-panel,
  .auth-panel {
    width: 50%;
    height: auto;
    min-height: 600px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 0;
    align-items: flex-start;
  }

  .container {
    flex-direction: column;
    width: 100%;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .branding-panel,
  .auth-panel {
    width: 100%;
    height: auto;
  }

  .branding-panel {
    padding: var(--spacing-lg) var(--spacing-md);
    min-height: 200px;
    max-height: 250px;
    padding-top: var(--spacing-lg);
  }

  .auth-panel {
    padding: var(--spacing-lg) var(--spacing-md);
    flex: 1;
  }

  .institution-logo {
    max-width: 180px;
  }

  .auth-header h1 {
    font-size: 24px;
  }

  .auth-content,
  .auth-option,
  .btn,
  .auth-subtitle {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-option {
    padding: var(--spacing-sm);
  }

  .btn {
    padding: 10px var(--spacing-sm);
  }

  .branding-panel {
    min-height: 180px;
  }

  .institution-logo {
    max-width: 150px;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .auth-option {
    border: 2px solid var(--color-text);
  }

  .btn {
    border-width: 2px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Visible for Better Accessibility */
.btn:focus-visible,
.footer-link:focus-visible,
.alt-login-link:focus-visible {
  outline: 2px solid var(--molloy-gold);
  outline-offset: 2px;
}
