/*
Theme Name: OPES Group Dark Luxury
Theme URI: https://opesafrica.com
Author: OPES Group
Description: Dark luxury theme for OPES Group / PES Africa. Gold and black aesthetic with Claude-powered AI lead agent.
Version: 1.0.0
Text Domain: opes-group
*/

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  --gold:        #C9A84C;
  --gold-light:  #E8C97A;
  --gold-dark:   #9A7A30;
  --black:       #0A0A0A;
  --black-mid:   #111111;
  --black-card:  #161616;
  --black-border:#222222;
  --white:       #F5F0E8;
  --white-dim:   #A89F8C;
  --font-display:'Cormorant Garamond', Georgia, serif;
  --font-body:   'Montserrat', 'Helvetica Neue', sans-serif;
  --transition:  0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width:   1280px;
  --section-pad: 100px 40px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; height: auto; display: block; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--white);
}
h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.25rem; }
p  { font-size: 0.95rem; color: var(--white-dim); margin-bottom: 1.2em; }

.gold-text    { color: var(--gold); }
.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 1rem;
}

/* ============================================
   LAYOUT
   ============================================ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 40px; }
section { padding: var(--section-pad); }
.divider { width: 60px; height: 1px; background: var(--gold); margin: 1.5rem 0; }
.divider-center { margin: 1.5rem auto; }
.text-center { text-align: center; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
  z-index: 0;
}
.btn:hover { color: var(--black); }
.btn:hover::before { transform: scaleX(1); }
.btn span { position: relative; z-index: 1; }
.btn-filled { background: var(--gold); color: var(--black); }
.btn-filled::before { background: var(--gold-light); }
.btn-filled:hover { color: var(--black); }

/* ============================================
   NAVIGATION
   ============================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 24px 0;
  transition: all var(--transition);
  border-bottom: 1px solid transparent;
}
#site-header.scrolled {
  background: rgba(10,10,10,0.97);
  padding: 16px 0;
  border-color: var(--black-border);
}
#site-header .container { display: flex; align-items: center; justify-content: space-between; }

.site-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--white);
}
.site-logo span { color: var(--gold); }

.main-nav ul { display: flex; list-style: none; gap: 2.5rem; align-items: center; }
.main-nav a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white-dim);
  transition: color var(--transition);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover,
.main-nav .current-menu-item > a { color: var(--gold); border-color: var(--gold); }
.nav-cta { margin-left: 1rem; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.menu-toggle span { display: block; width: 24px; height: 1px; background: var(--white); transition: all var(--transition); }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 140px 0 80px;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(201,168,76,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 80% 80% at 50% 100%, rgba(201,168,76,0.04) 0%, transparent 60%),
    var(--black);
  z-index: 0;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow { font-size: 0.7rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin-bottom: 1.5rem; }
.hero h1 { max-width: 820px; margin-bottom: 1.5rem; }
.hero-sub { font-size: 1.05rem; max-width: 560px; color: var(--white-dim); margin-bottom: 2.5rem; }
.hero-actions { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.hero-scroll { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 1; }
.hero-scroll span { font-size: 0.62rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--white-dim); }
.scroll-line { width: 1px; height: 50px; background: linear-gradient(var(--gold), transparent); animation: scrollAnim 2s ease-in-out infinite; }
@keyframes scrollAnim { 0%,100%{opacity:0.3} 50%{opacity:1} }

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar { background: var(--black-card); border-top: 1px solid var(--black-border); border-bottom: 1px solid var(--black-border); padding: 50px 40px; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.stat-item { padding: 1.5rem 2rem; text-align: center; border-right: 1px solid var(--black-border); }
.stat-item:last-child { border-right: none; }
.stat-number { font-family: var(--font-display); font-size: 3rem; color: var(--gold); line-height: 1; margin-bottom: 0.4rem; }
.stat-label { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--white-dim); }

/* ============================================
   ABOUT TEASER
   ============================================ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: center; }
.about-image { position: relative; }
.about-image img { width: 100%; height: 500px; object-fit: cover; filter: grayscale(20%) brightness(0.85); }
.about-image::before { content:''; position:absolute; inset:-20px 20px 20px -20px; border:1px solid var(--gold); z-index:-1; }

/* ============================================
   SERVICES GRID (home)
   ============================================ */
.services-section { background: var(--black-mid); }
.services-header { text-align: center; max-width: 700px; margin: 0 auto 4rem; }
.services-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--black-border); }
.service-card { background: var(--black-card); padding: 3rem 2.5rem; position: relative; overflow: hidden; transition: background var(--transition); }
.service-card::after { content:''; position:absolute; bottom:0;left:0; width:0;height:2px; background:var(--gold); transition:width var(--transition); }
.service-card:hover { background: var(--black-mid); }
.service-card:hover::after { width: 100%; }
.service-icon { width: 48px; height: 48px; margin-bottom: 1.5rem; color: var(--gold); }
.service-card h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.service-card p { font-size: 0.88rem; }
.service-card .read-more { display:inline-flex; align-items:center; gap:8px; font-size:0.7rem; letter-spacing:0.2em; text-transform:uppercase; color:var(--gold); margin-top:1.5rem; }

/* ============================================
   INSIGHTS TEASER
   ============================================ */
.insights-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; margin-top: 3rem; }
.insight-card { border: 1px solid var(--black-border); transition: border-color var(--transition); }
.insight-card:hover { border-color: var(--gold-dark); }
.insight-img { width:100%; height:200px; object-fit:cover; filter:grayscale(30%); transition:filter var(--transition); }
.insight-card:hover .insight-img { filter: grayscale(0); }
.insight-body { padding: 1.5rem; }
.insight-meta { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.6rem; }
.insight-body h4 { margin-bottom: 0.6rem; font-size: 1.2rem; }
.insight-body p { font-size: 0.85rem; }

/* ============================================
   CTA BAND
   ============================================ */
.cta-band { background: var(--black-card); border-top:1px solid var(--black-border); border-bottom:1px solid var(--black-border); text-align:center; padding:80px 40px; }
.cta-band h2 { margin-bottom:1rem; max-width:600px; margin-left:auto; margin-right:auto; }
.cta-band p  { max-width:500px; margin:0 auto 2rem; }

/* ============================================
   FOOTER
   ============================================ */
#site-footer { background: var(--black-mid); border-top:1px solid var(--black-border); padding:70px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 4rem; }
.footer-brand p { font-size:0.85rem; margin-top:1rem; max-width:280px; }
.footer-col h5 { font-size:0.68rem; letter-spacing:0.25em; text-transform:uppercase; color:var(--gold); margin-bottom:1.2rem; font-family:var(--font-body); font-weight:600; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { font-size:0.85rem; color:var(--white-dim); }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { border-top:1px solid var(--black-border); padding-top:1.5rem; display:flex; justify-content:space-between; align-items:center; }
.footer-bottom p { font-size:0.75rem; color:var(--white-dim); margin:0; }

/* ============================================
   AI AGENT WIDGET
   ============================================ */
#opes-agent { position:fixed; bottom:30px; right:30px; z-index:9999; font-family:var(--font-body); }
.agent-toggle { width:60px; height:60px; border-radius:50%; background:var(--gold); border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 20px rgba(201,168,76,0.4); transition:transform var(--transition),box-shadow var(--transition); margin-left:auto; }
.agent-toggle:hover { transform:scale(1.08); box-shadow:0 6px 30px rgba(201,168,76,0.6); }
.agent-toggle svg { color:var(--black); width:26px; height:26px; }
.agent-panel { display:none; flex-direction:column; width:360px; height:500px; background:var(--black-card); border:1px solid var(--gold-dark); margin-bottom:12px; overflow:hidden; box-shadow:0 20px 60px rgba(0,0,0,0.7); }
.agent-panel.open { display: flex; }
.agent-header { background:var(--gold); color:var(--black); padding:14px 18px; display:flex; align-items:center; justify-content:space-between; }
.agent-header-left { display:flex; align-items:center; gap:10px; }
.agent-dot { width:8px; height:8px; border-radius:50%; background:var(--black); opacity:0.4; }
.agent-dot.active { opacity:1; animation:pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:0.4} 50%{opacity:1} }
.agent-header h4 { font-family:var(--font-body); font-size:0.78rem; font-weight:700; letter-spacing:0.08em; }
.agent-header p  { font-size:0.65rem; opacity:0.7; margin:0; color:var(--black); }
.agent-close { background:none; border:none; cursor:pointer; color:var(--black); font-size:1.2rem; opacity:0.6; }
.agent-close:hover { opacity:1; }
.agent-messages { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:12px; }
.msg { max-width:85%; padding:10px 14px; font-size:0.82rem; line-height:1.5; }
.msg.agent { background:var(--black-border); color:var(--white); align-self:flex-start; }
.msg.user  { background:var(--gold-dark); color:var(--white); align-self:flex-end; }
.agent-typing { display:flex; gap:4px; align-items:center; padding:10px 14px; }
.agent-typing span { width:6px; height:6px; background:var(--gold); border-radius:50%; animation:bounce 1.2s infinite; }
.agent-typing span:nth-child(2){animation-delay:0.2s}
.agent-typing span:nth-child(3){animation-delay:0.4s}
@keyframes bounce{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-6px)}}
.agent-input-area { display:flex; border-top:1px solid var(--black-border); align-items:center; }
.agent-input-area input { flex:1; background:transparent; border:none; outline:none; color:var(--white); font-family:var(--font-body); font-size:0.82rem; padding:14px 16px; }
.agent-input-area input::placeholder { color:var(--white-dim); }
.agent-send { background:none; border:none; cursor:pointer; color:var(--gold); padding:0 16px; font-size:1.2rem; }

/* ============================================
   PAGE HERO (inner pages)
   ============================================ */
.page-hero { padding:160px 0 80px; background:var(--black-mid); border-bottom:1px solid var(--black-border); position:relative; overflow:hidden; }
.page-hero::before { content:''; position:absolute; bottom:0;right:0; width:500px;height:500px; background:radial-gradient(circle,rgba(201,168,76,0.06) 0%,transparent 70%); pointer-events:none; }

/* ============================================
   SERVICES PAGE (detail)
   ============================================ */
.service-detail-card { display:grid; grid-template-columns:1fr 2fr; gap:4rem; padding:3rem 0; border-bottom:1px solid var(--black-border); }
.service-detail-card:last-child { border-bottom:none; }
.service-number { font-family:var(--font-display); font-size:4rem; color:var(--black-border); line-height:1; }
.service-detail-card h3 { margin-bottom:1rem; }
.service-bullets { list-style:none; margin-top:1.2rem; }
.service-bullets li { padding:0.4rem 0 0.4rem 1.2rem; position:relative; font-size:0.88rem; color:var(--white-dim); }
.service-bullets li::before { content:'—'; position:absolute; left:0; color:var(--gold); }

/* ============================================
   ABOUT PAGE
   ============================================ */
.team-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:2rem; margin-top:3rem; }
.team-card { text-align:center; }
.team-img { width:100%; height:280px; object-fit:cover; filter:grayscale(20%); margin-bottom:1.2rem; border:1px solid var(--black-border); }
.team-card h4 { margin-bottom:0.2rem; }
.team-role { font-size:0.72rem; letter-spacing:0.15em; text-transform:uppercase; color:var(--gold); }
.values-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:2rem; margin-top:3rem; }
.value-card { padding:2rem; border:1px solid var(--black-border); }
.value-card h4 { color:var(--gold); margin-bottom:0.6rem; }

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-grid { display:grid; grid-template-columns:1fr 1fr; gap:6rem; }
.contact-form { display:flex; flex-direction:column; gap:1.2rem; }
.form-group { display:flex; flex-direction:column; gap:6px; }
.form-group label { font-size:0.7rem; letter-spacing:0.2em; text-transform:uppercase; color:var(--gold); }
.form-group input,
.form-group textarea,
.form-group select { background:var(--black-card); border:1px solid var(--black-border); color:var(--white); padding:12px 16px; font-family:var(--font-body); font-size:0.88rem; transition:border-color var(--transition); border-radius:0; -webkit-appearance:none; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline:none; border-color:var(--gold-dark); }
.form-group textarea { resize:vertical; min-height:130px; }
.contact-detail { margin-bottom:1.5rem; }
.contact-detail .label { font-size:0.68rem; letter-spacing:0.2em; text-transform:uppercase; color:var(--gold); margin-bottom:0.3rem; display:block; }
.contact-detail p { font-size:0.9rem; color:var(--white-dim); margin:0; }

/* ============================================
   BLOG PAGE
   ============================================ */
.blog-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:2rem; }
.blog-featured { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr; gap:3rem; align-items:center; border-bottom:1px solid var(--black-border); padding-bottom:3rem; margin-bottom:1rem; }
.blog-featured img { height:360px; object-fit:cover; }
.post-tag { font-size:0.65rem; letter-spacing:0.25em; text-transform:uppercase; color:var(--gold); display:block; margin-bottom:0.5rem; }
.post-date { font-size:0.75rem; color:var(--white-dim); margin-bottom:0.5rem; display:block; }
.post-excerpt { font-size:0.88rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { gap: 3rem; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .values-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  :root { --section-pad: 70px 24px; }
  .container { padding: 0 24px; }
  .main-nav { display:none; }
  .main-nav.open { display:flex; position:fixed; inset:0; background:var(--black); align-items:center; justify-content:center; }
  .main-nav.open ul { flex-direction:column; gap:2rem; text-align:center; }
  .main-nav.open a { font-size:1rem; }
  .menu-toggle { display:flex; }
  .about-grid,.contact-grid,.blog-featured { grid-template-columns:1fr; }
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .footer-grid { grid-template-columns:1fr; }
  .insights-grid,.team-grid,.values-grid { grid-template-columns:1fr; }
  .service-detail-card { grid-template-columns:1fr; }
  .agent-panel { width:90vw; }
}
