/* ============================================================
   Habras Technologies — Design System
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Color */
  --ink: #0F172A;
  --ink-2: #1E293B;
  --blue: #2563EB;
  --blue-700: #1D4ED8;
  --cyan: #06B6D4;
  --text: #1E293B;
  --muted: #64748B;
  --muted-2: #94A3B8;
  --white: #FFFFFF;
  --surface: #F8FAFC;
  --surface-2: #F1F5F9;
  --line: #E2E8F0;
  --line-soft: #EEF2F7;

  /* Brand gradient */
  --grad: linear-gradient(120deg, var(--blue) 0%, var(--cyan) 100%);
  --grad-soft: linear-gradient(120deg, rgba(37,99,235,.12), rgba(6,182,212,.12));

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadow */
  --sh-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --sh-md: 0 4px 12px rgba(15,23,42,.06), 0 12px 28px rgba(15,23,42,.07);
  --sh-lg: 0 18px 50px -12px rgba(15,23,42,.22);
  --sh-blue: 0 14px 34px -10px rgba(37,99,235,.45);

  /* Layout */
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 74px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.08; margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
::selection { background: var(--blue); color: #fff; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 130px); }
.section-sm { padding-block: clamp(48px, 6vw, 84px); }
.center { text-align: center; }
.dark { background: var(--ink); color: #CBD5E1; }
.dark h1, .dark h2, .dark h3, .dark h4 { color: #fff; }

/* ---------- Typographic scale ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var(--grad); display: inline-block; }
.dark .eyebrow { color: var(--cyan); }
.h-display { font-size: clamp(2.6rem, 6vw, 4.5rem); letter-spacing: -0.035em; }
.h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
.h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.lead { font-size: clamp(1.06rem, 1.5vw, 1.28rem); color: var(--muted); line-height: 1.6; }
.dark .lead { color: #94A3B8; }
.section-head { max-width: 680px; }
.section-head.center { margin-inline: auto; }
.section-head .h2 { margin-top: 18px; }
.section-head .lead { margin-top: 18px; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer; transition: all .22s cubic-bezier(.2,.7,.3,1);
  white-space: nowrap; line-height: 1;
}
.btn svg { width: 17px; height: 17px; transition: transform .22s ease; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--sh-blue); }
.btn-primary:hover { background: var(--blue-700); transform: translateY(-2px); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.dark .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.22); }
.dark .btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-lg { padding: 16px 30px; font-size: 16px; }
.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--blue); font-size: 15px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px; transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s, border-color .28s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: transparent; }

/* ---------- Icon chip ---------- */
.icon-chip {
  width: 52px; height: 52px; border-radius: var(--r-md);
  display: grid; place-items: center; color: #fff; background: var(--grad);
  box-shadow: var(--sh-blue); flex: none;
}
.icon-chip svg { width: 24px; height: 24px; }
.icon-chip.soft { background: var(--grad-soft); color: var(--blue); box-shadow: none; }

/* ---------- Pills / tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 6px 13px; border-radius: var(--r-pill); }
.tag.accent { color: var(--blue); background: rgba(37,99,235,.07); border-color: rgba(37,99,235,.18); }

/* ---------- Grid presets ---------- */
.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Image placeholder ---------- */
.ph {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(37,99,235,.05) 0 12px, rgba(6,182,212,.05) 12px 24px),
    var(--surface);
  border: 1px solid var(--line);
  display: grid; place-items: center; min-height: 200px; color: var(--muted-2);
}
.ph::after {
  content: attr(data-label); font-family: var(--font-mono); font-size: 12px;
  letter-spacing: .05em; color: var(--muted); background: #fff; padding: 5px 11px;
  border-radius: var(--r-pill); border: 1px solid var(--line); box-shadow: var(--sh-sm);
}
.ph.mesh { background: var(--grad); border: none; }
.ph.mesh::after { background: rgba(255,255,255,.9); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(255,255,255,.78); backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 1px 0 rgba(15,23,42,.02); }
.nav { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; color: var(--ink); letter-spacing: -.02em; }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; box-shadow: var(--sh-blue); flex: none; }
.brand .mark svg { width: 19px; height: 19px; color: #fff; }
.brand small { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .14em; display: block; font-weight: 500; margin-top: 1px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 15px; font-weight: 600; color: var(--ink-2); padding: 9px 14px; border-radius: var(--r-sm); transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--blue); background: var(--surface); }
.nav-links a.active { color: var(--blue); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r-sm); width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; color: var(--ink); }

@media (max-width: 920px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-menu { position: fixed; inset: var(--nav-h) 0 0 0; background: #fff; z-index: 99; padding: 24px var(--gutter); transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.7,.3,1); overflow-y: auto; }
  .mobile-menu.open { transform: translateX(0); }
  .mobile-menu a { display: block; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--ink); padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
  .mobile-menu .btn { margin-top: 24px; width: 100%; justify-content: center; }
}
.mobile-menu { display: none; }
@media (max-width: 920px) { .mobile-menu { display: block; } }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--ink); color: #94A3B8; padding-top: clamp(60px, 8vw, 96px); }
.site-footer a { color: #94A3B8; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.footer-brand .brand { color: #fff; margin-bottom: 18px; }
.footer-brand p { max-width: 320px; font-size: 15px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 14px; letter-spacing: .04em; margin-bottom: 18px; font-family: var(--font-body); font-weight: 700; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-col a { font-size: 15px; }
.footer-social { display: flex; gap: 10px; margin-top: 22px; }
.footer-social a { width: 38px; height: 38px; border-radius: 9px; border: 1px solid rgba(255,255,255,.12); display: grid; place-items: center; transition: all .2s; }
.footer-social a:hover { background: var(--blue); border-color: var(--blue); color: #fff; transform: translateY(-2px); }
.footer-social svg { width: 17px; height: 17px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; flex-wrap: wrap; }
@media (max-width: 820px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
  .site-header, .wa-float, .nav-toggle, .mobile-menu { display: none !important; }
}

/* ============================================================
   WHATSAPP FLOAT
   ============================================================ */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: #25D366;
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(37,211,102,.45);
  transition: transform .25s; color: #fff;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ============================================================
   GRID / MESH DECOR
   ============================================================ */
.bg-grid { position: relative; }
.bg-grid::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(148,163,184,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.12) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
}
.bg-grid > * { position: relative; z-index: 1; }

/* utility */
.mt-s { margin-top: 14px; } .mt-m { margin-top: 26px; } .mt-l { margin-top: 44px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-s { gap: 12px; } .gap-m { gap: 20px; } .wrap-w { flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); border: 0; }
