/* =====================================================================
   AgroRumi — agrorumi.com
   Identidad "Cuero y hacienda": crema editorial, cuero y terracota,
   Fraunces para los títulos y Mulish para el cuerpo. El detalle de firma
   es la COSTURA — bordes punteados como el pespunte de una montura.
   ===================================================================== */

:root {
  --leather: #6e4a2b;
  --leather-deep: #402810;
  --terracotta: #b5532a;
  --terracotta-dark: #8f3e1d;
  --cream: #fbf6ec;
  --cream-2: #f3ecde;
  --cream-3: #ede4d3;
  --cream-card: #fffdf8;
  --ink: #211c16;
  --ink-soft: #6e5e4c;
  --outline: #e0d4bf;
  --green: #5c7a33;
  --gold: #e8b84b;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Mulish", -apple-system, sans-serif;

  --stitch: 2px dashed color-mix(in srgb, var(--leather) 38%, transparent);
  --radius: 18px;
  --shadow-warm: 0 18px 44px -18px rgba(64, 40, 16, 0.28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  /* Grano de papel sutil sobre el crema */
  background-image:
    radial-gradient(at 85% -10%, rgba(232, 184, 75, 0.10), transparent 55%),
    radial-gradient(at -15% 25%, rgba(181, 83, 42, 0.05), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.028'/%3E%3C/svg%3E");
}

::selection { background: var(--terracotta); color: var(--cream); }

h1, h2, h3 { font-family: var(--font-display); color: var(--leather-deep); line-height: 1.12; }

a { color: var(--terracotta); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

em.brand {
  font-style: italic;
  color: var(--terracotta);
}

/* ---------- Header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo-mark { width: 40px; height: 40px; border-radius: 11px; }

.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--leather-deep);
  text-decoration: none;
}

nav.main { margin-left: auto; display: flex; gap: 26px; align-items: center; }

nav.main a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}
nav.main a:hover { color: var(--terracotta); }

@media (max-width: 640px) { nav.main a.hide-sm { display: none; } }

/* ---------- Botones ---------- */

.btn {
  display: inline-block;
  font-weight: 800;
  text-decoration: none;
  border-radius: 14px;
  padding: 14px 26px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--terracotta);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(181, 83, 42, 0.55);
}
.btn-primary:hover { background: var(--terracotta-dark); }

.btn-ghost {
  color: var(--leather);
  border: var(--stitch);
  background: var(--cream-card);
}

/* ---------- Hero ---------- */

.hero { padding: 72px 0 40px; overflow: hidden; }

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--leather);
  background: var(--cream-3);
  border: 1px solid var(--outline);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  font-weight: 700;
  margin-bottom: 20px;
}

.hero p.lead {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 30px;
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }

.hero-note { font-size: 0.9rem; color: var(--ink-soft); }

/* Animación de entrada, en cascada */
.reveal { opacity: 0; transform: translateY(18px); animation: rise 0.7s ease forwards; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.18s; }
.reveal.d3 { animation-delay: 0.28s; }
.reveal.d4 { animation-delay: 0.4s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}

/* ---------- Teléfono (mockup CSS del Inicio real de la app) ---------- */

.phone-scene { position: relative; display: flex; justify-content: center; }

.phone-scene::before {
  /* "sol" dorado detrás del teléfono */
  content: "";
  position: absolute;
  inset: -8% -14%;
  background: radial-gradient(closest-side at 60% 38%, rgba(232, 184, 75, 0.35), transparent 70%);
  z-index: 0;
}

.phone {
  position: relative;
  z-index: 1;
  width: 300px;
  border-radius: 42px;
  background: var(--leather-deep);
  padding: 12px;
  box-shadow: var(--shadow-warm), 0 2px 0 rgba(255, 255, 255, 0.25) inset;
  transform: rotate(2.5deg);
}

.phone-screen {
  background: var(--cream);
  border-radius: 32px;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.45;
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 14px 10px;
}
.app-bar img { width: 34px; height: 34px; border-radius: 50%; }
.app-bar .farm { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.app-bar .date { color: var(--ink-soft); font-size: 10.5px; }

.app-card {
  background: var(--cream-card);
  border: 1px solid var(--outline);
  border-radius: 13px;
  margin: 0 12px 10px;
  padding: 11px 13px;
}
.app-card .title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 7px;
  color: var(--leather-deep);
}

.kpis { display: flex; gap: 8px; }
.kpi { flex: 1; background: var(--cream-2); border-radius: 9px; padding: 7px 9px; }
.kpi b { display: block; font-size: 16px; color: var(--leather-deep); }
.kpi span { font-size: 9.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }

.ledger { display: flex; justify-content: space-between; padding: 3px 0; color: var(--ink-soft); }
.ledger b { color: var(--ink); font-weight: 800; }
.ledger.total { border-top: 1px dashed var(--outline); margin-top: 5px; padding-top: 6px; }
.ledger.total b { color: var(--green); }

.agenda-item { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.agenda-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--terracotta); flex: none; }
.agenda-dot.g { background: var(--green); }
.agenda-dot.o { background: var(--gold); }
.agenda-item .when { margin-left: auto; color: var(--ink-soft); font-size: 10px; }

.app-nav {
  display: flex;
  justify-content: space-around;
  padding: 9px 6px 13px;
  border-top: 1px solid var(--outline);
  color: var(--ink-soft);
  font-size: 9px;
  text-align: center;
}
.app-nav b { display: block; font-size: 15px; }
.app-nav .on { color: var(--terracotta); }

/* chip flotante "sin señal" */
.float-chip {
  position: absolute;
  z-index: 2;
  right: -6px;
  top: 46px;
  background: var(--leather);
  color: var(--cream);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 9px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow-warm);
  transform: rotate(-3deg);
}
.float-chip small { display: block; font-weight: 600; opacity: 0.75; font-size: 0.68rem; }

/* ---------- Secciones ---------- */

section { padding: 64px 0; }

.section-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 10px;
}

.section-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 14px; }

.section-sub { color: var(--ink-soft); max-width: 40rem; margin-bottom: 40px; }

/* Cinta offline — la promesa central, en cuero */
.offline-band { background: var(--leather); color: var(--cream); position: relative; }
.offline-band::before, .offline-band::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 0;
  border-top: var(--stitch);
  border-color: rgba(251, 246, 236, 0.35);
}
.offline-band::before { top: 10px; }
.offline-band::after { bottom: 10px; }
.offline-band .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.offline-band h2 { color: var(--cream); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.offline-band p { color: rgba(251, 246, 236, 0.82); }
.offline-points { display: grid; gap: 14px; }
.offline-points div {
  border: 2px dashed rgba(251, 246, 236, 0.3);
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 700;
}
.offline-points span { display: block; font-weight: 600; font-size: 0.9rem; opacity: 0.75; }

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.feature {
  background: var(--cream-card);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-warm); }
.feature::after {
  /* costura interior */
  content: "";
  position: absolute;
  inset: 7px;
  border: var(--stitch);
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.feature:hover::after { opacity: 1; }

.feature img { width: 54px; height: 54px; margin-bottom: 14px; }
.feature h3 { font-size: 1.12rem; margin-bottom: 6px; }
.feature p { color: var(--ink-soft); font-size: 0.95rem; }

/* Planes */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; align-items: stretch; }

.plan {
  background: var(--cream-card);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
}
.plan.featured {
  background: var(--leather-deep);
  color: var(--cream);
  border-color: var(--leather-deep);
  box-shadow: var(--shadow-warm);
}
.plan.featured h3, .plan.featured .plan-price { color: var(--cream); }
.plan.featured li { color: rgba(251, 246, 236, 0.85); }

.plan h3 { font-size: 1.3rem; }
.plan-price { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--terracotta); margin: 4px 0 16px; }
.plan ul { list-style: none; display: grid; gap: 9px; margin-bottom: 22px; }
.plan li { padding-left: 24px; position: relative; color: var(--ink-soft); font-size: 0.95rem; }
.plan li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; color: var(--green); }
.plan.featured li::before { color: var(--gold); }
.plan .btn { margin-top: auto; text-align: center; }

.plan-tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--leather-deep);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 10px;
}

/* CTA final */
.final-cta {
  text-align: center;
  background: var(--cream-2);
  border-top: 1px solid var(--outline);
  border-bottom: 1px solid var(--outline);
}
.final-cta h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 12px; }
.final-cta p { color: var(--ink-soft); margin-bottom: 28px; }

/* ---------- Footer ---------- */

footer.site { padding: 36px 0 46px; color: var(--ink-soft); font-size: 0.92rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
footer.site nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
footer.site a { color: var(--ink-soft); text-decoration: none; font-weight: 700; }
footer.site a:hover { color: var(--terracotta); }

/* ---------- Páginas legales ---------- */

.legal { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 6px; }
.legal .updated { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 36px; }
.legal h2 { font-size: 1.25rem; margin: 34px 0 10px; }
.legal h3 { font-size: 1.05rem; margin: 26px 0 8px; }
.legal p, .legal li { color: #4a4034; }
.legal ul { padding-left: 22px; margin: 8px 0; }
.legal .card {
  background: var(--cream-card);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 18px 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .phone { transform: rotate(0deg); }
  .offline-band .wrap { grid-template-columns: 1fr; }
}
