/* Calcula tu Proyecto — static site styles */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400..800;1,9..40,400..800&display=swap");
:root {
  --bg: hsl(210 40% 98%);
  --surface: #ffffff;
  --text: hsl(222 47% 11%);
  --muted: hsl(215 16% 47%);
  --border: hsl(214 32% 91%);
  --primary: hsl(166 76% 40%);
  --primary-dark: hsl(166 76% 33%);
  --accent: hsl(166 76% 40%);
  --accent-foreground: hsl(166 76% 24%);
  --accent-soft: hsl(166 76% 95%);
  --primary-soft: hsl(166 76% 95%);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --radius: 12px;
  --maxw: 1120px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }

/* Language toggle (ES/EN) */
[data-lang="en"] { display: none; }
html[lang="en"] [data-lang="es"] { display: none; }
html[lang="en"] [data-lang="en"] { display: revert; }
.lang-btn { background: none; border: 1px solid var(--border); border-radius: 9px; padding: 6px 11px; font-weight: 700; font-size: .85rem; color: var(--muted); cursor: pointer; font-family: inherit; line-height: 1; }
.lang-btn:hover { color: var(--primary); border-color: var(--primary); }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}
h1, h2, h3, h4 { line-height: 1.25; color: #0f172a; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin: 1.8em 0 .5em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

/* Skip link */
.skip { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; color: #0f172a; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: 0 0 30px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: .96rem; padding: 8px 12px; border-radius: 9px; }
.nav-links a:hover { color: var(--text); background: var(--primary-soft); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 9px; padding: 8px; cursor: pointer; color: var(--text); }
.nav-toggle svg { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 10px 16px 16px; box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; font-size: 1rem; }
}

/* Hero */
.hero {
  position: relative;
  background-image: linear-gradient(90deg, rgba(9, 20, 16, .82) 0%, rgba(9, 20, 16, .55) 55%, rgba(9, 20, 16, .30) 100%), url("/assets/hero.jpg");
  background-size: cover;
  background-position: center;
}
.hero-inner { padding: 92px 0 84px; max-width: 660px; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.18rem; color: rgba(255, 255, 255, .92); max-width: 620px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--primary); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.hero .btn-outline { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1rem; padding: 12px 22px; border-radius: 11px; border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background .15s ease; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; justify-content: center; }

/* Breadcrumb */
.breadcrumb { font-size: .88rem; color: var(--muted); padding: 18px 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 6px; color: var(--border); }

/* Cards grid */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card-link { transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.card-link:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(16,24,40,.10); border-color: hsl(166 50% 72%); text-decoration: none; }
.card h3 { margin: 0 0 6px; color: #0f172a; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }
.card .tool-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 14px; }
.card .card-more { margin-top: auto; padding-top: 14px; font-weight: 700; color: var(--primary); font-size: .92rem; }

/* Sections */
section { padding: 10px 0; }
.section-pad { padding: 40px 0; }
.tag { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; }

/* Steps */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.step .num { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; margin-bottom: 14px; }

/* Benefits list */
.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.benefits li { display: flex; gap: 10px; align-items: flex-start; }
.benefits li svg { flex: 0 0 22px; color: var(--accent); margin-top: 3px; }

/* Calculator */
.calc-wrap { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; margin: 18px 0 8px; }
@media (max-width: 800px) { .calc-wrap { grid-template-columns: 1fr; } }
.calc-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.calc-panel h2 { margin: 0 0 16px; font-size: 1.15rem; }
.field { margin-bottom: 14px; }
.field > label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: #334155; }
.field input, .field select {
  width: 100%; height: 46px; padding: 0 12px; margin: 0; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--border); border-radius: 10px; background-color: #fff; color: var(--text);
  vertical-align: middle; box-sizing: border-box;
}
.field select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a6478' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 16px 16px;
}
.field input:focus, .field select:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.row { display: grid; gap: 12px; }
.row-2 { grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 520px) { .row-3 { grid-template-columns: 1fr; } }
.calc-actions { display: flex; gap: 10px; margin-top: 6px; }
.hint { font-size: .82rem; color: var(--muted); margin: 4px 0 0; }
.error { color: #b91c1c; font-weight: 600; font-size: .9rem; margin: 6px 0 0; }
.result-box { background: var(--bg); border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; margin-bottom: 12px; }
.result-box .rl { font-size: .85rem; color: var(--muted); margin: 0 0 3px; }
.result-box .rv { font-size: 1.55rem; font-weight: 800; margin: 0; color: #0f172a; }
.result-box.primary { background: var(--accent-soft); border-color: #b6e3dd; }
.result-box.primary .rv { color: var(--accent); }
.result-empty { color: var(--muted); text-align: center; padding: 28px 0; }

/* Prose content */
.prose { max-width: 780px; }
.prose h2 { border-top: 1px solid var(--border); padding-top: 26px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.formula { background: hsl(210 40% 96%); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; line-height: 1.7; overflow-x: auto; margin: 0 0 12px; }
.formula strong { color: hsl(166 76% 28%); }
.callout { background: var(--primary-soft); border-left: 4px solid var(--primary); border-radius: 8px; padding: 14px 16px; margin: 0 0 16px; }
.callout.warn { background: #fff7ed; border-left-color: #ea580c; }
.example-table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: .96rem; }
.example-table th, .example-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.example-table th { color: var(--muted); font-weight: 600; width: 55%; }
.example-table td { font-weight: 700; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 2px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--primary); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq details p { padding: 12px 0; margin: 0; color: var(--muted); }

/* Related */
.related-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.disclaimer { font-size: .88rem; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: 11px; padding: 14px 16px; margin: 22px 0; }

/* Footer */
.site-footer { background: hsl(210 40% 96%); color: var(--muted); margin-top: 60px; padding: 46px 0 28px; border-top: 1px solid var(--border); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--primary); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1.6fr 1fr 1fr 1fr; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--text); font-size: .95rem; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .93rem; }
.site-footer .brand { color: var(--text); margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 20px; font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Ad slots — hidden until real ad units are placed */
.ad-slot { display: none; }

.mt-0 { margin-top: 0; }
.text-muted { color: var(--muted); }
