/* =========================================================
   theme-apple.css — ConstruBIM Apple-like theme
   ========================================================= */

:root{
  --bg:#ffffff;
  --ink:#111111;
  --muted:#6e6e73;
  --line:rgba(0,0,0,.10);
  --card:rgba(255,255,255,.88);
  --shadow:0 20px 60px rgba(0,0,0,.08);
  --radius:24px;

  --h1: clamp(40px, 6.2vw, 56px);
  --h2: clamp(28px, 4.2vw, 34px);
  --h3: clamp(18px, 2.6vw, 20px);
  --lead: clamp(16px, 2.1vw, 18px);
  --small: 13px;

  --hero-pad-y: clamp(46px, 7vw, 72px);
  --section-pad-y: clamp(44px, 6.5vw, 72px);
}

*{ box-sizing:border-box; }

html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, "Helvetica Neue", sans-serif;
  color:var(--ink);
  background:var(--bg);
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}

a{
  color:inherit;
  text-decoration:none;
}

a:hover{
  text-decoration:none;
}

img{
  max-width:100%;
  height:auto;
  display:block;
}

p, li{
  color:inherit;
}

.wrap{
  max-width:1100px;
  margin:0 auto;
  padding:0 16px;
}

section{
  padding:var(--section-pad-y) 0;
}

.hero p,
.section-head p,
.card p{
  max-width:62ch;
}

/* =======================
   NAV
======================= */
.nav{
  position:sticky;
  top:0;
  z-index:1000;
  backdrop-filter:saturate(180%) blur(16px);
  -webkit-backdrop-filter:saturate(180%) blur(16px);
  background:rgba(255,255,255,.82);
  border-bottom:1px solid rgba(0,0,0,.08);
}

.nav-inner{
  max-width:1100px;
  margin:0 auto;
  padding:12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  position:relative;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  letter-spacing:-0.2px;
  color:var(--ink);
  white-space:nowrap;
  font-size:18px;
  flex:0 0 auto;
}

.brand-badge{
  width:22px;
  height:22px;
  border-radius:7px;
  background:linear-gradient(135deg,#111,#444);
  box-shadow:0 8px 20px rgba(0,0,0,.15);
}

.nav-links{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
  margin-left:auto;
}

.nav-links a{
  font-size:13px;
  color:var(--muted);
  padding:8px 10px;
  border-radius:999px;
  transition:background .15s ease, color .15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"]{
  background:rgba(0,0,0,.06);
  color:var(--ink);
}

.nav-cta{
  border:1px solid rgba(0,0,0,.10);
}

.menu-btn{
  display:none;
  align-items:center;
  justify-content:center;
  min-width:96px;
  min-height:44px;
  padding:10px 14px;
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.92);
  border-radius:999px;
  font-weight:600;
  font-size:13px;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
  color:var(--ink);
  appearance:none;
  -webkit-appearance:none;
}

/* =======================
   BUTTONS
======================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:44px;
  padding:12px 18px;
  border-radius:999px;
  font-weight:600;
  font-size:15px;
  border:1px solid rgba(0,0,0,.12);
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
  color:var(--ink);
  background:#fff;
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 30px rgba(0,0,0,.08);
}

.btn.primary{
  background:#111;
  color:#fff;
  border-color:#111;
}

.btn.primary:hover{
  background:#000;
  border-color:#000;
}

/* =======================
   HERO
======================= */
.hero{
  padding:var(--hero-pad-y) 0 calc(var(--hero-pad-y) - 14px);
  background:
    radial-gradient(900px 520px at 30% 15%, rgba(0,0,0,.06), transparent 55%),
    radial-gradient(900px 520px at 70% 15%, rgba(0,0,0,.05), transparent 55%),
    linear-gradient(#fff, #fafafa);
  border-bottom:1px solid rgba(0,0,0,.06);
}

.hero-grid{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:26px;
  align-items:center;
}

.eyebrow{
  font-size:var(--small);
  color:var(--muted);
  font-weight:600;
  letter-spacing:.2px;
  margin:0 0 10px;
}

.hero h1{
  margin:0;
  font-size:var(--h1);
  line-height:1.03;
  letter-spacing:-0.6px;
}

.hero p{
  margin:14px 0 0;
  font-size:var(--lead);
  color:var(--muted);
  line-height:1.45;
}

.hero-actions{
  margin-top:22px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

.hero-media{
  border-radius:var(--radius);
  border:1px solid rgba(0,0,0,.08);
  background:
    radial-gradient(700px 420px at 30% 30%, rgba(0,0,0,.08), transparent 60%),
    linear-gradient(135deg, rgba(0,0,0,.02), rgba(0,0,0,.06));
  box-shadow:var(--shadow);
  overflow:hidden;
  position:relative;
  min-height:320px;
}

.hero-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.hero-media .tag{
  position:absolute;
  left:16px;
  bottom:16px;
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border:1px solid rgba(0,0,0,.08);
  border-radius:999px;
  padding:8px 10px;
  font-size:12px;
  color:var(--muted);
}

/* =======================
   STRIP / PILLS
======================= */
.strip{
  padding:18px 0;
  border-bottom:1px solid rgba(0,0,0,.06);
  background:#fff;
}

.strip-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
}

.pill{
  border:1px solid rgba(0,0,0,.10);
  border-radius:999px;
  padding:12px;
  background:rgba(255,255,255,.85);
  display:flex;
  gap:10px;
  align-items:flex-start;
  min-height:56px;
}

.dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:#111;
  margin-top:4px;
  box-shadow:0 8px 20px rgba(0,0,0,.15);
  flex:0 0 auto;
}

.pill b{
  font-size:13px;
  display:block;
}

.pill span{
  font-size:12px;
  color:var(--muted);
  display:block;
  margin-top:2px;
}

/* =======================
   SECTIONS + CARDS
======================= */
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.section-head h2{
  margin:0;
  font-size:var(--h2);
  letter-spacing:-0.4px;
  line-height:1.12;
}

.section-head p{
  margin:0;
  color:var(--muted);
  font-size:14px;
}

.cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}

.card{
  border-radius:var(--radius);
  border:1px solid rgba(0,0,0,.08);
  background:rgba(255,255,255,.88);
  box-shadow:0 14px 40px rgba(0,0,0,.06);
  padding:18px;
}

.card h3{
  margin:0 0 8px;
  font-size:var(--h3);
  letter-spacing:-0.2px;
  line-height:1.15;
}

.card p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}

/* =======================
   VIDEO
======================= */
.video-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:16px;
  align-items:start;
}

.video-tile{
  border-radius:var(--radius);
  overflow:hidden;
  border:1px solid rgba(0,0,0,.08);
  background:#000;
  box-shadow:var(--shadow);
  position:relative;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease;
}

.video-tile:hover{
  transform:translateY(-2px);
  box-shadow:0 26px 70px rgba(0,0,0,.14);
}

.video-tile img{
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.92;
}

.play{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
}

.play span{
  width:64px;
  height:64px;
  border-radius:999px;
  background:rgba(255,255,255,.22);
  border:1px solid rgba(255,255,255,.30);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
}

.play svg{
  width:22px;
  height:22px;
  fill:#fff;
  transform:translateX(2px);
}

.mini-videos{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}

.big-video{
  min-height:420px;
}

.mini-videos .video-tile{
  min-height:180px;
}

.two{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  align-items:center;
}

/* =======================
   POPUP
======================= */
.popup{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.72);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:9999;
}

.popup-inner{
  width:100%;
  max-width:980px;
  position:relative;
}

.popup video{
  width:100%;
  max-height:80vh;
  border-radius:18px;
  background:#000;
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 26px 90px rgba(0,0,0,.40);
}

.close{
  position:absolute;
  top:-46px;
  right:0;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.22);
  color:#fff;
  border-radius:999px;
  padding:10px 12px;
  font-weight:600;
  font-size:13px;
  cursor:pointer;
  user-select:none;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}

/* =======================
   WHATSAPP
======================= */
.whatsapp{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:100;
  width:56px;
  height:56px;
  border-radius:999px;
  background:#25D366;
  box-shadow:0 18px 60px rgba(0,0,0,.22);
  display:flex;
  align-items:center;
  justify-content:center;
}

.whatsapp svg{
  width:24px;
  height:24px;
  fill:#fff;
}

/* =======================
   FOOTER
======================= */
footer{
  padding:28px 0;
  border-top:1px solid rgba(0,0,0,.08);
  background:#fff;
  color:var(--muted);
  font-size:13px;
}

.foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.foot b{
  color:var(--ink);
}

/* =======================
   RESPONSIVE
======================= */
@media (max-width: 950px){
  .hero-grid{ grid-template-columns:1fr; }
  .strip-grid{ grid-template-columns:repeat(2,1fr); }
  .cards{ grid-template-columns:1fr; }
  .video-grid{ grid-template-columns:1fr; }
  .two{ grid-template-columns:1fr; }
}

@media (max-width: 800px){
  .menu-btn{
    display:inline-flex;
  }

  .nav-links{
    position:absolute;
    top:calc(100% + 10px);
    left:16px;
    right:16px;
    display:none;
    flex-direction:column;
    align-items:stretch;
    gap:6px;
    padding:12px;
    background:rgba(255,255,255,.98);
    border:1px solid rgba(0,0,0,.10);
    border-radius:20px;
    box-shadow:0 20px 50px rgba(0,0,0,.12);
    z-index:1100;
  }

  .nav-links.is-open{
    display:flex !important;
  }

  .nav-links a{
    display:block;
    width:100%;
    padding:12px 14px;
    font-size:16px;
    border-radius:14px;
  }
}

@media (min-width: 801px){
  .menu-btn{
    display:none !important;
  }

  .nav-links{
    display:flex !important;
    position:static;
    flex-direction:row;
    align-items:center;
    background:transparent;
    border:none;
    box-shadow:none;
    padding:0;
  }
}

@media (max-width: 520px){
  .big-video{ min-height:320px; }
  .pill{ padding:10px 12px; min-height:52px; }
  .whatsapp{ width:52px; height:52px; right:14px; bottom:14px; }
}
/* =========================================================
   AI Chat — homepage hero widget
   ========================================================= */

.cbi-hero{
  padding: clamp(36px, 5vw, 64px) 0 clamp(28px, 4vw, 48px);
  background:
    radial-gradient(900px 520px at 25% 15%, rgba(0,0,0,.05), transparent 55%),
    radial-gradient(900px 520px at 75% 10%, rgba(0,0,0,.04), transparent 55%),
    linear-gradient(#fff, #fafafa);
  border-bottom:1px solid var(--line);
}
.cbi-hero .eyebrow{ margin:0 0 8px; }
.cbi-hero h1{
  margin:0 0 12px;
  font-size: clamp(34px, 5.4vw, 52px);
  line-height:1.05;
  letter-spacing:-.5px;
  max-width:18ch;
}
.cbi-hero p.lead{
  margin:0 0 22px;
  font-size:var(--lead);
  color:var(--muted);
  max-width:64ch;
}

.cbi-chat{
  max-width: 880px;
  margin: 0 auto;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  backdrop-filter:saturate(140%) blur(8px);
  -webkit-backdrop-filter:saturate(140%) blur(8px);
}

.cbi-chat-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.6);
}
.cbi-chat-title{
  display:flex; align-items:center; gap:10px;
  font-size:14px; color:var(--ink);
}
.cbi-chat-title strong{ font-weight:600; }
.cbi-dot{
  width:8px; height:8px; border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 0 4px rgba(34,197,94,.18);
  animation: cbi-pulse 2.4s ease-in-out infinite;
}
@keyframes cbi-pulse{
  0%,100%{ box-shadow:0 0 0 4px rgba(34,197,94,.18); }
  50%    { box-shadow:0 0 0 7px rgba(34,197,94,.05); }
}
.cbi-chat-reset{
  font-size:12px; color:var(--muted);
  background:transparent; border:1px solid var(--line);
  padding:6px 10px; border-radius:999px; cursor:pointer;
  transition: background .15s ease, color .15s ease;
}
.cbi-chat-reset:hover{ background:#f5f5f7; color:var(--ink); }

.cbi-chat-body{
  padding:18px;
  min-height: 320px;
  max-height: 56vh;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:12px;
  scroll-behavior:smooth;
}
.cbi-msg{ display:flex; }
.cbi-msg-user{ justify-content:flex-end; }
.cbi-msg-assistant{ justify-content:flex-start; }
.cbi-bubble{
  max-width: 84%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.55;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.cbi-msg-user .cbi-bubble{
  background:#111;
  color:#fff;
  border-bottom-right-radius:6px;
}
.cbi-msg-assistant .cbi-bubble{
  background:#fff;
  color:var(--ink);
  border:1px solid var(--line);
  border-bottom-left-radius:6px;
}
.cbi-bubble p{ margin: 0 0 10px; }
.cbi-bubble p:last-child{ margin-bottom: 0; }
.cbi-bubble ul{ margin: 8px 0; padding-left: 22px; }
.cbi-bubble li{ margin: 4px 0; }
.cbi-bubble code{
  background:#f5f5f7; padding:1px 6px; border-radius:6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.cbi-bubble pre{
  background:#f5f5f7; padding:10px 12px; border-radius:10px;
  overflow-x:auto; margin: 8px 0;
}
.cbi-bubble pre code{ background:transparent; padding:0; }
.cbi-bubble a{ color:#0066cc; text-decoration:underline; text-underline-offset:2px; }
.cbi-bubble h3, .cbi-bubble h4{ margin: 10px 0 6px; font-size:15px; }

.cbi-typing{ display:inline-flex; gap:4px; align-items:center; }
.cbi-typing span{
  width:6px; height:6px; border-radius:50%;
  background:var(--muted);
  animation: cbi-blink 1.2s ease-in-out infinite;
}
.cbi-typing span:nth-child(2){ animation-delay:.15s; }
.cbi-typing span:nth-child(3){ animation-delay:.3s; }
@keyframes cbi-blink{
  0%,80%,100%{ opacity:.25; }
  40%{ opacity:1; }
}

.cbi-error{ color:#b91c1c; font-size:14px; }

.cbi-chat-suggest{
  display:flex; flex-wrap:wrap; gap:8px;
  padding: 4px 18px 14px;
}
.cbi-chip{
  font-size:13px; color:var(--ink);
  background:rgba(0,0,0,.04);
  border:1px solid var(--line);
  padding:8px 12px; border-radius:999px;
  cursor:pointer;
  transition: background .15s ease, transform .1s ease;
}
.cbi-chip:hover{ background:rgba(0,0,0,.08); }
.cbi-chip:active{ transform:scale(.97); }

.cbi-chat-form{
  display:flex; gap:10px; align-items:flex-end;
  padding:12px 14px;
  border-top:1px solid var(--line);
  background:rgba(255,255,255,.6);
}
.cbi-chat-input{
  flex:1;
  resize:none;
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  padding: 10px 14px;
  border:1px solid var(--line);
  border-radius: 14px;
  background:#fff;
  color:var(--ink);
  outline: none;
  max-height: 160px;
  overflow-y: auto;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cbi-chat-input:focus{
  border-color:#111;
  box-shadow:0 0 0 3px rgba(0,0,0,.08);
}
.cbi-chat-send{
  width:40px; height:40px; flex:none;
  display:inline-flex; align-items:center; justify-content:center;
  background:#111; color:#fff;
  border:none; border-radius:12px; cursor:pointer;
  transition: background .15s ease, transform .1s ease, opacity .15s ease;
}
.cbi-chat-send:hover{ background:#000; }
.cbi-chat-send:active{ transform:scale(.95); }
.cbi-chat-send:disabled{ opacity:.5; cursor:not-allowed; }

.cbi-chat-foot{
  display:flex; justify-content:space-between; align-items:center;
  padding:8px 18px 14px;
  font-size:12px; color:var(--muted);
}
.cbi-chat-foot a{ color:var(--muted); text-decoration:underline; text-underline-offset:2px; }
.cbi-quota{ font-variant-numeric: tabular-nums; }

/* Lead capture form inside chat */
.cbi-lead form{ display:grid; gap:8px; margin-top: 10px; }
.cbi-lead input[type=text], .cbi-lead input[type=email]{
  font: inherit; font-size:14px;
  padding: 9px 12px;
  border:1px solid var(--line); border-radius:10px;
  background:#fff; outline:none;
}
.cbi-lead input:focus{ border-color:#111; box-shadow:0 0 0 3px rgba(0,0,0,.06); }
.cbi-lead-actions{ display:flex; gap:8px; }
.cbi-lead-send, .cbi-lead-skip{
  font-size:13px; padding:8px 14px; border-radius:999px; cursor:pointer;
  border:1px solid var(--line); background:#fff; color:var(--ink);
  transition: background .15s ease;
}
.cbi-lead-send{ background:#111; color:#fff; border-color:#111; }
.cbi-lead-send:hover{ background:#000; }
.cbi-lead-send:disabled{ opacity:.6; cursor:not-allowed; }
.cbi-lead-skip:hover{ background:#f5f5f7; }
.cbi-lead-status{ font-size:12px; color:var(--muted); margin: 4px 0 0; min-height:1em; }
.cbi-lead-status.cbi-lead-ok{ color:#15803d; }
.cbi-lead-status.cbi-lead-err{ color:#b91c1c; }

@media (max-width: 600px){
  .cbi-bubble{ max-width: 92%; font-size: 14px; }
  .cbi-chat-body{ padding: 14px; min-height: 280px; max-height: 60vh; }
  .cbi-chat-foot{ flex-direction: column; align-items: flex-start; gap: 4px; }
}
