/* ═══════════════════════════════════════════════════
   APEX FOUR VENTURES — styles.css
   Dark / Light mode + EmailJS contact form
═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;0,900;1,700&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { text-decoration: none; }

/* ══════════════════════════════════════
   DARK MODE (default)
══════════════════════════════════════ */
:root {
  --teal:        #00c896;
  --teal-hover:  #00e8b0;
  --gold:        #d4af37;
  --bg:          #07090e;
  --bg2:         #0b0f1a;
  --surface:     rgba(255,255,255,0.03);
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.045);
  --muted:       #6a7488;
  --dim:         #3a4255;
  --heading:     #eef1f8;
  --body-color:  #d8dde8;
  --nav-scroll:  rgba(7,9,14,0.94);
  --mmenu-bg:    rgba(7,9,14,0.98);
  --footer-bg:   #03050a;
  --inp-bg:      rgba(255,255,255,0.04);
  --inp-border:  rgba(255,255,255,0.10);
  --inp-color:   #d8dde8;
  --inp-ph:      #2a3040;
  --toast-bg:    #0f1a14;
  --meta-val:    #b8c0cf;
  --scroll-track:#07090e;
  --hfade-color: #07090e;
  --stat-lbl:    #333a4a;
  --footer-desc: #333a4a;
  --footer-ent:  #1e2330;
  --toggle-bg:   rgba(255,255,255,0.08);
  --toggle-icon: '☀️';
  --shadow-teal: rgba(0,200,150,0.45);
  --ci-border:   rgba(255,255,255,0.05);
  --dir-border:  rgba(255,255,255,0.06);
  --svc-border:  rgba(255,255,255,0.06);
  --gis-border:  rgba(255,255,255,0.05);
  --drow-border: rgba(255,255,255,0.045);
  --fbot-border: rgba(255,255,255,0.04);
  --nav-link-color: #7a8499;
  --orb1:        rgba(0,200,150,0.09);
  --orb2:        rgba(212,175,55,0.07);
  --grid-line:   rgba(0,200,150,0.025);
}

/* ══════════════════════════════════════
   LIGHT MODE
══════════════════════════════════════ */
body.light {
  --bg:          #f4f6fb;
  --bg2:         #eaecf3;
  --surface:     rgba(0,0,0,0.02);
  --border:      rgba(0,0,0,0.08);
  --border2:     rgba(0,0,0,0.06);
  --muted:       #5a6272;
  --dim:         #8a94a8;
  --heading:     #0e1525;
  --body-color:  #2a3042;
  --nav-scroll:  rgba(244,246,251,0.96);
  --mmenu-bg:    rgba(244,246,251,0.99);
  --footer-bg:   #e2e5ef;
  --inp-bg:      rgba(0,0,0,0.04);
  --inp-border:  rgba(0,0,0,0.12);
  --inp-color:   #0e1525;
  --inp-ph:      #9aa3b2;
  --toast-bg:    #f0faf6;
  --meta-val:    #3a4255;
  --scroll-track:#f4f6fb;
  --hfade-color: #f4f6fb;
  --stat-lbl:    #8a94a8;
  --footer-desc: #7a8499;
  --footer-ent:  #9aa3b2;
  --toggle-bg:   rgba(0,0,0,0.08);
  --shadow-teal: rgba(0,200,150,0.35);
  --ci-border:   rgba(0,0,0,0.06);
  --dir-border:  rgba(0,0,0,0.07);
  --svc-border:  rgba(0,0,0,0.07);
  --gis-border:  rgba(0,0,0,0.06);
  --drow-border: rgba(0,0,0,0.06);
  --fbot-border: rgba(0,0,0,0.06);
  --nav-link-color: #8a94a8;
  --orb1:        rgba(0,200,150,0.06);
  --orb2:        rgba(212,175,55,0.05);
  --grid-line:   rgba(0,200,150,0.04);
}

/* ── Base ── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--body-color);
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb { background: var(--teal); border-radius: 8px; }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--heading); }

.grad-teal { background: linear-gradient(135deg,#00c896,#00e8b0); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.grad-gold { background: linear-gradient(135deg,#d4af37,#f5e07a); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.grad-mix  { background: linear-gradient(135deg,#00c896 0%,#d4af37 100%); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }

.section-lbl {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--teal); display: block; margin-bottom: 14px;
}
.section-h { font-size: clamp(2rem,3.5vw,3rem); font-weight: 900; line-height: 1.12; }
.divider   { width: 48px; height: 3px; background: linear-gradient(90deg,#00c896,#d4af37); border-radius: 2px; margin-bottom: 24px; }

/* ── Layout ── */
.wrap      { max-width: 1280px; margin: 0 auto; padding: 0 6%; }
.sec       { padding: 120px 0; border-top: 1px solid var(--border); }
.two-col   { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3,1fr); gap: 48px; }
.four-col  { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }

/* ── Pills ── */
.tag-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(0,200,150,0.35); color: var(--teal);
  border-radius: 100px; padding: 5px 15px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.tag-pill.gold { border-color: rgba(212,175,55,0.35); color: var(--gold); }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); display: inline-block; }

/* ── Buttons ── */
.btn-p {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg,#00c896,#00a880);
  color: #07090e; font-weight: 700; font-family: 'DM Sans', sans-serif;
  border: none; cursor: pointer; border-radius: 10px;
  padding: 13px 26px; font-size: 0.88rem; letter-spacing: 0.05em;
  transition: all 0.3s; text-decoration: none;
}
.btn-p:hover { transform: translateY(-3px); box-shadow: 0 12px 36px var(--shadow-teal); }

.btn-o {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1.5px solid rgba(0,200,150,0.45); color: var(--teal);
  font-weight: 600; font-family: 'DM Sans', sans-serif; cursor: pointer;
  border-radius: 10px; padding: 11px 24px;
  font-size: 0.88rem; letter-spacing: 0.04em; transition: all 0.3s;
}
.btn-o:hover { background: rgba(0,200,150,0.1); border-color: var(--teal); transform: translateY(-2px); }

/* ── Theme Toggle Button ── */
#themeToggle {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--toggle-bg);
  border: 1px solid var(--border);
  cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; flex-shrink: 0;
  color: var(--heading);
}
#themeToggle:hover { background: rgba(0,200,150,0.15); border-color: var(--teal); transform: scale(1.1); }

/* ── Navbar ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 6%; display: flex; align-items: center; justify-content: space-between;
  transition: all 0.4s; gap: 16px;
}
#nav.scrolled {
  padding: 12px 6%;
  background: var(--nav-scroll);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(0,200,150,0.1);
}
.logo      { display: flex; align-items: center; gap: 13px; cursor: pointer; flex-shrink: 0; }
.logo-img  { height: 44px; width: auto; display: block; }
.navlinks  { display: flex; gap: 28px; align-items: center; }
.nav-right { display: flex; align-items: center; gap: 12px; }

.navlink {
  background: none; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 0.84rem; font-weight: 500;
  padding: 4px 0; position: relative; color: var(--nav-link-color);
  transition: color 0.3s; letter-spacing: 0.04em; text-decoration: none;
}
.navlink::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg,#00c896,#d4af37);
  transition: width 0.35s;
}
.navlink:hover, .navlink.on { color: var(--teal); }
.navlink:hover::after, .navlink.on::after { width: 100%; }
.hmbgr { display: none; background: none; border: none; color: var(--heading); font-size: 1.5rem; cursor: pointer; }

/* ── Mobile Menu ── */
#mmenu {
  position: fixed; inset: 0; z-index: 200;
  background: var(--mmenu-bg); backdrop-filter: blur(28px);
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 32px;
}
#mmenu.open { display: flex; }
#mmenu .navlink { font-size: 1.25rem; font-weight: 600; color: var(--heading); }
.closebtn { position: absolute; top: 22px; right: 22px; background: none; border: none; color: var(--heading); font-size: 1.8rem; cursor: pointer; }

/* Mobile theme toggle inside menu */
.mm-toggle-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.mm-toggle-lbl { font-size: 0.82rem; color: var(--muted); font-weight: 500; }

/* ── Hero ── */
#home {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden; padding-top: 100px;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  background-color: var(--bg);
}
.orb      { position: absolute; border-radius: 50%; pointer-events: none; }
.ring {
  position: absolute; top: 50%; right: 4%; width: 400px; height: 400px;
  border-radius: 50%; border: 1px solid rgba(0,200,150,0.1);
  transform: translateY(-50%); animation: spin 28s linear infinite;
  pointer-events: none; display: flex; align-items: center; justify-content: center;
}
.ring-in   { width: 280px; height: 280px; border-radius: 50%; border: 1px dashed rgba(212,175,55,0.15); }
.ring-dot  { position: absolute; width: 9px; height: 9px; background: var(--teal); border-radius: 50%; top: 50%; left: 0; transform: translateY(-50%); }
.ring-dot2 { position: absolute; width: 7px; height: 7px; background: var(--gold); border-radius: 50%; bottom: 16%; right: 7%; }
.hfade     { position: absolute; bottom: 0; left: 0; right: 0; height: 130px; background: linear-gradient(transparent, var(--hfade-color)); pointer-events: none; }

.hero-title { font-size: clamp(2.8rem,5.5vw,5rem); font-weight: 900; line-height: 1.06; letter-spacing: -0.02em; margin-bottom: 28px; }
.hero-meta  { display: flex; flex-wrap: wrap; gap: 28px; }
.meta-item  { border-left: 2px solid rgba(0,200,150,0.35); padding-left: 13px; }
.meta-lbl   { font-size: 0.64rem; color: var(--dim); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 3px; }
.meta-val   { font-size: 0.88rem; font-weight: 600; color: var(--meta-val); }
.meta-val.teal { color: var(--teal); }

/* ── Stats ── */
#stats { padding: 60px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-num { font-family: 'Playfair Display', serif; font-size: 2.8rem; font-weight: 900; line-height: 1; }
.stat-lbl  { font-size: 0.72rem; color: var(--stat-lbl); margin-top: 8px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }

/* ── About ── */
.drow { display: flex; justify-content: space-between; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--drow-border); }
.dk   { font-size: 0.76rem; color: var(--dim); font-weight: 500; }
.dv   { font-size: 0.82rem; color: var(--meta-val); font-weight: 500; text-align: right; max-width: 56%; }

/* ── Services ── */
.svc-item  { border-bottom: 1px solid var(--svc-border); padding: 36px 0; }
.svc-icon  { font-size: 2rem; display: inline-block; transition: all 0.3s; }
.svc-title { font-family: 'Playfair Display', serif; font-size: 1.28rem; font-weight: 700; color: var(--heading); margin: 14px 0 10px; transition: color 0.3s; }
.svc-num   { font-size: 0.68rem; color: var(--teal); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.svc-item:hover .svc-icon  { transform: scale(1.1); }
.svc-item:hover .svc-title { color: var(--teal); }
.sgrid     { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: start; }
.svc-desc  { color: var(--muted); line-height: 1.82; font-size: 0.93rem; }

/* ── GIS ── */
.gis-banner    { border-left: 3px solid var(--teal); padding-left: 28px; margin-bottom: 40px; }
.gis-banner h3 { font-size: clamp(1.6rem,3vw,2.4rem); font-weight: 800; line-height: 1.2; margin-bottom: 14px; }
.gis-stats     { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 28px; }
.gsn           { font-family: 'Playfair Display', serif; font-size: 1.7rem; font-weight: 900; color: var(--teal); }
.gsl           { font-size: 0.68rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 3px; }
.gis-list      { display: grid; grid-template-columns: 1fr 1fr; gap: 0 60px; }
.gis-card      { padding: 28px 0; border-bottom: 1px solid var(--gis-border); }
.gis-card:hover .gis-title { color: var(--teal); }
.gis-title     { font-weight: 600; font-size: 0.95rem; color: var(--heading); margin-bottom: 8px; transition: color 0.3s; }
.gis-desc      { color: var(--muted); font-size: 0.82rem; line-height: 1.75; }
.gis-inner     { display: flex; gap: 14px; align-items: flex-start; }
.gis-ico       { font-size: 1.3rem; margin-top: 2px; flex-shrink: 0; }
.gis-cta-bar   { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 40px; border-top: 1px solid rgba(0,200,150,0.18); margin-top: 48px; }

/* Map bg */
.map-bg     { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.map-line-v { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--grid-line); }
.map-line-h { position: absolute; left: 0; right: 0; border-top: 1px solid var(--grid-line); }
.map-dot    { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: rgba(0,200,150,0.3); }
.map-dot::before, .map-dot::after {
  content: ''; position: absolute; top: 50%; left: 50%; border-radius: 50%;
  transform: translate(-50%,-50%); animation: pring 2.5s ease-out infinite;
}
.map-dot::before { width: 20px; height: 20px; background: rgba(0,200,150,0.22); }
.map-dot::after  { width: 32px; height: 32px; background: rgba(0,200,150,0.1); animation-delay: 0.6s; }

/* ── Team ── */
.dir-card { border-bottom: 1px solid var(--dir-border); padding-bottom: 32px; }
.dir-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.avatar   { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg,#00c896,#d4af37); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: #07090e; flex-shrink: 0; }
.avatar.gold { background: linear-gradient(135deg,#d4af37,#f5e07a); }
.dir-name { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: var(--heading); }
.dir-role { font-size: 0.7rem; color: var(--teal); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 3px; }
.dir-meta { display: flex; gap: 24px; }
.dm-n     { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--gold); }
.dm-l     { font-size: 0.65rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; }
.sec-wrap { margin-top: 48px; }
.sec-lbl2 { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal); margin-bottom: 18px; }
.sec-row  { display: flex; align-items: center; gap: 18px; }
.sec-name { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: var(--heading); }
.sec-role { font-size: 0.7rem; color: var(--gold); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 3px; }
.sec-addr { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }

/* ── Contact ── */
.ci-row   { display: flex; gap: 14px; align-items: flex-start; border-bottom: 1px solid var(--ci-border); padding-bottom: 16px; }
.ci-icon  { font-size: 1.2rem; margin-top: 1px; }
.ci-label { font-size: 0.67rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 3px; font-weight: 600; }
.ci-val   { font-size: 0.86rem; color: var(--meta-val); }

/* ── Form ── */
.form-lbl { display: block; font-size: 0.7rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; font-weight: 600; }
.form-inp {
  width: 100%;
  background: var(--inp-bg);
  border: 1px solid var(--inp-border);
  border-radius: 10px; padding: 13px 16px;
  color: var(--inp-color);
  font-family: 'DM Sans', sans-serif; font-size: 0.88rem;
  transition: border-color 0.3s, box-shadow 0.3s; outline: none;
  /* Fix dropdown/select appearance */
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
/* Custom dropdown arrow that respects theme */
select.form-inp {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300c896' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
/* Dropdown options theming */
select.form-inp option {
  background: var(--bg2, #0b0f1a);
  color: var(--inp-color);
  padding: 10px;
}
body.light select.form-inp option {
  background: #eaecf3;
  color: #0e1525;
}
.form-inp:focus { border-color: rgba(0,200,150,0.55); box-shadow: 0 0 0 3px rgba(0,200,150,0.09); }
.form-inp::placeholder { color: var(--inp-ph); }
.form-group { margin-bottom: 18px; }

/* ── Toast ── */
.toast {
  display: none; position: fixed; bottom: 28px; right: 28px; z-index: 999;
  background: var(--toast-bg); border: 1px solid rgba(0,200,150,0.4);
  color: var(--heading); border-radius: 12px; padding: 14px 22px;
  font-size: 0.88rem; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,200,150,0.2); animation: fadeUp 0.4s ease;
  max-width: 340px;
}
.toast.show { display: block; }
.toast.err  { border-color: rgba(255,80,80,0.4); box-shadow: 0 8px 32px rgba(255,80,80,0.15); }

/* Spinner */
.spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(7,9,14,0.3); border-top-color: #07090e; border-radius: 50%; animation: rotate 0.7s linear infinite; }
.btn-p.loading .spinner { display: inline-block; }
.btn-p.loading .btn-txt { display: none; }

/* ── Footer ── */
footer { background: var(--footer-bg); border-top: 1px solid var(--border); padding: 56px 6% 32px; }
.fbot  { border-top: 1px solid var(--fbot-border); padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }

/* ── Scroll-reveal ── */
.rev { opacity: 0; transform: translateY(36px); transition: opacity 0.9s cubic-bezier(.22,1,.36,1), transform 0.9s cubic-bezier(.22,1,.36,1); }
.rev.vis { opacity: 1; transform: translateY(0); }
.rev.d1 { transition-delay: 0.08s; }
.rev.d2 { transition-delay: 0.16s; }
.rev.d3 { transition-delay: 0.24s; }
.rev.d4 { transition-delay: 0.32s; }

/* ── Keyframes ── */
@keyframes spin   { from{transform:translateY(-50%) rotate(0)} to{transform:translateY(-50%) rotate(360deg)} }
@keyframes pring  { 0%{transform:translate(-50%,-50%) scale(1);opacity:.8} 100%{transform:translate(-50%,-50%) scale(2.4);opacity:0} }
@keyframes fadeUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
@keyframes rotate { to{transform:rotate(360deg)} }

/* ── Responsive ── */
@media (max-width: 768px) {
  .navlinks        { display: none; }
  .hmbgr           { display: block; }
  .two-col, .three-col { grid-template-columns: 1fr; gap: 40px; }
  .four-col        { grid-template-columns: 1fr 1fr; }
  .sgrid           { grid-template-columns: 1fr; gap: 16px; }
  .gis-list        { grid-template-columns: 1fr; }
  .ring            { display: none; }
  footer .two-col  { grid-template-columns: 1fr; gap: 32px; }
  .nav-right .btn-p { display: none; }
}
@media (max-width: 480px) {
  .four-col  { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.5rem; }
}
