/* Digital business card. Shared GMS paint and behavior; page-owned composition. */
.links-main {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}
.links-page #main-content.links-main { --page-grid-line: transparent; }
.links-fit { width: 100%; max-width: 540px; }

.links-card {
  --links-card-radius: 28px;
  position: relative;
  width: 100%;
  max-width: 540px;
  padding: 20px 32px 18px;
  border: 1px solid transparent;
  border-radius: var(--links-card-radius);
  box-shadow: var(--gloss-shadow);
}

/* Racing accent follows the printed business card. */
.links-racing-accent {
  position: absolute;
  top: -4px;
  left: calc(var(--links-card-radius) - 1px);
  width: calc(100% - var(--links-card-radius) - var(--links-card-radius) + 2px);
  height: 8px;
  z-index: 1;
  fill: #ed1c24;
  pointer-events: none;
}

.links-toolbar { display: flex; justify-content: flex-end; }
.links-identity { text-align: center; padding: 8px 0 8px; }
.links-logo { display: block; width: 240px; max-width: 100%; margin: 0 auto 6px; }
.links-logo img { width: 100%; }
.links-identity h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.08rem, 4.32vw, 1.44rem);
  line-height: 1.45;
  font-weight: 400;
  text-wrap: balance;
}

.links-primary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; width: 100%; max-width: 380px; margin-inline: auto; }
.links-primary .hero-btn { justify-content: center; min-height: 52px; padding: 8px 10px; border-radius: 26px; letter-spacing: 0; font-size: .9rem; }
.links-page.site-polish.gloss-theme .links-primary .hero-btn {
  --home-card-active: 0;
  overflow: visible; border: 1px solid transparent; color: var(--color-white);
  background: rgba(17,17,17,calc(.76 + var(--home-card-active) * .14));
  box-shadow: inset 0 1px 1px #ffffff1f,
    inset 0 calc(-14px - var(--home-card-active) * 7px) calc(24px + var(--home-card-active) * 22px) -16px #ffffff1f;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.links-primary .hero-btn::after { content: none; }
.links-card::before,
.links-primary .hero-btn::before {
  position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.links-card::before,
.links-primary .hero-btn::before {
  content: ""; padding: 1px;
  background: linear-gradient(140deg,rgba(255,255,255,.62) 0%,rgba(255,255,255,.06) 38%,rgba(255,255,255,0) 60%,rgba(255,255,255,.34) 100%);
  opacity: .58;
}
.links-primary .hero-btn::before { transition: opacity .3s ease; }
.links-page.site-polish.gloss-theme .links-primary .hero-btn:is(.is-home-card-active,:focus-visible,:active,.is-touch-pressed) { --home-card-active: 1; }
.links-primary .hero-btn:is(.is-home-card-active,:focus-visible)::before,
.links-primary .hero-btn:is(.is-home-card-active,:focus-visible) .home-card-edge { opacity: 1; }
.links-primary .hero-btn:focus-visible { outline: 2px solid #c4cbd6; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .links-primary .hero-btn::before { transition: none; }
}
.links-primary .ico { font-size: 1.2rem; }
.links-call .ico { transition: color 180ms ease; }
.links-call:is(:focus-visible, :active, .is-touch-pressed, .is-card-in-view) .ico { color: var(--color-whatsapp); }
.links-call:is(:active, .is-touch-pressed) .ico { transition-duration: 0s; }
@media (hover: hover) {
  .links-call:hover .ico { color: var(--color-whatsapp); }
}

/* All destination rows share the existing social haptics and brand colors. */
.links-destinations {
  --links-divider: linear-gradient(90deg, transparent, var(--glass-border) 16%, var(--glass-border) 84%, transparent);
  position: relative;
  width: 100%; max-width: 280px; margin: 20px auto 0;
  border-top: 1px solid transparent;
}
.links-destinations::before,
.links-page .links-destination::after {
  content: '';
  position: absolute;
  left: 0; right: 0; height: 1px;
  background: var(--links-divider);
  pointer-events: none;
}
.links-destinations::before { top: -1px; }
.links-page .links-destination::after { bottom: -1px; }
.links-page .links-destination {
  --links-row-rgb: var(--social-rgb, 224, 35, 30);
  --links-arrow-rgb: var(--links-row-rgb);
  --links-arrow-glow: 0;
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 16px;
  align-items: center;
  justify-items: start;
  text-align: left;
  gap: 14px;
  width: 100%;
  height: auto;
  min-height: 67px;
  padding: 9px 16px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  color: var(--color-text);
  background: transparent;
  box-shadow: none;
  transition: background var(--transition), color var(--transition);
}
.links-page .footer-social.links-social-list { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 0; margin: 0; }
.links-page.social-hover-theme .links-destinations .social-haptic-target { display: grid; width: 100%; min-width: 0; }
.links-page.social-hover-theme .footer-social .links-destination { background: transparent; box-shadow: none; }
.links-page.social-hover-theme .footer-social .links-destination:is(:hover, :focus-visible, .is-touch-pressed) {
  transform: none;
  color: var(--color-white);
  border-color: transparent;
  background: var(--gloss-control);
  box-shadow: none;
}
.links-page .links-destination[href]:is(:hover, :focus-visible, :active, .is-touch-pressed) { background: var(--gloss-control); }
.links-page .links-email { --links-row-rgb: 234, 67, 53; }
.links-page .links-maps { --links-row-rgb: 52, 168, 83; }
.links-page .links-save { --links-row-rgb: 148, 163, 184; --links-arrow-rgb: 45, 212, 191; }
.links-row-title { color: var(--color-text); font-size: .96rem; font-weight: 500; line-height: 1.5; }
.links-brand-icon { display: block; width: 30px; height: 30px; object-fit: contain; }
/* Neutral glass inside each tile; brand light stays on its border and outer halo. */
.links-icon-tile {
  --tile-rgb: var(--links-row-rgb);
  --tile-strength: var(--tile-interaction, .25);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 11px;
  border: 1px solid rgba(var(--tile-rgb), calc(.1 + .55 * var(--tile-strength)));
  color: rgb(var(--tile-rgb));
  background: var(--gloss-control);
  box-shadow: var(--gloss-control-shadow),
    0 0 14px rgba(var(--tile-rgb), calc(.28 * var(--tile-strength)));
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.links-social-list [aria-label="TikTok"] .links-brand-icon { filter: drop-shadow(1px 1px 0 #fe2c55); }
.links-social-list [aria-label="Instagram"] .links-icon-tile {
  --instagram-fill: url(#social-instagram-gradient);
  box-shadow: var(--gloss-control-shadow),
    -3px -3px 12px rgba(131, 58, 180, calc(.2 * var(--tile-strength))),
    0 0 12px rgba(225, 48, 108, calc(.15 * var(--tile-strength))),
    3px 3px 12px rgba(252, 175, 69, calc(.2 * var(--tile-strength)));
}
.links-icon-tile.links-gmail-tile {
  box-shadow: var(--gloss-control-shadow),
    -3px -3px 12px rgba(66, 133, 244, calc(.2 * var(--tile-strength))),
    0 0 14px rgba(234, 67, 53, calc(.28 * var(--tile-strength))),
    3px 3px 12px rgba(52, 168, 83, calc(.1333 * var(--tile-strength)));
}
.links-icon-tile.links-maps-tile {
  box-shadow: var(--gloss-control-shadow),
    0 0 14px rgba(52, 168, 83, calc(.28 * var(--tile-strength))),
    3px 3px 12px rgba(66, 133, 244, calc(.2 * var(--tile-strength)));
}
.links-row-arrow {
  width: 16px;
  height: 16px;
  color: var(--links-arrow-color, var(--color-text-muted));
  filter: drop-shadow(0 0 5px rgba(var(--links-arrow-rgb), calc(.65 * var(--links-arrow-glow))));
  transition: color 180ms ease, filter 180ms ease;
}
.links-site-icon { border-radius: 6px; }
.links-contact-icon { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }

.links-destination:is(:focus-visible, :active, .is-touch-pressed),
.social-haptic-target:has(.social-haptic-switch:focus-visible) .links-destination {
  --tile-interaction: 1;
  --links-arrow-color: rgb(var(--links-arrow-rgb));
  --links-arrow-glow: 1;
}

@media (hover: hover) {
  .links-destination:hover,
  .social-haptic-target:hover .links-destination {
    --tile-interaction: 1;
    --links-arrow-color: rgb(var(--links-arrow-rgb));
    --links-arrow-glow: 1;
  }
}

.links-destination:is(:active, .is-touch-pressed) .links-row-arrow { transition-duration: 0s; }

@media (prefers-reduced-motion: no-preference) {
  .links-social-list .links-row-title { transform-origin: left center; transition: transform 180ms ease; }
  .links-social-list .links-destination:is(:focus-visible, :active, .is-touch-pressed) .links-row-title,
  .links-social-list .social-haptic-target:has(.social-haptic-switch:focus-visible) .links-row-title {
    transform: scale(1.045);
  }
  .links-destination:is(:focus-visible, :active, .is-touch-pressed) .links-icon-tile,
  .social-haptic-target:has(.social-haptic-switch:focus-visible) .links-icon-tile {
    transform: translateY(-4px) rotate(6deg) scale(1.12, 1.05);
  }
  .links-destination:is(:active, .is-touch-pressed) .links-icon-tile {
    transition-duration: 0s;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .links-social-list .links-destination:hover .links-row-title,
  .links-social-list .social-haptic-target:hover .links-row-title {
    transform: scale(1.045);
  }
  .links-destination:hover .links-icon-tile,
  .social-haptic-target:hover .links-icon-tile {
    transform: translateY(-4px) rotate(6deg) scale(1.12, 1.05);
  }
}

@media (max-width: 540px) {
  .links-main { padding: 8px; }
  .links-card { --links-card-radius: 26px; padding: 7px 22px 8px; }
  .links-identity { padding: 7px 0 8px; }
  .links-logo { width: 220px; }
  .links-primary { max-width: 336px; }
  .links-primary .hero-btn { min-height: 44px; padding: 8px 10px; }
  .links-destinations { margin-top: 12px; }
  .links-page .links-destination { min-height: 61px; padding-block: 6px; }
  /* Preserve the business card composition; shared language control owns paint. */
  .links-page .links-toolbar .lang-switch {
    border: 0;
  }

}

@media (max-width: 350px) {
  .links-fit:not([data-links-fit]) .links-card { padding-inline: 16px; }
  .links-fit:not([data-links-fit]) .links-primary { gap: 8px; }
  .links-fit:not([data-links-fit]) .links-primary .hero-btn { gap: 7px; font-size: .83rem; padding-inline: 8px; }
  .links-page .links-fit:not([data-links-fit]) .links-destination { gap: 10px; padding-inline: 10px; }
}

@media (forced-colors: active) {
  .links-card { border-color: CanvasText; box-shadow: none; }
  .links-card::before,
  .links-destinations::before,
  .links-page .links-destination::after { display: none; }
  .links-destinations,
  .links-page .links-destination,
  .links-page.social-hover-theme .footer-social .links-destination:is(:hover, :focus-visible, .is-touch-pressed) { border-color: CanvasText; }
  .links-page.site-polish.gloss-theme .links-primary .hero-btn { color: LinkText; background: Canvas; border-color: LinkText; box-shadow: none; }
  .links-primary .hero-btn::before { display: none; }
  .links-page .links-destination[href] { color: LinkText; }
  .links-page .links-destination .links-icon-tile { --instagram-fill: currentColor; background: Canvas; box-shadow: none; color: LinkText; }
  .links-page .links-icon-tile .links-brand-icon { filter: none; }
  .links-row-title, .links-row-arrow { color: inherit; }
  .links-row-arrow { filter: none; }
}
