/* ==========================================================
   Calcuwin — sistema visual
   ========================================================== */
:root {
  --ink: #0f1214;
  --ink-2: #1b2024;
  --paper: #f5f3ee;
  --surface: #ffffff;
  --muted: #646b70;
  --muted-light: #a9b0b4;
  --line: #e3e0d8;
  --line-dark: #2a3136;
  --accent: #ff5b1f;
  --accent-hover: #e94a10;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(15,18,20,.04), 0 12px 32px rgba(15,18,20,.07);
  --display: "Manrope", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--display); color: var(--ink); background: var(--paper);
  line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
section { padding: 112px 0; }
h1, h2, h3 { line-height: 1.08; margin: 0 0 16px; letter-spacing: -.025em; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); letter-spacing: -.04em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -.035em; max-width: 16ch; }
h3 { font-size: 1.2rem; letter-spacing: -.015em; line-height: 1.25; }
em, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; color: var(--muted);
  font-weight: 600; text-transform: uppercase; font-size: .78rem; letter-spacing: .14em; margin: 0 0 20px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.eyebrow-light { color: rgba(255,255,255,.75); }
.lead { color: var(--muted); max-width: 620px; font-size: 1.1rem; }
.center { text-align: center; margin-top: 48px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; margin-bottom: 56px; }
.section-head h2 { margin: 0; }
.section-head .lead { margin: 0; max-width: 420px; }
.alt { background: var(--surface); }
.dark { background: var(--ink); color: #fff; }
.dark .lead { color: var(--muted-light); }

/* ---------- Accesibilidad ---------- */
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px; font-weight: 700; font-size: .98rem; font-family: inherit;
  text-decoration: none; border: 0; cursor: pointer; transition: background .2s, color .2s, transform .2s;
  background: var(--surface); color: var(--ink);
}
.btn:hover { transform: translateY(-1px); }
.btn::after { content: "→"; transition: transform .2s; }
.btn:hover::after { transform: translateX(3px); }
.btn-primary, .btn-accent { background: var(--accent); color: #fff; }
.btn-primary:hover, .btn-accent:hover { background: var(--accent-hover); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,.2); }
.btn-outline { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-block { width: 100%; }
.nav-cta::after, .btn-plain::after { content: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; padding: 14px 0; transition: padding .25s; }
.site-header .nav {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  height: 64px; padding: 0 10px 0 22px; border-radius: 999px;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(1.6) blur(14px);
  border: 1px solid rgba(15,18,20,.07); transition: box-shadow .25s;
}
.site-header.scrolled .nav { box-shadow: var(--shadow); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em; text-decoration: none; }
.logo-text span { color: var(--accent); }
.logo-mark { width: 26px; height: 26px; border: 2.5px solid currentColor; border-radius: 6px; position: relative; }
.logo-mark::before, .logo-mark::after { content: ""; position: absolute; background: currentColor; }
.logo-mark::before { left: 50%; top: 0; bottom: 0; width: 2.5px; transform: translateX(-50%); }
.logo-mark::after { top: 50%; left: 0; right: 0; height: 2.5px; transform: translateY(-50%); }
.menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.menu a { display: block; padding: 8px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--muted); transition: background .2s, color .2s; }
.menu a:hover { color: var(--ink); background: rgba(15,18,20,.05); }
.menu a[aria-current="page"] { color: var(--ink); background: rgba(15,18,20,.07); }
.nav-cta { padding: 12px 22px; background: var(--ink); color: #fff; }
.nav-cta:hover { background: var(--accent); }
.menu-toggle { display: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 1.2rem; cursor: pointer; }

/* ---------- Hero (inicio) ---------- */
.hero {
  position: relative; margin: -92px 0 0; padding: 0; min-height: 100svh; display: flex; align-items: flex-end;
  color: #fff; background: #20282d url("https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=2000&q=75") center/cover;
  isolation: isolate;
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,12,14,.55) 0%, rgba(10,12,14,.15) 35%, rgba(10,12,14,.85) 100%); }
.hero .wrap { width: 100%; padding-top: 180px; padding-bottom: 64px; }
.hero h1 { max-width: 14ch; margin-bottom: 28px; }
.hero h1 em { color: #ffd2bf; }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; }
.hero-copy p { font-size: 1.2rem; max-width: 520px; color: rgba(255,255,255,.85); margin: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-card {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(18px);
  border-radius: var(--radius); padding: 28px;
}
.hero-card h3 { font-size: 1rem; font-weight: 600; color: rgba(255,255,255,.8); margin-bottom: 18px; }
.hero-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.hero-checks li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.hero-checks svg { flex: none; width: 22px; height: 22px; color: var(--accent); }
.scroll-hint { display: flex; justify-content: space-between; margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.2); font-size: .9rem; color: rgba(255,255,255,.7); }

/* ---------- Cifras ---------- */
.stats-bar { padding: 0; background: var(--ink); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats > div { padding: 44px 24px; border-left: 1px solid var(--line-dark); }
.stats > div:first-child { border-left: 0; padding-left: 0; }
.stats strong { display: block; font-size: clamp(2.2rem, 4vw, 3.2rem); letter-spacing: -.04em; line-height: 1; margin-bottom: 10px; }
.stats span { color: var(--muted-light); font-size: .95rem; }

/* ---------- Problemas ---------- */
.pains { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.pain { padding: 32px 28px 8px 0; }
.pain + .pain { padding-left: 28px; border-left: 1px solid var(--line); }
.pain-num { font-family: var(--serif); font-style: italic; font-size: 2.4rem; color: var(--accent); line-height: 1; display: block; margin-bottom: 20px; }
.pain p { color: var(--muted); margin: 0; }
.pain-answer { margin-top: 56px; padding: 28px 32px; border-radius: var(--radius); background: var(--surface); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 1.15rem; font-weight: 600; }

/* ---------- Tarjetas ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 48px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .3s, box-shadow .3s; }
.alt .card { background: var(--paper); border-color: transparent; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card img { width: 100%; aspect-ratio: 4/3; height: auto; object-fit: cover; background: #d9d6ce; transition: transform .6s; }
.card:hover img { transform: scale(1.04); }
.card-body { padding: 24px; }
.card-body p { color: var(--muted); margin: 0; }
.card-link { text-decoration: none; color: inherit; display: block; }
.card .more { display: inline-block; margin-top: 14px; font-weight: 700; font-size: .92rem; }

/* Bento de productos (inicio) */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 300px; gap: 16px; }
.tile { position: relative; border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none; background: #2a3136; isolation: isolate; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(10,12,14,.8)); }
.tile:hover img { transform: scale(1.05); }
.tile-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px; display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.tile h3 { font-size: 1.5rem; margin: 0 0 6px; }
.tile p { margin: 0; color: rgba(255,255,255,.8); font-size: .95rem; max-width: 34ch; }
.tile .arrow { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-weight: 700; transition: background .2s, color .2s; }
.tile:hover .arrow { background: var(--accent); color: #fff; }
.tile-lg { grid-column: span 2; grid-row: span 2; }
.tile-lg h3 { font-size: 2.2rem; }
.tile-wide { grid-column: span 2; }

/* ---------- Iconos / ventajas ---------- */
.feature { display: flex; flex-direction: column; gap: 18px; padding: 28px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.alt .feature { background: var(--paper); border-color: transparent; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.feature-icon svg { width: 26px; height: 26px; }
.ico { width: 22px; height: 22px; vertical-align: -5px; margin-right: 8px; color: var(--accent); }

/* ---------- Pasos ---------- */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.step { position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.dark .step { background: var(--ink-2); border-color: var(--line-dark); }
.step::before { counter-increment: s; content: "0" counter(s); display: block; font-family: var(--serif); font-style: italic; font-size: 3rem; line-height: 1; color: var(--accent); margin-bottom: 40px; }
.step p { color: var(--muted); margin: 0; }
.dark .step p { color: var(--muted-light); }

/* ---------- Cotizador / formularios ---------- */
.quote { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
form { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 36px; display: grid; gap: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-weight: 600; font-size: .85rem; display: grid; gap: 8px; color: var(--ink); }
input, select, textarea {
  font: inherit; font-size: 1rem; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink); width: 100%; transition: border-color .2s, background .2s;
}
input:hover, select:hover, textarea:hover { border-color: #cfcbc1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); background: #fff; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #d92d20; background: #fff5f4; }
.hint { color: var(--muted); font-size: .85rem; margin: 0; text-align: center; }
.form-error { color: #b42318; font-weight: 600; margin: 0; }
.form-ok { color: #067647; font-weight: 600; margin: 0; }
.checklist { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.checklist li { padding-left: 34px; position: relative; color: var(--muted); }
.dark .checklist li { color: var(--muted-light); }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; }

/* ---------- Galería ---------- */
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 48px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4/5; height: auto; object-fit: cover; border-radius: var(--radius); background: #d9d6ce; }
.gallery figcaption { font-size: .9rem; color: var(--muted); margin-top: 12px; }
.home-gallery { grid-template-columns: 1.3fr 1fr 1fr; grid-auto-rows: 280px; }
.home-gallery figure:first-child { grid-row: span 2; }
.home-gallery img { aspect-ratio: auto; height: 100%; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button { font: inherit; font-weight: 600; border: 1.5px solid var(--line); background: transparent; padding: 10px 20px; border-radius: 999px; cursor: pointer; transition: all .2s; }
.filters button:hover { border-color: var(--ink); }
.filters button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Páginas internas ---------- */
.page-hero { margin-top: -92px; padding: 200px 0 96px; background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(255,91,31,.35), transparent 65%); pointer-events: none; }
.page-hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); max-width: 16ch; }
.page-hero p { color: var(--muted-light); max-width: 600px; margin: 0; font-size: 1.15rem; }
table { width: 100%; border-collapse: collapse; margin-top: 40px; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.alt table { background: var(--paper); }
th, td { padding: 18px 22px; border-bottom: 1px solid var(--line); text-align: left; }
tr:last-child td { border-bottom: 0; }
th { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
td:first-child { font-weight: 600; }
.table-scroll { overflow-x: auto; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 40px; }
.swatch { border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.swatch div { height: 140px; }
.swatch p { margin: 0; padding: 14px 18px; font-weight: 700; }
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); padding: 24px 0; }
.faq summary { font-weight: 700; font-size: 1.15rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); margin: 14px 0 0; max-width: 70ch; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact .card { border: 1px solid var(--line); }
.contact .card-body h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; align-items: center; }
.contact .card-body p { color: var(--ink); font-weight: 600; font-size: 1.05rem; }
.contact a { text-decoration: none; }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; background: var(--accent); color: #fff; border-radius: 32px; padding: 72px 64px; display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.cta h2 { margin-bottom: 12px; max-width: 14ch; }
.cta p { margin: 0; opacity: .9; font-size: 1.1rem; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta .btn { background: #fff; color: var(--ink); }
.cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.cta-dark { background: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--muted-light); padding: 96px 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 48px; }
.site-footer .logo { color: #fff; font-size: 1.6rem; margin-bottom: 16px; }
.site-footer p { max-width: 340px; }
.site-footer h3 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 20px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--line-dark); margin-top: 72px; padding-top: 24px; padding-bottom: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-word { font-weight: 800; letter-spacing: -.06em; font-size: clamp(4rem, 17vw, 15rem); line-height: .8; color: var(--ink-2); margin: 48px 0 -10px; user-select: none; white-space: nowrap; overflow: hidden; }

/* ---------- Flotantes ---------- */
.wa-float { position: fixed; right: 22px; bottom: 22px; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 28px rgba(0,0,0,.25); text-decoration: none; z-index: 30; transition: transform .2s; }
.wa-float:hover { transform: scale(1.06); }
.mobile-cta { display: none; }

/* ---------- Animación ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 260px; }
  .tile-lg { grid-column: span 2; grid-row: span 1; }
  .pains { grid-template-columns: repeat(2, 1fr); }
  .pain:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .quote { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 860px) {
  body { font-size: 16px; padding-bottom: 64px; }
  section { padding: 80px 0; }
  .wrap { padding: 0 16px; }
  .site-header { padding: 10px 0; }
  .site-header .nav { height: 58px; padding: 0 6px 0 18px; }
  .menu { display: none; position: absolute; top: 76px; left: 16px; right: 16px; flex-direction: column; padding: 12px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
  .menu.open { display: flex; }
  .menu a { padding: 14px 16px; font-size: 1.05rem; }
  .menu-toggle { display: block; }
  .nav-cta { display: none; }
  .hero { margin-top: -78px; }
  .page-hero { margin-top: -78px; padding: 150px 0 72px; }
  .hero .wrap { padding-top: 140px; padding-bottom: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .scroll-hint { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div { padding: 28px 16px; }
  .stats > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-dark); }
  .pains { grid-template-columns: 1fr; }
  .pain, .pain + .pain { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .bento { grid-template-columns: 1fr; grid-auto-rows: 280px; }
  .tile-lg, .tile-wide { grid-column: auto; }
  .tile-lg h3 { font-size: 1.6rem; }
  .steps { grid-template-columns: 1fr; }
  .step::before { margin-bottom: 16px; }
  .row, .contact { grid-template-columns: 1fr; }
  form { padding: 24px; }
  .home-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
  .home-gallery figure:first-child { grid-column: span 2; grid-row: auto; }
  .cta { padding: 44px 28px; border-radius: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .site-footer { padding-top: 64px; }
  .wa-float { display: none; }
  .mobile-cta { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 6px; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 30; padding: 6px; background: rgba(15,18,20,.92); backdrop-filter: blur(12px); border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
  .mobile-cta a { text-align: center; padding: 12px 6px; font-weight: 700; font-size: .95rem; text-decoration: none; color: #fff; border-radius: 999px; }
  .mobile-cta a.primary { background: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition: none !important; }
}
