/* ============================================================
   martinpera.com.ar — Sistema de diseño
   Full-width, cálido y humano. Sin tarjetas tipo plantilla.
   Personalidad: par tipográfico serif+sans, papel cálido,
   un acento, doodles dibujados a mano, voz en primera persona.
   ============================================================ */

/* ---------- Reset mínimo ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* nunca scroll horizontal en mobile */
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul, ol { margin: 0; padding: 0; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; }

p { margin: 0; }

button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Tokens ---------- */
:root {
  /* Paleta cálida (no blanco clínico) */
  --paper: #FBF8F2;        /* fondo principal, papel cálido */
  --paper-deep: #F2EADB;   /* bandas alternas, crema más profundo */
  --paper-ink: #161310;    /* banda oscura (footer / contraste) */
  --ink: #1A1613;          /* texto, negro cálido */
  --ink-soft: #574F46;     /* texto secundario */
  --ink-mute: #8A8073;     /* texto terciario / labels */
  --line: #E4D9C6;         /* bordes finos sobre papel */
  --line-dark: #2C2620;    /* bordes sobre banda oscura */

  /* Acento (persimmon / terracota) */
  --accent: #D9482B;       /* acento visible, doodles, highlights */
  --accent-strong: #B23A20;/* fondo de botones (contraste AA con blanco) */
  --accent-soft: #FBE7DF;  /* wash suave detrás de highlights */
  --accent-2: #1C6E54;     /* verde "crecimiento", muy puntual */

  /* Tipografía */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-body: clamp(1.0625rem, 0.99rem + 0.35vw, 1.1875rem);
  --fs-lede: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  --fs-h3:   clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  --fs-h2:   clamp(1.9rem, 1.4rem + 2.2vw, 3.1rem);
  --fs-h1:   clamp(2.6rem, 1.7rem + 4.4vw, 5.2rem);
  --fs-mega: clamp(2.8rem, 1.6rem + 5.6vw, 6rem);
  --fs-stat: clamp(2.6rem, 1.8rem + 3.5vw, 4.4rem);
  --fs-eyebrow: clamp(0.8rem, 0.76rem + 0.15vw, 0.9rem);

  /* Espaciado */
  --gutter: clamp(1.25rem, 0.6rem + 3vw, 4rem);
  --container: 1180px;
  --container-narrow: 760px;
  --section-y: clamp(3.5rem, 2rem + 7vw, 8rem);
  --radius: 14px;

  --shadow-soft: 0 1px 2px rgba(26, 22, 19, .04),
                 0 10px 30px -18px rgba(26, 22, 19, .22);
}

/* ---------- Tipografía display ---------- */
.serif { font-family: var(--font-serif); font-weight: 500; }
.italic { font-style: italic; }

h1, .h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-h1);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h2, .h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

h3, .h3 {
  font-family: var(--font-sans);
  font-weight: 650;
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 650;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 1rem;
}

.lede {
  font-size: var(--fs-lede);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 38ch;
}

.muted { color: var(--ink-soft); }

/* Enlace de texto inline (subrayado para no depender solo del color) */
.ulink {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
}
.ulink:hover { color: #9c3019; }

/* Resalte con marcador a mano */
.mark {
  background: linear-gradient(180deg, transparent 58%, var(--accent-soft) 58%);
  padding: 0 .08em;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container.narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }

.band { background: var(--paper); }
.band--alt { background: var(--paper-deep); }
.band--dark {
  background: var(--paper-ink);
  color: #F4EEE3;
}
.band--accent {
  background: var(--accent-strong); /* contraste AA con texto blanco (5.97:1) */
  color: #fff;
}

.band--dark .muted,
.band--dark .lede { color: #C8BCA8; }
.band--dark .eyebrow { color: #F0A98F; }

/* divisor fino entre bandas del mismo color */
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom: 1px solid var(--line);
}
/* blur solo en pantallas grandes: es caro de repintar en mobile */
@media (min-width: 900px) {
  .site-header { backdrop-filter: saturate(1.1) blur(8px); }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand img { height: 30px; width: auto; }
.brand .brand-mark { /* placeholder hasta tener logo */
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--accent-strong);
  color: #fff;
  font-weight: 700;
  font-family: var(--font-sans);
  font-size: .95rem;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  list-style: none;
}
.nav-links a {
  font-size: .98rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color .15s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ink); }

.nav-cta { margin-left: .4rem; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 10px;
  padding: .5rem .65rem;
  color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: .9rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
  text-align: center;
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--accent-strong);
  color: #fff;
}
.btn--primary:hover { background: #9c3019; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.btn--light {
  background: #fff;
  color: var(--ink);
}
.btn--on-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.5);
}
.btn--on-dark:hover { background: #fff; color: var(--ink); border-color:#fff; }

.btn--lg { padding: 1.05rem 1.8rem; font-size: 1.06rem; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 1rem + 6vw, 6rem) clamp(2.5rem, 1rem + 5vw, 5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
}
.hero-greet {
  font-size: var(--fs-lede);
  color: var(--ink-soft);
  margin-bottom: .6rem;
}
.hero h1 { margin-bottom: 1.4rem; }
.hero h1 .accent { color: var(--accent-strong); }
.hero .lede { max-width: 46ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.hero-note {
  margin-top: 1.4rem;
  font-size: .95rem;
  color: var(--ink-soft); /* AA: ink-mute no contrasta en texto */
  display: flex;
  align-items: center;
  gap: .5rem;
}

.hero-photo {
  position: relative;
}
.hero-photo img {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-soft);
}
.hero-photo .ph {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 18px;
  background:
    radial-gradient(120% 120% at 30% 20%, #F6E4D9 0%, #EAD8C3 60%, #E2C9Ac 100%);
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  font-family: var(--font-serif);
  border: 1px dashed var(--accent);
  text-align: center;
}

/* ---------- Banda de logos / confianza ---------- */
.trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.2rem, 4vw, 3.5rem);
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .95rem;
}
.trust .trust-label {
  font-size: var(--fs-eyebrow);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Statements (bandas tipo Nathan Barry) ---------- */
.statement {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-mega);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 16ch;
}
.statement .accent { color: var(--accent-strong); }
.statement-body { max-width: 52ch; margin-top: 1.4rem; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.stat { }
.stat .num {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-stat);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.band--dark .stat .num { color: #fff; }
.stat .label {
  margin-top: .6rem;
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 24ch;
}
.band--dark .stat .label { color: #C8BCA8; }

/* ---------- Split (imagen + texto, full width, sin tarjeta) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.split--reverse .split-media { order: 2; }
.split-media img,
.split-media .ph {
  width: 100%;
  border-radius: 16px;
  aspect-ratio: 5/4;
  object-fit: cover;
}
.split-media .ph {
  background: var(--paper-deep);
  border: 1px dashed var(--line);
  display: grid; place-items: center;
  color: var(--ink-mute);
  text-align: center;
  padding: 1rem;
}
.split h2 { margin-bottom: 1rem; }

/* ---------- Lista de proceso / servicios (sin cards) ---------- */
.flow { display: grid; gap: 0; }
.flow-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}
.flow-item:last-child { border-bottom: 1px solid var(--line); }
.flow-num {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--accent-strong);
  line-height: 1;
  min-width: 2.2ch;
}
.flow-item h3 { margin-bottom: .4rem; }
.flow-item p { color: var(--ink-soft); max-width: 60ch; }

/* listado simple con check */
.ticklist { list-style: none; display: grid; gap: .9rem; }
.ticklist li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .8rem;
  align-items: start;
}
.ticklist li::before {
  content: "";
  width: 22px; height: 22px; margin-top: .15rem;
  background: var(--accent-soft);
  border-radius: 50%;
  display: inline-block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23B23A20' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
}

/* ---------- Tabla comparativa ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare th, .compare td {
  text-align: left;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.compare thead th {
  font-family: var(--font-sans);
  font-weight: 650;
  font-size: .95rem;
}
.compare thead th.is-me { color: var(--accent-strong); }
.compare tbody th { font-weight: 600; color: var(--ink); width: 34%; }
.compare td.yes { color: var(--accent-2); font-weight: 600; }
.compare td.no { color: var(--ink-soft); }
.compare caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-sans);
  font-weight: 650;
  font-size: .95rem;
  color: var(--ink-soft);
  padding: 0 0 .8rem;
}

/* ---------- Casos / quotes ---------- */
.quote {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.4rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 22ch;
}
.quote-meta { margin-top: 1.4rem; color: var(--ink-soft); font-size: 1rem; }
blockquote { margin: 0; }

/* ---------- Videos ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
}
.video {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
}
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-caption { margin-top: .7rem; font-size: .98rem; color: var(--ink-soft); }
/* placeholder facade (sin iframe hasta cargar el link real) */
.video .ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: var(--paper-deep);
  color: var(--ink-mute);
  text-align: center; padding: 1rem;
  border: 1px dashed var(--line);
}

/* ---------- FAQ (details) ---------- */
.faq { display: grid; gap: 0; max-width: 820px; }
.faq details {
  border-top: 1px solid var(--line);
  padding: .35rem 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0;
  font-weight: 600;
  font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--accent-strong);
  line-height: 1;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  padding: 0 0 1.3rem;
  color: var(--ink-soft);
  max-width: 70ch;
}

/* ---------- CTA final ---------- */
.cta-final { text-align: center; }
.cta-final h2 { margin-bottom: 1.2rem; max-width: 18ch; margin-inline: auto; }
.cta-final .lede { margin-inline: auto; margin-bottom: 2rem; max-width: 50ch; text-align: center; }
.band--accent .lede { color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--paper-ink);
  color: #C8BCA8;
  padding-block: clamp(3rem, 6vw, 5rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.site-footer h4 {
  font-family: var(--font-sans);
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8A8073;
  margin-bottom: 1.1rem;
}
.footer-brand .serif { font-size: 1.5rem; color: #F4EEE3; }
.footer-brand p { margin-top: .8rem; max-width: 34ch; }
.footer-links { list-style: none; display: grid; gap: .7rem; }
.footer-links a { color: #C8BCA8; transition: color .15s ease; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .9rem;
  color: #8A8073;
}
.social { display: flex; gap: .8rem; }
.social a {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  color: #C8BCA8;
  transition: all .15s ease;
}
.social a:hover { background: #fff; color: var(--ink); border-color:#fff; }
.social svg { width: 20px; height: 20px; }

/* ---------- Doodles ---------- */
.doodle { color: var(--accent); pointer-events: none; }
.doodle--underline {
  display: block;
  width: 100%;
  max-width: 320px;
  margin-top: -.2rem;
}

/* ---------- Utilidades ---------- */
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.maxw-narrow { max-width: var(--container-narrow); }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; } .mt-5 { margin-top: 3rem; }
.mb-3 { margin-bottom: 1.5rem; }
.section-head { max-width: 640px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head.center { margin-inline: auto; }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: .8rem 1.2rem; z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Reveal on scroll ----------
   Solo se oculta cuando hay JS (.js en <html>); sin JS el contenido
   queda visible (clave para crawlers de LLMs y robustez). */
.reveal { transition: opacity .6s ease, transform .6s ease; }
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .js .reveal, .js .reveal.is-in { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 420px; }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split-media { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.5rem;
    transform: translateY(-130%);
    visibility: hidden; /* no focusable cuando está cerrado */
    transition: transform .28s ease, visibility 0s linear .28s;
    box-shadow: var(--shadow-soft);
  }
  .nav-links.open { transform: translateY(0); visibility: visible; transition: transform .28s ease, visibility 0s; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links li:first-child { border-top: 0; }
  .nav-links a { display: block; padding: 1rem 0; font-size: 1.1rem; }
  .nav-cta { margin: 1rem 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .hero-actions { display: none; }
  body { background: #fff; color: #000; }
}
