/* Base */
:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #6b7280;
  --brand: #ff6b00;         /* accent (Procore-like) */
  --primary: #0d6efd;       /* blue action */
  --focus: #4f46e5;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

/* Split layout */
.landing-container {
  display: flex;
  min-height: 100vh;
}

.login-side { padding: 40px; }

.login-side {
  width: 40%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 2px 0 12px rgba(2, 8, 20, .06);
}

/* Brand strip */
.brandbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.brand-logo { height: 100px; width: auto; }
.brand-title { font-size: 50px; font-weight: 700; letter-spacing: .2px; }

/* Headline */
.headline { 
  font-size: 20px; font-weight: 600; color: var(--ink);
  margin: 12px 0 10px; }

/* Inputs and macro-friendly defaults */
input[type="email"], input[type="password"], input[type="text"], select, textarea {
  width: 100%;
  margin: 10px 0 14px;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(79, 70, 229, .25);
  border-color: var(--focus);
}

/* Password with eye button */
.password-field { position: relative; }
.icon-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; cursor: pointer; font-size: 18px;
}

/* Inline row */
.row-inline { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; }
.remember { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.muted-link { color: var(--muted); text-decoration: none; }
.muted-link:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  width: 100%; padding: 12px 14px; margin-top: 8px;
  border: none; border-radius: 10px; cursor: pointer;
  font-weight: 600; font-size: 16px;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { filter: brightness(.95); }
.btn.sso { 
  background: #f8fafc; 
  border: 1px solid #e5e7eb; 
  color: #111827; 
  width: calc(50% - 4px);  /* Two buttons side by side with gap */
  padding: 10px 12px;
  font-size: 14px;
}
.btn.sso img { height: 20px; width: 20px; }
.btn.ghost { background: transparent; border: 1px dashed #cbd5e1; color: #0f172a; }
.btn.ghost:hover { border-style: solid; }

/* SSO buttons container - display as row */
.auth-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Divider */
.divider { position: relative; text-align: center; margin: 12px 0 6px; color: var(--muted); font-size: 14px; }
.divider::before, .divider::after {
  content: ""; position: absolute; top: 50%; width: 42%; height: 1px; background: #e5e7eb;
}
.divider::before { left: 0; } .divider::after { right: 0; }
.divider span { background: var(--card); padding: 0 8px; }

/* Error & legal */
.error { color: #dc2626; margin: 6px 0 10px; }
.legal { color: var(--muted); font-size: 12px; margin-top: 10px; }

/* RIGHT: Carousel */
.info-side {
  width: 65%;
  min-height: 100vh;
  position: relative;
  padding: 16px;
  overflow: auto;
}
.slide-shell {
  width: 100%;
  height: 100%;
  position: relative;
}
/* Scope hero-only carousel so it does NOT affect the news panel */
.slide-shell > .carousel {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

#carousel-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide-shell > .carousel img.active {
  opacity: 1;
}

.slide-caption {
  position: absolute;
  bottom: 40px;
  left: 40px;
  max-width: 400px;
  background: rgba(0,0,0,0.5);
  padding: 20px;
  border-radius: var(--radius);
  color: #fff;
}
#carousel-tagline { margin: 0 0 4px; font-size: 22px; }
#carousel-testimonial { margin: 0; color: var(--muted); font-style: italic; }
.dots { display: flex; gap: 8px; margin-top: 10px; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #cbd5e1; border: none; cursor: pointer;
}
.dot.active { background: var(--brand); }

/* Mobile */
@media (max-width: 980px) {
  .landing-container { flex-direction: column; }
  .login-side, .info-side { width: 100%; padding: 20px 16px; }
  .info-side { order: -1; }
}

/* Hide news carousel on phones */
@media (max-width: 768px) {
  .info-side { display: none !important; }
  .login-side { 
    width: 100% !important; 
    padding: 20px 16px !important;
    min-height: calc(var(--vh, 1vh) * 100);
  }
  .landing-container { 
    min-height: calc(var(--vh, 1vh) * 100);
    flex-direction: column;
  }
  
  /* Streamline branding on mobile */
  .brand-title { display: none; }  /* Hide "Total Cost Control" text */
  .brand-logo { height: 60px; }    /* Smaller logo */
  .brandbar { margin-bottom: 20px; justify-content: center; }
  
  /* Simplify headline */
  .headline .muted { display: none; } /* Hide tagline */
  .headline h2 { font-size: 26px; margin: 12px 0; text-align: center; }
  .headline { margin: 12px 0 20px; }
  .headline hr { display: none; } /* Hide divider */
  
  /* Better spacing for form */
  input[type="email"], input[type="password"] { 
    margin: 10px 0 14px; 
    padding: 14px;
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  .btn { 
    margin-top: 8px; 
    padding: 14px;
    font-size: 16px;
  }
  
  /* Stack SSO buttons on mobile */
  .auth-buttons {
    flex-direction: column;
  }
  
  .btn.sso {
    width: 100%;
    font-size: 15px;
    padding: 12px;
  }
  
  /* Simplify inline row on mobile */
  .row-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .remember {
    order: 2;
  }
  
  /* Center legal text */
  .legal {
    text-align: center;
  }
}

/* ==== Hero Caption Overlay Enhancement ==== */
.info-side .slide-caption {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.5); /* semi-transparent dark backdrop */
  color: #fff;
  z-index: 2;
  backdrop-filter: blur(2px); /* subtle blur for text contrast */
}

#carousel-tagline {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

#carousel-testimonial {
  margin: 0;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.4;
  color: #fff;
  opacity: 1;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8); /* shadow for contrast */
}
