/* Dr. Frühbeck Abogados — Premium Custom Layer
 * Only what Tailwind CDN can't express cleanly.
 * Tokens are defined in tailwind.config (see js/site.js). */

:root {
  --ink: #0F1B2D;
  --midnight: #1A2B4A;
  --ivory: #F5F1E8;
  --ivory-soft: #EFEADD;
  --brass: #B08D57;
  --brass-deep: #8E6F3E;
  --slate: #6B7280;
  --hairline: rgba(15, 27, 45, 0.12);
  --hairline-dark: rgba(245, 241, 232, 0.14);
}

/* ---------- PixelUno Preview Bar ---------- */
.preview-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 34px;
  background: linear-gradient(90deg, #6D28D9 0%, #7C3AED 50%, #6D28D9 100%);
  color: #F5F1FE;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0 1rem;
  text-align: center;
  line-height: 1.3;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 12px rgba(109, 40, 217, 0.28);
}
.preview-bar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F5F1FE;
  box-shadow: 0 0 0 3px rgba(245, 241, 254, 0.25);
  flex-shrink: 0;
  animation: preview-pulse 2.4s ease-in-out infinite;
}
@keyframes preview-pulse {
  0%, 100% { opacity: 0.55; box-shadow: 0 0 0 3px rgba(245, 241, 254, 0.15); }
  50%      { opacity: 1;    box-shadow: 0 0 0 6px rgba(245, 241, 254, 0.05); }
}
.preview-bar a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}
@media (max-width: 640px) {
  .preview-bar { font-size: 11px; height: auto; min-height: 34px; padding: 6px 12px; }
}

/* Header sits BELOW the preview bar */
.site-header { top: 34px !important; }
body { padding-top: 34px; }

/* Footer PixelUno signature */
.pixeluno-signature {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.01em;
}
.pixeluno-signature a {
  font-weight: 600;
  color: inherit;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color 200ms ease;
}
.pixeluno-signature a:hover {
  color: #C4B5FD;
}
.pixeluno-heart {
  color: #C4B5FD;
  font-size: 13px;
  line-height: 1;
  transform: translateY(0.5px);
  animation: pixeluno-heart-beat 1.8s ease-in-out infinite;
}
@keyframes pixeluno-heart-beat {
  0%, 100% { transform: translateY(0.5px) scale(1); }
  15%      { transform: translateY(0.5px) scale(1.18); }
  30%      { transform: translateY(0.5px) scale(0.94); }
  45%      { transform: translateY(0.5px) scale(1.08); }
  60%      { transform: translateY(0.5px) scale(1); }
}

/* Invisible watermark helper */
.pixeluno-hidden {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--ivory);
}

body {
  font-family: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--ivory);
  font-feature-settings: 'ss01', 'cv11';
  font-size: 17px;
  line-height: 1.65;
}

.font-display {
  font-family: 'Newsreader', ui-serif, Georgia, serif;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.font-display-tight {
  font-family: 'Newsreader', ui-serif, Georgia, serif;
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

/* ---------- Editorial rules ---------- */
.hairline {
  border-color: var(--hairline);
}
.hairline-b { border-bottom: 1px solid var(--hairline); }
.hairline-t { border-top: 1px solid var(--hairline); }
.hairline-dark-b { border-bottom: 1px solid var(--hairline-dark); }

.eyebrow {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

/* ---------- Underline link (grow from left) ---------- */
.link-underline {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 240ms ease-out;
  padding-bottom: 2px;
}
.link-underline:hover,
.link-underline:focus-visible {
  background-size: 100% 1px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  border-radius: 2px;
  transition: transform 200ms ease-out, background 200ms ease-out, color 200ms ease-out, border-color 200ms ease-out;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--ink);
  color: var(--ivory);
}
.btn-primary:hover {
  background: var(--midnight);
  transform: translateY(-1px);
}
.btn-outline {
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--ivory);
}
.btn-brass {
  background: var(--brass);
  color: #fff;
}
.btn-brass:hover {
  background: var(--brass-deep);
  transform: translateY(-1px);
}
.btn-ghost {
  color: var(--ivory);
  border-color: rgba(245, 241, 232, 0.35);
}
.btn-ghost:hover {
  background: var(--ivory);
  color: var(--ink);
}

/* ---------- Reveal animations (JS toggles .in) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-fade {
  opacity: 0;
  transition: opacity 900ms ease-out;
}
.reveal-fade.in {
  opacity: 1;
}

/* Character reveal (Fraunces headlines) */
.split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em);
  transition: opacity 700ms ease-out, transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.split-char.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Parallax hero ---------- */
.parallax-target {
  will-change: transform;
  transition: transform 60ms linear;
}

/* ---------- Marquee (network logos) ---------- */
.marquee {
  display: flex;
  overflow: hidden;
  gap: 4rem;
  mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
}
.marquee-track {
  display: flex;
  gap: 4rem;
  animation: marquee 40s linear infinite;
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}

/* ---------- Header (scroll state) ---------- */
.site-header {
  transition: background-color 300ms ease-out, backdrop-filter 300ms ease-out,
              border-color 300ms ease-out, padding 300ms ease-out;
}
.site-header.is-scrolled {
  background: rgba(245, 241, 232, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.site-header.on-dark {
  color: var(--ivory);
}
.site-header.on-dark.is-scrolled {
  background: rgba(15, 27, 45, 0.92);
  color: var(--ivory);
  border-bottom-color: var(--hairline-dark);
}

/* ---------- Form ---------- */
.field {
  position: relative;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline);
  padding: 1.5rem 0 0.6rem;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color 220ms ease;
  border-radius: 0;
}
.field textarea {
  min-height: 130px;
  resize: vertical;
  padding-top: 1.75rem;
}
.field label {
  position: absolute;
  top: 1.35rem;
  left: 0;
  font-size: 15px;
  color: var(--slate);
  pointer-events: none;
  transition: transform 220ms ease, color 220ms ease, font-size 220ms ease;
  transform-origin: 0 0;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.field input:not(:placeholder-shown),
.field textarea:not(:placeholder-shown),
.field select:valid {
  border-bottom-color: var(--brass);
}
.field input:focus + label,
.field textarea:focus + label,
.field select:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:not(:placeholder-shown) + label,
.field.filled label {
  transform: translateY(-1.15rem) scale(0.78);
  color: var(--brass-deep);
}
.field.on-dark input,
.field.on-dark select,
.field.on-dark textarea {
  color: var(--ivory);
  border-bottom-color: var(--hairline-dark);
}
.field.on-dark label {
  color: rgba(245, 241, 232, 0.62);
}
.field.on-dark input:focus,
.field.on-dark textarea:focus,
.field.on-dark select:focus {
  border-bottom-color: var(--brass);
}

/* Checkbox */
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 13px;
  color: var(--slate);
  line-height: 1.55;
  cursor: pointer;
}
.check input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  margin-top: 2px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  background: transparent;
  transition: border-color 200ms, background 200ms;
}
.check input[type="checkbox"]:checked {
  background: var(--ink);
  border-color: var(--ink);
}
.check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--ivory);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.check.on-dark {
  color: rgba(245, 241, 232, 0.72);
}
.check.on-dark input[type="checkbox"] {
  border-color: rgba(245, 241, 232, 0.35);
}
.check.on-dark input[type="checkbox"]:checked {
  background: var(--brass);
  border-color: var(--brass);
}

/* Focus visible everywhere */
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Utility ---------- */
.no-scroll { overflow: hidden; }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 640px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--ivory);
  padding: 1.25rem 1.5rem;
  z-index: 90;
  border-radius: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  transform: translateY(120%);
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
  box-shadow: 0 20px 40px -20px rgba(15, 27, 45, 0.35);
}
.cookie-banner.show {
  transform: translateY(0);
}

/* Mobile nav drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  background: var(--ink);
  color: var(--ivory);
  z-index: 80;
  padding: 6rem 2rem 2rem;
  transform: translateY(-100%);
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
  overflow-y: auto;
}
.nav-drawer.open {
  transform: translateY(0);
}
.nav-drawer a {
  display: block;
  font-family: 'Newsreader', serif;
  font-size: 2rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--hairline-dark);
  letter-spacing: -0.02em;
}

/* Hero blurred edge */
.hero-image-mask {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%);
  mask-image: linear-gradient(to right, transparent, #000 8%);
}

/* Reduced motion — kill everything animated */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-fade, .split-char {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .parallax-target { transform: none !important; }
  .marquee-track { animation: none !important; }
  .btn:hover { transform: none !important; }
}

/* Print */
@media print {
  .site-header, .cookie-banner, .nav-drawer { display: none; }
}
