@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter/Inter-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter/Inter-Italic-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

[x-cloak] {
  display: none !important;
}

:root {
  color-scheme: light;
  --bg: #f5f5f5;
  --hdr: #dcdcdc;
  --surface: #ffffff;
  --surface2: #ececec;
  --border: #d4d4d4;
  --text: #181818;
  --muted: #525252;
  --muted2: #707070;
  --input: #ffffff;
  --focus: #7a7a7a;
  --shadow-md: 0 16px 54px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 20px 70px rgba(0, 0, 0, 0.16);
}

.dark {
  color-scheme: dark;
  --bg: #171a1f;
  --hdr: #1b1f26;
  --surface: #1f242c;
  --surface2: #262c36;
  --border: #363e4a;
  --text: #f1f5f9;
  --muted: #c1c7d0;
  --muted2: #9aa3ad;
  --input: #171a1f;
  --focus: #b7bec8;
  --shadow-md: 0 1px 0 rgba(255, 255, 255, 0.03);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.03);
}

html {
  font-size: 17px;
}

@media (max-width: 640px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.dark body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1100px 620px at 18% 18%, rgba(255, 255, 255, 0.045), transparent 55%),
    radial-gradient(900px 520px at 82% 72%, rgba(255, 255, 255, 0.03), transparent 55%);
}

body > * {
  position: relative;
  z-index: 1;
}

.hdr {
  background: rgba(77, 77, 77, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
}

.dark .hdr {
  background: rgba(27, 31, 38, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.surface {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 95%, transparent);
  box-shadow: var(--shadow-md);
}

.dark .surface {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.b2b-logo-dark,
.theme-icon-dark {
  display: none;
}

.dark .b2b-logo-light,
.dark .theme-icon-light {
  display: none;
}

.dark .b2b-logo-dark,
.dark .theme-icon-dark {
  display: block !important;
}

.hover-soft {
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.hover-soft:hover {
  background: color-mix(in srgb, var(--surface2) 70%, transparent);
}

.dark .hover-soft:hover {
  background: color-mix(in srgb, #ffffff 6%, transparent);
}

.surface:hover {
  box-shadow: var(--shadow-lg);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.field {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--border) 92%, transparent);
  border-radius: 10px;
  padding: 14px 14px;
  background: var(--input);
  color: var(--text);
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.dark .field {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.field::placeholder {
  color: color-mix(in srgb, var(--muted2) 88%, transparent);
}

.field:hover {
  border-color: color-mix(in srgb, var(--focus) 55%, var(--border));
}

.field:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--focus) 18%, transparent);
  background: color-mix(in srgb, var(--surface2) 85%, #ffffff);
}

.dark .field:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--focus) 22%, transparent);
  background: var(--surface2);
}

select.field {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--muted2) 90%, transparent) 50%),
    linear-gradient(135deg, color-mix(in srgb, var(--muted2) 90%, transparent) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.icon-inline {
  display: inline-block !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  flex: 0 0 auto;
  vertical-align: middle;
}

.icon-inline-lg {
  width: 1.5rem !important;
  height: 1.5rem !important;
}

.anim-safe {
  transition-property: transform, background-color, border-color, color, opacity, box-shadow;
}

.b2b-compact .field {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
}

.b2b-compact label {
  margin-bottom: 0.35rem !important;
}

.b2b-compact textarea.field {
  min-height: 120px;
}

.no-shadow-card {
  box-shadow: none !important;
}

.no-shadow-card:hover {
  box-shadow: none !important;
  transform: none !important;
}

#portfolio-carousel {
  will-change: transform;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-stage {
  width: min(92vw, 1400px);
  height: min(88vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
  cursor: grab;
}

.lightbox-image.dragging {
  cursor: grabbing;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox-close {
  top: 18px;
  right: 18px;
  width: 52px;
  height: 52px;
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  font-size: 34px;
  line-height: 1;
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

body.lightbox-open {
  overflow: hidden;
}

section[id="portfolio-carousel1"],
section[id="form-empresas"],
footer {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

@media (max-width: 767px) {
  .hdr {
    backdrop-filter: none;
  }

  .surface {
    box-shadow: none;
  }

  .surface:hover {
    box-shadow: none;
    transform: none;
  }

  .lightbox-stage {
    width: 100vw;
    height: 100vh;
    padding: 20px;
  }

  .lightbox-nav {
    width: 48px;
    height: 48px;
    font-size: 28px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 46px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .anim-safe,
  .surface,
  .hover-soft,
  .lightbox,
  .lightbox-close,
  .lightbox-nav {
    transition: none !important;
    animation: none !important;
  }
}
