/* ============================================================
   Mtafiti Analytics - marketing site
   Brand tokens mirrored from the product (RE_frontend/css/variables.css)
   ============================================================ */

:root {
  --primary:        #1C4135;
  --primary-dark:   #142E25;
  --primary-light:  #2A5C4A;
  --accent:         #B18C35;
  --accent-light:   #C9A84C;
  --bg:             #F8F5F0;
  --bg-warm:        #F3ECE1;
  --surface:        #FFFFFF;
  --dark:           #1B3F33;
  --dark-2:         #16362B;
  --text:           #1C4135;
  --text-2:         #5B6B63;
  --text-muted:     #94A29B;
  --cream:          #FDF9F3;
  --border:         #E5E0D8;
  --border-dark:    #D4CEC4;
  --success:        #27AE60;

  --maxw: 1200px;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(20,46,37,.06), 0 1px 2px rgba(20,46,37,.04);
  --shadow-md: 0 10px 30px rgba(20,46,37,.10), 0 3px 8px rgba(20,46,37,.05);
  --shadow-lg: 0 30px 70px rgba(20,46,37,.16), 0 8px 20px rgba(20,46,37,.07);
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ---------- reset-ish ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); font-weight: 500;
}
.section { padding: clamp(64px, 10vw, 120px) 0; }

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; color: var(--primary); }
h2.title { font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 14px 0 18px; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-2); max-width: 620px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius-full, 999px);
  font-weight: 600; font-size: .98rem; transition: transform .25s var(--ease-out), box-shadow .25s, background .2s, color .2s;
  will-change: transform;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: var(--cream); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-gold { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(177,140,53,.3); }
.btn-gold:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(177,140,53,.4); }
.btn-ghost { color: var(--primary); border: 1.5px solid var(--border-dark); background: rgba(255,255,255,.5); }
.btn-ghost:hover { border-color: var(--primary); background: #fff; transform: translateY(-2px); }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s var(--ease), box-shadow .3s, backdrop-filter .3s, padding .3s;
  padding: 18px 0;
}
.nav.scrolled {
  background: rgba(248,245,240,.82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 rgba(20,46,37,.07);
  padding: 12px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: baseline; gap: 0; font-size: 1.28rem; font-weight: 700; letter-spacing: -0.02em; }
.brand .m { color: var(--primary); }
.brand .a { color: var(--accent); margin-left: .32em; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: .96rem; font-weight: 500; color: var(--text-2); transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--primary); }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -5px; height: 2px;
  background: var(--accent); transition: right .3s var(--ease-out);
}
.nav-links a:hover::after { right: 0; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.hamburger { display: none; flex-direction: column; gap: 5px; width: 30px; height: 30px; justify-content: center; align-items: center; }
.hamburger span { width: 22px; height: 2px; background: var(--primary); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(80vw, 320px); z-index: 99;
  background: var(--dark); padding: 90px 32px 32px; transform: translateX(100%);
  transition: transform .4s var(--ease-out); display: flex; flex-direction: column; gap: 8px;
  box-shadow: -20px 0 60px rgba(0,0,0,.3);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a { color: var(--cream); font-size: 1.15rem; font-weight: 500; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.mobile-menu a:last-of-type { border: none; }
.mobile-menu .btn { margin-top: 20px; justify-content: center; }
.menu-backdrop { position: fixed; inset: 0; background: rgba(20,46,37,.45); z-index: 98; opacity: 0; pointer-events: none; transition: opacity .3s; backdrop-filter: blur(2px); }
.menu-backdrop.open { opacity: 1; pointer-events: auto; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding: clamp(130px, 18vw, 190px) 0 clamp(60px, 8vw, 90px); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1000px 500px at 80% -5%, rgba(177,140,53,.10), transparent 60%),
    radial-gradient(900px 600px at 5% 10%, rgba(28,65,53,.08), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%);
}
.hero-inner { text-align: center; max-width: 860px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 700; letter-spacing: -0.035em; }
.hero h1 .grad {
  background: linear-gradient(100deg, var(--primary) 20%, var(--primary-light) 55%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .lede { margin: 22px auto 34px; font-size: clamp(1.1rem, 1.9vw, 1.4rem); max-width: 640px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-shot { margin: clamp(50px, 7vw, 80px) auto 0; max-width: 1060px; }

/* browser frame */
.frame {
  border-radius: 14px; overflow: hidden; background: #fff;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  transform: translateZ(0);
}
.frame-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #EDE8E0; border-bottom: 1px solid var(--border); }
.frame-bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.frame-bar i:nth-child(1){ background:#E4776B;} .frame-bar i:nth-child(2){ background:#E6B95C;} .frame-bar i:nth-child(3){ background:#7CC087;}
.frame-bar .url { margin-left: 12px; font-family: 'DM Mono', monospace; font-size: .72rem; color: var(--text-muted); background: #fff; padding: 4px 12px; border-radius: 6px; flex: 1; max-width: 320px; }
.frame img { width: 100%; display: block; }

/* ============================================================
   TRUST BAND
   ============================================================ */
.trust { background: var(--dark); color: var(--cream); text-align: center; padding: clamp(48px,7vw,72px) 0; position: relative; }
.trust::after { content:''; position:absolute; left:50%; bottom:0; transform:translateX(-50%); width:80px; height:3px; background:var(--accent); border-radius:3px; }
.trust h2 { color: var(--cream); font-size: clamp(1.5rem, 3.2vw, 2.3rem); font-weight: 600; max-width: 820px; margin: 0 auto; }
.trust h2 .g { color: var(--accent-light); }
.trust-stats { display: flex; justify-content: center; gap: clamp(30px,6vw,80px); margin-top: 40px; flex-wrap: wrap; }
.trust-stat { }
.trust-stat .num { font-size: clamp(1.8rem,4vw,2.6rem); font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.trust-stat .lbl { font-family:'DM Mono',monospace; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sidebar-muted, #8FADA2); margin-top: 4px; }

/* ============================================================
   JOURNEY
   ============================================================ */
.journey { background: var(--bg); }
.journey-head { text-align: center; max-width: 640px; margin: 0 auto clamp(50px,7vw,80px); }
.journey-head .lede { margin: 0 auto; }
.stage { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px,5vw,72px); align-items: center; margin-bottom: clamp(70px,9vw,120px); }
.stage:last-child { margin-bottom: 0; }
.stage.reverse .stage-text { order: 2; }
.stage.reverse .stage-media { order: 1; }
.stage-num { font-family:'DM Mono',monospace; font-size:.8rem; color:var(--accent); letter-spacing:.14em; font-weight:500; }
.stage-text h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 12px 0 14px; }
.stage-text p { color: var(--text-2); font-size: 1.06rem; max-width: 460px; }
.stage-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag { font-family:'DM Mono',monospace; font-size:.74rem; padding: 5px 12px; border-radius: 999px; background: var(--primary-bg, rgba(28,65,53,.08)); color: var(--primary); border: 1px solid var(--border); }
.stage-media { position: relative; }
.stage-media .frame { cursor: zoom-in; transition: transform .5s var(--ease-out), box-shadow .5s; }
.stage-media .frame:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* ============================================================
   FEATURES
   ============================================================ */
.features { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%); }
.features-head { text-align: center; max-width: 620px; margin: 0 auto clamp(46px,6vw,70px); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: transform .35s var(--ease-out), box-shadow .35s, border-color .35s;
}
.feat:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--border-dark); }
.feat-ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(28,65,53,.07); color: var(--primary); margin-bottom: 18px;
}
.feat-ic svg { width: 24px; height: 24px; }
.feat h4 { font-size: 1.12rem; font-weight: 600; color: var(--primary); margin-bottom: 7px; letter-spacing: -0.01em; }
.feat p { font-size: .95rem; color: var(--text-2); line-height: 1.55; }

/* ============================================================
   WHY
   ============================================================ */
.why { background: var(--bg-warm); }
.why-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: clamp(24px,4vw,48px); }
.why-col { text-align: center; }
.why-col .ic { width: 58px; height: 58px; margin: 0 auto 20px; border-radius: 16px; display:grid; place-items:center; background: var(--primary); color: var(--accent-light); }
.why-col .ic svg { width: 28px; height: 28px; }
.why-col h4 { font-size: 1.3rem; margin-bottom: 10px; color: var(--primary); }
.why-col p { color: var(--text-2); font-size: 1rem; max-width: 320px; margin: 0 auto; }

/* ============================================================
   PRICING
   ============================================================ */
.pricing { background: var(--bg); }
.price-card {
  max-width: 720px; margin: 0 auto; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--primary) 0%, var(--dark-2) 100%);
  color: var(--cream); border-radius: var(--radius-lg); padding: clamp(40px,6vw,64px);
  box-shadow: var(--shadow-lg);
}
.price-card::before { content:''; position:absolute; top:-40%; right:-10%; width:340px; height:340px; border-radius:50%; background: radial-gradient(circle, rgba(177,140,53,.28), transparent 70%); }
.price-card .eyebrow { color: var(--accent-light); position: relative; }
.price-card h2 { color: #fff; font-size: clamp(1.7rem,3.5vw,2.5rem); margin: 14px 0 16px; position: relative; }
.price-card p { color: rgba(253,249,243,.82); max-width: 480px; margin: 0 auto 30px; position: relative; }
.price-card .btn { position: relative; }

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--bg-warm); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px,6vw,80px); align-items: center; }
.about-text h2 { margin-bottom: 20px; }
.about-text p { color: var(--text-2); font-size: 1.06rem; margin-bottom: 16px; }
.about-text strong { color: var(--primary); font-weight: 600; }
.about-card {
  background: var(--dark); color: var(--cream); border-radius: var(--radius-lg); padding: clamp(34px,4vw,48px);
  box-shadow: var(--shadow-md);
}
.about-card .badge { display:inline-flex; align-items:center; gap:8px; font-family:'DM Mono',monospace; font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; color:var(--accent-light); background:rgba(177,140,53,.14); padding:6px 14px; border-radius:999px; margin-bottom:22px; }
.about-card h3 { color:#fff; font-size:1.5rem; margin-bottom:14px; }
.about-card p { color: rgba(253,249,243,.78); font-size: .98rem; margin-bottom: 20px; }
.about-card .loc { display:flex; align-items:center; gap:10px; padding-top:20px; border-top:1px solid rgba(255,255,255,.1); font-size:.92rem; color:rgba(253,249,243,.7); }
.about-card .loc svg { width:18px; height:18px; color: var(--accent-light); }

/* ============================================================
   CONTACT CTA
   ============================================================ */
.cta { background: var(--dark); color: var(--cream); text-align: center; position: relative; overflow: hidden; }
.cta::before { content:''; position:absolute; inset:0; background: radial-gradient(700px 400px at 50% 0%, rgba(177,140,53,.14), transparent 60%); }
.cta-inner { position: relative; max-width: 660px; margin: 0 auto; }
.cta h2 { color: #fff; font-size: clamp(2rem,4.5vw,3rem); margin-bottom: 18px; }
.cta p { color: rgba(253,249,243,.82); font-size: 1.15rem; margin-bottom: 34px; }
.cta .btn-gold { font-size: 1.1rem; padding: 17px 38px; }
.cta .hint { margin-top: 18px; font-size: .88rem; color: rgba(253,249,243,.55); font-family:'DM Mono',monospace; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--dark-2); color: rgba(253,249,243,.7); padding: 56px 0 34px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; padding-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,.09); }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 42px; height: 42px; }
.footer-brand .txt { font-size: 1.25rem; font-weight: 700; }
.footer-brand .txt .m { color: var(--cream); } .footer-brand .txt .a { color: var(--accent-light); }
.footer-links { display: flex; gap: 30px; flex-wrap: wrap; }
.footer-links a { color: rgba(253,249,243,.72); font-size: .95rem; transition: color .2s; }
.footer-links a:hover { color: var(--accent-light); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 26px; font-size: .86rem; color: rgba(253,249,243,.5); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20,46,37,.9); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 4vw; opacity: 0; pointer-events: none; transition: opacity .3s; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 10px; box-shadow: var(--shadow-lg); transform: scale(.96); transition: transform .35s var(--ease-out); }
.lightbox.open img { transform: scale(1); }
.lightbox-close { position: absolute; top: 24px; right: 30px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.6rem; display: grid; place-items: center; transition: background .2s; }
.lightbox-close:hover { background: rgba(255,255,255,.24); }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--delay, 0s); }
.reveal.in { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(.94); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--delay, 0s); }
.reveal-scale.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav-links, .nav-cta .btn { display: none; }
  .hamburger { display: flex; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .stage { grid-template-columns: 1fr; gap: 28px; }
  .stage.reverse .stage-text { order: 1; } .stage.reverse .stage-media { order: 2; }
  .stage-media { order: 2; } .stage-text { order: 1; }
  .why-grid { grid-template-columns: 1fr; gap: 44px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { order: 2; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .feat-grid { grid-template-columns: 1fr; }
  .trust-stats { gap: 28px; }
  .footer-top { flex-direction: column; gap: 26px; }
  .frame-bar .url { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal, .reveal-scale { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn:hover, .feat:hover, .stage-media .frame:hover { transform: none !important; }
}
