/* SetFile — layout.css (heredado del sitio de SetGantt)
   Structural layout: container, header, sections, grids, footer. */

/* ---- Container ---- */
.site-header__inner,
.section,
.hero,
.site-footer__top,
.trademark-disclaimer,
.copyright {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* .copyright anidado dentro de la columna de marca (es/index.html): no
   debe comportarse como contenedor de página completo aquí, solo seguir
   el ancho natural del texto — lo que sí necesita cuando va suelto en
   404.html (regla de arriba). */
.site-footer__brand-text .copyright {
  width: auto;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}

/* Anchor targets (#product, #pricing, etc. — #10 §62): without this, the
   sticky header covers the top of the section when a browser jumps to the
   URL fragment (direct link, back/forward, or the language switch's anchor
   preservation in nav.js). Applied to every element that actually carries
   one of the nav/footer anchor IDs. */
.hero,
.section {
  scroll-margin-top: var(--header-height);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg); /* fallback for browsers without color-mix() */
  background-color: color-mix(in srgb, var(--color-bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  line-height: 1.1;
  margin-right: auto;
}

.brand__logo {
  height: 32px;
  width: auto;
}

.brand__text {
  display: flex;
  flex-direction: column;
}

.brand__name {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-text-primary);
}

.brand__by {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* Secondary brand info, one level down from .brand__name and same muted
   tier as .brand__by, but sized/spaced for a full sentence (SetFile ↔
   Claris Partner attribution) rather than a short label. Not fine-print:
   this is brand-identity copy, not legal/supplementary text. */
.brand__meta {
  font-size: var(--fs-tiny);
  font-weight: 500;
  color: var(--color-text-muted);
  line-height: 1.45;
  margin-top: 0.15rem;
}

/* ---- Primary navigation ----
   Mobile-first: the full link list is always real markup in the DOM (works
   with JS disabled), but starts visually collapsed under the header. nav.js
   toggles the `.is-open` class + `#nav-toggle[aria-expanded]`. At >=960px
   (responsive.css) it switches to the always-visible static horizontal
   bar and .nav-toggle is hidden. */
.primary-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  transition: max-height var(--transition-fast);
}

.primary-nav.is-open {
  max-height: 70vh;
  overflow-y: auto;
}

.primary-nav ul {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) var(--container-padding) var(--space-4);
}

.primary-nav li {
  border-top: 1px solid var(--color-border);
}

.primary-nav li:first-child {
  border-top: none;
}

.primary-nav a {
  display: block;
  padding: var(--space-3) 0;
  font-weight: 600;
  color: var(--color-text-primary);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ---- Main sections ---- */
.section {
  padding-block: var(--space-12);
}

.section--tinted {
  background-color: var(--color-surface-alt);
}

/* Fondo azul suave (el mismo tono que --color-accent-soft, ya usado en
   focus rings y el chip del eyebrow) en vez del gris de .section--tinted
   — reservado para #ai-agents, la única sección que necesita distinguirse
   por color de marca, no solo por alternar blanco/gris como el resto. */
.section--accent-tinted {
  background-color: var(--color-accent-soft);
}

/* Lighter section for content that should read as reassurance, not as a
   pillar of equal weight to Product/Integration/Developers (e.g. Support). */
.section--compact {
  padding-block: var(--space-8);
}

/* Para dos secciones consecutivas donde no queremos el ritmo vertical
   completo entre ellas (p.ej. #services -> #certifications, separadas
   solo para quitar el fondo tintado, no para dejar un hueco enorme). */
.section--tight-top {
  padding-top: var(--space-6);
}

.section--tight-bottom {
  padding-bottom: var(--space-6);
}

.section--compact .section__intro {
  margin-bottom: var(--space-6);
}

.section__intro {
  max-width: 720px;
  margin: 0 auto var(--space-8) auto;
  text-align: center;
}

.section__subtitle {
  font-size: var(--fs-lead);
}

/* ---- Hero ---- */
.hero {
  padding-block: var(--space-12) var(--space-10);
  text-align: center;
}

.hero__content {
  max-width: 760px;
  margin-inline: auto;
}

.hero__subtitle {
  font-size: var(--fs-lead);
  max-width: 620px;
  margin-inline: auto;
}

/* Envuelve el h1 + hero__subtitle para poder reservarles una altura fija
   por JS (hero-rotator.js) y que el titular rotativo no desplace el
   cta-group ni las capability-card de debajo al cambiar de texto. */
.hero-rotator {
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#hero-heading,
.hero__subtitle {
  transition: opacity 350ms ease;
}

@media (prefers-reduced-motion: reduce) {
  #hero-heading,
  .hero__subtitle {
    transition: none;
  }
}

/* Línea fina que separa los botones del CTA de la fila de logos de
   partner — puramente visual (separador temático real, no decorativo
   oculto). Mismo ancho que .hero-partners, no el estrecho de
   .hero__content (760px): son hermanos de .capability-grid dentro de
   .hero, así que heredan directamente su ancho de contenedor. */
.hero-divider {
  display: block;
  width: calc(100% - 1.6rem); /* media pastilla: la mitad del padding-inline de .button (1.6rem) a cada lado */
  margin: var(--space-6) auto var(--space-5) auto;
  border: none;
  border-top: 1px solid var(--color-border);
}

/* Logos de partner (Claris Partner/Platinum/Reseller + B2Brouter + Arsys)
   — visibles ya en la carga inicial del hero, sin necesidad de hacer
   scroll. No son certificaciones (esas están en #certifications más
   abajo), por eso viven aquí y no en .cert-row. Hermano de
   .capability-grid (no hijo de .hero__content): así ocupa el ancho
   completo del contenedor del hero en vez de quedarse en los 760px
   centrados del título/botones — con un inset de "media pastilla"
   (0.8rem, la mitad del padding-inline de .button) a cada lado en vez de
   ir a ras del borde. Dos filas: los tres Claris arriba, B2Brouter y
   Arsys (logos de marca reales, no texto) debajo — cada uno con su
   propia identidad visual, no encajan en la misma fila que los Claris
   sin verse desiguales. */
.hero-partners {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  padding-inline: 0.8rem;
}

.hero-partners__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-8);
  width: 100%;
}

.hero-partners img {
  height: 34px;
  width: auto;
}

.hero-partners__row a {
  display: inline-flex;
  align-items: center;
}

/* claris-partner-platinum.png y claris-partner-reseller.png llevan, dentro
   del propio PNG, una segunda línea de texto ("PLATINUM"/"RESELLER") bajo
   el icono+wordmark que no tiene el logo base (claris-partner-logo.png) —
   mismo ancho de lienzo (768px) pero un 59% más de alto. A igual altura
   en CSS, esa franja extra "roba" tamaño al wordmark y se ve más pequeño.
   Se compensa dándoles más alto (28px × 159/100) para que el wordmark
   quede al mismo tamaño que el logo base; align-items: flex-start (arriba)
   hace que ese wordmark quede a la misma altura visual en los tres, con
   la etiqueta de nivel colgando debajo solo en estos dos. */
.hero-partners__logo--tier {
  height: 54px; /* 34px × 159/100, misma proporción que antes de agrandar la fila */
}

/* Logos de marca de B2Brouter y Arsys (no de Claris): lienzo y proporción
   propios, se igualan por altura visual en vez de heredar los 34px de
   los Claris para que no se vean minúsculos al lado de su wordmark. */
.hero-partners__logo--brand {
  height: 40px;
}

.hero-partners a {
  font-size: var(--fs-small);
  font-weight: 600;
}

.hero__supporting {
  max-width: 620px;
  margin-inline: auto;
}

.hero__asset {
  /* Full container width: the product screenshot is the protagonist of the
     hero, not a supporting illustration (#06 §9, §49; Nico Paso 2 review). */
  max-width: var(--container-max);
  margin: var(--space-10) auto 0 auto;
}

/* ---- Demo blocks (alternating two-column) ---- */
.demo-block {
  display: grid;
  gap: var(--space-8);
  align-items: center;
  padding-block: var(--space-8);
}

.demo-block__text {
  max-width: 480px;
}

/* ---- Two column generic layout ---- */
.two-col {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-6);
}

/* ---- Capability grid ---- */
.capability-grid {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

/* ---- Process steps ----
   4 columnas en vez de una lista vertical (más fácil de escanear de un
   vistazo), pero sin repetir el error de dar más peso visual al número
   que al valor: "Calidad/Integridad/Innovación/Seguridad" es el mensaje,
   "1/2/3/4" es solo referencia — así que el número se queda pequeño y
   discreto (como en la maqueta original) y el título es lo grande. */
.process-steps {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.process-steps > li {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.process-steps h3 {
  font-size: clamp(1.35rem, 1.2rem + 0.7vw, 1.7rem);
  font-weight: 800;
  margin: 0;
}

/* ---- Sequence list (developer problem chain) ---- */
.sequence-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block: var(--space-4);
}

/* ---- FAQ ---- */
.faq-list {
  max-width: 760px;
  margin-inline: auto;
  display: grid;
  gap: var(--space-3);
}

/* ---- Contact ---- */
.contact-section .section__intro {
  margin-bottom: var(--space-6);
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  margin-top: var(--space-6);
}

.contact-form {
  max-width: 560px;
  margin: var(--space-8) auto 0 auto;
  display: grid;
  gap: var(--space-4);
}

/* ---- Footer ----
   Tightened after Nico's review: less top padding under the separator
   line, brand as a horizontal logo+wordmark lockup instead of a stacked
   column, nav/legal links as clean single-column lists instead of an
   uneven wrap, and the legal fine print visually de-emphasized (smaller
   type) below everything else. */
.site-footer {
  border-top: 1px solid var(--color-border);
  background-color: var(--color-surface-alt);
  padding-block: var(--space-6) var(--space-5);
}

.site-footer__top {
  display: grid;
  gap: var(--space-6);
  padding-bottom: var(--space-4);
}

/* ---- Commercial footer (en/es/ca — index.html) ----
   Structure (per Nico's DevTools review + follow-up spec):
     .site-footer__top                 (page-width container — shared rule above)
       .site-footer__row               (brand block left, nav columns right)
         .site-footer__brand-block
         .site-footer__columns
       .site-footer__legal-text        (copyright + disclaimer, own full-width
                                         row below .site-footer__row, two
                                         plain <div>s — not <p>, not nested
                                         inside the narrower brand column)
   Mobile-first: everything stacks in one column by default: brand block,
   then the 3 nav columns each full-width, then legal text. Widens into the
   side-by-side layout from 700px up (responsive.css) — see that file for
   why 700px and why a fixed gap instead of justify-content: space-between
   (that stretched the two groups to the far edges of the container on wide
   viewports, leaving a huge empty gap in the middle — reported by Nico). */
.site-footer__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.site-footer__brand-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.site-footer__brand-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.site-footer__brand-text p {
  margin: 0;
}

/* Claris Partner Platinum badge — now swapped per theme (real light/dark
   artwork supplied by Nico, see assets/brand/), no backing chip needed
   anymore since each variant is already legible on its own background. */
.site-footer__partner-badge {
  height: 28px;
  width: auto;
}

[data-theme="dark"] .site-footer__partner-badge--light,
:root:not([data-theme="dark"]) .site-footer__partner-badge--dark {
  display: none;
}

/* Full-width copyright + disclaimer row, below brand block AND nav columns
   (not confined to the brand column's width like the previous version).
   Plain <div>s, not <p> — no default browser margin to fight with flexbox
   gap (that was the source of the earlier uneven-spacing bug; using <div>
   here sidesteps the whole issue instead of resetting margins by hand). */
/* Línea separadora pegada a la fila de arriba (marca + columnas), sin
   ningún bloque de texto a ancho completo que la distancie de "Contacto". */
.site-footer__divider {
  border-top: 1px solid var(--color-border);
}

.site-footer__columns {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.site-footer__col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Neutral/muted like the header's primary-nav, instead of inheriting the
   global link color (bright accent blue) — the footer nav is wayfinding,
   the same family as the header nav, not body copy with a link in it. Same
   treatment for the legal column so all three columns read as one family. */
.site-footer__col a {
  color: var(--color-text-primary);
  font-size: var(--fs-small);
  font-weight: 600;
}

.site-footer__col a:hover {
  color: var(--color-accent-hover);
}

.site-footer__logo {
  height: 40px;
  width: auto;
}

.trademark-disclaimer,
.copyright {
  color: var(--color-text-muted);
  font-size: var(--fs-tiny);
}

/* Simplified footer top row for privacy.html/terms.html/cookies.html: just
   brand + the three legal cross-links, no partner badge, no commercial
   nav column (#10 review — legal pages don't need to replicate the
   commercial navigation). Mobile-first single column; two columns once
   there's room, same breakpoint as the full footer grid. */
.site-footer__top--legal {
  grid-template-columns: 1fr;
}
