/* Rutina Cero — automatización con IA. Identidad: tinta índigo + ámbar, sobre hueso. */

:root {
  color-scheme: light;

  --bone: #FAF9F5;
  --bg: var(--bone);
  --surface: #FFFFFF;
  --surface-2: #F1EFE8;
  --ink: #15172B;
  --ink-soft: #3C4059;
  --muted: #6A6E86;
  --line: #E3E0D6;
  --line-strong: #CFCBBE;
  --accent: #C9761A;
  --accent-bright: #E0912E;
  --accent-soft: #FBF0DF;
  --indigo: #2B3480;
  --indigo-soft: #E7E8F5;
  --shadow-sm: 0 1px 2px rgba(21, 23, 43, .06);
  --shadow: 0 2px 4px rgba(21, 23, 43, .04), 0 18px 40px -28px rgba(21, 23, 43, .45);

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  --step: clamp(1rem, .93rem + .3vw, 1.06rem);
  --gutter: clamp(1rem, .35rem + 2.8vw, 2.75rem);
  --max: 72rem;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #101126;
    --surface: #171935;
    --surface-2: #1D2040;
    --ink: #EDECF5;
    --ink-soft: #C5C6DB;
    --muted: #979AB6;
    --line: #262A50;
    --line-strong: #363B6E;
    --accent: #F0A542;
    --accent-bright: #FFBC63;
    --accent-soft: #2A2340;
    --indigo: #9BA6FF;
    --indigo-soft: #1E2246;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px -28px rgba(0, 0, 0, .9);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101126;
  --surface: #171935;
  --surface-2: #1D2040;
  --ink: #EDECF5;
  --ink-soft: #C5C6DB;
  --muted: #979AB6;
  --line: #262A50;
  --line-strong: #363B6E;
  --accent: #F0A542;
  --accent-bright: #FFBC63;
  --accent-soft: #2A2340;
  --indigo: #9BA6FF;
  --indigo-soft: #1E2246;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px -28px rgba(0, 0, 0, .9);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
[hidden] { display: none !important; }

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.025em; text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- marca ---------- */

.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.logo svg { width: 26px; height: 26px; flex: none; }
.logo .word { font-family: var(--font-display); font-weight: 800; font-size: 1.06rem; letter-spacing: -.03em; }
.logo .word em { font-style: normal; color: var(--accent); }

/* ---------- cabecera ---------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: .65rem;
}

.site-nav { display: flex; gap: 1.35rem; margin-left: auto; }
.site-nav a {
  font-size: .9rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: .3rem;
  border-bottom: 1.5px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.site-nav + .header-actions { margin-left: 0; }

.langs { display: flex; gap: .1rem; padding: .15rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.langs button {
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: .28rem .5rem;
  cursor: pointer;
  line-height: 1;
}
.langs button:hover { color: var(--ink); }
.langs button[aria-pressed="true"] { color: var(--ink); background: var(--surface-2); }

@media (max-width: 60rem) { .site-nav { display: none; } }

/* ---------- botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
  padding: .68rem 1.15rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .45rem .85rem; font-size: .85rem; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--accent)); }
.btn-accent { background: var(--accent); color: #FFF9F0; }
.btn-accent:hover { background: var(--accent-bright); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- secciones ---------- */

section { scroll-margin-top: 5rem; }
main > .wrap > section { padding-block: clamp(3rem, 2rem + 3.6vw, 5.5rem); }
main > .wrap > section + section { border-top: 1px solid var(--line); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}
.eyebrow::before { content: ""; width: 1.6rem; height: 1.5px; background: currentColor; opacity: .55; }

.section-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 1.2rem + 1.4vw, 2.75rem); }
.section-head h2 { font-size: clamp(1.55rem, 1.25rem + 1.4vw, 2.25rem); line-height: 1.12; }
.section-head p { color: var(--ink-soft); margin-top: .85rem; max-width: 58ch; }

/* ---------- héroe ---------- */

.hero { padding-block: clamp(2.75rem, 1.6rem + 4.5vw, 5rem) clamp(2.75rem, 2rem + 3vw, 4.5rem) !important; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: center; }

.hero h1 { font-size: clamp(2.05rem, 1.3rem + 3.3vw, 3.5rem); line-height: 1.04; letter-spacing: -.035em; }
.hero h1 .hl { color: var(--accent); }
.hero .lede { font-size: clamp(1.02rem, .97rem + .35vw, 1.15rem); color: var(--ink-soft); margin-top: 1.15rem; max-width: 40ch; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.8rem; }

.trust { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 2rem; padding-top: 1.15rem; border-top: 1px solid var(--line); list-style: none; padding-left: 0; font-size: .84rem; color: var(--muted); }
.trust li { display: flex; align-items: center; gap: .45rem; }
.trust li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }

/* tarjeta de flujo */

.flow {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.flow-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.flow-head .title { font-family: var(--font-display); font-weight: 700; font-size: .92rem; letter-spacing: -.01em; }
.pill { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .55rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }

.flow-steps { list-style: none; margin: 0; padding: 1.1rem 1.1rem .4rem; position: relative; }
.flow-steps > li { position: relative; padding-left: 2.15rem; padding-bottom: 1.15rem; }
.flow-steps > li::before {
  content: "";
  position: absolute;
  left: .48rem; top: 1.45rem; bottom: -.15rem;
  width: 1.5px;
  background: var(--line-strong);
}
.flow-steps > li:last-child::before { display: none; }
.flow-steps .dot {
  position: absolute; left: 0; top: .28rem;
  width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
}
.flow-steps .dot::after { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: var(--line-strong); }
.flow-steps li.on .dot { border-color: var(--accent); }
.flow-steps li.on .dot::after { background: var(--accent); }
.flow-steps h4 { font-size: .9rem; margin-bottom: .15rem; }
.flow-steps p { font-size: .87rem; color: var(--muted); max-width: 34ch; }

.flow-foot { display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; padding: .85rem 1.1rem calc(.9rem + 0px); border-top: 1px dashed var(--line-strong); background: var(--surface-2); font-size: .82rem; color: var(--muted); }
.flow-foot b { font-family: var(--font-display); color: var(--ink); font-weight: 700; }

@keyframes pulse-dot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .75; } }
.flow-steps li.on .dot::after { animation: pulse-dot 2.4s ease-in-out infinite; }

@media (max-width: 62rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .lede { max-width: 52ch; }
}

/* ---------- servicios ---------- */

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr)); list-style: none; margin: 0; padding: 0; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.card.featured { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.card .badge {
  position: absolute; top: -.7rem; left: 1.2rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: var(--accent); color: #FFF9F0;
  padding: .25rem .6rem; border-radius: 999px;
}
.card h3 { font-size: 1.1rem; }
.card .price { font-family: var(--font-display); font-weight: 800; font-size: 1.85rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.card .price small { font-family: var(--font-body); font-size: .78rem; font-weight: 500; letter-spacing: 0; color: var(--muted); display: block; margin-top: .35rem; }
.card p { font-size: .93rem; color: var(--ink-soft); }
.card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; font-size: .9rem; color: var(--ink-soft); }
.card ul li { display: flex; gap: .5rem; align-items: baseline; }
.card ul li::before { content: ""; width: .42rem; height: .42rem; border-radius: 1px; background: var(--accent); flex: none; transform: rotate(45deg) translateY(-1px); }
.card .card-cta { margin-top: auto; padding-top: .35rem; }

.note { font-size: .86rem; color: var(--muted); margin-top: 1.2rem; }

/* ---------- a quién ayudo ---------- */

.sectors { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.chips li {
  font-size: .89rem;
  padding: .42rem .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-soft);
}
.sectors p { color: var(--ink-soft); }
.sectors p + p { margin-top: .85rem; }

@media (max-width: 54rem) { .sectors { grid-template-columns: 1fr; } }

/* ---------- proceso ---------- */

.steps { counter-reset: step; display: grid; gap: 1.6rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-top: 2.6rem; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 1.9rem; height: 1.9rem;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: .92rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 50%;
}
.steps li::after { content: ""; position: absolute; top: .95rem; left: 2.35rem; right: -.75rem; height: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1rem; margin-bottom: .3rem; }
.steps p { font-size: .92rem; color: var(--ink-soft); }

@media (max-width: 54rem) { .steps li::after { display: none; } }

/* ---------- proyectos ---------- */

.projects { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); list-style: none; margin: 0; padding: 0; }
.project {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 1.35rem 1.35rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.project .tag { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.project h3 { font-size: 1.05rem; margin: .45rem 0 .5rem; }
.project p { font-size: .93rem; color: var(--ink-soft); }

/* ---------- sobre mí ---------- */

.about { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 3rem); grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
.about p + p { margin-top: .95rem; }
.about p { color: var(--ink-soft); }
.id-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem; box-shadow: var(--shadow-sm); }
.id-card .monogram {
  width: 3rem; height: 3rem; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.04em;
  margin-bottom: .9rem;
}
.id-card .name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.id-card .role { font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }
.id-card dl { margin: 0; display: grid; gap: 0; font-size: .88rem; }
.id-card dl > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .5rem; border-top: 1px solid var(--line); }
.id-card dt { color: var(--muted); }
.id-card dd { margin: 0; text-align: right; font-weight: 500; }

@media (max-width: 54rem) { .about { grid-template-columns: 1fr; } }

/* ---------- preguntas ---------- */

.faq { display: grid; gap: .55rem; max-width: 48rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 1.1rem; }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-display); font-weight: 700; font-size: .98rem;
  padding: .95rem 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-body); font-size: 1.25rem; color: var(--accent); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { font-size: .93rem; color: var(--ink-soft); padding-bottom: 1.05rem; max-width: 62ch; }

/* ---------- llamada final ---------- */

.cta-band {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 1.2rem + 2.4vw, 3rem);
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
}
.cta-band h2 { font-size: clamp(1.4rem, 1.15rem + 1.2vw, 2rem); }
.cta-band p { color: color-mix(in srgb, var(--bg) 78%, var(--ink)); margin-top: .7rem; max-width: 42ch; }
.cta-band .contacts { display: grid; gap: .55rem; }
.cta-band .contacts a { display: flex; align-items: center; gap: .6rem; font-weight: 600; text-decoration: none; padding: .7rem .95rem; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); }
.cta-band .contacts a:hover { border-color: var(--accent); color: var(--accent-bright); }
.cta-band .contacts .lbl { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--bg) 60%, var(--ink)); min-width: 5.5rem; font-weight: 700; }

@media (max-width: 54rem) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- pie ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--surface-2); margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.site-footer .wrap { padding-block: clamp(2rem, 1.5rem + 1.5vw, 3rem) calc(1.5rem + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; gap: 1.75rem; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
.footer-grid h4 { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; font-weight: 700; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .92rem; }
.footer-grid a { color: var(--ink-soft); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.footer-tag { font-size: .9rem; color: var(--muted); margin-top: .8rem; max-width: 34ch; }
.footer-legal { margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; justify-content: space-between; align-items: baseline; }
.footer-legal nav { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.footer-legal a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.footer-legal a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 60rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- páginas legales ---------- */

.legal { padding-block: clamp(2.25rem, 1.5rem + 3vw, 4rem); max-width: 48rem; }
.legal h1 { font-size: clamp(1.7rem, 1.35rem + 1.6vw, 2.35rem); }
.legal .updated { font-size: .84rem; color: var(--muted); margin-top: .5rem; margin-bottom: 2.25rem; }
.legal h2 { font-size: 1.05rem; margin: 2.1rem 0 .65rem; }
.legal p, .legal li { font-size: .95rem; color: var(--ink-soft); }
.legal p + p { margin-top: .8rem; }
.legal ul { padding-left: 1.15rem; display: grid; gap: .3rem; }
.legal ul.plain { list-style: none; padding: 1rem 1.15rem; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; gap: 0; }
.legal ul.plain li { display: flex; flex-wrap: wrap; gap: .3rem .8rem; padding-block: .45rem; border-top: 1px solid var(--line); }
.legal ul.plain li:first-child { border-top: 0; }
.legal ul.plain .label { font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); min-width: 11rem; }
.legal .back { display: inline-block; margin-top: 2.5rem; font-size: .92rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.legal .back:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
