/* ============================================================
   Kibot — sitio de marca
   Palabra de marca: "Kibot" (data-brand en index.html, BRAND en main.js)
   ============================================================ */

:root {
  --brand: "Kibot";
  --bg: #F3F5F2;
  --bg-2: #E4EBE7;
  --paper: #FFFFFF;
  --ink: #0B1210;
  --ink-soft: #3D4A45;
  --ink-faint: #6B7873;
  --line: rgba(11, 18, 16, 0.12);
  --accent: #FF4D1C;
  --accent-hover: #E03E12;
  --accent-soft: #FFE1D6;
  --mint: #0ED3A3;
  --mint-dim: #0A9B78;
  --mint-soft: #D4F8EE;
  --teal: #0A9B78;
  --teal-soft: #D4F8EE;
  --gold: #0ED3A3;
  --dark: #071210;
  --dark-2: #0C1A17;
  --white: #F7FAF8;
  --shadow: 0 18px 50px rgba(7, 18, 16, 0.10);
  --radius: 22px;
  --header-h: 76px;
  --font-display: "Syne", "Outfit", sans-serif;
  --font-serif: "Syne", "Outfit", sans-serif;
  --font-sans: "Outfit", "Segoe UI", sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0;
}
p { margin: 0; }

.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(243, 245, 242, 0.88);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.logo-mark { width: 34px; height: 34px; flex: 0 0 34px; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 1.05rem;
  line-height: 1;
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a {
  text-decoration: none; font-size: 0.92rem; font-weight: 550;
  color: var(--ink-soft);
}
.nav a:hover { color: var(--ink); }
.header-cta { display: flex; gap: 8px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; text-decoration: none; border: 0; cursor: pointer;
  border-radius: 999px; padding: 12px 20px; font-weight: 650;
  font-size: 0.95rem; transition: 0.2s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #000; }
.btn-ghost {
  background: transparent; color: var(--white);
  border: 1px solid rgba(247,250,248,0.35);
}
.btn-ghost:hover { background: rgba(247,250,248,0.1); }
.btn-outline {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
}
.btn-outline:hover { border-color: var(--ink); }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0;
  background: transparent; cursor: pointer; position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--ink);
  position: absolute; left: 12px; border-radius: 2px;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { content: ""; top: -6px; }
.nav-toggle span::after { content: ""; top: 6px; }

/* Hero */
.hero {
  position: relative;
  background: var(--dark);
  color: var(--white);
  overflow: hidden;
  min-height: 0;
  display: block;
}
.hero-media { position: absolute; inset: 0; pointer-events: none; opacity: 0.55; }
.hero-media video,
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.22; transform: scale(1.04);
  filter: blur(8px) saturate(0.85);
}
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7,18,16,0.94) 0%, rgba(7,18,16,0.78) 42%, rgba(7,18,16,0.35) 100%),
    linear-gradient(180deg, rgba(7,18,16,0.15) 0%, rgba(7,18,16,0.7) 100%);
}
.hero-layout {
  position: relative; z-index: 1;
  width: min(var(--max), calc(100% - 40px));
  margin: 40px auto 48px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-inner { margin: 0; max-width: none; }
.hero-frame {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #0C1A17;
  aspect-ratio: 1 / 1;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  border: 1px solid rgba(14, 211, 163, 0.18);
}
.hero-frame video,
.hero-frame img { width: 100%; height: 100%; object-fit: cover; opacity: 1; transform: none; filter: none; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--mint); font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; font-size: 0.74rem;
  margin-bottom: 18px;
}
.kicker::before { content: ""; width: 28px; height: 1px; background: var(--mint); }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.85rem); max-width: 16ch; }
.hero .lead {
  margin-top: 18px; font-size: 1.05rem; color: rgba(247,250,248,0.78);
  max-width: 52ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-meta {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px;
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid rgba(247,250,248,0.14);
}
.hero-meta div { min-width: 0; }
.hero-meta strong {
  display: block; font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700;
}
.hero-meta span { color: rgba(247,250,248,0.62); font-size: 0.88rem; }

/* Concepto */
.concepto {
  background: var(--dark-2);
  color: var(--white);
  padding: 88px 0;
}
.concepto .section-head { max-width: 820px; margin-bottom: 40px; }
.concepto h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 22ch; }
.concepto .lead { margin-top: 18px; color: rgba(247,250,248,0.72); font-size: 1.08rem; max-width: 60ch; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pillar {
  background: rgba(247,250,248,0.04);
  border: 1px solid rgba(14, 211, 163, 0.18);
  border-radius: var(--radius);
  padding: 24px;
}
.pillar h3 { font-size: 1.25rem; margin-bottom: 8px; }
.pillar p { color: rgba(247,250,248,0.68); font-size: 0.95rem; }
.pillar .ico { color: var(--mint); font-weight: 800; letter-spacing: 0.12em; font-size: 0.72rem; text-transform: uppercase; margin-bottom: 10px; }

/* Sections */
section { padding: 88px 0; }
.concepto, .hero { padding: 0; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 1.05rem; }
.section-dark { background: var(--dark-2); color: var(--white); }
.section-dark .section-head p,
.section-dark .muted { color: rgba(247,250,248,0.7); }
.section-alt { background: var(--bg-2); }
.kicker-ink { color: var(--accent) !important; }
.kicker-ink::before { background: var(--accent); }

/* Catalog */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  border: 1px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: 8px 14px; cursor: pointer;
  font-size: 0.88rem; font-weight: 600; color: var(--ink-soft);
}
.chip:hover, .chip.is-on { background: var(--ink); color: var(--white); border-color: var(--ink); }

.grid-machines {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}
.card {
  grid-column: span 4;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); }
.card-img {
  aspect-ratio: 1 / 1;
  background: #eef3f0;
  overflow: hidden;
  position: relative;
}
.card-img img, .card-img video {
  width: 100%; height: 100%; object-fit: contain; padding: 10px;
}
.card-img video.is-cover,
.card-img.is-cover video,
.card-img.is-cover img { object-fit: cover; padding: 0; }
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 1.4rem; }
.card p { color: var(--ink-soft); font-size: 0.95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  background: var(--bg-2); color: var(--ink); border-radius: 999px;
  padding: 4px 9px;
}
.card-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.linkish {
  background: none; border: 0; color: var(--accent); font-weight: 700;
  cursor: pointer; padding: 0; text-decoration: none;
}
.linkish:hover { text-decoration: underline; }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(7,18,16,0.66);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal.is-open { display: flex; }
.modal-card {
  width: min(920px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  background: var(--paper);
  border-radius: 28px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
}
.modal-card img, .modal-card video { width: 100%; height: 100%; object-fit: contain; background: #eef3f0; min-height: 260px; }
.modal-body { padding: 32px; }
.modal-body h3 { font-size: 2rem; margin: 8px 0 12px; }
.modal-close {
  position: fixed; top: 18px; right: 18px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--paper); cursor: pointer; font-size: 1.4rem;
}

/* Models */
.models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.model {
  background: var(--paper); border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--line);
}
.model .n {
  font-family: var(--font-display); font-size: 2rem; color: var(--accent);
}
.model h3 { font-size: 1.45rem; margin: 8px 0 12px; }
.model p { color: var(--ink-soft); }

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.step {
  background: rgba(247,250,248,0.05);
  border: 1px solid rgba(247,250,248,0.12);
  border-radius: var(--radius);
  padding: 24px;
}
.step .n {
  font-family: var(--font-display); font-size: 2.2rem; color: var(--mint);
}
.step h3 { font-size: 1.3rem; margin: 6px 0 10px; }
.step p { color: rgba(247,250,248,0.7); font-size: 0.95rem; }
.lead-box {
  margin-top: 36px;
  background: var(--mint);
  color: var(--dark);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap;
}
.lead-box strong { font-family: var(--font-display); font-size: 2rem; display: block; }

/* Hosts */
.hosts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.host {
  background: var(--paper); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow);
}
.host h3 { font-size: 1.55rem; margin-bottom: 10px; }
.host p { color: var(--ink-soft); }
.host ul { margin: 14px 0 0; padding: 0 0 0 18px; color: var(--ink-soft); }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details {
  background: var(--paper); border-radius: 16px; padding: 4px 22px;
  border: 1px solid var(--line);
}
.faq summary {
  cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; float: right; font-weight: 500; color: var(--accent);
  font-size: 1.3rem; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 18px; color: var(--ink-soft); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.contact-card {
  background: var(--paper); border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--line);
}
.contact-card a { color: var(--accent); font-weight: 700; text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }
form { display: grid; gap: 14px; }
label { font-size: 0.85rem; font-weight: 700; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; background: #fff;
}
textarea { min-height: 140px; resize: vertical; }
.form-ok, .form-err { display: none; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.form-ok { background: var(--mint-soft); color: var(--mint-dim); }
.form-err { background: var(--accent-soft); color: var(--accent); }
.form-ok.is-on, .form-err.is-on { display: block; }

/* Footer */
footer {
  background: var(--dark); color: rgba(247,250,248,0.75);
  padding: 48px 0 32px; font-size: 0.92rem;
}
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
footer a { color: var(--white); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-note { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(247,250,248,0.12); color: rgba(247,250,248,0.5); font-size: 0.82rem; }
.logo-light .wordmark { color: var(--white); }

.only-mobile { display: none !important; }

@media (max-width: 980px) {
  .card, .grid-machines .card { grid-column: span 6; }
  .models, .hosts, .timeline, .contact-grid, .footer-inner, .modal-card, .pillars {
    grid-template-columns: 1fr;
  }
  .hero-layout { grid-template-columns: 1fr; margin: 40px auto 48px; }
  .hero-frame { max-width: 440px; margin-inline: auto; width: 100%; }
  .modal-card img, .modal-card video { max-height: 280px; }
}
@media (max-width: 720px) {
  .hero-meta { grid-template-columns: 1fr; gap: 14px; }
  .nav, .header-cta { display: none; }
  .header.is-open .nav {
    display: flex; flex-direction: column;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg); padding: 16px 20px 24px;
    border-bottom: 1px solid var(--line); align-items: flex-start;
  }
  .header.is-open .nav .only-mobile { display: block !important; }
  .nav-toggle { display: block; }
  .card, .grid-machines .card { grid-column: span 12; }
  .hero-inner { margin: 0; }
  section { padding: 64px 0; }
  .concepto { padding: 64px 0; }
}
