/*
Theme Name: ViewOne Nexus
Theme URI: https://viewonenexus.com/
Author: ViewOne Nexus
Author URI: https://viewonenexus.com/
Description: Dark, single-page marketing theme for ViewOne Nexus — hero, about, services, why-us, and a call-to-action with a built-in enquiry modal that emails submissions to the address set in Customizer > ViewOne Nexus. Classic (non-block) theme, no page builder required.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: viewone-nexus
Tags: one-column, custom-menu, custom-logo, featured-images, translation-ready, dark-mode-support
*/

/* ViewOne Nexus — styles
   1. Tokens & reset      4. Sections
   2. Layout helpers      5. Cards
   3. Header & nav        6. CTA / footer / modal / responsive */

/* ---------- 1. Tokens & reset ---------- */
:root {
  --bg: #050816;
  --bg-soft: rgba(255, 255, 255, 0.025);
  --blue: #3b82f6;
  --blue-light: #60a5fa;
  --purple: #7c3aed;
  --purple-light: #a78bfa;
  --text: #ffffff;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --gradient: linear-gradient(90deg, var(--blue), var(--purple));
  --max: 1280px;
  --pad-x: clamp(20px, 4vw, 32px);
  --pad-y: clamp(56px, 8vw, 96px);
  --radius: 18px;
  --header-h: 80px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--blue-light); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--purple-light); }
h1, h2, h3 { letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: rgba(124, 58, 237, 0.45); }

:focus-visible {
  outline: 2px solid var(--blue-light);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 2. Layout helpers ---------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.section > .container { padding-top: var(--pad-y); padding-bottom: var(--pad-y); }

.eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-light);
}

.section-title {
  margin: 0 0 52px;
  max-width: 780px;
  font-size: clamp(28px, 4.2vw, 40px);
  line-height: 1.15;
  font-weight: 700;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 14px 34px -14px rgba(124, 58, 237, 0.95);
}
.btn-primary:hover { color: #fff; filter: brightness(1.12); transform: translateY(-2px); }
.btn-ghost {
  color: #e5e7eb;
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover {
  color: #fff;
  border-color: rgba(124, 58, 237, 0.7);
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
}
.btn-sm { padding: 11px 22px; font-size: 15px; border-radius: 10px; }

/* ---------- Ambient background ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 78%);
}
.bg-glow {
  position: absolute;
  top: 0; left: 0;
  width: 600px; height: 600px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.13), rgba(59, 130, 246, 0.07) 45%, transparent 68%);
  filter: blur(20px);
  will-change: transform;
}
.bg-dot {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 999px;
  background: var(--blue-light);
  box-shadow: 0 0 12px 2px rgba(96, 165, 250, 0.7);
  opacity: 0.45;
  animation: drift 20s ease-in-out infinite;
}
.bg-dot:nth-child(3) { top: 8%; left: 6%; }
.bg-dot:nth-child(4) { top: 62%; left: 22%; background: var(--purple-light); animation-duration: 24s; animation-delay: 3s; }
.bg-dot:nth-child(5) { top: 28%; left: 78%; animation-duration: 21s; animation-delay: 6s; }
.bg-dot:nth-child(6) { top: 82%; left: 66%; background: var(--purple-light); animation-duration: 27s; animation-delay: 1.5s; }
.bg-dot:nth-child(7) { top: 45%; left: 46%; animation-duration: 30s; animation-delay: 9s; }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33% { transform: translate3d(28px, -36px, 0); }
  66% { transform: translate3d(-22px, 24px, 0); }
}

.page { position: relative; z-index: 1; }

/* ---------- 3. Header & nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(5, 8, 22, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-header.is-scrolled { background: rgba(5, 8, 22, 0.92); }
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header-spacer { height: var(--header-h); }

/* Logo image. Height-driven: set the height and the width follows the
   image's own aspect ratio, so replacing static/img/logo.png with a
   differently-proportioned file needs no CSS change. */
.logo {
  display: block;
  flex: none;
  height: 46px;
}
.logo img {
  display: block;
  width: auto;
  height: 100%;
  object-fit: contain;
}
.logo-lg { height: 62px; }

.nav-desktop { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 36px); }
.nav-link { color: var(--text-muted); font-size: 15px; font-weight: 500; }
.nav-link:hover, .nav-link[aria-current="page"] { color: #fff; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.nav-toggle:hover { border-color: rgba(124, 58, 237, 0.7); }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: rgba(5, 8, 22, 0.97);
  backdrop-filter: blur(14px);
  padding: 14px var(--pad-x) 22px;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile.is-open { display: flex; }
.nav-mobile a {
  padding: 14px 4px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.nav-mobile a:hover { color: #fff; }
.nav-mobile .btn { margin-top: 14px; border-bottom: none; }

/* ---------- 4. Hero & about ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 56px;
  align-items: center;
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: var(--pad-y);
}
.hero::before {
  content: "";
  position: absolute;
  top: -160px; left: -120px;
  width: 620px; height: 620px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.16), transparent 62%);
  pointer-events: none;
}
.hero-copy { position: relative; }
.hero-title {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hero-lead {
  margin: 28px 0 0;
  max-width: 520px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -6%;
  border-radius: 32px;
  background: radial-gradient(ellipse at 50% 48%, rgba(124, 58, 237, 0.22), transparent 66%);
  pointer-events: none;
}
.hero-visual img { position: relative; width: 100%; height: auto; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 64px;
}
.about-body { display: flex; flex-direction: column; gap: 22px; }
.about-body p { margin: 0; font-size: 18px; line-height: 1.7; color: var(--text-muted); }

/* ---------- 5. Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(59, 130, 246, 0.55); background: rgba(59, 130, 246, 0.06); }
.card:nth-child(even):hover { border-color: rgba(124, 58, 237, 0.55); background: rgba(124, 58, 237, 0.06); }
.card h3 { margin: 0 0 10px; font-size: 19px; font-weight: 600; }
.card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-muted); }

.card-service { display: flex; gap: 20px; }
.card-icon {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--blue-light);
}
.card:nth-child(even) .card-icon {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
  color: var(--purple-light);
}

.card-why { padding: 30px 26px; }
.card-why .card-icon {
  width: 42px; height: 42px;
  margin-bottom: 20px;
  border-radius: 12px;
  border: none;
}
.card-why h3 { font-size: 18px; }

/* ---------- 6. CTA, footer, modal ---------- */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(105deg, #0a1030 0%, #131a4a 42%, #3b1d6e 100%);
  padding: clamp(48px, 7vw, 72px) var(--pad-x);
  text-align: center;
}
.cta-waves {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.85;
}
.cta-waves .wave-a { animation: waveA 14s ease-in-out infinite; }
.cta-waves .wave-b { animation: waveB 19s ease-in-out infinite; }
.cta-waves .wave-c { animation: waveB 16s ease-in-out infinite; }
.cta-waves .wave-d { animation: waveA 22s ease-in-out infinite; }
.cta > *:not(.cta-waves) { position: relative; }
.cta .eyebrow { color: #7dd3fc; }
.cta h2 { margin: 0; font-size: clamp(32px, 5vw, 44px); font-weight: 700; }
.cta p { margin: 16px 0 34px; font-size: 18px; color: #dbeafe; }

@keyframes waveA {
  0%, 100% { transform: translate3d(0, 0, 0) scaleY(1); }
  50% { transform: translate3d(-26px, 10px, 0) scaleY(1.08); }
}
@keyframes waveB {
  0%, 100% { transform: translate3d(0, 6px, 0) scaleY(1.04); }
  50% { transform: translate3d(24px, -8px, 0) scaleY(0.94); }
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 40px;
}
.footer-about p { margin: 20px 0 0; max-width: 320px; font-size: 14px; line-height: 1.65; color: var(--text-muted); }
.footer-col h3 { margin: 0 0 18px; font-size: 15px; font-weight: 600; color: #fff; }
.footer-list { display: flex; flex-direction: column; gap: 12px; }
.footer-list a { font-size: 14px; color: var(--text-muted); }
.footer-list a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px var(--pad-x) 40px;
  text-align: center;
}
.footer-bottom p { margin: 0; font-size: 13px; color: var(--text-dim); }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: rgba(3, 5, 15, 0.78);
  backdrop-filter: blur(6px);
}
.modal.is-open { display: flex; }
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(160deg, #0a0f26, #0b0a1f);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  padding: clamp(24px, 4vw, 36px);
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.modal-close:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.modal-panel h2 { margin: 0 0 8px; font-size: 26px; font-weight: 700; }
.modal-intro { margin: 0 0 26px; font-size: 15px; line-height: 1.6; color: var(--text-muted); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.field-full { grid-column: 1 / -1; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: rgba(59, 130, 246, 0.8); }
.field option { background: #0a0f26; color: #fff; }
.field ::placeholder { color: var(--text-dim); }

.form-error { grid-column: 1 / -1; margin: 0; font-size: 14px; color: #fca5a5; }
.form-error:empty { display: none; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form-note { margin: 0; font-size: 13px; color: var(--text-dim); }
.form-success {
  display: none;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.1);
  font-size: 15px;
  line-height: 1.6;
  color: #dbeafe;
}
.form-success.is-visible { display: block; }
.is-hidden { display: none !important; }

/* ---------- Responsive & motion ---------- */
@media (max-width: 860px) {
  .nav-desktop, .header-inner > .btn { display: none; }
  .nav-toggle { display: grid; }
  .hero { gap: 40px; }
  .hero-visual { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 7. WordPress integration ----------
   Rules that only matter inside WordPress: the admin bar offset, the
   editor/comment defaults, and alignment classes WP expects a theme to
   provide. The design above is untouched. */

/* Admin bar pushes the page down 32px (46px on small screens); the fixed
   header has to move with it or it hides behind the bar. */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

/* WP core alignment + caption classes (required for theme review). */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: none; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Custom logo: WP wraps the logo image in .custom-logo-link. Match the
   sizing the static .logo rule uses so either source looks the same. */
.logo .custom-logo-link { display: block; height: 100%; }
.logo .custom-logo { width: auto; height: 100%; object-fit: contain; }
/* Text fallback when no logo image is set. */
.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  line-height: 0.92;
  letter-spacing: 0.06em;
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  white-space: nowrap;
}
.logo-text .logo-sub { font-size: 15px; letter-spacing: 0.3em; color: var(--purple); }

/* Interior pages (anything that is not the front page) and post content. */
.page-hero { padding-top: clamp(40px, 6vw, 72px); }
.page-hero h1 { margin: 0; font-size: clamp(32px, 5vw, 46px); font-weight: 700; }
.entry-content { max-width: 760px; font-size: 16px; line-height: 1.75; color: var(--text-muted); }
.entry-content h2, .entry-content h3, .entry-content h4 { color: #fff; margin: 2em 0 0.6em; }
.entry-content a { color: var(--blue-light); text-decoration: underline; }
.entry-content img { border-radius: var(--radius); margin: 1.5em 0; }
.entry-content blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--purple);
  color: #dbeafe;
}
.entry-content code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.92em;
  color: #fff;
}
.entry-content pre {
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  overflow-x: auto;
}
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: 0.5em; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}
.post-list { display: grid; gap: 20px; margin-top: 32px; }
.post-meta { font-size: 13px; color: var(--text-dim); margin: 0 0 10px; }
.pagination { margin-top: 40px; display: flex; gap: 10px; flex-wrap: wrap; }
.pagination .page-numbers {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.pagination .page-numbers.current { border-color: var(--purple); color: #fff; }
