/* ============================================================================
   GIA Maintenance Page Stylesheet
   Professional, modern design for Architecture & Engineering firm
   ============================================================================ */

/* ============================================================================
   Custom Fonts
   ============================================================================ */

/* Atlas Grotesk Font Family */
@font-face {
  font-family: "Atlas Grotesk";
  src: url("assets/fonts/AtlasGrotesk-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atlas Grotesk";
  src: url("assets/fonts/AtlasGrotesk-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atlas Grotesk";
  src: url("assets/fonts/AtlasGrotesk-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Noe Display Font Family */
@font-face {
  font-family: "Noe Display";
  src: url("assets/fonts/Noe Display Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color palette - Professional A&E theme */
  --primary-color: #0a4d8f;
  --accent-color: #00b4d8;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.65);
  --text-warning: rgba(255, 231, 186, 0.95);
  --warning-bg: rgba(255, 180, 102, 0.14);
  --warning-border: rgba(255, 180, 102, 0.35);
  --overlay-dark: rgba(10, 20, 35, 0.75);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --status-offline: #ff6b6b;
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.35);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
}

/* Body and background */
body {
  font-family:
    "Atlas Grotesk",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Helvetica Neue",
    Arial,
    sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  /* iOS Safari viewport fix */
  min-height: -webkit-fill-available;
  min-height: 100vh;
  overflow-x: hidden;
  background: #0a1628;
  position: relative;
}

/* Fix for iOS viewport units */
html {
  height: -webkit-fill-available;
}

/* Background image with overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("assets/cityscape-background.jpg") center center / cover
    no-repeat;
  /* Safari fallback */
  background-image: url("assets/cityscape-background.jpg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -2;
  /* Fallback gradient if image doesn't load */
  background-color: #0a1628;
  /* Mild blur effect */
  -webkit-filter: blur(7px);
  filter: blur(7px);
  /* Prevent flickering on iOS */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-dark);
  /* Safari fallback for backdrop-filter */
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  z-index: -1;
  /* Prevent flickering on iOS */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Main container */
.container {
  min-height: -webkit-fill-available;
  min-height: 100vh;
  display: flex;
  /* Safari flexbox fix */
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: var(--spacing-md);
  max-width: 1400px;
  margin: 0 auto;
}

/* Header with company logo */
.header {
  /* Changed from var(--spacing-lg) to half that value */
  /* padding: calc(var(--spacing-lg) / 2) 0; */
  -webkit-animation: fadeInDown 0.8s ease-out;
  animation: fadeInDown 0.8s ease-out;
  /* Add minimum height to maintain spacing even without logo */
  min-height: 25px;
}

.company-logo {
  height: 50px;
  width: auto;
  /* Safari filter fallback */
  -webkit-filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  -webkit-transition: -webkit-transform 0.3s ease;
  transition: -webkit-transform 0.3s ease;
  transition: transform 0.3s ease;
  transition:
    transform 0.3s ease,
    -webkit-transform 0.3s ease;
  /* Hide the logo but maintain space */
  visibility: hidden;
}

.company-logo:hover {
  -webkit-transform: scale(1.02);
  transform: scale(1.02);
}

/* Main content area */
.main-content {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--spacing-md) var(--spacing-xl);
  -webkit-animation: fadeIn 1s ease-out;
  animation: fadeIn 1s ease-out;
}

/* GIA Logo */
.gia-logo-container {
  margin-bottom: var(--spacing-md);
  -webkit-animation: fadeInScale 1.2s ease-out;
  animation: fadeInScale 1.2s ease-out;
}

.gia-logo {
  height: 120px;
  width: auto;
  -webkit-filter: drop-shadow(0 4px 16px rgba(0, 180, 216, 0.4));
  filter: drop-shadow(0 4px 16px rgba(0, 180, 216, 0.4));
  -webkit-animation: pulse 3s ease-in-out infinite;
  animation: pulse 3s ease-in-out infinite;
}

/* Status indicator */
.status-indicator {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: var(--spacing-sm);
  /* Safari gap fallback */
  margin-bottom: var(--spacing-lg);
  -webkit-animation: fadeInUp 0.8s ease-out 0.2s both;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Safari gap fallback */
.status-indicator > * + * {
  margin-left: var(--spacing-sm);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--status-offline);
  -webkit-animation: statusPulse 2s ease-in-out infinite;
  animation: statusPulse 2s ease-in-out infinite;
  box-shadow: 0 0 12px var(--status-offline);
}

.status-title {
  font-family: "Noe Display", Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  /* Safari clamp fallback */
  font-size: 2.25rem;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Message container */
.message-container {
  max-width: 760px;
  margin: 0 auto var(--spacing-xl);
  padding: var(--spacing-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  -webkit-animation: fadeInUp 0.8s ease-out 0.4s both;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.message-primary {
  font-family: "Atlas Grotesk", sans-serif;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-size: 1.5rem;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 500;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  line-height: 1.5;
}

.message-secondary {
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  font-size: 1.125rem;
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  color: var(--text-secondary);
  line-height: 1.6;
}

.message-warning {
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  font-size: 1.125rem;
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  color: var(--text-warning);
  line-height: 1.6;
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Details container */
.details-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
  max-width: 800px;
  width: 100%;
  margin: 0 auto var(--spacing-xl);
  -webkit-animation: fadeInUp 0.8s ease-out 0.6s both;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.detail-item {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: start;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  /* Safari tap highlight */
  -webkit-tap-highlight-color: transparent;
}

/* Safari gap fallback */
.detail-item > * + * {
  margin-left: var(--spacing-sm);
}

.detail-item:hover {
  background: rgba(255, 255, 255, 0.12);
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.detail-icon {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  background: var(--accent-color);
  border-radius: 10px;
  color: var(--text-primary);
}

.detail-content {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  text-align: left;
}

.detail-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-color);
  margin-bottom: var(--spacing-xs);
}

.detail-text {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Contact container */
.contact-container {
  margin-bottom: var(--spacing-lg);
  -webkit-animation: fadeInUp 0.8s ease-out 0.8s both;
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.contact-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.contact-text a {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Progress indicator */
.progress-indicator {
  width: 100%;
  max-width: 400px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin: var(--spacing-lg) auto 0;
  -webkit-animation: fadeInUp 0.8s ease-out 1s both;
  animation: fadeInUp 0.8s ease-out 1s both;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--accent-color),
    var(--primary-color),
    var(--accent-color)
  );
  background: -webkit-linear-gradient(
    left,
    var(--accent-color),
    var(--primary-color),
    var(--accent-color)
  );
  background: linear-gradient(
    90deg,
    var(--accent-color),
    var(--primary-color),
    var(--accent-color)
  );
  background-size: 200% 100%;
  -webkit-animation: progressSlide 2.5s ease-in-out infinite;
  animation: progressSlide 2.5s ease-in-out infinite;
  border-radius: 2px;
}

/* Footer */
.footer {
  padding: var(--spacing-lg) 0;
  text-align: center;
  -webkit-animation: fadeInUp 0.8s ease-out;
  animation: fadeInUp 0.8s ease-out;
}

.footer-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================================================
   Animations
   ============================================================================ */

@-webkit-keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@-webkit-keyframes fadeInUp {
  from {
    opacity: 0;
    -webkit-transform: translateY(20px);
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    -webkit-transform: translateY(20px);
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@-webkit-keyframes fadeInDown {
  from {
    opacity: 0;
    -webkit-transform: translateY(-20px);
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    -webkit-transform: translateY(-20px);
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@-webkit-keyframes fadeInScale {
  from {
    opacity: 0;
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
  }
}

@-webkit-keyframes pulse {
  0%,
  100% {
    -webkit-filter: drop-shadow(0 4px 16px rgba(0, 180, 216, 0.4));
    filter: drop-shadow(0 4px 16px rgba(0, 180, 216, 0.4));
  }
  50% {
    -webkit-filter: drop-shadow(0 4px 24px rgba(0, 180, 216, 0.6));
    filter: drop-shadow(0 4px 24px rgba(0, 180, 216, 0.6));
  }
}

@keyframes pulse {
  0%,
  100% {
    -webkit-filter: drop-shadow(0 4px 16px rgba(0, 180, 216, 0.4));
    filter: drop-shadow(0 4px 16px rgba(0, 180, 216, 0.4));
  }
  50% {
    -webkit-filter: drop-shadow(0 4px 24px rgba(0, 180, 216, 0.6));
    filter: drop-shadow(0 4px 24px rgba(0, 180, 216, 0.6));
  }
}

@-webkit-keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }
}

@-webkit-keyframes progressSlide {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes progressSlide {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

/* Tablet adjustments */
@media (max-width: 768px) {
  .container {
    padding: var(--spacing-sm);
  }

  .header {
    /* Half of the original padding */
    padding: calc(var(--spacing-md) / 2) 0;
    min-height: 20px;
  }

  .company-logo {
    height: 40px;
  }

  .gia-logo {
    height: 90px;
  }

  .main-content {
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  .message-container {
    padding: var(--spacing-md);
  }

  .details-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  :root {
    --spacing-xl: 2rem;
    --spacing-lg: 1.5rem;
  }

  .header {
    min-height: 17.5px;
  }

  .company-logo {
    height: 35px;
  }

  .gia-logo {
    height: 75px;
  }

  .status-indicator {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .status-dot {
    width: 10px;
    height: 10px;
  }

  .message-container {
    padding: var(--spacing-sm);
  }

  .detail-item {
    padding: var(--spacing-sm);
  }

  .detail-icon {
    width: 36px;
    height: 36px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --glass-bg: rgba(0, 0, 0, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
  }
}

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