/* Arrow Reveal Button — vanilla port of the expanding-badge CTA */

.btn-ar{
  --ar-ease:cubic-bezier(0.44, 0, 0.56, 1);
  --ar-dur:0.46s;
  --ar-h:56px;
  --ar-badge:40px;
  --ar-icon:18px;
  --ar-gap:14px;
  --ar-pad-y:8px;
  --ar-pad-x:28px;
  --ar-pad-badge:8px;
  --ar-scale:1;
  --ar-x:0px;
  --ar-radius:999px;
  --ar-pill:#8B4513;
  --ar-label:#fff;
  --ar-badge-bg:#6F370F;
  --ar-icon-fg:#fff;
  --ar-border:transparent;
  --ar-shadow:0 10px 24px rgba(0,0,0,0.16);
  --ar-focus:#8B4513;

  position:relative;
  display:inline-flex;
  flex-direction:row-reverse;
  align-items:center;
  gap:var(--ar-gap);
  height:var(--ar-h);
  min-height:var(--ar-h);
  padding:var(--ar-pad-y) var(--ar-pad-x) var(--ar-pad-y) var(--ar-pad-badge);
  box-sizing:border-box;
  border:0;
  border-radius:var(--ar-radius);
  background:var(--ar-pill);
  color:var(--ar-label);
  font-family:inherit;
  font-weight:700;
  font-size:19px;
  letter-spacing:.01em;
  line-height:1;
  text-decoration:none;
  cursor:pointer;
  overflow:hidden;
  isolation:isolate;
  box-shadow:var(--ar-shadow);
  transform:scale(1);
  transition:transform var(--ar-dur) var(--ar-ease), background-color var(--ar-dur) var(--ar-ease), color var(--ar-dur) var(--ar-ease), box-shadow var(--ar-dur) var(--ar-ease);
  -webkit-tap-highlight-color:transparent;
  appearance:none;
  -webkit-appearance:none;
}
.btn-ar::before{display:none!important} /* kill legacy .btn wash */

.btn-ar--sm{
  --ar-h:48px;
  --ar-badge:34px;
  --ar-icon:16px;
  --ar-pad-x:20px;
  --ar-gap:12px;
  font-size:16px;
}

/* Primary: #8B4513 fill */
.btn-ar--primary{
  --ar-pill:#8B4513;
  --ar-label:#FFFFFF;
  --ar-badge-bg:#6F370F;
  --ar-icon-fg:#FFFFFF;
  --ar-border:transparent;
  --ar-shadow:0 10px 24px rgba(0,0,0,0.16);
  --ar-focus:#8B4513;
}

/* Outline on dark / photo surfaces */
.btn-ar--outline-light{
  --ar-pill:transparent;
  --ar-label:#FAF3E0;
  --ar-badge-bg:#FAF3E0;
  --ar-icon-fg:#8B4513;
  --ar-border:#FAF3E0;
  --ar-shadow:0 8px 18px rgba(0,0,0,0.10);
  --ar-focus:#FAF3E0;
}

/* Outline on light surfaces */
.btn-ar--outline-dark{
  --ar-pill:transparent;
  --ar-label:#8B4513;
  --ar-badge-bg:#8B4513;
  --ar-icon-fg:#FFFFFF;
  --ar-border:#8B4513;
  --ar-shadow:0 8px 18px rgba(139,69,19,0.12);
  --ar-focus:#8B4513;
}

.btn-ar__label{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
  color:var(--ar-label);
  transform:translateX(0);
  transition:transform var(--ar-dur) var(--ar-ease), color var(--ar-dur) var(--ar-ease);
  pointer-events:none;
}
.btn-ar__short{display:none}

.btn-ar__slot{
  position:relative;
  z-index:0;
  flex:none;
  width:var(--ar-badge);
  height:var(--ar-badge);
  pointer-events:none;
}

.btn-ar__badge{
  position:absolute;
  z-index:2;
  top:50%;
  left:var(--ar-pad-badge);
  width:var(--ar-badge);
  height:var(--ar-badge);
  margin-top:calc(var(--ar-badge) / -2);
  border-radius:50%;
  background:var(--ar-badge-bg);
  transform:scale(1);
  transform-origin:center center;
  transition:transform var(--ar-dur) var(--ar-ease), background-color var(--ar-dur) var(--ar-ease);
  pointer-events:none;
  will-change:transform;
}

.btn-ar__icon{
  position:absolute;
  z-index:3;
  top:50%;
  left:calc(var(--ar-pad-badge) + var(--ar-badge) / 2);
  width:var(--ar-icon);
  height:var(--ar-icon);
  margin-top:calc(var(--ar-icon) / -2);
  margin-left:calc(var(--ar-icon) / -2);
  color:var(--ar-icon-fg);
  display:grid;
  place-items:center;
  transform:translateX(0);
  transition:transform var(--ar-dur) var(--ar-ease), color var(--ar-dur) var(--ar-ease);
  pointer-events:none;
  will-change:transform;
}
.btn-ar__icon svg{
  width:100%;
  height:100%;
  display:block;
  max-width:calc(var(--ar-badge) / 1.414);
  max-height:calc(var(--ar-badge) / 1.414);
}

/* Border overlay grows outward so the expanding badge never gaps the edge */
.btn-ar__border{
  position:absolute;
  z-index:4;
  inset:-1.5px;
  border-radius:inherit;
  border:1.5px solid var(--ar-border);
  pointer-events:none;
  box-sizing:border-box;
}
.btn-ar--primary .btn-ar__border{border-color:transparent}

.btn-ar__spinner{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.btn-ar__spinner::before{
  content:"";
  width:14px;height:14px;
  border:2px solid currentColor;
  border-right-color:transparent;
  border-radius:50%;
  animation:btn-ar-spin .7s linear infinite;
}
@keyframes btn-ar-spin{to{transform:rotate(360deg)}}
.btn-ar.is-sending .btn-ar__label-idle{display:none}
.btn-ar.is-sending .btn-ar__spinner{display:inline-flex}
.btn-ar:not(.is-sending) .btn-ar__spinner{display:none}

/* Hover / focus-visible covered state (fine pointer only) */
@media (hover:hover) and (pointer:fine){
  .btn-ar:hover .btn-ar__badge,
  .btn-ar.is-hover .btn-ar__badge,
  .btn-ar:focus-visible .btn-ar__badge{
    transform:scale(var(--ar-scale));
  }
  .btn-ar:hover .btn-ar__icon,
  .btn-ar.is-hover .btn-ar__icon,
  .btn-ar:focus-visible .btn-ar__icon{
    transform:translateX(var(--ar-x));
  }
  .btn-ar:hover .btn-ar__label,
  .btn-ar.is-hover .btn-ar__label,
  .btn-ar:focus-visible .btn-ar__label{
    transform:translateX(-8px); /* toward left badge */
  }
}

.btn-ar:focus{outline:none}
.btn-ar:focus-visible{
  outline:2px solid var(--ar-focus);
  outline-offset:3px;
}

/* Press */
.btn-ar:active,
.btn-ar.is-pressed{
  transform:scale(0.97);
}

/* Reduced motion: instant colour swap, no scale/slide */
@media (prefers-reduced-motion:reduce){
  .btn-ar,
  .btn-ar__badge,
  .btn-ar__icon,
  .btn-ar__label{
    transition:background-color .01s linear, color .01s linear!important;
  }
  .btn-ar:hover .btn-ar__badge,
  .btn-ar.is-hover .btn-ar__badge,
  .btn-ar:focus-visible .btn-ar__badge,
  .btn-ar:hover .btn-ar__icon,
  .btn-ar.is-hover .btn-ar__icon,
  .btn-ar:focus-visible .btn-ar__icon,
  .btn-ar:hover .btn-ar__label,
  .btn-ar.is-hover .btn-ar__label,
  .btn-ar:focus-visible .btn-ar__label{
    transform:none!important;
  }
  .btn-ar--primary:hover,
  .btn-ar--primary.is-hover,
  .btn-ar--primary:focus-visible{
    background:#6F370F;
  }
  .btn-ar--outline-light:hover,
  .btn-ar--outline-light.is-hover,
  .btn-ar--outline-light:focus-visible{
    background:#FAF3E0;
    color:#8B4513;
  }
  .btn-ar--outline-light:hover .btn-ar__label,
  .btn-ar--outline-light.is-hover .btn-ar__label,
  .btn-ar--outline-light:focus-visible .btn-ar__label{color:#8B4513}
  .btn-ar--outline-dark:hover,
  .btn-ar--outline-dark.is-hover,
  .btn-ar--outline-dark:focus-visible{
    background:#8B4513;
    color:#fff;
  }
  .btn-ar--outline-dark:hover .btn-ar__label,
  .btn-ar--outline-dark.is-hover .btn-ar__label,
  .btn-ar--outline-dark:focus-visible .btn-ar__label{color:#fff}
  .btn-ar:active,
  .btn-ar.is-pressed{transform:none}
}

@media (max-width:768px){
  .btn-ar{
    --ar-h:48px;
    --ar-badge:34px;
    --ar-icon:16px;
    --ar-pad-x:18px;
    --ar-gap:10px;
    font-size:15px;
  }
  .btn-ar--sm{
    --ar-h:44px;
    --ar-badge:30px;
    --ar-icon:15px;
    font-size:14px;
  }
}

/* Hero CTAs under 400px: shorter primary label */
@media (max-width:399px){
  .btn-ar--quote{
    --ar-pad-x:14px;
    --ar-gap:8px;
    font-size:13px;
  }
  .btn-ar--quote .btn-ar__full{display:none}
  .btn-ar--quote .btn-ar__short{display:inline}
  .hero__actions .btn-ar{
    --ar-pad-x:12px;
    font-size:13px;
  }
}
