/* ============================================
   CLERTIC.CL — MAIN STYLESHEET
   Stack: Tailwind CDN + Custom Variables
   Aesthetic: Dark Luxury / Technical Edge
   ============================================ */

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

/* ── TOKENS ──────────────────────────────── */
:root {
  --bg:        #060608;
  --bg-2:      #0d0d12;
  --surface:   #111118;
  --border:    rgba(255,255,255,0.07);
  --accent:    #00E5C8;
  --accent-2:  #7B61FF;
  --white:     #F2F2F5;
  --muted:     rgba(242,242,245,0.38);
  --font-display: 'Syne', sans-serif;
  --font-serif:   'Instrument Serif', serif;
  --font-mono:    'DM Mono', monospace;
}

/* ── RESET & BASE ────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: auto; }   /* Lenis handles smooth scroll */

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── LENIS SMOOTH SCROLL FIX ─────────────── */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

/* ── CURSOR ──────────────────────────────── */
.cursor {
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease, opacity 0.15s ease;
  mix-blend-mode: difference;
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid rgba(0,229,200,0.4);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1), width 0.2s, height 0.2s;
}
body:hover .cursor { opacity: 1; }

/* ── TYPOGRAPHY ──────────────────────────── */
.display-xl {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 10vw, 10rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--white);
}
.display-lg {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 6rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
}
.display-md {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.text-serif {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.7;
  color: var(--muted);
}
.label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.accent-text { color: var(--accent); }
.muted { color: var(--muted); }

/* ── NAV ─────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}
#nav.scrolled {
  background: rgba(6,6,8,0.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  color: var(--white);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }

/* ── HERO ────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3rem 6rem;
  position: relative;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,200,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,200,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}
.hero-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: rgba(0,229,200,0.05);
  margin-bottom: 2.5rem;
  width: fit-content;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.5); }
}
.hero-title-wrap { overflow: hidden; }
.hero-title-line { display: block; transform: translateY(110%); }
.hero-tagline {
  margin-top: 2rem;
  max-width: 520px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
  opacity: 0;
}
.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 3rem;
  opacity: 0;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  background: var(--accent);
  color: #060608;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 4px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,229,200,0.25);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--white); }
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-line-anim 2s ease-in-out infinite;
}
@keyframes scroll-line-anim {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
/* Route SVG overlay in hero */
#route-canvas {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

/* ── MARQUEE ─────────────────────────────── */
.marquee-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 1.2rem 0;
  background: var(--bg-2);
}
.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}
.marquee-sep { color: var(--accent); font-size: 1rem; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── PRODUCTS STICKY SCROLL ──────────────── */
#products {
  position: relative;
}
.products-pin-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.products-text-col {
  width: 45%;
  padding: 10vh 4rem 10vh 3rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.products-visual-col {
  width: 55%;
  min-height: 300vh;   /* 3 panels */
  position: relative;
}
.product-panel {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 3rem 4rem 2rem;
  position: relative;
}

/* Text items in text column */
.product-text-item {
  position: absolute;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  width: 100%;
}
.product-text-item.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}
.product-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}
.product-title { margin-bottom: 1rem; }
.product-desc {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.product-features { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.product-features li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.product-features li::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.progress-bar-wrap {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.progress-track {
  width: 100%;
  height: 1px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.6s ease;
}

/* Mockup cards */
.mockup-card {
  width: 100%;
  max-width: 540px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.mockup-card:hover {
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg) translateY(-8px);
}
.mockup-topbar {
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup-body { padding: 1.5rem; }

/* Mockup 1 — WhatsApp Order System */
.wa-order-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  animation: slide-in-r 0.4s ease both;
}
.wa-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.wa-status-new { background: #00E5C8; box-shadow: 0 0 8px rgba(0,229,200,0.5); }
.wa-status-kitchen { background: #FF9500; box-shadow: 0 0 8px rgba(255,149,0,0.5); }
.wa-status-done { background: #30D158; }
@keyframes slide-in-r {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wa-order-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--white);
  font-weight: 500;
}
.wa-order-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}
.wa-order-badge {
  margin-left: auto;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-new { background: rgba(0,229,200,0.1); color: var(--accent); border: 1px solid rgba(0,229,200,0.2); }
.badge-kitchen { background: rgba(255,149,0,0.1); color: #FF9500; border: 1px solid rgba(255,149,0,0.2); }
.badge-done { background: rgba(48,209,88,0.1); color: #30D158; border: 1px solid rgba(48,209,88,0.2); }

/* Mockup 2 — Transport Planner */
.route-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}
.route-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.route-map-placeholder {
  width: 100%;
  height: 160px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
}
.route-svg { width: 100%; height: 100%; }
.route-grid-stat {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.stat-cell {
  padding: 0.75rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  text-align: center;
}
.stat-val {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* Mockup 3 — Power BI / Analytics */
.glass-panel {
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}
.chart-bar-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  width: 60px;
  flex-shrink: 0;
}
.chart-bar-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.chart-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: bar-grow 1.2s cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes bar-grow {
  from { width: 0 !important; }
}
.chart-bar-val {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  width: 36px;
  text-align: right;
}
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.kpi-item {
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: rgba(123,97,255,0.06);
  border: 1px solid rgba(123,97,255,0.12);
}
.kpi-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
}
.kpi-lbl {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ── DATA SHOWCASE SECTION ───────────────── */
#data-section {
  padding: 12rem 3rem;
  position: relative;
  overflow: hidden;
}
.data-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123,97,255,0.12) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.glass-metric-card {
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(30px);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.glass-metric-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}
.glass-metric-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,229,200,0.15);
}
.metric-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--white) 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── TESTIMONIAL / CREDIBILITY ───────────── */
#credibility {
  padding: 8rem 3rem;
  border-top: 1px solid var(--border);
}
.cred-tag {
  display: inline-flex;
  padding: 0.35rem 0.9rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* ── CTA FINAL ───────────────────────────── */
#cta-final {
  padding: 14rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-bg-orb {
  position: absolute;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,200,0.06) 0%, transparent 65%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ── FOOTER ──────────────────────────────── */
footer {
  padding: 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer .muted { font-size: 0.75rem; }

/* ── FLOATING WHATSAPP CTA ───────────────── */
#wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.wa-float-btn {
  width: 52px;
  height: 52px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(37,211,102,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.wa-float-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(37,211,102,0.5);
}
.wa-float-label {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px 0 0 8px;
  padding: 0 1.2rem;
  height: 44px;
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--white);
  white-space: nowrap;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  transform: translateX(8px);
}
#wa-float:hover .wa-float-label {
  max-width: 200px;
  opacity: 1;
  padding: 0 1.2rem;
}
.wa-float-ping {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
  animation: ping 2s ease infinite;
}
@keyframes ping {
  0%, 100% { transform: scale(1); opacity: 1; }
  60% { transform: scale(1.6); opacity: 0; }
}

/* ── SECTION SPACING ─────────────────────── */
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.eyebrow-line { width: 32px; height: 1px; background: var(--accent); }
.section-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: end;
  margin-bottom: 6rem;
}

/* ── SPLIT TEXT REVEAL ───────────────────── */
.split-reveal .word {
  display: inline-block;
  overflow: hidden;
}
.split-reveal .word-inner {
  display: inline-block;
  transform: translateY(110%);
}

/* ── DIVIDER ─────────────────────────────── */
.h-line { width: 100%; height: 1px; background: var(--border); }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 768px) {
  #hero { padding: 0 1.5rem 5rem; }
  #nav { padding: 1.2rem 1.5rem; }
  .nav-links { display: none; }
  .products-pin-wrapper { flex-direction: column; }
  .products-text-col, .products-visual-col { width: 100%; }
  .products-text-col { position: relative; height: auto; padding: 4rem 1.5rem 2rem; }
  .products-visual-col { min-height: auto; }
  .product-panel { height: auto; padding: 2rem 1.5rem; }
  #data-section { padding: 6rem 1.5rem; }
  #cta-final { padding: 8rem 1.5rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
  .section-intro-grid { grid-template-columns: 1fr; gap: 2rem; }
}
