/* Final site-wide polish: social icons and unified button typography. */

:root {
  --ying-button-font-size: 17px;
}

/* CTA and text-button labels use one readable size across every template. */
.withying-site-header .nav-cta,
.withying-site-header .mobile-cta,
.withying-site-footer .footer-cta-btn,
.ying-template-home .btn-hero-primary,
.ying-template-home .btn-nl,
.ying-template-home .svc-cta,
.ying-template-home .btn-text,
.ying-template-service .btn,
.ying-template-blog .filter-tab,
.ying-template-blog .btn-nl,
.ying-template-blog .btn-load,
.ying-template-article .btn-cta-main,
.ying-template-story .story-btn,
.ying-template-services-overview .services-overview-btn,
.ying-template-services-overview .services-overview-card__cta,
.ying-template-services-overview .services-overview-soon-card__cta,
.ying-template-services-overview .services-overview-soon-notify,
.ying-template-services-overview .services-overview-newsletter__form button,
.ying-template-services-overview .services-overview-newsletter-form a,
.wp-block-button__link,
button[type="submit"],
input[type="submit"],
input[type="button"] {
  font-size: var(--ying-button-font-size) !important;
}

.ying-template-blog .filter-tab {
  font-size: calc(var(--ying-button-font-size) - 2px) !important;
}

.withying-site-header .nav-cta {
  min-height: 41px;
  padding: 10px 19px;
  font-size: calc(var(--ying-button-font-size) - 3px) !important;
}

.withying-site-footer .footer-cta-btn {
  min-height: 48px;
  padding: 0 20px;
  font-size: 14px !important;
}

/* Newsletter banners keep their CTA in the reading flow, below the copy. */
.ying-template-blog .nl-banner {
  align-items: start;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
}

.ying-template-blog .nl-banner-form--button-only {
  align-items: flex-start;
  width: fit-content;
}

/* Home hero secondary action: text link with underline and arrow. */
.ying-template-home .hero-btns {
  align-items: center;
  gap: 22px;
}

.ying-template-home .btn-hero-ghost {
  position: relative;
  min-height: 0;
  padding: 0 34px 8px 0;
  color: rgba(232, 213, 176, 0.94);
  background: transparent !important;
  border: 0;
  border-bottom: 1px solid rgba(232, 213, 176, 0.58);
  border-radius: 0;
  box-shadow: none;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1.5px;
  line-height: 1.25;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ying-template-home .btn-hero-ghost::after {
  content: "→";
  position: absolute;
  right: 0;
  bottom: 7px;
  color: currentColor;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.ying-template-home .btn-hero-ghost:hover,
.ying-template-home .btn-hero-ghost:focus-visible {
  color: #faf9f6;
  background: transparent !important;
  border-color: rgba(250, 249, 246, 0.9);
  box-shadow: none;
  transform: translateX(2px);
}

.ying-template-home .btn-hero-ghost:hover::after,
.ying-template-home .btn-hero-ghost:focus-visible::after {
  transform: translateX(4px);
}

.ying-template-home .btn-hero-ghost:focus-visible {
  outline: 2px solid rgba(232, 213, 176, 0.75);
  outline-offset: 6px;
}

/* Home hero title is authored as two lines; desktop should not rewrap each line. */
@media (min-width: 769px) {
  .ying-template-home .hero-content {
    max-width: min(920px, 72vw);
  }

  .ying-template-home .hero-title {
    max-width: none;
    font-size: clamp(46px, 5vw, 60px);
    white-space: nowrap;
  }
}

.ying-template-home .about-img--mobile {
  display: none;
}

.ying-template-home .nl-quote--mobile {
  display: none;
}

.ying-template-service .hero-image--mobile {
  display: none;
}

/* Clean, optical-size matched social marks in the footer palette. */
.withying-site-footer .footer-social-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 0;
  border-radius: 0;
  color: var(--ying-sand, #e8d5b0);
}

.withying-site-footer .footer-social-icon svg {
  display: block;
  width: 23px;
  height: 23px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.withying-site-footer .footer-social-icon__dot {
  fill: currentColor;
  stroke: none;
}

/* Retire the old CSS-drawn glyphs after switching to inline SVG. */
.withying-site-footer .footer-social--instagram .footer-social-icon::before,
.withying-site-footer .footer-social--instagram .footer-social-icon::after,
.withying-site-footer .footer-social--threads .footer-social-icon::before,
.withying-site-footer .footer-social--linkedin .footer-social-icon::before {
  content: none;
}

.withying-site-footer .footer-social:hover .footer-social-icon {
  color: rgba(250, 249, 246, 0.96);
}

/* Digital products become fully visible and clickable when enabled in ACF. */
.ying-template-services-overview .services-overview-soon-card--active {
  display: block;
  opacity: 1;
  color: inherit;
  text-decoration: none;
  border-color: rgba(158, 74, 30, 0.28);
  box-shadow: 0 14px 34px rgba(28, 26, 20, 0.07);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ying-template-services-overview .services-overview-soon-card--active:hover {
  transform: translateY(-4px);
  border-color: rgba(158, 74, 30, 0.55);
  box-shadow: 0 20px 44px rgba(28, 26, 20, 0.12);
}

.ying-template-services-overview .services-overview-soon-card--active .services-overview-soon-badge {
  color: #9e4a1e;
  border-color: rgba(158, 74, 30, 0.35);
}

.ying-template-services-overview .services-overview-soon-card--active .services-overview-soon-notify {
  color: #9e4a1e;
}

.ying-template-services-overview .services-overview-soon-card--active:focus-visible {
  outline: 2px solid #9e4a1e;
  outline-offset: 4px;
}

/* Newsletter CTA belongs to the copy flow, directly below its paragraph. */
.ying-template-services-overview .services-overview-newsletter-inner {
  display: block;
}

.ying-template-services-overview .services-overview-newsletter-form--button-only {
  margin-top: 24px;
}

@media (max-width: 900px) {
  .withying-site-header .mobile-cta {
    display: none;
  }
}

@media (max-width: 768px) {

  .ying-template-blog .nl-banner-form--button-only,
  .ying-template-blog .nl-banner-form--button-only .btn-nl {
    width: fit-content;
  }

  /* Keep the compact credibility strip focused on its first two items. */
  .ying-template-home .cred-item:nth-child(n + 3),
  .ying-template-service .trust-item:nth-child(n + 3) {
    display: none;
  }

  .ying-template-home .cred-item:nth-child(2),
  .ying-template-service .trust-item:nth-child(2) {
    border-right: 0;
  }

  /* Mobile footer keeps only the copyright line. */
  .withying-site-footer .footer-bottom-links {
    display: none;
  }

  .withying-site-footer .footer-column--cta {
    display: none;
  }

  .ying-template-home .about-img--desktop {
    display: none;
  }

  .ying-template-home .about-img--mobile {
    display: block;
    aspect-ratio: 1.2 / 1;
    margin: 0 0 28px;
    overflow: visible;
  }

  .ying-template-home .about-img--mobile img {
    aspect-ratio: 1.2 / 1;
    height: auto;
    object-fit: cover;
  }

  .ying-template-home .about-img--mobile .about-img-caption {
    position: static;
    padding: 18px 0 0;
    color: #77716a;
    background: none;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 5px;
  }

  .ying-template-home .nl-stat-row,
  .ying-template-home .nl-quote {
    display: none;
  }

  .ying-template-home .btn-hero-ghost {
    align-self: flex-start;
    border-bottom: 0;
    padding-right: 0;
    width: auto;
  }

  .ying-template-home .btn-hero-ghost::after {
    content: none;
  }

  .ying-template-service .hero-image--desktop {
    display: none;
  }

  .ying-template-service .hero {
    padding-top: 1rem;
  }

  .ying-template-service .hero-image--mobile {
    display: block;
    margin: 24px 0 24px;
  }

  .ying-template-home :is(.about-title, .nl-title, .worlds-title, .svc-title, .posts-title),
  .ying-template-service :is(.hero-title, .section-title, .pain-title, .case-title, .step-title, .about-name, .pkg-title, .bottom-cta-title),
  .ying-template-services-overview :is(.services-overview-page-title, .services-overview-section-title, .services-overview-newsletter-title),
  .ying-template-story :is(.story-hero__title, .story-chapter__title, .story-closing__title),
  .ying-template-blog :is(.blog-title, .featured-title, .post-title, .nl-banner-title),
  .ying-template-article :is(.article-title, .cta-service-title, .related-title) {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    text-wrap: balance;
    word-break: normal;
    white-space: normal;
  }

  /* Mobile headings must remain readable within the available column width. */
  .ying-template-home .hero-title,
  .ying-template-service .hero-title,
  .ying-template-story .story-hero__title,
  .ying-template-blog .blog-title,
  .ying-template-article .article-title {
    font-size: clamp(28px, 9.2vw, 40px);
  }

  .ying-template-home :is(.about-title, .nl-title, .worlds-title, .svc-title, .posts-title) {
    font-size: clamp(24px, 7.6vw, 32px);
  }

  .ying-template-service :is(.section-title, .pain-title, .case-title, .step-title, .about-name, .pkg-title, .bottom-cta-title),
  .ying-template-services-overview :is(.services-overview-page-title, .services-overview-section-title, .services-overview-newsletter-title),
  .ying-template-story :is(.story-chapter__title, .story-closing__title),
  .ying-template-blog :is(.featured-title, .post-title, .nl-banner-title),
  .ying-template-article :is(.cta-service-title, .related-title) {
    font-size: clamp(24px, 7.6vw, 32px);
  }

  .ying-template-service .bottom-cta-title {
    font-size: clamp(22px, 7vw, 30px);
    line-height: 1.25;
  }
}

.withying-back-to-top {
  position: fixed;
  right: clamp(18px, 3vw, 34px);
  bottom: clamp(18px, 3vw, 34px);
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  color: #faf9f6;
  background: #1c1a14;
  border: 1px solid rgba(250, 249, 246, 0.18);
  border-radius: 999px;
  box-shadow: 0 16px 38px rgba(28, 26, 20, 0.22);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.withying-back-to-top[hidden] {
  display: none;
}

.withying-back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (min-width: 769px) {
  .withying-back-to-top {
    right: 34px;
    bottom: 34px;
  }
}

.withying-back-to-top:hover,
.withying-back-to-top:focus-visible {
  background: #9e4a1e;
}

.withying-back-to-top:focus-visible {
  outline: 2px solid #e8d5b0;
  outline-offset: 4px;
}

.withying-back-to-top svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 768px) {
  .withying-back-to-top {
    width: 46px;
    height: 46px;
    right: 16px;
    bottom: 16px;
  }

  .withying-back-to-top svg {
    width: 22px;
    height: 22px;
  }
}
