/*
Theme Name: Teraby Theme
Theme URI: https://teraby.com/
Description: Tema de TERABY para Bricks, con servicios, recursos y blog en WordPress.
Author: teraby
Author URI: https://teraby.com/
Template: bricks
Version: 1.3.0
Text Domain: teraby
*/

:root {
  --text-body: #c2c9d5;
  --text-dim: #a5afc1;
  --text-faint: #8995a7;
}
html { font-size: 100%; }
body.bricks-is-frontend { line-height: 1.65; }
body.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
#brx-content { min-width: 0; }
body .site-header { background: var(--bg-primary); backdrop-filter: none; }
.brxe-section.section, .brxe-container.container { align-self: auto; }
.main-nav .brxe-text-basic, .lang-switch .brxe-text-basic { width: auto; }
/* The left scrim protects the reading area across all three shots. */
.hero {
  isolation: isolate;
  background: #090a1e;
  min-height: clamp(32rem, 45vw, 48rem);
  padding-block: clamp(6rem, 8vw, 9rem) clamp(5rem, 7vw, 8rem);
  justify-content: center;
}
.hero::before {
  content: "";
  inset: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  filter: none;
  animation: none;
  will-change: auto;
  background: linear-gradient(90deg, #090a1e 12%, rgba(9,10,30,.96) 24%, rgba(9,10,30,.85) 43%, rgba(9,10,30,.52) 63%, rgba(9,10,30,.19) 100%);
  z-index: 1;
}
.hero::after { content: none; }
.hero .teraby-hero-film {
  display: block;
  position: absolute;
  inset: 4.25rem 0 0 auto;
  width: 76%;
  height: calc(100% - 4.25rem);
  mask-image: linear-gradient(90deg,transparent,#000 18%);
  object-fit: cover;
  object-position: 55% center;
  pointer-events: none;
}
.hero .hero-grid { z-index: 2; grid-template-columns: 1fr; max-width: var(--container); }
.hero-copy .display {
  max-width: 17ch;
  font-size: clamp(3rem, 4.5vw, 4.8rem);
  line-height: 1.035;
  letter-spacing: -.045em;
  color: #fff;
  text-wrap: balance;
}
.hero-copy .lead { max-width: 45ch; font-size: clamp(1.04rem, 1.45vw, 1.22rem); line-height: 1.55; color: #f0f2ec; }
body.home #brx-content p { text-wrap: pretty; }
.hero-copy .lead { text-wrap: balance; }
.hero-actions { margin-top: 1.7rem; }
.hero-actions .btn-ghost { color: white; background: #18221de6; border: 1px solid #949b93; }
.hero-actions .btn-ghost:hover { background: #26372c; }
.hero [data-hero-motion] {
  position: absolute;
  z-index: 2;
  bottom: 1rem;
  right: max(1rem, calc((100% - var(--container))/2));
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  width: auto;
  min-height: 44px;
  padding: .35rem .9rem;
  border: 1px solid #a7afa6;
  border-radius: 2rem;
  background: #111b16e8;
  color: #fff;
  font: 500 .8rem/1.2 var(--font-sans);
  cursor: pointer;
}
.hero [data-hero-motion][hidden] { display: none; }
.hero [data-hero-motion]::before { content: ""; width: 0; height: 0; border-block: 5px solid transparent; border-left: 8px solid currentColor; }
.hero [data-hero-motion][data-playing=true]::before { width: 8px; height: 11px; border: solid currentColor; border-width: 0 3px; }
#problema .teraby-agency { max-width: 37ch; color: var(--accent); font: 500 .9rem/1.5 var(--font-sans); }
#problema .h2 strong { display: block; color: var(--text-hi); font-weight: 700; }
.teraby-pillar { padding-block: clamp(1.25rem, 2.4vw, 2.15rem); border-top: 1px solid var(--border); }
.teraby-pillar h3 { margin: 0 0 .5rem; color: var(--text-hi); font-size: clamp(1.36rem,2.3vw,1.85rem); line-height: 1.16; letter-spacing: -.025em; }
.teraby-pillar p { max-width: 58ch; margin: 0; color: var(--text-body); line-height: 1.65; }
.hero .btn, .site-header .btn { min-height: 44px; }
#problema .situacion-num { color: var(--text-dim); }
.post-cuerpo { overflow-wrap: break-word; }
.post-seccion :is(h2,h3), .post-indice { scroll-margin-top: 5rem; }
.post-cuerpo p, .post-cuerpo li { text-wrap: pretty; }
.post-cuerpo a:not(.btn), .blog-mas a { text-underline-offset: .2em; }
:where(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.cc .cc-acciones button { min-height: 42px; }
.cc .cc-texto { font-size: .925rem; }
.cc .cc-acciones { flex-wrap: wrap; }
#brx-content .reveal { opacity: 1; }
@media (max-width: 860px) {

  .hero-grid { grid-template-columns: minmax(0, 1fr); }


  .lang-switch a { display: inline-flex; min-height: 44px; align-items: center; }
}
@media (max-width: 480px) {


  .hero-actions { gap: .75rem; }

  .cc { max-height: min(74dvh,35rem); overflow-y: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }

  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Keep the first action in view while the visitor chooses their cookies. */
@media (min-width: 861px) {
  body .cc[data-cc] { inset: auto 5.5rem 0 auto; }
}
@media (max-width: 640px) {
  .cc[data-cc] .cc-acciones { display: flex; gap: .4rem .55rem; }
  .cc[data-cc] .cc-acciones .btn { flex: 0 1 auto; min-height: 44px; padding-inline: .75rem; }
  .cc[data-cc] .cc-acciones .cc-config { min-height: 44px; margin: 0; }
  .cc[data-cc] .cc-texto { line-height: 1.4; }
}

/* Emphasize the sequence and prices without boxing each step. */
#como-trabajamos .steps { column-gap: clamp(1.5rem,3vw,3.5rem); }
#como-trabajamos .step { background: transparent; border: 0; padding-inline: 0; }
#como-trabajamos .step h3 { font-size: clamp(1.3rem,2.2vw,1.65rem); line-height: 1.15; }
#problema .num { color: var(--text-dim); }
.site-footer .mono, .hero-note, .blog-fecha { letter-spacing: normal; }
@media (max-width: 860px) {
  .cc.cc-inline[data-cc] {
    position: relative;
    inset: auto;
    max-height: none;
    width: 100%;
    padding: 0 clamp(1.25rem,4vw,2rem) 1.5rem;
    z-index: auto;
  }
  .cc-inline .cc-panel {
    width: 100%;
    max-width: 42rem;
    margin-inline: auto;
    box-shadow: none;
  }
}

@media (max-width: 860px) {
  .hero { --film-height: clamp(12rem,55vw,22rem); min-height: auto; padding-block: calc(4.25rem + var(--film-height) * .76) 2.25rem; }
  .hero .teraby-hero-film { width: 100%; height: var(--film-height); object-position: center 42%; mask-image: none; }
  .hero::before { background: linear-gradient(180deg, rgba(9,10,30,.16) 4.25rem, rgba(9,10,30,.28) calc(4.25rem + var(--film-height) * .5), #090a1e calc(4.25rem + var(--film-height))); }
  .hero-copy .display { max-width: min(100%,22ch); font-size: clamp(2.3rem, 8.7vw, 3.55rem); }
  .hero-copy .lead { max-width: 42ch; }
  .hero [data-hero-motion] { top: 4.8rem; right: 1rem; bottom: auto; }
}
/* The same message form is rendered in the dialog and on direct campaign links. */
.teraby-contact-dialog, .teraby-contact-inline {
  color: #f3f5f0;
  background: #141628;
  border: 1px solid #54586e;
  font-family: var(--font-sans, system-ui);
  line-height: 1.5;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border-radius: 1rem;
}
dialog.teraby-contact-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  box-sizing: border-box;
  width: min(calc(100% - 2rem), 33rem);
  height: fit-content;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}
.teraby-contact-dialog:not([open]), .teraby-message [hidden] { display: none; }
.teraby-contact-dialog::backdrop { background: rgba(5,10,7,.76); }
.teraby-dialog-head { display: flex; align-items: start; gap: 1rem; justify-content: space-between; }
.teraby-dialog-head h2, .teraby-contact-inline h2 { font-size: clamp(1.55rem,3vw,2rem); line-height: 1.15; color: inherit; margin: 0; }
.teraby-dialog-head h2:focus { outline: none; }
.teraby-dialog-head button { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; margin: -.5rem -.45rem 0 0; padding: 0; background: transparent; color: inherit; border: 0; cursor: pointer; }
.teraby-message { display: grid; justify-items: start; gap: .65rem; color: #f3f5f0; width: 100%; max-width: 40rem; font: 400 1rem/1.5 var(--font-sans, system-ui); }
.teraby-message label { font-weight: 600; color: inherit; margin: .45rem 0 0; }
.teraby-message p { color: #c4d0c6; margin: 0; font-size: .92rem; }
.teraby-message .teraby-recipient { margin-top: .4rem; color: #bdf771; }
.teraby-message textarea {
  border: 1px solid #89998d; border-radius: .4rem; background: #0c0e1b;
  color: #f3f5f0; font: inherit; line-height: 1.5; padding: .8rem 1rem;
  resize: vertical; width: 100%; min-height: 6rem;
}
.teraby-message [data-contact-attachment] a { color: #bdf771; text-decoration: underline; }
.teraby-message button[type=submit] { margin-top: .5rem; width: auto; background: #bdf771; color: #17211c; padding: .65rem 1.15rem; min-height: 44px; }
.teraby-contact-inline { width: min(calc(100% - 2rem),40rem); margin: 1rem auto 4rem; scroll-margin-top: 5rem; }
.teraby-contact-launch {
  position: fixed; z-index: 40;
  right: calc(clamp(.875rem, 2vw, 1.5rem) + env(safe-area-inset-right));
  bottom: calc(clamp(.875rem, 2vw, 1.5rem) + env(safe-area-inset-bottom));
  display: grid; place-items: center; box-sizing: border-box;
  width: 3.5rem; height: 3.5rem; border: 1px solid var(--studio-ink); border-radius: 50%;
  background: var(--studio-acid); color: var(--studio-ink);
  box-shadow: 0 3px 12px rgb(20 22 18 / .18); transition: background-color .16s, color .16s;
}
.teraby-contact-launch svg { display: block; width: 2.1rem; height: 2.1rem; }
.teraby-contact-launch:is(:hover,:focus-visible) { background: var(--studio-ink); color: var(--studio-acid); }
.teraby-contact-launch:focus-visible { outline: 3px solid var(--studio-violet); outline-offset: 3px; }
@media (max-width: 860px) {
  body:has(.cc[data-cc]:not([hidden]):not(.cc-inline)) .teraby-contact-launch { visibility: hidden; }
}
