/* ==========================================================================
   Carmín · Estudio digital — cierre: preguntas, contacto, footer y
   WhatsApp flotante
   ========================================================================== */

/* =============================== PREGUNTAS ============================ */
.faq {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px var(--gap);
  padding-bottom: var(--section);
}
.faq__head { grid-column: 1 / span 4; display: grid; gap: 22px; align-content: start; }
.faq__list { grid-column: 6 / -1; border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: 26px;
  list-style: none;
  cursor: pointer;
  font-family: var(--f-display);
  font-stretch: 106%;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  line-height: 1.3;
  letter-spacing: -.02em;
  transition: color .3s;
}
.qa summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .qa summary:hover { color: var(--accent-text); } }
.qa__icon {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color .4s, transform .6s var(--ease);
}
.qa__icon::before,
.qa__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform .5s var(--ease);
}
.qa__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.qa[open] .qa__icon { background: var(--pearl); color: var(--ink); transform: rotate(180deg); }
.qa[open] .qa__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.qa__a p { max-width: 60ch; padding-bottom: 28px; color: var(--silver-2); }

@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .qa::details-content {
    height: 0;
    overflow: clip;
    transition: height .6s var(--ease), content-visibility .6s allow-discrete;
  }
  .qa[open]::details-content { height: auto; }
}

@media (max-width: 900px) {
  .faq__head,
  .faq__list { grid-column: 1 / -1; }
}

/* =============================== CONTACTO ============================= */
.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--section) clamp(72px, 9vw, 128px);
  border-top: 1px solid var(--line);
}
.contact__veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 30%, rgba(6, 7, 8, .85) 62%, var(--ink) 80%);
}
.contact > .wrap { position: relative; z-index: 1; }
.contact__title {
  margin: 20px 0 clamp(64px, 8vw, 140px);
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 600;
  font-size: clamp(3.4rem, 13.4vw, 14.5rem);
  line-height: .84;
  letter-spacing: -.055em;
  text-shadow: 0 20px 80px rgba(0, 0, 0, .6);
}
.contact__title em { font-size: 1em; }
.contact__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 56px var(--gap);
}
.contact__info { grid-column: 1 / span 5; display: grid; gap: 40px; align-content: start; }
.contact__lead { max-width: 40ch; font-size: var(--fs-lead); line-height: 1.5; color: var(--silver); }
.contact__list { display: grid; border-top: 1px solid var(--line); }
.contact__list > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}
.contact__list dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--silver-2); }
.contact__list dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-width: 0;
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}
.contact__list a { background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat; padding-bottom: 2px; }
.contact__email { user-select: all; }
.copy {
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(243, 242, 239, .07);
  color: var(--silver-2);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .3s, background-color .3s;
}
.copy:hover { color: var(--pearl); background: rgba(243, 242, 239, .12); }

.form {
  grid-column: 7 / -1;
  display: grid;
  gap: 30px;
  align-content: start;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 24px;
  background: rgba(14, 16, 19, .72);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px var(--gap); }
.field { display: grid; gap: 6px; align-content: start; }
.field label,
.chips legend {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--silver-2);
}
.field input,
.field textarea {
  width: 100%;
  padding: 10px 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  color: var(--pearl);
  font-size: 1.125rem;
  line-height: 1.4;
  outline: none;
  resize: vertical;
  transition: border-color .3s;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(140, 147, 155, .7); }
.field input:focus,
.field textarea:focus { border-bottom-color: var(--accent-text); }
.field.is-error input { border-bottom-color: var(--accent-text); }
.field__err { min-height: 1.2em; font-size: var(--fs-sm); color: var(--accent-text); }
.field__err:empty { min-height: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.chips legend { width: 100%; margin-bottom: 14px; padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding-inline: 16px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: var(--fs-sm);
  color: var(--silver);
  transition: background-color .35s var(--ease), color .35s, box-shadow .35s;
}
.chip input:hover + span { box-shadow: inset 0 0 0 1px var(--silver-2); color: var(--pearl); }
.chip input:checked + span { background: var(--pearl); color: var(--ink); box-shadow: 0 0 30px -8px rgba(243, 242, 239, .5); }
.chip input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.form__note { margin-top: -14px; font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--silver-2); text-align: center; }
.form__ok {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 16px;
  background: rgba(243, 242, 239, .05);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.form__ok[hidden] { display: none; }
.form__ok .btn { justify-self: start; }

@media (max-width: 900px) {
  .contact__info,
  .form { grid-column: 1 / -1; }
  .contact__veil { background: linear-gradient(180deg, transparent 8%, rgba(6, 7, 8, .88) 24%, var(--ink) 40%); }
}
@media (max-width: 560px) {
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .contact__list > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* ================================ FOOTER ============================== */
.footer {
  overflow: hidden;
  padding-block: clamp(56px, 7vw, 104px) calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}
.footer__top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px var(--gap); }
.footer__col { display: grid; gap: 14px; align-content: start; }
.footer__col ul { display: grid; gap: 8px; list-style: none; font-size: var(--fs-sm); color: var(--silver); }
.footer__col a { transition: color .3s; }
.footer__col a:hover { color: var(--accent-text); }
.footer__col .mono { font-size: 11px; letter-spacing: .08em; color: var(--silver-2); font-variant-numeric: tabular-nums; }

.footer__word {
  margin: clamp(56px, 8vw, 120px) 0 clamp(18px, 2vw, 28px);
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 700;
  font-size: 19vw;
  line-height: .8;
  letter-spacing: -.05em;
  white-space: nowrap;
  text-align: center;
  user-select: none;
}
.footer__word span {
  display: inline-block;
  padding-inline: .02em;
  background: var(--irid);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: irid-shift 12s linear infinite;
  filter: drop-shadow(0 0 40px rgba(var(--accent-rgb), .25));
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--silver-2);
}
.footer__bottom a:hover { color: var(--pearl); }

@media (max-width: 800px) {
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ========================== WHATSAPP FLOTANTE ========================= */
.wa-float {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right, 0px));
  /* shortcut: 84px deja libre la insignia "Powered by Netlify" (64px) del plan gratis; volver a 18px si se quita. */
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 22px 0 16px;
  border-radius: 999px;
  background: rgba(18, 20, 24, .7);
  color: var(--pearl);
  font-size: var(--fs-sm);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 40px -14px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transform: translateY(160%);
  transition: transform .8s var(--ease), background-color .3s;
}
.wa-float .i { color: var(--accent-text); }
.wa-float.is-on { transform: none; }
.wa-float:hover { background: rgba(var(--accent-rgb), .85); }
.wa-float:hover .i { color: var(--pearl); }
@media (max-width: 560px) {
  .wa-float { width: 54px; padding: 0; justify-content: center; }
  .wa-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* ---------- Consentimiento del formulario ---------- */
.consent { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 4px 12px; align-items: start; font-size: var(--fs-sm); color: var(--silver); }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.consent a { color: var(--pearl); text-decoration: underline; text-underline-offset: 3px; }
.consent .field__err { grid-column: 2; }

/* ---------- Footer: significado de la marca y enlaces legales ---------- */
.footer__meaning { margin: -6px 0 28px; text-align: center; font-family: var(--f-serif); font-size: 1.05rem; color: var(--silver-2); }
.footer__meaning em { color: var(--pearl); }
.footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.footer__legal a:hover { color: var(--pearl); }
.footer__book { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--pearl); }
