/* AMULETO — home: bloques del sitemap aprobado */

/* ---------- 2. Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: clamp(112px, 15vh, 160px) var(--gutter) clamp(56px, 9vh, 96px);
  text-align: center;
}
.hero .kicker {
  font-size: var(--fs-kicker);
  color: var(--color-primary-text);
  margin-bottom: clamp(20px, 3.5vh, 36px);
}
.hero h1 {
  max-width: min(100%, 20ch);
  font-size: var(--fs-hero);
  line-height: var(--lh-hero);
  letter-spacing: var(--ls-hero);
}
.hero .lead {
  max-width: 40ch;
  margin-top: clamp(24px, 4vh, 40px);
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text-strong);
}
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: clamp(28px, 4.5vh, 44px); }


.rise { animation: rise 0.9s var(--ease-out) both; animation-delay: calc(var(--d, 0) * 1ms); }

/* ---------- 3. Los tres servicios ---------- */
.mods { display: flex; gap: 20px; }
.mod {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 44px 36px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color var(--dur-base), box-shadow var(--dur-slow), flex-grow var(--dur-slow) var(--ease-standard);
}
.mod-glow {
  display: none; /* el manual no admite brillos ni degradés */
  position: absolute;
  top: -160px;
  right: -160px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.mod-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mod-icon { width: 44px; height: 44px; color: var(--color-primary-text); }
.mod-tag { font-size: 12px; color: var(--text-soft); }
.mod h3 { position: relative; margin: 0 0 16px; font-size: var(--fs-h3-card); line-height: 1.1; letter-spacing: -0.01em; }
.mod-problem { position: relative; font-size: var(--fs-card-text); line-height: var(--lh-body); color: var(--text-muted); }
.mod-list { position: relative; display: grid; gap: 10px; margin-top: 24px; }
.mod-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text-strong);
}
.mod-list li::before { content: ""; flex: 0 0 14px; height: 1px; background: var(--color-primary-text); transform: translateY(-4px); }
.mod:focus-within { border-color: var(--color-primary); }
.mod:focus-within .mod-glow { opacity: 1; }

@media (hover: hover) and (min-width: 821px) {
  .mods:hover .mod:hover { flex-grow: 1.45; }
  .mod:hover { border-color: var(--color-primary); box-shadow: var(--shadow-card-hover); }
  .mod:hover .mod-glow { opacity: 1; }
  .mods:hover .mod:not(:hover) .mod-problem,
  .mods:hover .mod:not(:hover) .mod-list { opacity: 0.45; }
  .mod-problem, .mod-list { transition: opacity 0.5s; }
}

/* ---------- 4. ¿Te pasa algo de esto? ---------- */
.rows { max-width: var(--container-width); margin: 0 auto; }
.srv {
  position: relative;
  display: block;
  padding: clamp(26px, 4.6vh, 44px) 0;
  border-top: 1px solid var(--border-subtle);
  overflow: hidden;
}
.srv:last-child { border-bottom: 1px solid var(--border-subtle); }
.srv-bg {
  position: absolute;
  inset: 0;
  background: var(--color-text);
  transform: scaleY(0);
  transform-origin: center bottom;
  transition: transform 0.6s var(--ease-wipe);
}
.srv-in {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: 32px;
  padding-inline: 24px;
  transition: color var(--dur-base);
}
.srv h3 {
  font-size: clamp(1.625rem, 2.9vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  transition: transform 0.6s var(--ease-wipe);
}
.srv-svc { display: grid; gap: 8px; }
.srv-label { font-size: 12px; color: var(--color-primary-text); transition: color var(--dur-base); }
.srv-desc { max-width: 42ch; font-size: 17px; line-height: 1.55; color: var(--text-muted); transition: color var(--dur-base); }

.srv:focus-visible .srv-bg { transform: scaleY(1); }
.srv:focus-visible .srv-in, .srv:focus-visible h3 { color: var(--color-background); }
.srv:focus-visible .srv-label, .srv:focus-visible .srv-desc { color: color-mix(in srgb, var(--color-background) 82%, transparent); }
.srv:focus-visible .srv:focus-visible { outline-offset: -3px; }
@media (hover: hover) and (min-width: 821px) {
  .srv:hover .srv-bg { transform: scaleY(1); }
  .srv:hover .srv-in, .srv:hover h3 { color: var(--color-background); }
  .srv:hover .srv-label, .srv:hover .srv-desc { color: color-mix(in srgb, var(--color-background) 82%, transparent); }
  .srv:hover h3 { transform: translateX(20px); }
  .srv:hover }

/* ---------- Banda de servicios ---------- */
.marquee { padding: var(--sp-m) 0; overflow: hidden; }
.mq-track { display: flex; width: max-content; animation: mq 50s linear infinite; }
.mq-group { display: flex; flex: 0 0 auto; }
.mq-group span {
  display: inline-flex;
  align-items: center;
  padding-right: 0.5em;
  font: 500 clamp(3rem, 6vw, 5.4rem) / 1 var(--font-heading);
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1.2px rgb(90 42 79 / 0.7);
  white-space: nowrap;
}
.mq-group span::after {
  content: "";
  width: 0.16em;
  height: 0.16em;
  margin-left: 0.5em;
  border-radius: 50%;
  background: var(--am-durazno);
}
@keyframes mq { to { transform: translateX(-50%); } }

/* ---------- 6. Cómo trabajamos ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  max-width: var(--container-width);
  margin: 0 auto;
}
.step { padding-top: 24px; border-top: 1px solid var(--border-strong); }
.step-n { display: block; font-size: 13px; color: var(--color-primary-text); }
.step h3 { margin: 20px 0 12px; font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.1; letter-spacing: -0.01em; }
.step p { font-size: 17px; line-height: 1.55; color: var(--text-muted); }

/* ---------- 7. Quiénes somos ---------- */
.about { padding-block: var(--sp-xl); text-align: center; }
.about .kicker { margin-bottom: 5vh; font-size: var(--fs-kicker); color: var(--color-primary-text); }
.statement {
  max-width: 30ch;
  margin: 0 auto;
  font: 500 clamp(1.75rem, 3.7vw, 3.25rem) / var(--lh-statement) var(--font-heading);
  letter-spacing: -0.02em;
  color: var(--color-heading);
  text-wrap: balance;
}
[data-words] .w { display: inline-block; transition: opacity 0.35s; }
.js [data-words] .w { opacity: 0.22; }
.js [data-words] .w.is-lit { opacity: 1; }
.about-more { display: flex; justify-content: center; margin-top: clamp(32px, 6vh, 56px); }

/* ---------- 8. Cierre de contacto ---------- */
.cta {
  min-height: min(100svh, 820px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5vh;
  text-align: center;
}
.cta h2 { font-size: var(--fs-cta); line-height: 0.9; letter-spacing: var(--ls-cta); }
.cta h2 span { display: block; }
.cta-sub { max-width: 40ch; font-size: var(--fs-lead); line-height: var(--lh-body); color: var(--text-muted); }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
      
  .mods { flex-direction: column; }
  .mod { flex: 0 0 auto; min-height: 0; gap: 24px; padding: 32px 24px; }

  .srv-in { grid-template-columns: 1fr; gap: 14px; padding-inline: 0; }
  
  .steps { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .hero-ctas .btn { width: 100%; }
  .hero .kicker { font-size: 12px; letter-spacing: 0.1em; }
}

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; }
  .mq-track { animation: none; }
  [data-words] .w { transition: none; }
}


/* ---------- Capturas reales ---------- */
.shot-img { flex: 1; min-height: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; background: var(--am-blanco); }

/* ---------- Trabajos: destacados + otros ---------- */
.feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) 28px; max-width: 1200px; margin: 0 auto; }
.feat-card { position: relative; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.feat-frame {
  display: flex;
  flex-direction: column;
  aspect-ratio: 16 / 11;
  background: var(--am-blanco);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow), border-color var(--dur-base);
}
.feat-card h3 { font-size: var(--fs-h3-card); line-height: 1.1; letter-spacing: -0.01em; }
.feat-card p { margin-top: 8px; max-width: 40ch; font-size: var(--fs-card-text); line-height: 1.5; color: var(--text-muted); }
.feat-tag { margin-top: 14px; display: inline-block; font-size: 12px; color: var(--color-primary-text); }
.feat-card a::after { content: ""; position: absolute; inset: 0; } /* tarjeta entera clickeable */
.feat-card a:focus-visible { outline: none; }
.feat-card:focus-within .feat-frame { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-focus); }
@media (hover: hover) {
  .feat-card:hover .feat-frame { transform: translateY(-6px); border-color: var(--color-primary); box-shadow: var(--shadow-card-hover); }
}

/* ---------- Medalla de fondo (CSS 3D, se mueve con el scroll) ---------- */
/* La silueta sale del isotipo (amuleto-isotipo-ciruela.svg, 690 x 946) usado como máscara:
   aro, calado, globo y argolla. Va como data URI porque algunos navegadores bloquean
   máscaras desde archivos locales. */
.coin-stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.coin {
  --coin: clamp(170px, 27vw, 380px);
  --glint: 0;
  --medal: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%22-345 -601 690 946%22 width=%22690%22 height=%22946%22 fill=%22%235A2A4F%22 color=%22%235A2A4F%22%3E%3Cpath fill-rule=%22evenodd%22 d=%22M-285 0A285 285 0 1 0 285 0A285 285 0 1 0 -285 0Z M-223 0A223 223 0 1 0 223 0A223 223 0 1 0 -223 0Z%22/%3E%3Cpath fill-rule=%22evenodd%22 d=%22M-197 0A197 197 0 1 0 197 0A197 197 0 1 0 -197 0Z M-167 0A167 167 0 1 0 167 0A167 167 0 1 0 -167 0Z%22/%3E%3CclipPath id=%22c1%22%3E%3Ccircle r=%22195%22/%3E%3C/clipPath%3E%3Cg clip-path=%22url%28%23c1%29%22 fill=%22none%22 stroke=%22currentColor%22 stroke-width=%2232%22%3E%3Cellipse rx=%2287%22 ry=%22173%22/%3E%3Cline x1=%22-300%22 y1=%220%22 x2=%22300%22 y2=%220%22/%3E%3C/g%3E%3Crect x=%22-34%22 y=%22-343%22 width=%2268%22 height=%2274%22 rx=%2214%22/%3E%3Cpath fill-rule=%22evenodd%22 d=%22M0 -475a66 66 0 1 0 0.01 0Z M0 -443a34 34 0 1 0 0.01 0Z%22/%3E%3C/svg%3E");
  position: absolute;
  top: 0;
  left: 0;
  width: var(--coin);
  height: calc(var(--coin) * 946 / 690);
  perspective: 1400px;
  will-change: transform;
  opacity: 0.5;
}
.coin-body { position: absolute; inset: 0; transform-style: preserve-3d; }
.coin-face, .coin-rim {
  position: absolute;
  inset: 0;
  -webkit-mask: var(--medal) center / 100% 100% no-repeat;
  mask: var(--medal) center / 100% 100% no-repeat;
}
.coin-face {
  backface-visibility: hidden;
  background:
    radial-gradient(circle at 50% 55%, rgb(255 240 170 / 0.35), transparent 55%),
    conic-gradient(from 30deg at 50% 60%, #8a6a1f, #f3d676, #b78a2a, #fff0b0, #9a7422, #e8c35a, #8a6a1f);
}
.coin-front { transform: translateZ(8px); }
.coin-back { transform: rotateY(180deg) translateZ(8px); }
.coin-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / 0.55) 48%, transparent 62%);
  opacity: var(--glint);
}
.coin-rim { background: #a87d22; }
.coin-rim:nth-child(odd) { background: #8a6619; }

@media (max-width: 820px) {
  .feat { grid-template-columns: 1fr; gap: 40px; }
  .feat-frame { aspect-ratio: 16 / 10; }
}
@media (prefers-reduced-motion: reduce) {
  .coin { opacity: 0.5; }
}

.shot-img.shot-img--left { object-position: 0 0; }
@media (max-width: 1000px) and (min-width: 821px) {
  .feat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Carrusel de Quiénes somos ---------- */
.carousel { position: relative; max-width: 760px; margin: clamp(40px, 7vh, 72px) auto 0; }
.car-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius-card);
  background: var(--am-ciruela);
  overscroll-behavior-x: contain;
}
.car-track::-webkit-scrollbar { display: none; }
.car-track:focus-visible { outline-offset: 4px; }
.car-slide { flex: 0 0 100%; aspect-ratio: 3 / 2; scroll-snap-align: center; scroll-snap-stop: always; }
.car-slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.car-btn {
  position: absolute;
  top: calc(50% - 22px - 24px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--am-claro);
  color: var(--am-ciruela);
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.car-btn svg { width: 22px; height: 22px; }
.car-prev { left: 14px; }
.car-next { right: 14px; }
.car-btn:hover, .car-btn:focus-visible { background: var(--am-ciruela); color: var(--am-claro); }
.car-btn:focus-visible { outline-color: var(--am-oscuro); }
.car-bar { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.car-dots { display: flex; }
.car-dot, .car-pause { position: relative; width: 32px; height: 32px; padding: 0; border: 0; background: transparent; cursor: pointer; color: var(--am-ciruela); }
.car-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.car-dot[aria-current="true"]::before { background: currentColor; transform: scale(1.2); }
.car-dot:focus-visible, .car-pause:focus-visible { outline-color: var(--am-ciruela); outline-offset: -2px; border-radius: 50%; }
.car-pause-ico { position: absolute; top: 50%; left: 50%; width: 10px; height: 12px; margin: -6px 0 0 -5px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.car-pause[aria-pressed="true"] .car-pause-ico { width: 0; height: 0; border: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin: -6px 0 0 -4px; }
@media (max-width: 820px) {
  .car-btn { width: 40px; height: 40px; top: calc(50% - 20px - 22px); }
  .car-prev { left: 8px; }
  .car-next { right: 8px; }
}

/* ---------- Llegada a una sección desde el menú ---------- */
@keyframes land { 0% { transform: translateY(18px) scale(0.97); opacity: 0.35; } 100% { transform: none; opacity: 1; } }
.is-landing { animation: land 0.9s var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { .is-landing { animation: none; } }
