/* Design tokens and global styles */
:root{
  --primary: #0b3d91;     /* deep blue (pycloud-like) */
  --accent: #0fb3d4;      /* teal accent */
  --gold: #FFD700;        /* CTA buttons only */
  --text: #2C2C2C;
  --muted: #6b7280;
  --bg: #f7f8fb;
  --container: 1100px;
  --space-sm: 0.75rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --radius: 12px;
  --elev: 0 8px 24px rgba(16,24,40,0.08);
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  /* Make page background black and default text white (content below hero will be dark) */
  color: #fff;
  background: #000;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* Navigation */
/* Header / nav */

header { background: transparent; position:fixed; top:0; left:0; right:0; z-index:60; transition: background .18s ease, box-shadow .18s ease; }

/* Layout: logo left, nav items right */
nav { display:flex; align-items:center; padding:0.6rem 1.5rem; max-width:var(--container); margin:0 auto; justify-content:space-between; }
nav ul { list-style:none; margin:0; padding:0; display:flex; gap:0.5rem; margin-left:auto; align-items:center; }

/* Pill style for links */
nav a { position:relative; display:inline-flex; align-items:center; gap:0.5rem; padding:0.45rem 0.85rem; border-radius:999px; color: #fff; text-decoration:none; font-weight:600; transition: background .14s ease, color .14s ease, transform .12s ease; }
nav a:hover { transform: translateY(-2px); }
nav a.active { background: rgba(255,255,255,0.14); color: #fff; }

/* Logo sizes tuned for PyCloud-like header */
.logo { height:72px; margin-right:1rem; }

/* Circular hover/backdrop using pseudo-element but placed on li to avoid absolute conflicts */
nav li { position:relative; }
nav a::before { content: ""; position:absolute; left:50%; top:50%; width:48px; height:48px; transform:translate(-50%,-50%) scale(0.96); border-radius:50%; background: rgba(255,255,255,0.04); z-index:-1; transition: transform .12s ease, background .12s ease, opacity .12s ease; opacity:0.95; }
nav a:hover::before { transform:translate(-50%,-50%) scale(1.06); background: rgba(255,255,255,0.14); }

/* Header state for switching to white background (toggle by JS or on scroll) */
/* When the header switches to white (bg-white), apply shadow and change link colors */
/* When header switches to white, apply subtle glass effect and refined shadow + separator */
header.bg-white {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.86));
  box-shadow: 0 8px 30px rgba(2,6,23,0.08);
  backdrop-filter: blur(6px) saturate(1.03);
  -webkit-backdrop-filter: blur(6px) saturate(1.03);
}
/* thin separator line (slightly darker than before for contrast) */
header.bg-white::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(2,6,23,0.06); }
header.bg-white nav a { color: var(--primary); /* or black */ }
header.bg-white nav a.active { background: transparent; color: var(--primary); }
header.bg-white nav a::before { background: rgba(11,61,145,0.03); opacity:0.85; }

/* Homepage and header spacing rules
  Default: add top padding so fixed header doesn't overlap content.
  On the homepage (body.home) we want the header to overlay the hero video, so remove the padding. */
body { padding-top:88px; }
body.home { padding-top: 0; }

/* Homepage-specific header overlay: header sits absolutely over the video and shows a white separator line */
/* Homepage overlay: header sits above video. keep background transparent but add a subtle white separator */
/* On the homepage the header overlays the video by default; it becomes white only when
  the JS toggles `header.bg-white` (on hover or scroll). */
body.home header { position:absolute; top:0; left:0; right:0; background:transparent; box-shadow:none; }
body.home header::after { content: ""; position:absolute; left:0; right:0; bottom:0; height:1px; background: rgba(255,255,255,0.18); pointer-events:none; }
body.home header nav a { color: #fff; }
body.home header .site-title { color: #fff; font-weight:700; font-family: 'Poppins', sans-serif; margin-left:0.5rem; }
body.home header .brand { display:flex; align-items:center; gap:0.5rem; }
/* When scrolled the existing header.bg-white rules will override and switch the title/link colors back to primary */

/* Make the site title larger and use a modern sans for both words */
.site-title { font-size: 1.6rem; display:inline-flex; align-items:center; gap:0.5rem; font-family: 'Poppins', 'Montserrat', sans-serif; font-weight:700; letter-spacing:0.2px; }
.brand-logo { height:44px; width:auto; display:inline-block; margin-right:0.5rem; }

/* When the header is white (scrolled) — even on the homepage — force the nav & title to the text color (black-like) */
body.home header.bg-white nav a,
body.home header.bg-white .site-title,
body.home header.bg-white .site-title-zark,
body.home header.bg-white .site-title-wealth {
  color: #000 !important;
  fill: #000 !important;
}

/* When header becomes fixed on the homepage, add top padding to avoid layout jump */
body.has-fixed-header { padding-top: 88px; }
@media (max-width:900px){
  body.has-fixed-header { padding-top: 72px; }
}

/* Make the homepage header fixed when scrolled (body.has-fixed-header is set by JS) */
body.has-fixed-header header { position: fixed; top: 0; left: 0; right: 0; z-index: 120; }

/* Dim / hide the background video when header is white or hovered */
/* header-dim-video behavior removed: background video no longer dimmed/paused. */

/* Also ensure the header separator switches to a subtle dark line when scrolled */
body.home header.bg-white::after { background: rgba(2,6,23,0.06); }

/* Hero Section */

/* Hero */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1rem; }
.hero { padding: 4rem 0; background: linear-gradient(180deg,#fff 0%,var(--bg) 100%); border-bottom: 4px solid var(--primary); }
.hero-grid { display:grid; grid-template-columns: 1fr 480px; gap: var(--space-lg); align-items:center; }
.hero-copy h1 { font-family: 'Poppins', 'Montserrat', sans-serif; font-size: clamp(2rem, 4vw, 3rem); margin:0 0 0.5rem 0; color: #0b234f; }
.lead { font-size:1.05rem; color:var(--muted); margin-bottom:1rem; }
.hero-ctas { display:flex; gap:0.75rem; align-items:center; }

/* CTA Button */
.cta-button, .btn.primary {
  background: var(--gold);
  color: #111;
  padding:0.75rem 1.25rem;
  border-radius:10px;
  text-decoration:none;
  font-weight:700;
  display:inline-block;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn.ghost { background:transparent; color:var(--primary); border:2px solid rgba(11,61,145,0.08); padding:0.6rem 1rem; border-radius:8px; }
.cta-button:hover, .btn.primary:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }

/* Sections */

.why-zark, .services-teaser, .cta, .about, .contact, .services { max-width: 980px; margin: 3.5rem auto; padding: 0 1rem; }
.why-zark h2, .services-teaser h2, .cta h2 { color: var(--primary); font-family:'Poppins','Montserrat',sans-serif; font-size:1.6rem; margin-bottom:0.5rem; }
.why-zark p, .services-teaser p, .cta p { color: inherit; font-size:1.05rem; margin-bottom:1rem; }


/* Services grid + card styles (replaces .service-boxes/.box pattern) */
.services-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:1.5rem; margin-top:1rem; }
.card { background:#fff; border-radius:var(--radius); overflow:hidden; box-shadow:var(--elev); display:flex; flex-direction:column; min-height:260px; }
.card-visual { height:140px; background-size:cover; background-position:center; }
.card-body { padding:1rem 1.25rem; flex:1; }
.card h3 { margin:0 0 0.5rem 0; }

/* keep legacy classes for compatibility */
.service-boxes { display:flex; gap:1rem; flex-wrap:wrap; }
.box { min-width:260px; }

/* Contact form */
form { display:flex; flex-direction:column; gap:1rem; margin-top:1.5rem; }
input, textarea { padding:0.75rem; border:1px solid rgba(11,61,145,0.06); border-radius:6px; font-size:1rem; background:#fff; color:var(--text); }
input:focus, textarea:focus { outline:none; border-color:var(--primary); }
button { background:var(--gold); color:#111; padding:0.75rem 1.5rem; border-radius:10px; border:none; font-weight:700; }
button:hover { transform:translateY(-2px); box-shadow:0 8px 20px rgba(0,0,0,0.08); }

/* Contact Info */
.contact-info {
  margin-top: 2em;
  font-size: 1em;
  color: inherit;
}

/* Footer */
footer { text-align:center; padding:2rem 1rem; background: #0b234f; color: #fff; font-size:0.95rem; }

/* Homepage Video Background */
/* Video background (kept) */
.video-background { position:relative; height:100vh; overflow:hidden; background:var(--bg); }
.video-background::before { content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(11,34,79,0.46), rgba(2,6,23,0.24)); z-index:1; }
.video-background video { position:absolute; top:50%; left:50%; min-width:100%; min-height:100%; transform:translate(-50%,-50%); object-fit:cover; z-index:0; }

/* Smooth transitions for video visual changes */
.video-background video { transition: opacity .22s ease, filter .22s ease; }

/* When header toggles to white, reduce prominence of the background video */
/* Slight fade/opacity on the background video when header is white */
/* Reverted: keep video fully visible when header.bg-white */
/* header.bg-white + main .video-background video { opacity: 0.22; filter: blur(1px) saturate(0.9); } */

/* Logo sizing: default reduced to 120px; responsive adjustment below */
.logo { height:72px; margin-right:1rem; }
@media (max-width:900px){
  .logo { height:56px; }
  body { padding-top:72px; }
  nav { padding:0.5rem 1rem; }
  nav ul { gap:0.4rem; }
  nav a { padding:0.45rem 0.7rem; font-size:0.95rem; }
}

/* Accessibility: visible focus for keyboard users */
nav a:focus-visible {
  outline: 3px solid rgba(11,61,145,0.12);
  outline-offset: 4px;
  border-radius: 999px;
}

/* Mobile: hamburger toggle */
.nav-toggle { display:none; background:transparent; border:0; cursor:pointer; width:44px; height:44px; align-items:center; justify-content:center; border-radius:8px; }
.nav-toggle .bar { display:block; width:20px; height:2px; background:#fff; border-radius:2px; position:relative; transition: transform .18s ease, opacity .12s ease; }
.nav-toggle .bar::before, .nav-toggle .bar::after { content:""; position:absolute; left:0; width:20px; height:2px; background:#fff; border-radius:2px; transition: transform .18s ease, opacity .12s ease; }
.nav-toggle .bar::before { top:-6px; }
.nav-toggle .bar::after { top:6px; }

/* When header.bg-white (light background) make hamburger dark */
header.bg-white .nav-toggle .bar,
header.bg-white .nav-toggle .bar::before,
header.bg-white .nav-toggle .bar::after { background: var(--primary); }

/* Mobile menu panel */
@media (max-width:900px){
  .nav-toggle { display:inline-flex; }
  nav ul { position:absolute; top:100%; right:1rem; display:none; flex-direction:column; gap:0.25rem; background:#fff; padding:0.5rem; border-radius:12px; box-shadow: 0 12px 40px rgba(2,6,23,0.12); min-width:200px; }
  nav li { margin:0; }
  nav li + li { border-top:1px solid rgba(11,61,145,0.04); }
  nav a { color: var(--primary); background: transparent; padding:0.75rem 1rem; border-radius:8px; }
  header.nav-open nav ul { display:flex; }

  /* transform hamburger to X when open */
  header.nav-open .nav-toggle .bar { transform: rotate(45deg); }
  header.nav-open .nav-toggle .bar::before { transform: rotate(90deg) translateX(0); top:0; }
  header.nav-open .nav-toggle .bar::after { opacity:0; }
}

.overlay { position:relative; z-index:3; text-align:left; color:#fff; padding-top:28vh; padding-left:6vw; max-width:680px; }
.overlay h1 { animation: fadeIn 1s; font-size:3.25rem; font-weight:700; color:#fff; text-shadow: 0 6px 22px rgba(2,6,23,0.6); }
.overlay p { font-size:1.2rem; color:rgba(255,255,255,0.9); text-shadow: 0 4px 18px rgba(2,6,23,0.55); }
.overlay .cta-button { margin-top:20px; }

/* Responsive Design */
@media (max-width:900px){
  .hero-grid { grid-template-columns:1fr; }
  .hero-media { order:2; }
  .services-grid { grid-template-columns:1fr; }
  .service-boxes { flex-direction:column; align-items:center; }
  .box { width:90%; margin-bottom:1rem; }
  section { max-width:98vw; }
  nav ul { gap:1rem; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95);}
  to { opacity: 1; transform: scale(1);}
}

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

@media (max-width:600px){
  .overlay h1 { font-size:2em; }
  .lead, .overlay p { font-size:1.05rem; }
  .cta-button { font-size:1rem; padding:0.75rem 1rem; }
  nav { position:sticky; top:0; z-index:100; }
}
