/*
  Sentinel Secure Services
  Global Stylesheet
  - Shared layout, typography, components for public pages
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --bg: #0a0f1a;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.7);
  --muted-2: rgba(255, 255, 255, 0.55);
  --brand: #5dd6ff;
  --brand-2: #7c5cff;
  --success: #2fe39c;
  --warning: #ffc04d;
  --danger: #ff4d6d;

  --shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --container: 1200px;
  --gutter: 20px;

  --focus: 0 0 0 3px rgba(93, 214, 255, 0.24);

  --section-padding: 80px;
  --section-padding-mobile: 60px;
}




/* Base reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background: radial-gradient(1200px 800px at 10% 0%, rgba(124, 92, 255, 0.12), transparent 60%),
    radial-gradient(900px 650px at 100% 0%, rgba(93, 214, 255, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}



img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Utility */
.container {
  width: min(var(--container), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.section {
  padding: var(--section-padding) 0;
}

.section.compact {
  padding: calc(var(--section-padding) * 0.7) 0;
}

/* Brand Identity */
.brand-logo,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.brand-logo:hover,
.footer-brand:hover {
  opacity: 0.9;
}

.brand-logo img,
.footer-brand img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-logo .brand-text,
.footer-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-logo .brand-name,
.footer-brand .brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  white-space: nowrap;
}

.brand-logo .brand-tagline,
.footer-brand .brand-tagline {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}



.kicker {
  color: var(--brand);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.h1,
.h2,
.h3 {
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  line-height: 1.2;
}

.h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 10px 0 14px;
}

.h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

.p {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  max-width: 65ch;
}



.grid {
  display: grid;
  gap: 18px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}



.card.soft {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}



.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
  user-select: none;
}



.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}



.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn.primary {
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #08101c;
  font-weight: 800;
}





.btn.primary:hover {
  background: linear-gradient(135deg, rgba(93, 214, 255, 0.95), rgba(124, 92, 255, 0.95));
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 15, 26, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}



.header-inner {

  /* Register page comprehensive alignment fixes - OVERRIDE ALL CONFLICTING STYLES */
  .auth-page .form-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .auth-page .form-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 14px !important;
    align-items: flex-end !important;
    margin-bottom: 0 !important;
    grid-template-columns: none !important;
  }

  .auth-page .form-row .field {
    flex: 1 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .auth-page .field {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
    grid: none !important;
  }

  .auth-page .field input {
    width: 100% !important;
    height: 44px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  .auth-page .field label {
    margin-bottom: 0 !important;
    font-size: 13px !important;
    color: var(--muted) !important;
    font-weight: 500 !important;
  }

  .auth-page .field .helper {
    margin-top: 4px !important;
    font-size: 12px !important;
    color: var(--muted-2) !important;
    order: 2 !important;
  }

  .auth-page .field .error {
    margin-top: 4px !important;
    font-size: 12px !important;
    order: 3 !important;
  }

  /* Mobile responsive fix */
  @media (max-width: 768px) {
    .auth-page .form-row {
      flex-direction: column !important;
      gap: 16px !important;
    }

    .auth-page .form-row .field {
      flex: none !important;
    }
  }

  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 14px;
}



.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 10px;
  transition: all 0.2s ease;
  white-space: nowrap;
}



.nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}



.nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}



.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 150ms ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}



.mobile-toggle {
  display: none;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 0 16px;
}



.mobile-panel .nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.mobile-panel .nav a {
  width: 100%;
}

.mobile-panel .nav-actions {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

/* Hero */
.hero {
  padding: 100px 0 60px;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(93, 214, 255, 0.05) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: center;
}

.hero-panel {
  position: relative;
  border: none;
  background: transparent;
}



.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hero-right {
  padding: 24px;
}

.stat {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
}



.stat strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}



.stat span {
  display: block;
  font-size: 14px;
  color: var(--muted);
}



/* Lists / tables */
.list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.12);
}

.footer-top {
  padding: 50px 0 18px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 18px;
}

.footer-title {
  font-weight: 800;
  margin: 0 0 10px;
}

.footer-text {
  color: var(--muted);
  margin: 0 0 14px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-2);
  font-size: 13px;
}

/* Light mode footer styling */


/* Auth page specific styling */
.auth-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.btn.primary {
  font-weight: 700;
}

/* Ensure password fields are same size */
input[type="password"] {
  box-sizing: border-box;
  height: 44px;
}

/* Force dark mode for auth pages */
body[data-require-session] {
  background: #0a0a0a;
  color: #ffffff;
}

body[data-require-session] .auth-shell,
body[data-require-session] .site-header {
  background: #0a0a0a;
}

body[data-require-session] .card {
  background: rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-require-session] .input {
  background: rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Forms (shared basics) */
.field {
  display: grid;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field label {
  font-size: 13px;
  color: var(--muted);
}

.input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  transition: all 0.3s ease;
}

/* Select dropdown styling */
select.input {
  color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

[data-theme="light"] select.input {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .input {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--text);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: rgba(255, 255, 255, 0.95);
}

.input:focus {
  outline: none;
  box-shadow: var(--focus);
  border-color: rgba(93, 214, 255, 0.36);
}

.helper {
  font-size: 13px;
  color: var(--muted-2);
}

.error {
  font-size: 13px;
  color: rgba(255, 77, 109, 0.92);
}

.success {
  font-size: 13px;
  color: rgba(47, 227, 156, 0.92);
}


/* Responsive Breakpoints */

/* Desktop & Tablet Collapse (1024px) */
@media (max-width: 1024px) {
  .header-inner {
    padding: 12px 0;
  }

  .nav {
    gap: 8px;
  }

  .nav a {
    padding: 6px 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .brand {
    min-width: 180px;
  }

  .brand-title strong {
    font-size: 15px;
  }

  .navbar-nav {
    white-space: nowrap;
  }
}

/* Tablet & Small Desktop (1024px) - Modified to show menu at 1024px */
@media (max-width: 1023px) {

  .nav,
  .nav-actions {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-panel.open {
    display: block;
    background: var(--bg);
    border-top: 1px solid var(--border);
    margin-top: 10px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
    /* 2 columns for tablet */
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: var(--section-padding-mobile) 0;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
    /* 1 column for mobile */
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .brand-logo .brand-tagline {
    display: none;
    /* Hide tagline on small screens to save space */
  }
}

/* Light theme styles */
[data-theme="light"] {
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-2: rgba(255, 255, 255, 0.9);
  --border: rgba(0, 0, 0, 0.1);
  --text: rgba(15, 23, 42, 0.92);
  --muted: rgba(15, 23, 42, 0.7);
  --muted-2: rgba(15, 23, 42, 0.5);
  --brand: #0ea5e9;
  --brand-2: #6366f1;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);

  --focus: 0 0 0 3px rgba(14, 165, 233, 0.24);
}

[data-theme="light"] body {
  background: var(--bg);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

[data-theme="light"] .btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

[data-theme="light"] .btn:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

[data-theme="light"] .btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
}

[data-theme="light"] .theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
}

[data-theme="light"] .theme-toggle:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

[data-theme="light"] .nav a {
  color: var(--muted);
}

[data-theme="light"] .nav a:hover,
[data-theme="light"] .nav a.active {
  background: var(--surface);
  color: var(--text);
}

[data-theme="light"] .mobile-panel.open {
  background: var(--bg);
  border-top: 1px solid var(--border);
}

[data-theme="light"] .site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

[data-theme="light"] .footer-links a {
  color: var(--muted);
}

[data-theme="light"] .footer-links a:hover {
  color: var(--text);
}

[data-theme="light"] .badge {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

[data-theme="light"] .stat-icon {
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Small Mobile (360px) */
@media (max-width: 360px) {
  .container {
    padding-inline: 12px;
  }

  .h1 {
    font-size: 24px;
  }

  .h2 {
    font-size: 20px;
  }

  .brand-logo .brand-name {
    font-size: 1rem;
  }

  /* Fix GET IN TOUCH section - single column layout */
  .section .grid[style*="grid-template-columns: repeat(3, 1fr)"],
  .section .grid[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Fix CONTACT OPERATIONS section */
  .section .grid[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Fix PHYSICAL SECURITY SERVICES cards */
  .section[aria-label*="Physical security"] .grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Fix VISION card layout in about page */
  .section .container[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* General card padding reduction for small screens */
  .card {
    padding: 14px;
  }

  /* Reduce font sizes in cards */
  .stat strong {
    font-size: 14px;
  }

  .stat span {
    font-size: 13px;
  }

  /* Fix hero grid layouts */
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Fix form layouts */
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Fix footer grid */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Reduce button sizes */
  .btn {
    padding: 10px 14px;
    font-size: 14px;
  }

  .btn.small {
    padding: 8px 10px;
    font-size: 13px;
  }

  /* Reduce badge sizes */
  .badge {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Fix stat icons */
  .stat-icon {
    width: 36px;
    height: 36px;
  }

  .stat {
    gap: 10px;
  }

  /* Ensure no horizontal overflow */
  * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Fix any remaining grid layouts */
  .grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Specific fixes for contact sections */
  .section[id="contact"] .grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Fix hero actions */
  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}