/* Sentinel Petroleum Services — bespoke brand system */

:root {
  --navy: #0a1628;
  --navy-light: #162236;
  --amber: #c9940a;
  --amber-bright: #e5a916;
  --steel: #6b7280;
  --steel-light: #9ca3af;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --danger: #dc2626;
  --success: #16a34a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
}

/* Header / Nav */
.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  background: var(--amber);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--navy);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--steel-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--amber); }

/* Employee Login */
#employeeLogin {
  background: transparent;
  border: 1px solid var(--amber);
  color: var(--amber);
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

#employeeLogin:hover {
  background: var(--amber);
  color: var(--navy);
}

#employeeLogin[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--steel);
  color: var(--steel);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 6rem 2rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(201, 148, 10, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero h1 span { color: var(--amber); }

.hero p {
  font-size: 1.25rem;
  color: var(--steel-light);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
}

.btn-primary {
  background: var(--amber);
  color: var(--navy);
  padding: 0.875rem 2rem;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover { background: var(--amber-bright); }

.btn-secondary {
  background: transparent;
  color: var(--white);
  padding: 0.875rem 2rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.3);
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.05);
}

/* Sections */
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

.section-subtitle {
  color: var(--steel);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--off-white);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.2s;
}

.service-card:hover {
  border-color: var(--amber);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.service-icon {
  width: 48px;
  height: 48px;
  background: var(--navy);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service-card p {
  color: var(--steel);
  font-size: 0.9rem;
}

/* About / Footprint */
.about-section {
  background: var(--off-white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.stat-box {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  border-left: 4px solid var(--amber);
}

.stat-box .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
}

.stat-box .label {
  font-size: 0.85rem;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Signature Element — Fleet Locator */
.signature-section {
  background: var(--navy);
  color: var(--white);
  padding: 5rem 2rem;
}

.signature-section .section-title,
.signature-section .section-subtitle {
  color: var(--white);
  text-align: center;
}

.signature-section .section-subtitle {
  color: var(--steel-light);
}

.fleet-locator {
  max-width: 900px;
  margin: 2rem auto 0;
  background: var(--navy-light);
  border: 1px solid rgba(201, 148, 10, 0.3);
  border-radius: 12px;
  padding: 2rem;
}

.locator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.locator-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.status-badge {
  background: var(--success);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.rig-list {
  display: grid;
  gap: 0.75rem;
}

.rig-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  transition: background 0.2s;
}

.rig-item:hover {
  background: rgba(255,255,255,0.08);
}

.rig-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.rig-info span {
  font-size: 0.8rem;
  color: var(--steel-light);
}

.rig-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
}

.rig-status.active { background: rgba(22, 163, 74, 0.2); color: #4ade80; }
.rig-status.standby { background: rgba(201, 148, 10, 0.2); color: var(--amber); }
.rig-status.maintenance { background: rgba(220, 38, 38, 0.2); color: #f87171; }

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--steel-light);
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.site-footer p {
  font-size: 0.85rem;
}

/* Chat Widget Styles */
#chatLaunch {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--amber);
  color: var(--navy);
  border: none;
  border-radius: 50px;
  padding: 1rem 1.5rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 200;
  transition: transform 0.2s;
}

#chatLaunch:hover { transform: translateY(-2px); }

#chatPanel {
  position: fixed;
  bottom: 5rem;
  right: 2rem;
  width: 380px;
  max-height: 520px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  z-index: 200;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  visibility: hidden;
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}

#chatPanel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

#chatPanel header {
  background: var(--navy);
  color: var(--white);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px 12px 0 0;
  font-weight: 600;
}

#chatClose {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

#chatLog {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.msg {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.msg.user {
  align-self: flex-end;
  background: var(--amber);
  color: var(--navy);
  border-bottom-right-radius: 4px;
}

.msg.bot {
  align-self: flex-start;
  background: var(--off-white);
  color: var(--navy);
  border-bottom-left-radius: 4px;
}

.msg.system {
  align-self: center;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
}

.msg.typing {
  color: var(--steel);
  font-style: italic;
}

#chatForm {
  display: flex;
  padding: 0.75rem;
  border-top: 1px solid #e5e7eb;
  gap: 0.5rem;
}

#chatInput {
  flex: 1;
  padding: 0.625rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
}

#chatInput:focus {
  outline: none;
  border-color: var(--amber);
}

#chatSend {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
}

#chatSend:disabled { opacity: 0.5; cursor: not-allowed; }

/* SE Panel */
#sePanel {
  background: var(--off-white);
  padding: 2rem;
  border-top: 1px solid #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .about-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 1rem; }
  #chatPanel { width: calc(100vw - 2rem); right: 1rem; }
}
