/* ==========================================================================
   OBSYX — Design tokens
   ========================================================================== */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f6f6f7;
  --color-bg-dark: #0a0a0b;
  --color-text: #101113;
  --color-text-muted: #5b5f66;
  --color-text-inverse: #f5f5f6;
  --color-text-inverse-muted: #a5a8ad;
  --color-border: #e7e7e9;
  --color-border-dark: #26272a;
  --color-black: #111113;
  --color-black-hover: #2a2b2e;
  --color-accent: #25d366;
  --color-accent-dark: #1da851;
  --color-accent-soft: #e8f9ee;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 17, 19, 0.06);
  --shadow-md: 0 8px 24px rgba(16, 17, 19, 0.08);
  --shadow-lg: 0 24px 60px rgba(16, 17, 19, 0.14);

  --container-w: 1160px;
  --section-pad: clamp(3.5rem, 6vw, 6.5rem);

  --fs-h1: clamp(2.25rem, 1.5rem + 3.5vw, 3.75rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem);
  --fs-h3: clamp(1.125rem, 1rem + 0.5vw, 1.3rem);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, figure, blockquote, ul, ol { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-black);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 768px) {
  .container { padding-inline: 2rem; }
}

h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; }

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent-dark);
  margin-bottom: 0.75rem;
}
.eyebrow-light { color: var(--color-accent); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1.375rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-black);
  color: #fff;
}
.btn-primary:hover { background: var(--color-black-hover); }

.btn-lg { padding: 0.9rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.main-nav a { color: var(--color-text-muted); transition: color 0.15s ease; }
.main-nav a:hover { color: var(--color-text); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.header-actions .btn-primary { display: none; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav.open {
  display: flex;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 0.5rem 1.25rem 1.25rem;
  box-shadow: var(--shadow-md);
}
.main-nav.open a { width: 100%; padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); }
.main-nav.open a:last-child { border-bottom: none; }

@media (min-width: 1024px) {
  .main-nav { display: flex; }
  .header-actions .btn-primary { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) var(--section-pad); }

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero-copy h1 { margin-bottom: 1.25rem; }
.hero-sub {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: 2rem;
}
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 1rem; }
.hero-microcopy { font-size: 0.8125rem; color: var(--color-text-muted); }

.hero-visual { display: flex; flex-direction: column; align-items: center; }

.phone-mockup {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.phone-mockup-notch {
  height: 22px;
  background: var(--color-black);
  border-radius: 0 0 14px 14px;
  width: 40%;
  margin-inline: auto;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-black);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.chat-header-text { display: flex; flex-direction: column; line-height: 1.25; }
.chat-header-text strong { font-size: 0.875rem; }
.chat-header-text span { font-size: 0.7rem; color: var(--color-accent-dark); }

.chat-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.55rem; min-height: 300px; }
.msg {
  max-width: 85%;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  line-height: 1.4;
}
.msg.received {
  background: var(--color-bg-alt);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg.sent {
  background: var(--color-accent-soft);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 0.6rem 0.8rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  border-bottom-left-radius: 4px;
}
.chat-typing span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--color-text-muted);
  animation: typing-bounce 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.chat-lead-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
}
.chat-lead-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

.visual-caption {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 300px;
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
  .hero-visual { align-items: flex-end; }
}

/* ==========================================================================
   Sections (generic)
   ========================================================================== */
.section { padding-block: var(--section-pad); }
.section-alt { background: var(--color-bg-alt); }

.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-sub { color: var(--color-text-muted); font-size: 1.0625rem; margin-top: 0.75rem; }

.grid-3, .grid-4 { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.icon-badge {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  color: var(--color-text);
}
.icon-badge-accent { background: var(--color-accent-soft); color: var(--color-accent-dark); }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}
.section-alt .card { background: #fff; }
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--color-text-muted); font-size: 0.9375rem; }

.feature h3 { margin-bottom: 0.5rem; }
.feature p { color: var(--color-text-muted); font-size: 0.9375rem; }

/* ==========================================================================
   Cómo funciona
   ========================================================================== */
.steps {
  display: grid;
  gap: 2rem;
  counter-reset: step;
  position: relative;
}
.step { position: relative; padding-left: 0; }
.step-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-black);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 1rem;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--color-text-muted); font-size: 0.9375rem; max-width: 40ch; }

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Founder story
   ========================================================================== */
.founder-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 3rem;
}
.founder-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-black);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.founder-quote p {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.founder-quote footer {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}
.founder-quote footer span { font-weight: 400; color: var(--color-text-muted); }

@media (min-width: 768px) {
  .founder-block { flex-direction: row; padding: 2.5rem; }
}

.subsection-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Testimonials + integrations
   ========================================================================== */
.testimonial {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}
.testimonial p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.testimonial p::before { content: '"'; }
.testimonial p::after { content: '"'; }
.testimonial footer { font-size: 0.85rem; font-weight: 600; }
.testimonial footer span { font-weight: 400; color: var(--color-text-muted); }

.integrations { margin-top: 3.5rem; text-align: center; }
.integrations-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}
.integrations-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.integration-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
}
.integration-badge svg { color: var(--color-accent-dark); flex-shrink: 0; }


/* ==========================================================================
   CTA final / form
   ========================================================================== */
.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}
.cta-grid {
  display: grid;
  gap: 3rem;
}
.cta-copy h2 { color: #fff; margin-bottom: 1rem; }
.cta-copy p { color: var(--color-text-inverse-muted); font-size: 1.0625rem; max-width: 42ch; }
.cta-alt { margin-top: 1.5rem; font-size: 0.9375rem; }
.cta-alt a { color: var(--color-accent); font-weight: 600; }

.lead-form {
  background: #fff;
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row label { font-size: 0.85rem; font-weight: 600; }
.form-row label span { font-weight: 400; color: var(--color-text-muted); }
.form-row input {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  background: var(--color-bg-alt);
}
.form-row input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
  background: #fff;
}
.form-note { font-size: 0.75rem; color: var(--color-text-muted); text-align: center; }
.form-status { font-size: 0.85rem; font-weight: 600; text-align: center; min-height: 1.2em; }
.form-status.success { color: var(--color-accent-dark); }
.form-status.error { color: #c0392b; }

@media (min-width: 900px) {
  .cta-grid { grid-template-columns: 1fr 1fr; align-items: center; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse-muted);
  border-top: 1px solid var(--color-border-dark);
  padding-top: 3.5rem;
}
.footer-inner {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border-dark);
}
.footer-brand p { margin-top: 0.9rem; max-width: 32ch; font-size: 0.9rem; }
.footer-domain { color: var(--color-text-inverse); font-weight: 600; margin-top: 0.5rem !important; }
.logo-footer { color: #fff; }

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.footer-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-inverse);
  margin-bottom: 0.9rem !important;
}
.footer-links a { display: block; font-size: 0.9rem; margin-bottom: 0.65rem; }
.footer-links a:hover { color: #fff; }

.footer-bottom { padding-block: 1.5rem; font-size: 0.8rem; }

@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr; }
}

/* ==========================================================================
   Reveal-on-scroll (progressive enhancement)
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
