/* =========================================================
   HHB · hhb.cl — Estilos de la landing
   Paleta y tipografías según el Manual de marca v1.0
   ========================================================= */

:root {
  --ink: #0B1F33;
  --ink-deep: #071523;
  --green: #0B7A69;
  --green-dark: #08594C;
  --mint: #5FD3BC;
  --amber: #F2B95C;
  --slate: #4A5866;
  --paper: #F5F6F3;
  --line: #DDE2E6;
  --white: #FFFFFF;
  --on-dark: #E8EEF2;
  --on-dark-2: #C9D5DF;
  --on-dark-3: #A9B8C6;
  --dark-line: #2C4560;

  --f-logo: "Archivo Black", "Arial Black", sans-serif;
  --f-head: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --radius: 14px;
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.section-dark :focus-visible, .check-card :focus-visible, .site-footer :focus-visible { outline-color: var(--mint); }

h1, h2, h3 { font-family: var(--f-head); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.75rem); line-height: 1.1; }
h3 { font-size: 1.3rem; line-height: 1.2; }
p { margin: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: var(--white); padding: .75rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; color: var(--white); }

/* ---------- Logo 08A (monograma en contorno) ---------- */
.logo {
  --s: 48px;
  flex: none;
  width: var(--s); height: var(--s);
  border: calc(var(--s) / 24) solid var(--ink);
  border-radius: calc(var(--s) / 8);
  padding: calc(var(--s) * .12) calc(var(--s) * .14);
  display: flex; flex-direction: column; justify-content: center;
  font-family: var(--f-logo);
  font-size: calc(var(--s) * .36);
  line-height: .92;
  color: var(--ink);
}
.logo-b { color: var(--green); }
.logo-neg { border-color: var(--white); color: var(--white); }
.logo-neg .logo-b { color: var(--mint); }
.logo-sm { --s: 36px; }

/* ---------- Botones y textos utilitarios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .8rem 1.4rem;
  border-radius: 8px; border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--f-body);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); color: var(--white); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--green); color: var(--white); }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }

.kicker {
  display: inline-block;
  font-family: var(--f-mono); font-size: .8rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--green);
}
.kicker-light { color: var(--mint); }
.kicker-amber { color: var(--amber); font-size: .75rem; }

.lead { font-size: 1.125rem; color: var(--slate); }
.lead-light { color: var(--on-dark-2); }
.link { font-weight: 600; text-decoration: none; padding: .5rem 0; }
.link-light { color: var(--mint); font-weight: 600; text-decoration: none; padding: .5rem 0; }
.link-light:hover { color: var(--white); }
.fine { font-size: .82rem; color: var(--on-dark-3); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--f-logo); font-size: 1.35rem; }
.brand-name .accent { color: var(--green); }
.brand-url { font-family: var(--f-mono); font-size: .7rem; color: var(--slate); letter-spacing: .04em; }

.nav-links { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem 1.5rem; }
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; padding: .6rem 0; }
.nav-links a:not(.btn):hover { color: var(--green); }
.nav-links .btn { min-height: 44px; padding: .6rem 1.1rem; font-size: .95rem; }

.nav-toggle {
  display: none; width: 48px; height: 48px;
  align-items: center; justify-content: center;
  background: transparent; border: 1.5px solid var(--line); border-radius: 8px;
  color: var(--ink); cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: .5rem 1.5rem 1.25rem;
    box-shadow: 0 12px 24px rgba(11, 31, 51, .08);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a:not(.btn) { display: block; padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 1rem; width: 100%; }
}

/* ---------- Secciones ---------- */
.section { padding: 5.5rem 0; }
.section-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--ink); color: var(--on-dark); }
.section-head { display: flex; flex-direction: column; gap: .75rem; max-width: 44rem; margin-bottom: 3rem; }
.section-head-row { max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem; }
.section-head-row > div { display: flex; flex-direction: column; gap: .75rem; max-width: 40rem; }

/* ---------- Hero ---------- */
.hero { background: var(--white); }
.hero-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 3.5rem; padding-top: 5rem; padding-bottom: 5.5rem; }
.hero-copy { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.hero-copy .lead { font-size: 1.19rem; max-width: 40rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }

.check-card {
  flex: 1 1 340px; min-width: 0;
  background: var(--ink); color: var(--on-dark);
  border-radius: 16px; padding: 2rem;
  display: flex; flex-direction: column; gap: 1.1rem;
}
.check-title { font-family: var(--f-head); font-size: 1.35rem; font-weight: 500; line-height: 1.3; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.checklist label {
  display: flex; gap: .75rem; align-items: flex-start;
  font-size: .95rem; color: var(--on-dark-2);
  padding: .35rem 0; cursor: pointer;
}
.checklist input {
  appearance: none; flex: none;
  width: 22px; height: 22px; margin: 1px 0 0;
  border: 2px solid var(--mint); border-radius: 5px;
  display: grid; place-content: center; cursor: pointer;
}
.checklist input::after {
  content: ""; width: 10px; height: 6px;
  border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transition: transform .12s;
}
.checklist input:checked { background: var(--mint); }
.checklist input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check-result { font-family: var(--f-mono); font-size: .85rem; color: var(--on-dark-3); }

/* ---------- Tarjetas de servicios ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; display: flex; flex-direction: column; gap: .9rem;
}
.card p { color: var(--slate); font-size: .95rem; }
.card ul { margin: 0; padding-left: 1.1rem; color: var(--slate); font-size: .88rem; display: flex; flex-direction: column; gap: .25rem; }
.card .icon { width: 40px; height: 40px; fill: none; stroke: var(--green); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.card-dark { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.card-dark p, .card-dark ul { color: var(--on-dark-2); }
.card-dark .icon { stroke: var(--mint); }
.card-soft { background: var(--paper); }
.meta { font-family: var(--f-mono); font-size: .75rem; color: var(--slate); }

/* ---------- Servicios: grilla de 6 ---------- */
.cards-services { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.num-tag { font-family: var(--f-mono); font-size: .8rem; color: var(--green); }
.card-dark .num-tag { color: var(--mint); }
.card .link-light { margin-top: auto; }

/* ---------- DPO ---------- */
.dpo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; margin-bottom: 4rem; }
.dpo-box { background: #12304A; border-radius: var(--radius); padding: 1.75rem; display: flex; flex-direction: column; gap: 1rem; }
.dpo-box-outline { background: transparent; border: 1px solid var(--dark-line); }
.dpo-list, .law-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .6rem; color: var(--on-dark-2); font-size: .95rem; }
.dpo-list li { position: relative; padding-left: 1.1rem; }
.dpo-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 2px; background: var(--mint); }
.law-list { counter-reset: law; }
.law-list li { counter-increment: law; position: relative; padding-left: 2rem; }
.law-list li::before { content: counter(law, decimal-leading-zero); position: absolute; left: 0; top: .15em; font-family: var(--f-mono); font-size: .8rem; color: var(--amber); }
.law-list strong { color: var(--white); }
.sub-head { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .75rem; color: var(--white); }
.sub-head-dark { color: var(--ink); margin-top: 4rem; }
.sub-lead { max-width: 46rem; margin-bottom: 2rem; }

/* ---------- Modalidades ---------- */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.mode { background: var(--ink); color: var(--white); border-radius: var(--radius); padding: 1.5rem 1.75rem; display: flex; flex-direction: column; gap: .4rem; }
.mode h4 { margin: 0; font-family: var(--f-head); font-size: 1.2rem; }
.mode p { color: var(--on-dark-2); font-size: .95rem; }

/* ---------- Valores (Sobre mí) ---------- */
.values { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; }
.values li { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .25rem; }
.values strong { font-family: var(--f-head); font-size: 1.05rem; }
.values span { font-size: .875rem; color: var(--slate); line-height: 1.45; }

/* ---------- Ley 21.719 ---------- */
.ley-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2.5rem 4rem; margin-bottom: 3rem; }
.ley-head > div:first-child { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.ley-head .lead { max-width: 42rem; }
.notice {
  flex: 1 1 300px; min-width: 0;
  border: 1px solid var(--dark-line); border-radius: 12px;
  padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: .5rem;
}
.notice p { font-size: .95rem; color: var(--on-dark-2); }

.steps {
  list-style: none; margin: 0 0 1.5rem; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1px;
  background: var(--dark-line); border: 1px solid var(--dark-line);
  border-radius: var(--radius); overflow: hidden;
}
.steps li { background: var(--ink); padding: 1.75rem; display: flex; flex-direction: column; gap: .5rem; }
.steps .num { font-family: var(--f-mono); color: var(--mint); font-size: .875rem; }
.steps h3 { font-size: 1.19rem; }
.steps p { color: var(--on-dark-3); font-size: .95rem; }

/* ---------- Proceso ---------- */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.process li { border-top: 2px solid var(--ink); padding-top: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.process .step { font-family: var(--f-mono); font-size: .875rem; color: var(--green); }
.process p { color: var(--slate); font-size: .95rem; }

/* ---------- Sobre mí ---------- */
.about { display: flex; flex-wrap: wrap; align-items: center; gap: 3rem; }
.photo { flex: 1 1 280px; max-width: 380px; aspect-ratio: 4 / 5; border-radius: 16px; object-fit: cover; }
.photo-placeholder {
  background: #E4E8E6; border: 1.5px dashed #9AA7B2;
  display: flex; align-items: center; justify-content: center;
  color: var(--slate); font-family: var(--f-mono); font-size: .8rem;
}
.about-copy { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.about-copy .lead { font-size: 1.06rem; max-width: 46rem; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { font-family: var(--f-mono); font-size: .8rem; padding: .375rem .75rem; border-radius: 999px; background: var(--white); border: 1px solid var(--line); }

/* ---------- Contacto ---------- */
.contact { display: flex; flex-wrap: wrap; gap: 3.5rem; }
.contact-copy { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.contact-list { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.contact-list a { color: var(--on-dark); text-decoration: none; display: flex; align-items: center; gap: .75rem; padding: .45rem 0; }
.contact-list a:hover { color: var(--mint); }
.contact-list svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--mint); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.form-embed {
  flex: 999 1 480px; min-width: 0;
  display: flex; flex-direction: column; gap: .75rem;
}
.form-embed iframe {
  display: block; width: 100%; height: 1080px; border: 0;
  border-radius: 16px; background: var(--ink-deep);
  box-shadow: 0 0 0 1px var(--dark-line);
}
.form-embed-alt { font-size: .85rem; color: var(--on-dark-3); }
.form-embed-alt a { color: var(--mint); }
@media (max-width: 640px) { .form-embed iframe { height: 1280px; } }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink-deep); color: var(--on-dark-3); font-size: .875rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.footer-brand { display: flex; align-items: center; gap: .75rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer-links a { color: var(--on-dark-2); padding: .5rem 0; display: inline-block; }
.footer-links a:hover { color: var(--mint); }

/* ---------- Página legal ---------- */
.legal { padding: 4rem 0 5rem; }
.legal .container { max-width: 780px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: .5rem; }
.legal h2 { font-size: 1.4rem; margin: 2.25rem 0 .75rem; }
.legal p, .legal li { color: var(--slate); }
.legal p + p { margin-top: .75rem; }
.legal ul { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.draft-note { background: #FFF6E5; border: 1px solid var(--amber); border-radius: 10px; padding: 1rem 1.25rem; margin: 1.5rem 0 1rem; font-size: .92rem; color: var(--ink) !important; }

/* ---------- Animación de entrada (respeta reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: flex; align-items: center; }
.notfound .container { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.notfound .logo { --s: 72px; margin-bottom: 1rem; }
.notfound h1 { color: var(--white); }
.notfound .btn-outline { background: transparent; color: var(--white); border-color: var(--white); }
.notfound .btn-outline:hover { background: var(--white); color: var(--ink); }
