/* OCTOPUS360 — páginas y controles compartidos
 * Accesibilidad, idiomas, formularios, preguntas frecuentes y documentos legales.
 * lib/site-page.ts lo carga después de los CSS específicos de cada página
 * y antes de site-editorial.css. Los ajustes propios de Contacto van en contact.css. */

/* Shared shell, readable forms and legal pages. Effect-specific layout stays in its owning module. */

:root {
  --reading: #c4becf;
  --focus: #dac3ff;
  scroll-padding-top: 110px;
}

[hidden] {
  display: none!important;
}

button,input,textarea,select {
  font: inherit;
}

a,button {
  -webkit-tap-highlight-color: transparent;
}

:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}

body {
  overflow-wrap: break-word;
}

.section :where(p,li) {
  text-wrap: pretty;
}

input,textarea,select {
  color-scheme: dark;
}

/* Cabecera y selector de idioma. */

.site-header .header-right {
  gap: clamp(15px,2vw,32px);
}

.language-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.language-nav a {
  display: grid;
  place-items: center;
  min-width: 31px;
  min-height: 44px;
  font-size: 10px;
  color: #b9b0c8;
  border-bottom: 1px solid transparent;
}

.language-nav a[aria-current=true] {
  color: #e4d5f7;
  border-color: #ac7bdf;
}

.language-nav a:hover {
  color: white;
}

.quick-nav a[aria-current=page] {
  color: #cda6ff;
}

.site-menu .menu-link {
  line-height: 1.14;
}

.menu-navigation {
  position: relative;
  z-index: 2;
}

/* Enlaces legales y control global de movimiento. */

.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid #cbb3e621;
  margin-top: 30px;
  padding-top: 20px;
  color: #aca1ba;
  font-size: 10px;
  line-height: 1.7;
  position: relative;
  z-index: 6;
}

.footer-legal nav {
  display: flex;
  gap: 0 22px;
  flex-wrap: wrap;
}

.footer-legal nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-legal a:hover {
  color: #e4d1fd;
}

.motion-preference {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #c1a1dd34;
  border-radius: 3px;
  font-size: 10px;
  background: #14101b;
  color: #d3c1e5;
}

.motion-preference[aria-pressed=true] {
  background: #30203f;
  color: #e1c5ff;
}

/* Contacto: estructura de columnas y formulario. */

.contact-v8 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8vw;
  padding-top: clamp(150px,14vw,210px);
  padding-bottom: 80px;
  position: relative;
  max-width: 1700px;
  margin: auto;
}

.contact-v8-intro>.eyebrow {
  color: #b29bc9;
  font-size: 12px;
}

.contact-v8 h1 {
  font-size: clamp(42px,5.9vw,92px);
  line-height: 1.08;
  letter-spacing: -.075em;
  font-weight: 900;
  margin: 32px 0;
}

.contact-v8 h1 em {
  font-style: normal;
  color: #b58ade;
}

.contact-v8-intro>p {
  max-width: 440px;
  color: var(--reading);
  font-size: 14px;
  line-height: 1.9;
}

.contact-v8-details {
  display: grid;
  gap: 16px;
  margin: 35px 0;
  font-size: 12px;
  color: #b2a6c0;
}

.contact-v8-details>a {
  font-size: clamp(12px,1.35vw,20px);
  color: #ece2f8;
  line-height: 1.6;
  letter-spacing: -.04em;
}

.contact-v8-image {
  height: 235px;
  position: relative;
  overflow: hidden;
  border: 1px solid #a68cbd35;
}

.contact-v8-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.55) brightness(.65);
}

.contact-v8-image span {
  position: absolute;
  bottom: 12px;
  left: 15px;
  font-size: 10px;
  color: #d1c7de;
}

.contact-form-wrap {
  padding: clamp(22px,3vw,42px);
  background: linear-gradient(145deg,#18111e,#0a080f);
  border: 1px solid #c4a4dc2b;
  box-shadow: 0 40px 90px #0004;
  align-self: start;
}

.contact-form-wrap>h2 {
  font-size: clamp(28px,3vw,44px);
  letter-spacing: -.065em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.contact-form-wrap>p {
  font-size: 11px;
  line-height: 1.8;
  color: #b5a9c3;
  margin-bottom: 28px;
}

.contact-form {
  display: grid;
  gap: 20px;
}

.form-field {
  display: grid;
  gap: 9px;
}

.form-field label {
  font-size: 12px;
  color: #ded4e8;
  line-height: 1.6;
}

.form-field input,.form-field textarea,.form-field select {
  width: 100%;
  min-height: 49px;
  background: #07060ab8;
  border: 1px solid #c4a8de3d;
  border-radius: 3px;
  padding: 13px 14px;
  color: #f0e8fa;
  font: 400 13px/1.8 Unbounded,sans-serif;
  letter-spacing: -.025em;
}

.form-field textarea {
  resize: vertical;
  min-height: 145px;
}

.form-field :where(input,textarea,select)[aria-invalid=true] {
  border-color: #e0a2b9;
}

.form-field :where(input,textarea,select):focus {
  border-color: #bc92ed;
  outline-offset: 3px;
}

.form-hint,.contact-form-note {
  font-size: 10px;
  color: #b7a9c5;
  line-height: 1.8;
}

.form-error {
  font-size: 11px;
  line-height: 1.6;
  color: #f3b4c8;
}

.form-error:empty {
  display: none;
}

.form-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #c8bbd7;
  font-size: 11px;
  line-height: 1.9;
  cursor: pointer;
  min-height: 44px;
}

.form-check input {
  appearance: auto;
  accent-color: #ab7cdf;
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  margin-top: 2px;
}

.form-check a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-submit {
  width: 100%;
  min-height: 54px;
}

.form-status {
  font-size: 12px;
  color: #f0c4db;
  line-height: 1.7;
}

.contact-review h3 {
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: -.055em;
  margin: 25px 0;
}

.contact-review pre {
  font: 400 12px/1.9 Unbounded,sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #07060a;
  border: 1px solid #b79bce26;
  padding: 20px;
  max-height: 430px;
  overflow: auto;
  color: #c7bbd4;
}

.contact-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 24px;
}

.contact-review-actions button {
  min-height: 44px;
  font-size: 11px;
}

.contact-review>p {
  font-size: 11px;
  color: #bdadc9;
  line-height: 1.8;
  margin-top: 20px;
}

/* Contacto: preguntas frecuentes. */

.contact-faq {
  padding-top: 40px;
  padding-bottom: 90px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 0 8vw;
  border-top: 1px solid #bca1ce22;
}

.contact-faq>h2 {
  grid-row: 1/4;
  font-size: clamp(25px,3vw,42px);
  letter-spacing: -.055em;
  line-height: 1.25;
  max-width: 330px;
}

.contact-faq details {
  border-bottom: 1px solid #c3b0d22a;
  padding: 20px 0;
}

.contact-faq summary {
  cursor: pointer;
  font-size: 13px;
  line-height: 1.7;
  min-height: 34px;
  list-style-position: outside;
  margin-left: 20px;
  color: #dfd4eb;
}

.contact-faq details p {
  font-size: 12px;
  line-height: 1.9;
  color: #bcaecb;
  margin: 18px 20px 4px;
}

/* Documentos legales y su columna de lectura. */

.legal-page {
  padding-top: clamp(155px,14vw,215px);
  padding-bottom: 95px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8vw;
  max-width: 1600px;
  margin: auto;
}

.legal-heading {
  align-self: start;
  position: sticky;
  top: 145px;
}

.legal-heading>.eyebrow {
  display: block;
  color: #bca9ce;
  font-size: 10px;
  line-height: 1.8;
  max-width: 330px;
}

.legal-heading h1 {
  font-size: clamp(35px,4.7vw,74px);
  letter-spacing: -.065em;
  line-height: 1.12;
  font-weight: 900;
  margin: 27px 0;
}

.legal-lead {
  color: #b7a9c5;
  font-size: 13px;
  line-height: 1.9;
  max-width: 390px;
}

.legal-updated {
  display: block;
  margin-top: 32px;
  font-size: 10px;
  color: #aa9ab9;
}

.legal-content {
  min-width: 0;
}

.legal-content section {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid #bea5d425;
}

.legal-content h2 {
  font-size: clamp(18px,1.7vw,26px);
  letter-spacing: -.045em;
  line-height: 1.5;
  margin-bottom: 18px;
}

.legal-content p {
  font-size: 12px;
  line-height: 2;
  color: #c6bcd2;
  margin-bottom: 18px;
}

.legal-content a {
  text-decoration: underline;
  text-underline-offset: 4px;
  color: #d2aff5;
}

/* Preferencias de movimiento reducido. */

html[data-motion=reduce] {
  scroll-behavior: auto!important;
}

html[data-motion=reduce] *,html[data-motion=reduce] *::before,html[data-motion=reduce] *::after {
  animation-duration: .001ms!important;
  animation-iteration-count: 1!important;
  transition-duration: .001ms!important;
  scroll-behavior: auto!important;
}

html[data-motion=reduce] [data-reveal] {
  opacity: 1!important;
  transform: none!important;
}

@media (max-width:1100px) {
  .site-header .quick-nav {
    display: none;
  }

  .contact-v8 {
    gap: 4vw;
  }

  .contact-form-wrap {
    padding: 25px;
  }

  .legal-page {
    gap: 5vw;
  }
}

@media (max-width:760px) {
  .site-header {
    padding-inline: 20px;
  }

  .site-header .header-right {
    gap: 12px;
  }

  .language-nav a {
    font-size: 9px;
    min-width: 28px;
  }

  .site-header .brand {
    font-size: 14px;
  }

  .menu-toggle>span:first-child {
    display: none;
  }

  .menu-toggle {
    min-width: 35px;
    min-height: 44px;
  }

  .site-header .menu-symbol {
    margin: 0;
  }

  .footer-legal {
    gap: 14px;
  }

  .footer-legal nav {
    width: 100%;
    gap: 0 15px;
  }

  .footer-legal nav a {
    font-size: 10px;
  }

  .contact-v8 {
    grid-template-columns: 1fr;
    padding-top: 140px;
    padding-bottom: 55px;
    gap: 35px;
  }

  .contact-v8 h1 {
    font-size: clamp(40px,10.5vw,72px);
    margin-top: 24px;
  }

  .contact-v8-intro>p {
    font-size: 12px;
  }

  .contact-v8-details {
    margin: 25px 0;
    gap: 12px;
  }

  .contact-v8-details>a {
    font-size: 13px;
  }

  .contact-v8-image {
    height: 175px;
  }

  .contact-form-wrap {
    padding: 25px 20px;
  }

  .form-field :where(input,textarea,select) {
    font-size: 16px;
  }

  .contact-faq {
    grid-template-columns: 1fr;
    padding-top: 35px;
    padding-bottom: 55px;
  }

  .contact-faq>h2 {
    grid-row: auto;
    margin-bottom: 20px;
  }

  .legal-page {
    grid-template-columns: 1fr;
    padding-top: 140px;
    gap: 45px;
  }

  .legal-heading {
    position: static;
  }

  .legal-heading h1 {
    font-size: clamp(34px,9vw,60px);
  }

  .legal-content p {
    font-size: 12px;
  }

  .legal-updated {
    margin-top: 24px;
  }
}

@media (forced-colors:active) {
  .contact-form-wrap,.form-field input,.form-field textarea,.form-field select {
    background: Canvas;
    color: CanvasText;
    border-color: CanvasText;
  }

  .contact-v8-image {
    display: none;
  }
}

@media print {
  .site-header,.site-footer,.site-menu,.tentacle-divider,.depth-atmosphere,.scene,.contact-v8-image {
    display: none!important;
  }

  .section {
    padding: 20px!important;
  }

  .legal-page {
    display: block;
  }

  .legal-heading {
    position: static;
  }

  body {
    background: white!important;
    color: black!important;
  }

  .legal-content p {
    color: black!important;
  }
}
