/* =========================================================
   TPI WORLD - Modern Maintenance Page Stylesheet
   ========================================================= */

:root {
  /* Color Palette - Light Theme (Default) */
  --bg-canvas: #f7faff;
  --bg-gradient: radial-gradient(circle at 50% 20%, #ffffff 0%, #f0f6ff 50%, #e6effc 100%);
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-border: rgba(35, 61, 115, 0.12);
  --ink: #233d73;             /* Primary navy stroke & typography */
  --ink-secondary: #4a638f;   /* Muted navy/slate */
  --ink-subtle: #7993be;      /* Soft supporting slate */
  --accent-blue: #3b82f6;     /* Primary interactive blue */
  --accent-cyan: #60a5fa;
  --screen-fill: #b2d4fd;
  --cactus-green: #38c172;
  --pill-bg: #e2edff;
  --pill-text: #1d4ed8;
  --status-live: #10b981;
  --shadow-sm: 0 4px 12px rgba(35, 61, 115, 0.06);
  --shadow-md: 0 10px 25px -5px rgba(35, 61, 115, 0.1), 0 8px 10px -6px rgba(35, 61, 115, 0.05);
  --shadow-lg: 0 20px 35px -10px rgba(35, 61, 115, 0.15);
  
  --font-heading: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Palette */
[data-theme="dark"] {
  --bg-canvas: #0b132b;
  --bg-gradient: radial-gradient(circle at 50% 20%, #131f42 0%, #0c152e 50%, #070c1d 100%);
  --bg-card: rgba(18, 30, 64, 0.85);
  --bg-card-border: rgba(147, 197, 253, 0.18);
  --ink: #dbeafe;             /* Light crisp strokes in dark mode */
  --ink-secondary: #93c5fd;
  --ink-subtle: #60a5fa;
  --accent-blue: #3b82f6;
  --accent-cyan: #38bdf8;
  --screen-fill: #1e3a8a;
  --cactus-green: #10b981;
  --pill-bg: rgba(30, 58, 138, 0.5);
  --pill-text: #93c5fd;
  --status-live: #34d399;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.5);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-gradient);
  background-color: var(--bg-canvas);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  padding: 2rem 1.5rem;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Ambient Background Blobs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  transition: opacity 0.5s ease;
}

.glow-top {
  top: -15%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(147, 197, 253, 0.6) 0%, rgba(96, 165, 250, 0) 70%);
}

.glow-bottom {
  bottom: -15%;
  left: -5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(191, 219, 254, 0.5) 0%, rgba(147, 197, 253, 0) 70%);
}

/* Top Navigation Bar */
.top-nav {
  position: absolute;
  top: 1.5rem;
  left: 0;
  right: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

/* System Status Pill */
.system-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--pill-bg);
  color: var(--pill-text);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  border: 1px solid var(--bg-card-border);
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.02em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-live);
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background-color: var(--status-live);
  opacity: 0.6;
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  50% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(0.8); opacity: 0; }
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  color: var(--ink);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-blue);
}

.theme-toggle-btn .sun-icon { display: block; }
.theme-toggle-btn .moon-icon { display: none; }

[data-theme="dark"] .theme-toggle-btn .sun-icon { display: none; }
[data-theme="dark"] .theme-toggle-btn .moon-icon { display: block; }

/* Main Wrapper */
.maintenance-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  margin: 3.5rem auto 1.5rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Brand Title */
.brand-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(35, 61, 115, 0.08);
  animation: fadeInDown 0.8s ease-out;
}

/* Illustration Container */
.illustration-container {
  width: 100%;
  max-width: 820px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5rem 0 1.25rem 0;
  user-select: none;
}

.scene-svg {
  width: 100%;
  height: auto;
  max-height: 460px;
  filter: drop-shadow(0 15px 30px rgba(35, 61, 115, 0.07));
  overflow: visible;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.illustration-container:hover .scene-svg {
  transform: scale(1.012);
}

/* ================= SVG Keyframe Animations ================= */

/* 1. Pendulum Sway for Crane Suspended Picture Frame */
.pendulum-rig {
  transform-origin: 427px 105px;
  animation: gentleSway 5s ease-in-out infinite alternate;
}

@keyframes gentleSway {
  0% {
    transform: translate(427px, 105px) rotate(-3.5deg);
  }
  50% {
    transform: translate(427px, 105px) rotate(3deg);
  }
  100% {
    transform: translate(427px, 105px) rotate(-3.5deg);
  }
}

.hanging-frame-assembly {
  animation: frameCounterBalance 5s ease-in-out infinite alternate;
}

@keyframes frameCounterBalance {
  0% {
    transform: translate(0, 91px) rotate(1.2deg);
  }
  100% {
    transform: translate(0, 91px) rotate(-1.5deg);
  }
}

/* 2. Gears Rotation */
.gear-rotate-cw {
  transform-origin: 0px 0px;
  animation: spinClockwise 12s linear infinite;
}

@keyframes spinClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.gear-rotate-ccw {
  transform-origin: 0px 0px;
  animation: spinCounterClockwise 8.5s linear infinite;
}

@keyframes spinCounterClockwise {
  from { transform: translate(32px, 28px) rotate(0deg); }
  to { transform: translate(32px, 28px) rotate(-360deg); }
}

/* 3. Clock Minute Hand */
.clock-minute-hand {
  transform-origin: 0px 0px;
  animation: spinClockwise 20s linear infinite;
}

/* 4. Floating Ambient Elements */
.floating-item {
  animation: floatBobbing 4s ease-in-out infinite alternate;
}

.float-delay-1 {
  animation-duration: 3.8s;
  animation-delay: -0.5s;
}

.float-delay-2 {
  animation-duration: 4.6s;
  animation-delay: -1.8s;
}

.float-delay-3 {
  animation-duration: 5.2s;
  animation-delay: -2.7s;
}

@keyframes floatBobbing {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-7px); }
}

/* 5. Cactus Gentle Wobble on Hover */
.cactus-group {
  transform-origin: 215px 580px;
  transition: transform 0.4s ease;
  cursor: pointer;
}

.cactus-group:hover {
  animation: cactusDance 1s ease-in-out infinite alternate;
}

@keyframes cactusDance {
  0% { transform: translate(180px, 508px) rotate(-3deg); }
  100% { transform: translate(180px, 508px) rotate(3deg); }
}

/* Message Section */
.message-section {
  margin-bottom: 1.75rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.main-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
  line-height: 1.25;
}

.sub-heading {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 600;
  color: var(--ink-secondary);
  letter-spacing: 0.01em;
}

/* Countdown Card */
.countdown-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  padding: 0.9rem 1.8rem;
  border-radius: 16px;
  border: 1px solid var(--bg-card-border);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 62px;
}

.unit-val {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.unit-lbl {
  font-size: 0.725rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-subtle);
  margin-top: 0.35rem;
}

.unit-divider {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink-subtle);
  margin-bottom: 0.8rem;
}

/* Notify Me Form */
.notify-container {
  width: 100%;
  max-width: 480px;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.notify-form {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 9999px;
  padding: 0.35rem 0.4rem 0.35rem 1.1rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.notify-form:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), var(--shadow-lg);
}

.input-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 0.6rem;
}

.input-wrapper .mail-icon {
  color: var(--ink-subtle);
  flex-shrink: 0;
}

.input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}

.input-wrapper input::placeholder {
  color: var(--ink-subtle);
}

.notify-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--ink);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.35rem;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(35, 61, 115, 0.2);
  white-space: nowrap;
}

[data-theme="dark"] .notify-btn {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.notify-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 6px 16px rgba(35, 61, 115, 0.3);
}

.notify-btn .arrow-icon {
  transition: transform 0.2s ease;
}

.notify-btn:hover .arrow-icon {
  transform: translateX(3px);
}

.notify-feedback {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 1.25rem;
  transition: var(--transition-smooth);
}

.notify-feedback.success {
  color: #10b981;
}

.notify-feedback.error {
  color: #ef4444;
}

/* Footer Section */
.page-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-card-border);
  width: 100%;
  max-width: 600px;
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.social-btn:hover {
  color: var(--accent-blue);
  background: var(--pill-bg);
}

.copyright-text {
  font-size: 0.8125rem;
  color: var(--ink-subtle);
}

/* Entrance Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Mobile & Tablet Responsiveness */
@media (max-width: 768px) {
  body {
    padding: 1.5rem 1rem;
  }

  .top-nav {
    position: relative;
    top: 0;
    padding: 0;
    margin-bottom: 1.5rem;
  }

  .maintenance-wrapper {
    margin-top: 0;
  }

  .brand-title {
    font-size: 2.2rem;
  }

  .main-heading {
    font-size: 1.6rem;
  }

  .sub-heading {
    font-size: 1.15rem;
  }

  .countdown-card {
    padding: 0.75rem 1.25rem;
    gap: 0.6rem;
  }

  .unit-val {
    font-size: 1.45rem;
  }

  .unit-divider {
    font-size: 1.45rem;
  }

  .notify-form {
    padding: 0.3rem 0.35rem 0.3rem 0.9rem;
  }

  .notify-btn {
    padding: 0.65rem 1.1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .notify-form {
    flex-direction: column;
    border-radius: 16px;
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .input-wrapper {
    width: 100%;
    padding: 0 0.25rem;
  }

  .notify-btn {
    width: 100%;
    justify-content: center;
  }
}
