/* KODIQ overrides on Fjelvik base */

/* Logo: white on dark photo header; black on white/scrolled/solid */
.brand__logo {
  display: block;
  height: clamp(28px, 4vw, 38px);
  width: auto;
  max-width: min(148px, 42vw);
  transition: filter var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.header[data-header="photo"] .brand__logo {
  filter: brightness(0) invert(1);
}
.header[data-header="photo"].is-scrolled .brand__logo,
.header[data-header="solid"] .brand__logo,
.header.is-solid .brand__logo,
.menu-open .brand__logo {
  filter: brightness(0);
}

/* Modo oscuro: logo siempre blanco en el navbar */
html[data-theme="dark"] .brand__logo,
html[data-theme="dark"] .header[data-header="photo"] .brand__logo,
html[data-theme="dark"] .header[data-header="photo"].is-scrolled .brand__logo,
html[data-theme="dark"] .header[data-header="solid"] .brand__logo,
html[data-theme="dark"] .header.is-solid .brand__logo,
html[data-theme="dark"] .menu-open .brand__logo,
html[data-theme="dark"] .menu-open .header[data-header="photo"] .brand__logo {
  filter: brightness(0) invert(1) !important;
}

.brand__word {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kodiq-float-wa {
  position: fixed;
  right: max(0.85rem, env(safe-area-inset-right));
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--r-pill);
  background: #25d366;
  color: #fff !important;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  box-shadow: 0 14px 36px -12px rgba(16, 20, 18, 0.45);
}
.kodiq-float-wa:hover { filter: brightness(1.05); color: #fff !important; }
.kodiq-float-wa i { font-size: 1.15rem; }

.promise__icon i,
.tcard__kind i,
.dtile__icon i {
  font-size: 1.35rem;
}

.promise__icon {
  display: grid;
  place-items: center;
}

.booking .field__label { margin-bottom: 0.35rem; }
.booking textarea.input {
  min-height: 5.5rem;
  resize: vertical;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0.75rem 0.9rem;
  font: inherit;
  background: var(--paper);
  color: var(--pine);
}
.booking__tabs button i { font-size: 0.95rem; }

/* Dark mode: flecha del CTA (círculo claro + icono oscuro) */
html[data-theme="dark"] .cta-orbit__dot {
  color: var(--fog);
}
html[data-theme="dark"] .hero .cta-orbit__text {
  background: #101412;
  color: #fff;
}
html[data-theme="dark"] .hero .cta-orbit__dot {
  background: #fff;
  color: #101412;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.92);
}
html[data-theme="dark"] .hero .cta-orbit:hover .cta-orbit__text {
  background: #1a211e;
}

/* Options del <select>: texto siempre oscuro sobre fondo claro (popup nativo) */
.input select option,
select.input option {
  background-color: #ffffff;
  color: #101412;
}
html[data-theme="dark"] .booking .input select {
  color: var(--pine);
}

.hero__img--cover {
  object-fit: cover;
  object-position: center 35%;
  width: 100%;
  height: 100%;
}

/* Spanish titles need more room than travel-template 11ch */
.hero__title {
  max-width: min(18ch, 100%);
  overflow-wrap: anywhere;
  hyphens: auto;
}
.hero__sub {
  max-width: min(52ch, 100%);
}

.kodiq-service-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--glacier);
  color: var(--pine);
  margin-bottom: 0.85rem;
}

.contact__form .input,
.contact__form select.input,
.contact__form textarea.input {
  width: 100%;
  max-width: 100%;
}

.page-shell {
  padding-top: 5.5rem;
  padding-bottom: var(--section);
}
.page-shell .phead { margin-bottom: 2rem; }

.kodiq-page-back { margin-top: 2.5rem; }
.kodiq-page-back a {
  color: var(--pine);
  font-weight: 600;
  text-decoration: none;
}
.kodiq-page-back a:hover { text-decoration: underline; }

.redes-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.red-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.25rem;
  min-width: 0;
}
.red-card h3 { margin: 0.5rem 0; font-size: var(--text-lg); }
.red-card p { margin: 0 0 1rem; color: var(--pine-mute); }

.tcard__media img { width: 100%; height: 100%; object-fit: cover; }
.tcard, .dtile, .promise, .split__copy, .statement { min-width: 0; }

.footer__brand-logo {
  height: 48px;
  width: auto;
  margin-bottom: 0.75rem;
  filter: brightness(0) invert(1);
}

/* Service tiles: clamp long copy so it never overflows the photo */
.dtile__meta { max-width: calc(100% - 5.5rem); }
.dtile__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dtile__place {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}
.dtile__place i { margin-right: 0.35rem; }

/* Soften Bootstrap only on inner pages */
.page-shell .container { max-width: var(--container); }
.page-shell .row { margin-left: -12px; margin-right: -12px; }
.page-shell [class*="col-"] { padding-left: 12px; padding-right: 12px; }
body { background: var(--fog); overflow-x: hidden; }
html { overflow-x: hidden; }
a { color: inherit; }

/* Ensure header stays above page backgrounds / orbs */
.kodiq-page--services .footer { position: relative; z-index: 2; }
.page-shell h1, .page-shell h2, .page-shell h3 {
  font-family: var(--font-display);
  color: var(--pine);
}

/* Motion prep — anime.js drives these */
[data-anime] {
  opacity: 0;
  will-change: transform, opacity;
}
[data-anime].is-in {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  [data-anime] { opacity: 1 !important; transform: none !important; }
}

/* ---------- About · software empresarial + orbs (estilo chilpo, paleta negra) ---------- */
.phead--about {
  max-width: 46rem;
}
.phead--about h1 {
  max-width: 18ch;
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.phead--about > p {
  max-width: 46ch;
  color: var(--pine-mute);
  font-size: var(--text-md);
}

.kodiq-about {
  display: grid;
  gap: clamp(2.25rem, 4vw, 3.5rem);
}

.kodiq-about__intro,
.kodiq-about__who {
  max-width: 46rem;
}

.kodiq-about__kicker {
  margin: 0 0 0.45rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pine-mute);
}

.kodiq-about__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 1.15rem + 1.4vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.kodiq-about__lead {
  margin: 0;
  color: var(--pine-mute);
  font-size: var(--text-md);
  line-height: 1.65;
}
.kodiq-about__lead strong { color: var(--pine); font-weight: 600; }

.kodiq-orb-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.35rem);
}
.kodiq-orb-grid--4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.kodiq-orb-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kodiq-orb-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 220px;
  border: 0;
  border-radius: 28px;
  color: #f4f4f4;
  box-shadow: 0 18px 44px rgba(10, 10, 10, 0.22);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s;
}
.kodiq-orb-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 56px rgba(10, 10, 10, 0.3);
}
.kodiq-orb-card--ink { background: #111111; }
.kodiq-orb-card--charcoal { background: #1c1c1c; }
.kodiq-orb-card--slate { background: #2a2a2a; }
.kodiq-orb-card--graphite { background: #161616; }
.kodiq-orb-card--step { min-height: 210px; }

.kodiq-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.kodiq-orb--a {
  width: 180px;
  height: 180px;
  right: -48px;
  top: -56px;
  background: #000;
  opacity: 0.42;
  animation: kodiq-orb-a 8s ease-in-out infinite;
}
.kodiq-orb--b {
  width: 140px;
  height: 140px;
  left: -44px;
  bottom: -58px;
  background: #3d3d3d;
  opacity: 0.55;
  animation: kodiq-orb-b 9.5s ease-in-out infinite;
}
.kodiq-orb--c {
  width: 72px;
  height: 72px;
  right: 18%;
  bottom: 14%;
  background: #9a9a9a;
  opacity: 0.22;
  animation: kodiq-orb-c 7s ease-in-out infinite;
}
.kodiq-orb-card--charcoal .kodiq-orb--a { background: #000; opacity: 0.38; }
.kodiq-orb-card--charcoal .kodiq-orb--b { background: #4a4a4a; }
.kodiq-orb-card--slate .kodiq-orb--a { background: #0a0a0a; }
.kodiq-orb-card--slate .kodiq-orb--b { background: #5a5a5a; opacity: 0.4; }
.kodiq-orb-card--graphite .kodiq-orb--b { background: #2e2e2e; }

.kodiq-orb-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: inherit;
  padding: clamp(1.35rem, 1.1rem + 1.4vw, 1.85rem);
}
.kodiq-orb-card__eyebrow {
  display: block;
  margin: 0 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.kodiq-orb-card h3,
.kodiq-about-cta h2 {
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: clamp(1.28rem, 1.05rem + 0.9vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.kodiq-orb-card p {
  margin: 0;
  max-width: 28rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  flex: 1;
}

.kodiq-about-cta {
  min-height: auto;
}
.kodiq-about-cta__body { min-height: auto; }
.kodiq-about-cta h2 {
  font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.2rem);
  max-width: 18ch;
}
.kodiq-about-cta p { max-width: 42rem; }
.kodiq-about-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1.35rem;
}
.kodiq-about-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--r-pill);
  background: #fff;
  color: #111 !important;
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.kodiq-about-cta__btn:hover { filter: brightness(0.96); color: #111 !important; }
.kodiq-about-cta__mail {
  color: rgba(255, 255, 255, 0.78) !important;
  font-weight: 600;
  text-underline-offset: 4px;
}
.kodiq-about-cta__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.35rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
}
.kodiq-about-cta__stats strong {
  color: #fff;
  font-weight: 700;
}

@keyframes kodiq-orb-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-10px, 12px) scale(1.06); }
}
@keyframes kodiq-orb-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(14px, -8px) scale(1.05); }
}
@keyframes kodiq-orb-c {
  0%, 100% { transform: translate(0, 0); opacity: 0.18; }
  50% { transform: translate(-8px, -10px); opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .kodiq-orb { animation: none !important; }
  .kodiq-orb-card:hover { transform: none; }
}

@media (max-width: 960px) {
  .kodiq-orb-grid--3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kodiq-orb-grid--4 { grid-template-columns: 1fr; }
  .kodiq-orb-card,
  .kodiq-orb-card--step { min-height: 200px; }
}

/* ---------- Mobile / tablet density ---------- */
@media (max-width: 1024px) {
  .hero {
    min-height: auto;
    padding-top: clamp(5.5rem, 18vw, 7rem);
    padding-bottom: 1.25rem;
  }
  .hero__grid {
    gap: 1.25rem;
    padding-bottom: 1rem;
  }
  .hero__copy { gap: 0.9rem; }
  .hero__title {
    max-width: 100%;
    font-size: clamp(1.85rem, 7.2vw, 2.75rem);
    line-height: 1.12;
  }
  .hero__sub {
    font-size: var(--text-sm);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .booking {
    max-width: 100%;
    padding: 1rem;
    gap: 0.85rem;
  }
  .booking__tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .booking__tabs button {
    min-height: 42px;
    font-size: 0.72rem;
    gap: 0.3rem;
    padding-inline: 0.2rem;
  }
  .statement__line {
    font-size: clamp(1.55rem, 5.8vw, 2.15rem);
    line-height: 1.2;
    max-width: 18ch;
  }
  .statement__sub {
    font-size: clamp(1.05rem, 3.9vw, 1.2rem);
    max-width: 34ch;
    margin-top: 1.35rem;
    padding-inline: 0.35rem;
    opacity: 0.88;
  }
  .shead h2,
  .split__copy h2,
  .closer__card h2 {
    font-size: clamp(1.45rem, 5.2vw, 2.1rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .hsrv {
    gap: 0.85rem;
  }
  .tgrid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .promise-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.25rem;
  }
  .split__media { max-height: 320px; }
  .split__media img { width: 100%; height: 100%; object-fit: cover; }
}

@media (max-width: 720px) {
  .kodiq-float-wa span { display: none; }
  .kodiq-float-wa { padding: 0.95rem; border-radius: 50%; }

  .header__signin { display: none; }
  .shead--split {
    display: grid;
    gap: 0.75rem;
  }
  .shead--split .link-arrow { justify-self: start; }

  .dtile__count {
    font-size: 0.65rem;
    padding: 0.35rem 0.55rem;
  }
  .dtile__meta {
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.75rem;
    max-width: none;
  }

  .quote-band__inner blockquote {
    font-size: clamp(1.2rem, 5vw, 1.65rem);
  }

  .footer__cols {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .footer__word {
    font-size: clamp(3rem, 18vw, 6rem);
  }
  .contact {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .contact__photo { max-height: min(68vw, 420px); }
  .closer__card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .closer__actions {
    width: 100%;
    display: grid;
    gap: 0.65rem;
  }
  .closer__actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .hero { min-height: 100svh; }
  .booking__tabs button span,
  .booking__tabs button {
    font-size: 0.68rem;
  }
  .booking__tabs button i { display: none; }
  .container {
    --gutter: 1rem;
  }
  .section {
    padding-block: clamp(2.5rem, 8vw, 4rem);
  }
}
