/* ===========================================================
   flaco.digital — estilos base
   =========================================================== */

/* ---------- Tipografía local: MADE Okine Sans (peso Black) ---------- */
/* Se mapea a todo el rango de pesos para que cualquier clase de Tailwind
   (font-medium, font-semibold, font-bold, etc.) use siempre el Black. */
@font-face {
  font-family: 'Okine Sans';
  src: url('../fonts/MADEOkineSans-Black.otf') format('opentype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Okine Sans Outline';
  src: url('../fonts/MADEOkineSans-BlackOutline.otf') format('opentype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Focus states ---------- */
.focus-ring:focus-visible {
  outline: 2px solid #0a0a0a;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Grain texture overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.025;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Custom cursor (desktop only) ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 70;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: #0a0a0a;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
.cursor-ring {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(10, 10, 10, 0.25);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, opacity 0.2s ease;
}
.cursor-ring.is-active {
  width: 64px;
  height: 64px;
  background: #ffffff;
  border-color: transparent;
  mix-blend-mode: difference;
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ---------- Nav ---------- */
.nav-shell.is-scrolled {
  box-shadow: 0 6px 24px -8px rgba(10, 10, 10, 0.12);
}

.nav-link {
  position: relative;
  padding-bottom: 2px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: #e6e6e6;
  transition: width 0.25s ease;
}
.nav-link:hover::after {
  width: 100%;
}

.hablemos-btn:hover {
  background: #0a0a0a;
  transform: translateY(-2px);
}

/* Burger icon */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 18px;
  height: 14px;
}
.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #0a0a0a;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#menuBtn[aria-expanded="true"] .burger span:first-child {
  transform: translateY(5.5px) rotate(45deg);
}
#menuBtn[aria-expanded="true"] .burger span:last-child {
  transform: translateY(-5.5px) rotate(-45deg);
}

.mobile-menu {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.mobile-menu[hidden] {
  display: none;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #0a0a0a;
  color: #ffffff;
  border-radius: 9999px;
  padding: 0.9rem 1.6rem;
  font-size: 0.95rem;
  text-transform: lowercase;
  letter-spacing: 0.01em;
  transition: background-color 0.25s ease, transform 0.25s ease;
}
.btn-primary:hover {
  background: #0a0a0a;
  transform: translateY(-2px);
}
.btn-primary svg {
  transition: transform 0.25s ease;
}
.btn-primary:hover svg {
  transform: translateX(3px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #0a0a0a;
  color: #ffffff;
  border: 1px solid #0a0a0a;
  border-radius: 9999px;
  padding: 0.9rem 1.6rem;
  font-size: 0.95rem;
  text-transform: lowercase;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.btn-secondary:hover {
  background: #0a0a0a;
  transform: translateY(-2px);
}

.btn-light {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  color: #0a0a0a;
  border-radius: 9999px;
  padding: 0.9rem 1.6rem;
  font-size: 0.95rem;
  text-transform: lowercase;
  transition: background-color 0.25s ease, transform 0.25s ease;
}
.btn-light:hover {
  background: #ffffff;
  color: #0a0a0a;
  transform: translateY(-2px);
}
.btn-light svg {
  transition: transform 0.25s ease;
}
.btn-light:hover svg {
  transform: translate(2px, -2px);
}

/* ---------- Outline text (decorative) ---------- */
.text-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(10, 10, 10, 0.08);
}

/* ---------- Marquee ---------- */
.marquee {
  width: max-content;
}
.marquee-track {
  animation: marquee 28s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ---------- Tags ---------- */
.tag {
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  color: #6e6c68;
}
.tag-light {
  background: #ffffff;
  border-color: rgba(10, 10, 10, 0.08);
}

/* ---------- Service / FAQ accordions ---------- */
.service-item summary::-webkit-details-marker,
.faq-item summary::-webkit-details-marker {
  display: none;
}
.service-item .chevron,
.faq-item .chevron {
  transition: transform 0.3s ease;
}
.service-item[open] .chevron,
.faq-item[open] .chevron {
  transform: rotate(180deg);
}
.service-item > div,
.faq-item > p {
  animation: accordion-in 0.35s ease;
}
@keyframes accordion-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .service-item > div,
  .faq-item > p {
    animation: none;
  }
}

/* ---------- Why cards ---------- */
.why-card {
  border: 1px solid rgba(10, 10, 10, 0.1);
  border-radius: 1.5rem;
  padding: 2rem;
  transition: border-color 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}
.why-card:hover {
  border-color: #0a0a0a;
  background: #f5f4f1;
  transform: translateY(-4px);
}
.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: #f5f4f1;
  margin-bottom: 1.25rem;
}
.why-card:hover .why-icon {
  background: #0a0a0a;
  color: #ffffff;
}

/* ---------- Work cards ---------- */
.work-card {
  background: #ffffff;
  border: 1px solid rgba(10, 10, 10, 0.08);
  border-radius: 1.5rem;
  padding: 1.75rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px -16px rgba(10, 10, 10, 0.18);
}
.work-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.work-card-cta {
  background: #0a0a0a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- Service chips ---------- */
.service-chip {
  background: #0a0a0a;
  color: #ffffff;
  border-color: #0a0a0a;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
@media (hover: hover) {
  .service-chip:hover {
    transform: translateY(-2px);
  }
}
.service-chip.is-selected {
  background: #0a0a0a;
  color: #ffffff;
  border-color: #0a0a0a;
}
.service-chip .chip-check {
  display: none;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.service-chip.is-selected .chip-check {
  display: inline-flex;
}

/* ---------- Contact icon ---------- */
.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(10, 10, 10, 0.12);
  flex-shrink: 0;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Stagger children within sections that opt in */
.reveal.is-visible ~ .reveal {
  transition-delay: 0.05s;
}
