/* =========================================================
   María José Solares Nualart — "Luxe Nocturna"
   Tokens y estilos según design_handoff_web_luxe_nocturna/README.md
   ========================================================= */

:root {
  /* Fondos */
  --bg:              #0c0d0d;
  --bg-band:         #101211;
  --bg-card:         #141615;
  --bg-card-hover:   #181b19;
  --bg-cell-hover:   #121413;

  /* Bordes */
  --hairline:        #1f2120;
  --border-soft:     #2a2c2b;
  --border-ghost:    #4a4d49;

  /* Texto */
  --text-heading:    #f2ede2;
  --text-body:       #d6d6d2;
  --text-hero-sub:   #b3b6b0;
  --text-muted:      #9a9d97;
  --text-muted-2:    #8a8d89;
  --text-faint:      #6a6d68;
  --text-faint-2:    #5b5e5a;

  /* Acentos */
  --gold:            #e8b34b;
  --gold-hover:      #f2cd7e;
  --on-gold:         #141412;
  --green:           #4fae8d;
  --green-hover:     #63c9a5;
  --chip-bg:         #e9e8e3;

  /* Tipografías */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Layout */
  --content:     1280px;
  --pad-x:       64px;
  --pad-y:       110px;
  --nav-h:       69px;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, dl, dd, figure, blockquote { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

img { display: block; max-width: 100%; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
a:hover { color: var(--gold-hover); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Utilidades */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--gold);
  color: var(--on-gold);
  font: 800 13px var(--sans);
  letter-spacing: .06em;
  padding: 12px 20px;
}
.skip-link:focus { left: 0; color: var(--on-gold); }

.section {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
}
.section--flush-top { padding-top: 0; }

/* offset del nav sticky al saltar a un ancla */
[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

.label {
  font: 700 12px var(--sans);
  letter-spacing: .3em;
  line-height: 1.4;
}
.label--gold  { color: var(--gold); }
.label--green { color: var(--green); }

.h2-serif {
  font: 600 40px var(--serif);
  line-height: 1.2;
  color: var(--text-heading);
}

/* Botones — esquinas rectas */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: .06em;
  text-align: center;
  cursor: pointer;
  border-radius: 0;
}
.btn--gold {
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 800;
  border: 1px solid var(--gold);
  padding: 15px 30px;
}
.btn--gold:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  color: var(--on-gold);
}
.btn--ghost {
  border: 1px solid var(--border-ghost);
  background: transparent;
  color: var(--text-body);
  font-weight: 700;
  padding: 14px 30px;
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.btn--block {
  display: block;
  width: 100%;
  padding: 16px;
  letter-spacing: .08em;
}

/* ---------- Feature flags (aplicados por config.js sobre <html>) ---------- */

.off-showBlog        [data-flag="showBlog"],
.off-showTestimonios [data-flag="showTestimonios"],
.off-showWhatsapp    [data-flag="showWhatsapp"],
.off-showFormulario  [data-flag="showFormulario"] { display: none !important; }

/* data-flag-off: al revés — el bloque aparece solo si el flag está apagado */
[data-flag-off] { display: none; }
.off-showFormulario [data-flag-off="showFormulario"] { display: flex; }

/* ---------- 1. Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* la 3.ª columna queda vacía: centra los links */
  align-items: center;
  gap: 24px;
  padding: 22px var(--pad-x);
  background: rgba(12, 13, 13, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 600 22px var(--serif);
  color: var(--gold);
  letter-spacing: .1em;
  white-space: nowrap;
  justify-self: start;
}

.nav__logo {
  height: 40px;
  width: auto;
}

.nav__links {
  display: flex;
  justify-self: center;
  gap: 30px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  white-space: nowrap;
}
.nav__links a { color: var(--text-muted-2); }
.nav__links a:hover { color: var(--gold); }

/* ---------- 2. Hero ---------- */

.hero {
  position: relative;
  height: 82vh;
  min-height: 620px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(12, 13, 13, .3) 0%,
    rgba(12, 13, 13, .9) 78%,
    rgba(12, 13, 13, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--pad-x) 96px;
  pointer-events: none;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero__title {
  font: 600 72px/1.05 var(--serif);
  color: var(--text-heading);
  max-width: 860px;
}

.hero__sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-hero-sub);
  max-width: 560px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
}
.hero__ctas .btn { pointer-events: auto; }

/* ---------- 3. Sobre mí ---------- */

.about {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 72px;
  align-items: center;
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about__title {
  font: 600 44px/1.2 var(--serif);
  color: var(--text-heading);
}

.about__body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-muted);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin-top: 12px;
  border-top: 1px solid var(--hairline);
  padding-top: 26px;
}
.stat__num {
  font: 600 32px var(--serif);
  color: var(--green);
}
.stat__label {
  margin: 0;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--text-faint);
}

.about__portrait {
  width: 400px;
  height: 490px;
  object-fit: cover;
  justify-self: end;
}

/* ---------- 4. Expertise ---------- */

.expertise__label { margin-bottom: 30px; }

.grid-cells {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}

.cell {
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background-color .2s ease;
}
.cell:hover { background: var(--bg-cell-hover); }

.cell__title {
  font: 600 23px var(--serif);
  color: var(--text-heading);
}
.cell__title--green { color: var(--green); }

.cell__desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted-2);
}

/* ---------- 5. Marketing + IA ---------- */

.band {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-band);
}

.band__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 96px var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.band__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.band__title {
  font: 600 40px var(--serif);
  line-height: 1.2;
  color: var(--text-heading);
  max-width: 700px;
}

.band__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pillar {
  border-top: 1px solid var(--gold);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pillar__title {
  font: 700 16px var(--sans);
  color: var(--gold);
}
.pillar__desc {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ---------- 6. Servicios ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.services__head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 10px;
}
.services__meta {
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--text-faint);
}

.card {
  background: var(--bg-card);
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background-color .2s ease;
}
.card:hover { background: var(--bg-card-hover); }

.card__title {
  font: 700 15px var(--sans);
  color: var(--gold);
  letter-spacing: .06em;
}
.card__desc {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ---------- 7. Trayectoria ---------- */

.track {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.track__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 40px var(--pad-x);
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
  opacity: .75;
}

.track__label {
  font: 700 11px var(--sans);
  letter-spacing: .25em;
  color: var(--text-faint-2);
  white-space: nowrap;
}

.track__logos {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  flex: 1;
  justify-content: space-around;
  align-items: center;
}

.chip {
  background: var(--chip-bg);
  border-radius: 8px;
  padding: 10px 18px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chip__img { object-fit: contain; }
.chip__img--entel    { max-height: 34px; max-width: 110px; }
.chip__img--hibu     { max-height: 30px; max-width: 110px; }
.chip__img--napsis   { max-height: 26px; max-width: 120px; }
.chip__img--medipass { max-height: 36px; max-width: 110px; }
.chip__img--zaldivar { max-height: 36px; max-width: 110px; }

/* ---------- 8. Blog ---------- */

.blog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.blog__head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}
.blog__more {
  font-size: 13px;
  letter-spacing: .1em;
  white-space: nowrap;
}

.post {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: inherit;
}
.post:hover { color: inherit; }
.post:hover .post__title { color: var(--gold); }
.post__title {
  font: 600 22px var(--serif);
  color: var(--text-heading);
}
.post__date {
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--text-faint);
}

/* ---------- 9. Testimonios ---------- */

.testimonials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.quote {
  border: 1px solid var(--border-soft);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.quote__text {
  font: 500 italic 23px/1.55 var(--serif);
  color: var(--text-body);
}
.quote__by {
  font-size: 12px;
  letter-spacing: .15em;
  color: var(--gold);
}

/* ---------- 10. Contacto ---------- */

.contact {
  border-top: 1px solid var(--hairline);
  background: var(--bg-band);
}

.contact__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 100px var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 72px;
  align-items: start;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact__title {
  font: 600 48px/1.15 var(--serif);
  color: var(--text-heading);
}
.contact__list {
  font-size: 15px;
  line-height: 2;
  color: var(--text-muted);
}
.contact__hours { color: var(--text-faint); }

.contact__cta {
  flex-direction: column;
  gap: 14px;
}
.contact__cta-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.contact__cta .btn--ghost { padding: 15px 16px; }

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form input,
.form textarea {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 0;
  color: var(--text-body);
  padding: 15px 18px;
  font: 500 14px var(--sans);
  outline: none;
  width: 100%;
}
.form textarea { resize: vertical; }
.form input::placeholder,
.form textarea::placeholder { color: var(--text-faint); }
.form input:focus,
.form textarea:focus { border-color: var(--gold); }
.form input[aria-invalid="true"],
.form textarea[aria-invalid="true"] { border-color: #b4544a; }

.form button[disabled] { opacity: .6; cursor: default; }

.form__status {
  min-height: 20px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--text-muted);
}
.form__status.is-ok    { color: var(--green); }
.form__status.is-error { color: #d98b7f; }

.contact__logo {
  display: block;
  margin: 0 auto;
  padding: 0 var(--pad-x) 64px;
  width: min(300px, 70%);
  height: auto;
}

.footer {
  border-top: 1px solid var(--hairline);
  padding: 26px var(--pad-x);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--text-faint-2);
}

/* ---------- 11. WhatsApp flotante ---------- */

.wa-float {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 60;
  background: var(--green);
  color: var(--bg);
  font: 800 14px var(--sans);
  letter-spacing: .04em;
  padding: 16px 24px;
  border-radius: 99px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}
.wa-float:hover { background: var(--green-hover); color: var(--bg); }

/* ---------- 12. Blog: índice y artículos ---------- */

.blog-index {
  max-width: var(--content);
  margin: 0 auto;
}
.blog-index__title {
  font: 600 clamp(34px, 5vw, 54px)/1.1 var(--serif);
  color: var(--text-heading);
  margin: 12px 0 0;
}
.blog-index__intro {
  max-width: 62ch;
  margin: 18px 0 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.post-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 36px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: inherit;
  border: 1px solid var(--border-soft);
  padding: 0 0 24px;
  transition: border-color .2s ease, transform .2s ease;
}
.post-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  color: inherit;
}
.post-card__img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  background: var(--bg-band);
}
.post-card__title {
  font: 600 23px/1.25 var(--serif);
  color: var(--text-heading);
  margin: 12px 24px 0;
}
.post-card:hover .post-card__title { color: var(--gold); }
.post-card__date {
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--gold);
  margin: 0 24px;
}
.post-card__blurb {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 4px 24px 0;
}

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
}
.article__title {
  font: 600 clamp(32px, 4.5vw, 48px)/1.15 var(--serif);
  color: var(--text-heading);
  margin: 14px 0 0;
}
.article__meta {
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--text-faint);
  margin: 16px 0 0;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
}

.article__body {
  margin-top: 40px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-body);
}
.article__body p { margin: 0 0 22px; }
.article__body h2,
.article__body h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.25;
  margin: 44px 0 16px;
}
.article__body h2 { font-size: 30px; }
.article__body h3 { font-size: 24px; }
.article__body strong { color: var(--text-heading); }
.article__body ul,
.article__body ol { margin: 0 0 22px; padding-left: 22px; }
.article__body li { margin-bottom: 10px; }
.article__body blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 26px;
  border-left: 2px solid var(--gold);
  font: 500 italic 21px/1.6 var(--serif);
  color: var(--text-heading);
}

.post-figure { margin: 32px 0; }
.post-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.contact--slim { border-top: 1px solid var(--hairline); }
.contact__slim {
  max-width: var(--content);
  margin: 0 auto;
  padding: 72px var(--pad-x);
  text-align: center;
}
.contact__slim .contact__list { margin-top: 14px; }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
  :root { --pad-x: 40px; --pad-y: 88px; }

  .about { grid-template-columns: 1fr 340px; gap: 48px; }
  .about__portrait { width: 340px; height: 416px; }
  .contact__inner { grid-template-columns: 1fr 380px; gap: 48px; }
  .hero__title { font-size: 60px; }
}

@media (max-width: 900px) {
  .nav { grid-template-columns: 1fr; gap: 14px; padding: 16px var(--pad-x); }
  .nav__links { justify-self: start; flex-wrap: wrap; gap: 14px 22px; }

  .grid-cells,
  .band__grid,
  .services,
  .post-grid,
  .blog { grid-template-columns: repeat(2, 1fr); }

  .about,
  .contact__inner { grid-template-columns: 1fr; }
  .about__portrait { justify-self: start; }
}

@media (max-width: 768px) {
  :root { --pad-x: 24px; --pad-y: 72px; --nav-h: 128px; }

  .hero { height: auto; min-height: 560px; }
  .hero__overlay { padding-bottom: 64px; padding-top: 120px; position: relative; }
  .hero__bg { position: absolute; }
  .hero__title { font-size: 44px; }
  .hero__sub { font-size: 16px; }
  .hero__ctas .btn { flex: 1 1 auto; }

  .about__title { font-size: 34px; }
  .about__portrait { width: 100%; height: auto; aspect-ratio: 400 / 490; }

  .h2-serif,
  .band__title { font-size: 32px; }
  .contact__title { font-size: 36px; }

  .grid-cells,
  .band__grid,
  .services,
  .blog,
  .post-grid,
  .testimonials { grid-template-columns: 1fr; }

  .article__body { font-size: 16px; }

  .cell { padding: 28px 24px; }
  .card, .quote { padding: 28px 24px; }

  .band__inner { padding: 72px var(--pad-x); }
  .contact__inner { padding: 72px var(--pad-x); }

  .services__head,
  .blog__head { flex-direction: column; align-items: flex-start; gap: 10px; }

  .track__inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .track__logos { justify-content: flex-start; gap: 18px; }

  .footer { flex-direction: column; gap: 8px; }

  .wa-float { right: 16px; bottom: 16px; padding: 14px 20px; }
}

@media (max-width: 480px) {
  .nav__brand { font-size: 18px; gap: 9px; }
  .nav__logo { height: 32px; }
  .hero__title { font-size: 38px; }
  .stats { gap: 24px; }
}
