/* ================= RESET & GLOBAL ================= */

:root {
  color-scheme: light dark;
  --pale-slate: #cecfd3ff;
  --platinum: #f1f2f4ff;
  --black: #020200ff;
  --prussian-blue: #071831ff;
  --slate-grey: #717d89ff;
  --steel-blue: #157cd6ff;
  --icy-blue: #a6dffaff;
  --baltic-blue: #275e9aff;
  --deep-space-blue: #0d3559ff;
}

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

body {
  font-family: Arial, sans-serif;
  background-color: var(--platinum);
  background-image: linear-gradient(180deg, #fbfcfe 0%, #f4f6f8 20%, #eceff3 45%, #dcdfe5 70%, #cecfd3 100%);
  color: var(--prussian-blue);
  line-height: 1.6;
}

/* ================= LAYOUT ================= */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container.wide {
  max-width: 1320px;
}

/* ================= HEADER ================= */

.header {
  position: relative;
  z-index: 1000;
  background-color: #fbfcfe;
  padding: 10px 40px;
  transition:
    background-color 0.3s ease,
    backdrop-filter 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

/* Sticky only when scrolling UP */
.header.is-sticky {
  position: sticky;
  top: 0;
  animation: slideDown 0.25s ease-out;
}

.header.scrolled {
  background-color: rgba(251, 252, 254, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 2px 6px rgba(2, 2, 0, 0.08),
    0 10px 30px rgba(2, 2, 0, 0.06);
  border-bottom: 1px solid rgba(39, 94, 154, 0.14);
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* ================= NAV ================= */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 100px;
  width: auto;
  filter:
    drop-shadow(0.1px 0 0 rgba(0,0,0,0.3))
    drop-shadow(-0.1px 0 0 rgba(0,0,0,0.3))
    drop-shadow(0 0.1px 0 rgba(0,0,0,0.3))
    drop-shadow(0 -0.1px 0 rgba(0,0,0,0.3))
    drop-shadow(0.1px 0.1px 0 rgba(0,0,0,0.3))
    drop-shadow(-0.1px -0.1px 0 rgba(0,0,0,0.3));
}

/* Links */
.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--prussian-blue);
  font-weight: 500;
}

.nav-links a:hover {
  opacity: 0.7;
}

/* ================= MOBILE NAVIGATION ================= */

/* Toggle button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

body.nav-open {
  overflow: hidden;
}

/* Mobile styles */
@media (max-width: 768px) {

  /* Show hamburger */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;

    position: fixed;
    top: 20px;
    right: 20px;

    z-index: 1101; /* ABOVE the menu */
  }

  /* Hamburger lines */
  .nav-toggle span {
    width: 26px;
    height: 2px;
    background: var(--prussian-blue);
    display: block;

    transition:
      transform 0.3s ease,
      opacity 0.2s ease;
  }

  /* OPEN STATE → X */
  .nav-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Fullscreen menu */
  .nav-links {
    position: fixed;
    inset: 0;

    background: rgba(251, 252, 254, 0.96);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;

    transform: translateX(100%);
    transition: transform 0.35s ease;

    z-index: 1100; /* BELOW the button */
  }

  /* Menu open */
  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li a {
    font-size: 1.25rem;
  }

  /* Mobile menu (closed) */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;

    background: rgba(251, 252, 254, 0.96);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;

    transition: right 0.35s ease;
    z-index: 1000;
  }

  /* Open state */
  .nav-links.open {
    right: 0;
  }

  .nav-links li a {
    font-size: 1.25rem;
  }

  .nav-links a {
    padding: 8px 0;
  }

  .nav-links {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

/* ================= HERO ================= */

.hero {
  padding: 100px 0;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

/* Text */
.hero-content {
  max-width: 540px;
}

.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 24px;
  max-width: 420px;
}

.hero-content a:not(.btn-primary) {
  color: var(--baltic-blue);
}

/* Image */
.hero-image {
  display: flex;
  justify-content: flex-end;
}

.hero-image img {
  max-width: 5200px;
  width: 100%;
  height: auto;
  object-fit: contain;
  transform: translateX(-24px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  background: var(--steel-blue);
  color: #ffffff;
  padding: 14px 30px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13, 53, 89, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(13, 53, 89, 0.16);
}

.cta-subtext {
  margin-top: 10px;
  font-size: 0.9rem;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .hero {
    padding: 64px 0;
  }
}

/* =============== HERO ANIMATIONS =============== */

/* Initial hidden state */
.hero-content,
.hero-image {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

/* Image slightly different motion */
.hero-image {
  transform: translateY(20px) translateX(-24px);
}

/* When hero becomes visible */
.hero.animate .hero-content {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.hero.animate .hero-image {
  opacity: 1;
  transform: translateY(0) translateX(-24px);
  transition-delay: 0.25s;
}

/* Mobile: remove horizontal offset */
@media (max-width: 1024px) {
  .hero-image {
    transform: translateY(20px);
  }

  .hero.animate .hero-image {
    transform: translateY(0);
  }
}

/* =============== TRUST CARD ================= */

.trust-card-wrapper {
  position: relative;
  z-index: 900;
}

/* Desktop / default */
.trust-card {
  position: fixed;
  top: 128px;

  /* Centering fix */
  left: 0;
  right: 0;
  margin-inline: auto;

  max-width: 760px;
  width: calc(100% - 48px);

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: rgba(241, 242, 244, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  padding: 18px 28px;
  border-radius: 12px;

  box-shadow: 0 10px 30px rgba(13, 53, 89, 0.1);
  border: 1px solid rgba(166, 223, 250, 0.45);

  transition:
    top 0.25s ease,
    opacity 0.25s ease;
}

/* When header is hidden */
.trust-card.at-top {
  top: 12px;
}

/* Trust items */
.trust-item {
  flex: 1;
  text-align: center;
}

.trust-item strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}

.trust-item span {
  font-size: 0.85rem;
  color: var(--slate-grey);
}

.trust-divider {
  width: 1px;
  height: 32px;
  background: rgba(39, 94, 154, 0.18);
}

.trust-card {
  will-change: top;
}

/* ================= TRUST CARD (MOBILE) ================= */
@media (max-width: 768px) {
  .trust-card-wrapper {
    position: static;
    margin-top: -24px; /* subtle overlap with hero */
  }

  .trust-card {
    position: static;
    width: 100%;
    max-width: none;

    margin: 0 auto;
    padding: 14px 16px;

    gap: 12px;
    border-radius: 12px;
  }

  .trust-item {
    flex: 1;
    text-align: center;
  }

  .trust-item strong {
    font-size: 13px;
  }

  .trust-item span {
    font-size: 12px;
    opacity: 0.8;
  }

  .trust-divider {
    display: none;
  }
}

/* ================= SECTIONS ================= */

section {
  padding: 80px 0;
}

/* ================= ABOUT ==================== */

.about img {
  display: flex;
  width: 100%;
  padding-top: 20px;
}

/* ================= ABOUT IMAGE CAROUSEL (FADE) ================= */

.about-carousel {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 12px;
}

/* Track becomes a stack */
.carousel-track {
  position: relative;
  width: 100%;
  height: auto;
}

/* Images fade */
.carousel-track img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: auto;
  object-fit: cover;

  opacity: 0;
  transition: opacity 0.6s ease;
  border-radius: 12px;
}

/* Active image */
.carousel-track img.active {
  opacity: 1;
  position: relative;
}

/* Buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  background: rgba(241, 242, 244, 0.88);
  border: 1px solid rgba(166, 223, 250, 0.45);
  width: 42px;
  height: 42px;

  border-radius: 50%;
  cursor: pointer;

  font-size: 20px;
  font-weight: 700;
  color: var(--prussian-blue);

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 6px 16px rgba(13, 53, 89, 0.18);
  z-index: 10;

  transition: transform 0.2s ease, background 0.2s ease;
}

.carousel-btn:hover {
  background: var(--icy-blue);
  transform: translateY(-50%) scale(1.05);
}

.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

/* Mobile tweaks */
@media (max-width: 768px) {
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

/* ================= SERVICES ================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.service-card {
  position: relative;
  overflow: hidden;

  padding: 28px;
  border-radius: 12px;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  color: var(--prussian-blue);
  min-height: 260px;

  box-shadow: 0 12px 30px rgba(13, 53, 89, 0.1);
}

/* White overlay for readability */
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    180deg,
    rgba(241, 242, 244, 0.74) 0%,
    rgba(241, 242, 244, 0.86) 100%
  );
  /*backdrop-filter: blur(2px);*/

  z-index: 1;
}

/* Ensure content sits above overlay */
.service-card > * {
  position: relative;
  z-index: 2;
}

.service-card:hover::before {
  background: linear-gradient(
    180deg,
    rgba(166, 223, 250, 0.28) 0%,
    rgba(241, 242, 244, 0.84) 100%
  );
}

.service-cctv {
  background-image: url("/assets/images/cctv.jpg");
}

.service-door {
  background-image: url("/assets/images/stairs.png");
}

.service-event {
  background-image: url("/assets/images/club.jpg");
}

.service-guarding {
  background-image: url("/assets/images/midnight.png");
}

.service-concierge {
  background-image: url("/assets/images/doorman.png");
}

.service-key {
  background-image: url("/assets/images/keys.jpg");
}

.service-close {
  background-image: url("/assets/images/close.jpg");
}

.icon {
  width: 48px;
  height: 48px;
  color: var(--steel-blue);
  margin-bottom: 16px;
  border-radius: 6px;
}

.service-icon {
  display: flex;
  justify-content: left;
  margin-bottom: 1rem;
}

.service-card:hover .icon {
  color: var(--baltic-blue);
}

.service-card:hover {
  transform: translateY(-4px);
}

/* ================= FAQ ================= */

details {
  margin-top: 16px;
  background: rgba(241, 242, 244, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(206, 207, 211, 0.8);
  padding: 16px;
  border-radius: 6px;
}

/* ================= CONTACT ================= */

.contact-form {
  max-width: 500px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

input,
textarea {
  padding: 12px;
  border-radius: 4px;
  border: 1px solid var(--pale-slate);
  background: rgba(255, 255, 255, 0.75);
  color: var(--prussian-blue);
}

/* ================= FOOTER ================= */

.footer-divider {
  height: 1px;
  background: rgba(39, 94, 154, 0.16);
  margin-top: 80px;
}

/* Footer base */
.footer {
  background: linear-gradient(180deg, rgba(251, 252, 254, 0.28) 0%, rgba(224, 230, 236, 0.4) 100%);
  color: var(--prussian-blue);
  padding: 48px 0 24px;
  font-size: 0.95rem;
}

/* Container */
.footer .container.wide {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 64px;
  padding-right: 64px;
}

/* ===== GRID LAYOUT (FIXED) ===== */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr; /* CRITICAL FIX */
  align-items: start;
  column-gap: 48px;
}

/* Columns */
.footer-column {
  width: 100%;
}

.footer-column h4 {
  font-size: 1rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.footer-column p {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Vertical dividers */
.footer-vertical-divider {
  width: 1px;
  background: rgba(39, 94, 154, 0.16);
}

/* Links */
.footer a {
  color: var(--prussian-blue);
  text-decoration: none;
}

.footer a:hover {
  opacity: 0.7;
}

/* Social icons */
.footer-socials {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.footer-socials svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-socials a:hover svg {
  opacity: 1;
  transform: translateY(-2px);
}

/* Bottom bar */
.footer-bottom {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid rgba(39, 94, 154, 0.12);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
  .footer .container.wide {
    padding-left: 24px;
    padding-right: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    row-gap: 32px;
    text-align: center;
  }

  /* Hide vertical dividers on mobile */
  .footer-vertical-divider {
    display: none;
  }

  .footer-column {
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(39, 94, 154, 0.12);
  }

  .footer-column:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .footer-socials {
    justify-content: center;
  }
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1024px) {
  .hero {
    padding: 80px 0;
  }

  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image {
    justify-content: center;
  }

  .hero-image img {
    transform: none;
    max-width: 420px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 16px 12px;
  }

  .nav {
    justify-content: center;
    position: relative;
    min-height: 64px;
  }

  .logo {
    position: absolute;
    left: 42%;
    transform: translateX(-50%);
  }

  .logo img {
    max-height: 86px;
  }

  .nav-toggle {
    position: absolute;
    right: 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* =============== SCROLL REVEAL =============== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slight variation for cards */
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

/* ================= THEME TOGGLE ================= */

/* Theme toggle button */
.theme-toggle {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;

  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--steel-blue);
}

/* Icon base */
.theme-toggle span {
  position: absolute;
  width: 22px;
  height: 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* LIGHT MODE (default) */
.icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.icon-moon {
  opacity: 0;
  transform: scale(0.6) rotate(-90deg);
}

/* DARK MODE */
body.dark .theme-toggle {
  color: var(--icy-blue);
}

body.dark .icon-sun {
  opacity: 0;
  transform: scale(0.6) rotate(90deg);
}

body.dark .icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.nav-links li {
  display: flex;
  align-items: center;
}

/* ================= DARK MODE ================= */

body.dark {
  background-color: #04111f;
  background-image: linear-gradient(180deg, #04111f 0%, #071831 35%, #0b2240 70%, #102847 100%);
  color: var(--platinum);
}

/* Header */
body.dark .header {
  background-color: #04111f;
}

body.dark .header.scrolled {
  background-color: rgba(4, 17, 31, 0.92);
  border-bottom: 1px solid rgba(166, 223, 250, 0.14);
}

/* Navigation */
body.dark .nav-links a {
  color: var(--platinum);
}

body.dark .theme-toggle {
  color: var(--icy-blue);
}

/* Mobile nav background */
body.dark .nav-links {
  background: rgba(4, 17, 31, 0.96);
}

/* Hamburger */
body.dark .nav-toggle span {
  background: var(--platinum);
}

/* Sections */
body.dark section {
  background: transparent;
}

/* Cards & surfaces */
body.dark .service-card::before,
body.dark details,
body.dark .trust-card {
  background: rgba(13, 53, 89, 0.72);
  color: var(--platinum);
  border-color: rgba(166, 223, 250, 0.16);
}

/* Trust divider */
body.dark .trust-divider,
body.dark .footer-divider,
body.dark .footer-vertical-divider {
  background: rgba(166, 223, 250, 0.18);
}

/* Buttons */
body.dark .btn-primary {
  color: var(--platinum);
  background: var(--steel-blue);
}

/* Inputs */
body.dark input,
body.dark textarea {
  background: rgba(13, 53, 89, 0.72);
  color: var(--platinum);
  border: 1px solid rgba(166, 223, 250, 0.18);
}

/* Footer */
body.dark .footer {
  background: linear-gradient(180deg, rgba(16, 40, 71, 0.2) 0%, rgba(4, 17, 31, 0.38) 100%);
  color: var(--platinum);
}

body.dark .footer a {
  color: var(--platinum);
}

body.dark .services-grid h3,
body.dark .services-grid p {
  color: var(--platinum);
}

body.dark .trust-item span,
body.dark .footer-bottom {
  color: rgba(241, 242, 244, 0.78);
}

body.dark .logo img {
  filter:
    drop-shadow(0 0 2px rgba(0, 0, 0, 0.4))
    drop-shadow(0 0 2px rgb(0, 0, 0))
    drop-shadow(0 0 4px rgba(0, 0, 0, 0.8));
}

