/*
 * Aykut Sever — Footer Developer Signature UI Kit
 * Reusable, dependency-free, responsive, accessible.
 * Visual source adapted from MEGAMIST footer signature.
 * Namespace: .as-signature
 */

.as-signature {
  --as-signature-label-color: rgba(255, 255, 255, 0.64);
  --as-signature-name-color: #ffffff;
  --as-signature-focus-color: #7dd3fc;
  --as-signature-gap: 0.5rem;
  --as-signature-name-size: clamp(1.45rem, 1.15rem + 0.55vw, 1.6rem);

  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--as-signature-gap);
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--as-signature-label-color);
  font: inherit;
  line-height: 1.25;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  isolation: isolate;
}

.as-signature,
.as-signature *,
.as-signature *::before,
.as-signature *::after {
  box-sizing: border-box;
}

.as-signature__label {
  display: inline-block;
  margin: 0;
  padding: 0;
  color: var(--as-signature-label-color);
  font-family: inherit;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.25;
  text-decoration: none;
}

.as-signature__name,
.as-signature__name:link,
.as-signature__name:visited {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  max-width: 100%;
  margin: 0;
  padding: 0.25rem 0 0.38rem;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--as-signature-name-color);
  font-family: "Segoe Script", "Brush Script MT", "URW Chancery L", cursive;
  font-size: var(--as-signature-name-size);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.18);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: opacity 160ms ease, transform 160ms ease, text-shadow 160ms ease;
}

.as-signature__name::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.08rem;
  left: 0;
  height: 1px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
  transform: scaleX(1);
  transform-origin: center;
  transition: opacity 160ms ease, transform 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .as-signature__name:hover {
    color: var(--as-signature-name-color);
    opacity: 0.94;
    transform: translateY(-1px);
    text-shadow: 0 2px 14px rgba(255, 255, 255, 0.24);
  }

  .as-signature__name:hover::after {
    opacity: 1;
    transform: scaleX(0.92);
  }
}

.as-signature__name:focus-visible {
  outline: 2px solid var(--as-signature-focus-color);
  outline-offset: 4px;
  color: var(--as-signature-name-color);
}

/* Safer wrapping on narrow footers and translated layouts. */
@media (max-width: 420px) {
  .as-signature {
    flex-wrap: wrap;
    row-gap: 0.12rem;
    white-space: normal;
  }

  .as-signature__label,
  .as-signature__name {
    flex: 0 0 auto;
  }
}

@media (max-width: 340px) {
  .as-signature {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
  }

  .as-signature__name {
    --as-signature-name-size: 1.42rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .as-signature__name,
  .as-signature__name::after {
    transition: none;
  }
}

/* Optional alignment helpers. */
.as-signature--start { justify-content: flex-start; text-align: left; }
.as-signature--center { justify-content: center; text-align: center; }
.as-signature--end { justify-content: flex-end; text-align: right; }

/* Optional light-background skin. Add .as-signature--light when footer is white/light. */
.as-signature--light {
  --as-signature-label-color: rgba(15, 23, 42, 0.62);
  --as-signature-name-color: #0f172a;
  --as-signature-focus-color: #0369a1;
}

/* Güzeller Kumlama R3: layout integration, scoped to the premium footer. */
.site-footer .footer-line > .as-signature {
  --as-signature-label-color: var(--footer-muted);
  --as-signature-name-color: var(--footer-ink);
  --as-signature-focus-color: var(--footer-accent);
  flex: 0 1 auto;
  align-self: center;
  margin-inline-start: auto;
}
.site-footer .as-signature__name { min-height: 44px; }
/* Keep keyboard-focused footer links above the existing fixed mobile actions. */
@media (max-width: 860px) {
  html { scroll-padding-block-end: calc(116px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 600px) {
  .site-footer .footer-line > .as-signature {
    align-self: flex-end;
    margin-top: 4px;
  }
}
@media (max-width: 340px) {
  .site-footer .footer-line > .as-signature { align-items: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  .site-footer .as-signature__name,
  .site-footer .as-signature__name::after { transition: none; }
  .site-footer .as-signature__name:hover { transform: none; }
}
