/* Shared primary CTA treatment, approved from the light-beige capsule mockup.
   Overrides are restricted to buttons; page layout and outline CTAs stay separate.
   !important also covers consultation styles loaded after page startup. */
:root {
  --anew-button-beige: #bca99a;
  --anew-button-beige-hover: #a39381;
  --anew-button-beige-active: #92816f;
  --anew-button-on-beige: #fff;
}

/* The empty pseudo-element is decorative and survives form status-text updates. */
.anew-button {
  --anew-button-well-width: 24px;
  --anew-button-well-height: 24px;
  --anew-button-inset: 16px;
  --anew-button-gap: 12px;
  --anew-button-height: 46px;
  --anew-button-label-padding: 24px;
  --anew-button-icon-size: 24px;
  --anew-button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18 18 6M6 6h12v12'/%3E%3C/svg%3E");
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  min-width: min(220px, 100%) !important;
  max-width: 100%;
  min-height: var(--anew-button-height) !important;
  padding: 8px calc(var(--anew-button-inset) + var(--anew-button-well-width) + var(--anew-button-gap)) 8px var(--anew-button-label-padding) !important;
  border: 1px solid var(--anew-button-beige) !important;
  border-radius: 999px !important;
  font-weight: 600;
  text-align: center;
  text-decoration: none !important;
  transition: background-color .2s ease, border-color .2s ease;
}
.anew-button[data-anew-icon="phone"] {
  --anew-button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.5 3.5 4 4-2 2a16 16 0 0 0 7 7l2-2 4 4-2 2C10 19 5 14 3.5 5.5zM14 3a8 8 0 0 1 7 7M14 7a4 4 0 0 1 3 3'/%3E%3C/svg%3E");
}
.anew-button[data-anew-icon="back"] {
  --anew-button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5m6-6-6 6 6 6'/%3E%3C/svg%3E");
}
.anew-button[data-anew-icon="send"] {
  --anew-button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4 20-7ZM22 2 11 13'/%3E%3C/svg%3E");
}
.anew-button::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 50% var(--anew-button-inset) auto auto !important;
  width: var(--anew-button-well-width) !important;
  height: var(--anew-button-well-height) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent var(--anew-button-icon) center / var(--anew-button-icon-size) no-repeat !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transform: translateY(-50%) !important;
  pointer-events: none;
}
.anew-button > .anew-button__legacy-icon { display: none !important; }
.anew-button:focus-visible { outline: 2px solid #806b58; outline-offset: 4px; }
.anew-button:disabled, .anew-button[aria-disabled="true"] { cursor: not-allowed; opacity: .65; }

/* Paired secondary CTAs share the slimmer silhouette without a filled icon well. */
:is(.pill.gray, .about-button-outline, .process-button:not(.process-button-primary), .contact-primary > .contact-line, .contact-project a) {
  box-sizing: border-box;
  min-width: min(220px, 100%) !important;
  min-height: 46px !important;
  padding-block: 8px !important;
  border-radius: 999px;
}
:is(.site-header .anew-button, .site-system-header__cta.anew-button, .content-cta.anew-button, .header-contact.anew-button) {
  --anew-button-height: 44px;
  --anew-button-well-width: 20px;
  --anew-button-well-height: 20px;
  --anew-button-icon-size: 20px;
  --anew-button-inset: 12px;
  --anew-button-label-padding: 18px;
  --anew-button-gap: 12px;
  min-width: 184px !important;
}
body.airy-hero-study #home :is(.anew-button, .pill.gray) {
  min-width: 236px !important;
}
body.airy-hero-study #journey .anew-button {
  --anew-button-height: 56px;
  --anew-button-well-width: 28px;
  --anew-button-well-height: 28px;
  --anew-button-inset: 24px;
  --anew-button-label-padding: 34px;
  --anew-button-gap: 22px;
  --anew-button-icon-size: 28px;
  min-width: min(340px, 100%) !important;
}
#consultDialog[data-consult-dialog] .anew-button {
  --anew-button-height: 50px;
  --anew-button-well-width: 24px;
  --anew-button-well-height: 24px;
}
@media (max-width: 760px) {
  :is(.site-header .anew-button, .site-system-header__cta.anew-button, .content-cta.anew-button, .header-contact.anew-button) {
    --anew-button-label-padding: 12px;
    --anew-button-gap: 8px;
    min-width: 0 !important;
  }
  body.airy-hero-study #home :is(.anew-button, .pill.gray) {
    min-width: 0 !important;
    min-height: 44px !important;
  }
  body.airy-hero-study #home .anew-button {
    --anew-button-height: 44px;
    --anew-button-well-width: 20px;
    --anew-button-well-height: 20px;
    --anew-button-inset: 12px;
    --anew-button-label-padding: 10px;
    --anew-button-gap: 5px;
    --anew-button-icon-size: 19px;
  }
  body.airy-hero-study #journey .anew-button {
    --anew-button-height: 52px;
    --anew-button-well-width: 24px;
    --anew-button-well-height: 24px;
    --anew-button-inset: 18px;
    --anew-button-icon-size: 24px;
    --anew-button-label-padding: 24px;
    --anew-button-gap: 14px;
    min-width: min(300px, 100%) !important;
  }
}

:is(
  .pill.sand, .consult, .header-contact, .flow-cta, .peace-link,
  .about-button:not(.about-button-outline),
  .sp-button, .sp-link, .site-system-header__cta,
  .inner-cta, .process-link > a, .detail-cta > a,
  .architecture-final-cta a, .content-cta, .content-button,
  .process-button-primary, .contact-primary > a:not(.contact-line),
  .contact-project form button, #consultDialog[data-consult-dialog] .consult-submit
) {
  background-color: var(--anew-button-beige) !important;
  border-color: var(--anew-button-beige) !important;
  color: var(--anew-button-on-beige) !important;
  filter: none !important;
}

@media (hover: hover) {
  :is(
    .pill.sand, .consult, .header-contact, .flow-cta, .peace-link,
    .about-button:not(.about-button-outline),
    .sp-button, .sp-link, .site-system-header__cta,
    .inner-cta, .process-link > a, .detail-cta > a,
    .architecture-final-cta a, .content-cta, .content-button,
    .process-button-primary, .contact-primary > a:not(.contact-line),
    .contact-project form button, #consultDialog[data-consult-dialog] .consult-submit
  ):not(:disabled):not([aria-disabled="true"]):hover {
    background-color: var(--anew-button-beige-hover) !important;
    border-color: var(--anew-button-beige-hover) !important;
  }
}

:is(
  .pill.sand, .consult, .header-contact, .flow-cta, .peace-link,
  .about-button:not(.about-button-outline),
  .sp-button, .sp-link, .site-system-header__cta,
  .inner-cta, .process-link > a, .detail-cta > a,
  .architecture-final-cta a, .content-cta, .content-button,
  .process-button-primary, .contact-primary > a:not(.contact-line),
  .contact-project form button, #consultDialog[data-consult-dialog] .consult-submit
):not(:disabled):not([aria-disabled="true"]):active {
  background-color: var(--anew-button-beige-active) !important;
  border-color: var(--anew-button-beige-active) !important;
}
