@font-face {
  font-family: 'Golos Text';
  src: url('/taplink/assets/fonts/GolosText-Regular.ttf') format('truetype');
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: 'Golos Text';
  src: url('/taplink/assets/fonts/GolosText-SemiBold.ttf') format('truetype');
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

@font-face {
  font-family: 'Montserrat';
  src: url('/taplink/assets/fonts/Montserrat-Regular-subset.ttf') format('truetype');
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  color-scheme: light;
  --brand-brown: #532814;
  --brand-brown-deep: #3f1d0e;
  --brand-gold: #ffb814;
  --brand-gold-soft: #ffe8ad;
  --page: #fff8e9;
  --surface: #ffffff;
  --surface-soft: #fffaf1;
  --border: #eadbbe;
  --muted: #78665d;
  --shadow: rgba(83, 40, 20, 0.1);
  --focus: #8d470f;
  --radius-card: 28px;
  --radius-control: 20px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--page);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 6%, rgba(255, 184, 20, 0.2), transparent 28rem),
    radial-gradient(circle at 92% 94%, rgba(83, 40, 20, 0.08), transparent 31rem), var(--page);
  color: var(--brand-brown);
  font-family:
    'Montserrat',
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--brand-brown-deep);
  color: white;
  font:
    600 14px/1.2 'Golos Text',
    sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-130%);
}

.skip-link:focus {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.page-decoration {
  position: fixed;
  z-index: 0;
  width: min(62vw, 540px);
  aspect-ratio: 1;
  border: 1px solid rgba(83, 40, 20, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.page-decoration::before,
.page-decoration::after {
  position: absolute;
  border: inherit;
  border-radius: inherit;
  content: '';
  inset: 13%;
}

.page-decoration::after {
  inset: 27%;
}

.page-decoration_top {
  top: -30vw;
  right: -26vw;
}

.page-decoration_bottom {
  bottom: -34vw;
  left: -28vw;
}

.profile-card {
  position: relative;
  z-index: 1;
  width: min(100%, 472px);
  padding: clamp(28px, 7vw, 44px) clamp(18px, 6vw, 32px) 24px;
  overflow: hidden;
  border: 1px solid rgba(234, 219, 190, 0.9);
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 30px 80px var(--shadow),
    0 5px 18px rgba(83, 40, 20, 0.05);
  backdrop-filter: blur(14px);
}

.profile-header {
  position: relative;
  z-index: 1;
  text-align: center;
}

.brand-mark {
  width: min(56vw, 210px);
  margin: 0 auto 18px;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.header-controls {
  width: 100%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-switch {
  flex: 0 0 auto;
  min-height: 50px;
  padding: 2px;
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.92);
  box-shadow: inset 0 1px 0 white;
}

.language-button {
  min-width: 48px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font:
    600 11px/1 'Golos Text',
    sans-serif;
  letter-spacing: 0.07em;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.language-button:hover {
  color: var(--brand-brown);
}

.language-button:active {
  transform: scale(0.96);
}

.language-button.is-active {
  background: var(--brand-brown);
  box-shadow:
    0 3px 8px rgba(83, 40, 20, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: white;
}

.language-button:focus-visible {
  outline: 3px solid rgba(141, 71, 15, 0.3);
  outline-offset: 2px;
}

h1 {
  margin: 0;
  color: var(--brand-brown);
  font:
    600 clamp(31px, 9vw, 42px) / 1.08 'Golos Text',
    sans-serif;
  letter-spacing: -0.035em;
}

.profile-description {
  max-width: 36ch;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.link-list {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  display: grid;
  gap: 12px;
}

.link-card {
  --specular-opacity: 0;
  --specular-x: 50%;
  --specular-y: 50%;
  position: relative;
  isolation: isolate;
  min-height: 76px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow:
    0 4px 0 #e8d9c0,
    0 13px 27px rgba(83, 40, 20, 0.075);
  text-decoration: none;
  transform: translate3d(0, 0, 0);
  transform-style: preserve-3d;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background-color 180ms ease;
  will-change: transform;
}

.link-card::before {
  position: absolute;
  z-index: 0;
  top: -45%;
  bottom: -45%;
  left: -62%;
  width: 38%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.16) 20%,
    rgba(255, 255, 255, 0.76) 50%,
    rgba(255, 255, 255, 0.18) 80%,
    transparent
  );
  content: '';
  opacity: 0;
  pointer-events: none;
  transform: skewX(-18deg);
}

.link-card::after {
  position: absolute;
  z-index: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(83, 40, 20, 0.055);
  content: '';
  inset: 0;
  pointer-events: none;
}

.link-card > * {
  position: relative;
  z-index: 1;
}

.link-card > .specular-glow {
  position: absolute;
  z-index: 3;
  border-radius: inherit;
  background: radial-gradient(
    112px circle at var(--specular-x) var(--specular-y),
    rgba(255, 255, 255, 0.35) 0,
    rgba(255, 255, 255, 0.14) 33%,
    transparent 72%
  );
  content: '';
  inset: 0;
  opacity: var(--specular-opacity);
  pointer-events: none;
  transition: opacity 90ms linear;
  will-change: opacity, background;
}

.link-card > .specular-glow::after {
  position: absolute;
  padding: 1.5px;
  border-radius: inherit;
  background: radial-gradient(
    92px circle at var(--specular-x) var(--specular-y),
    rgba(255, 255, 255, 0.98) 0,
    rgba(255, 255, 255, 0.72) 30%,
    rgba(255, 255, 255, 0.12) 66%,
    transparent 78%
  );
  content: '';
  inset: 0;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.link-card_primary > .specular-glow {
  background: radial-gradient(
    125px circle at var(--specular-x) var(--specular-y),
    rgba(255, 255, 255, 0.48) 0,
    rgba(255, 255, 255, 0.2) 31%,
    transparent 72%
  );
}

.link-card:hover {
  border-color: #d8bd87;
  background: #fffdf8;
  box-shadow:
    0 6px 0 #e1cda9,
    0 19px 34px rgba(83, 40, 20, 0.12);
  transform: translate3d(0, -3px, 0);
}

.link-card:not(.link-card_primary):hover::before {
  animation: card-sheen 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.link-card:active {
  box-shadow:
    0 1px 0 #e8d9c0,
    0 5px 13px rgba(83, 40, 20, 0.08);
  transform: translate3d(0, 3px, 0) scale(0.985);
  transition-duration: 80ms;
}

.link-card:focus-visible {
  --specular-opacity: 0.78 !important;
  --specular-x: 76%;
  --specular-y: 18%;
  outline: 3px solid rgba(141, 71, 15, 0.3);
  outline-offset: 3px;
}

.link-card_primary {
  min-height: 82px;
  border-color: #e9a900;
  background: linear-gradient(135deg, #ffd96a 0%, var(--brand-gold) 100%);
  box-shadow:
    0 5px 0 #d99900,
    0 18px 34px rgba(255, 184, 20, 0.29),
    0 7px 15px rgba(83, 40, 20, 0.1);
}

.link-card_primary:hover {
  border-color: #d89e00;
  background: linear-gradient(135deg, #ffdc76 0%, #ffb30a 100%);
  box-shadow:
    0 7px 0 #cc9000,
    0 23px 39px rgba(255, 184, 20, 0.34),
    0 9px 18px rgba(83, 40, 20, 0.12);
}

.link-card_primary:active {
  box-shadow:
    0 1px 0 #d99900,
    0 7px 16px rgba(255, 184, 20, 0.23),
    0 4px 10px rgba(83, 40, 20, 0.09);
  transform: translate3d(0, 4px, 0) scale(0.985);
}

.link-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 5px 13px rgba(83, 40, 20, 0.09);
  color: var(--brand-brown);
  transform: translateZ(12px);
  transition:
    box-shadow 180ms ease,
    transform 180ms ease;
}

.link-icon_city {
  border: 1px solid rgba(83, 40, 20, 0.1);
  background: rgba(255, 255, 255, 0.94);
}

.link-icon_2gis img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.link-card:hover .link-icon {
  box-shadow:
    inset 0 1px 0 white,
    0 8px 17px rgba(83, 40, 20, 0.12);
  transform: translateZ(18px) scale(1.035);
}

.link-card:active .link-icon {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 2px 6px rgba(83, 40, 20, 0.08);
  transform: translateZ(4px) scale(0.98);
}

.link-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.link-copy strong {
  overflow-wrap: anywhere;
  font:
    600 17px/1.25 'Golos Text',
    sans-serif;
}

.link-copy small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.link-card_primary .link-copy small {
  color: rgba(83, 40, 20, 0.74);
  font-variant-numeric: tabular-nums;
}

.link-arrow,
.external-arrow {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--brand-brown);
  transform: translateZ(10px);
  transition: transform 180ms ease;
}

.link-arrow {
  background: rgba(255, 255, 255, 0.46);
}

.link-arrow svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.external-arrow svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-card:hover .link-arrow {
  transform: translate3d(2px, 0, 16px);
}

.link-card:hover .external-arrow {
  transform: translate3d(2px, -2px, 16px);
}

.link-card:active .link-arrow,
.link-card:active .external-arrow {
  transform: translate3d(0, 0, 3px);
}

.section-label {
  margin: 12px 4px 0;
  color: var(--brand-brown);
  font:
    600 13px/1.3 'Golos Text',
    sans-serif;
  letter-spacing: 0.025em;
}

.profile-footer {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.profile-footer p {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border));
}

.footer-line:last-child {
  background: linear-gradient(90deg, var(--border), transparent);
}

@media (max-width: 520px) {
  html {
    background-color: var(--brand-gold);
  }

  body {
    padding: 0;
    display: block;
    background-color: var(--brand-gold);
    background-image: url('/taplink/assets/mobile-background.png?v=20260806-1');
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
  }

  .profile-card {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(30px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .page-decoration {
    display: none;
  }
}

@media (max-width: 350px) {
  .profile-card {
    padding-right: 12px;
    padding-left: 12px;
  }

  .link-card {
    grid-template-columns: 46px minmax(0, 1fr) 34px;
    gap: 9px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .link-icon {
    width: 46px;
    height: 46px;
  }

  .link-copy strong {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .profile-header,
  .link-card,
  .profile-footer {
    animation: reveal 420ms backwards cubic-bezier(0.22, 1, 0.36, 1);
  }

  .link-card:nth-of-type(1) {
    animation-delay: 70ms;
  }

  .link-card:nth-of-type(2) {
    animation-delay: 110ms;
  }

  .link-card:nth-of-type(3) {
    animation-delay: 150ms;
  }

  .profile-footer {
    animation-delay: 190ms;
  }

  .link-card::before {
    animation: card-sheen-auto 8.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
    will-change: transform, opacity;
  }

  .link-card_primary::before {
    animation-delay: 0.6s;
  }

  .link-card_aktau::before {
    animation-delay: 3.3s;
  }

  .link-card_astana::before {
    animation-delay: 6s;
  }

  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes card-sheen {
    0% {
      opacity: 0;
      transform: translate3d(0, 0, 0) skewX(-18deg);
    }

    24% {
      opacity: 0.5;
    }

    100% {
      opacity: 0;
      transform: translate3d(440%, 0, 0) skewX(-18deg);
    }
  }

  @keyframes card-sheen-auto {
    0%,
    2% {
      opacity: 0;
      transform: translate3d(0, 0, 0) skewX(-18deg);
    }

    5% {
      opacity: 0.72;
    }

    16% {
      opacity: 0;
      transform: translate3d(440%, 0, 0) skewX(-18deg);
    }

    17%,
    100% {
      opacity: 0;
      transform: translate3d(440%, 0, 0) skewX(-18deg);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .link-card,
  .link-card:hover,
  .link-card:active,
  .link-card .link-icon,
  .link-card:hover .link-icon,
  .link-card:active .link-icon,
  .link-card .link-arrow,
  .link-card .external-arrow {
    transform: none;
  }

  .link-card::before {
    display: none;
  }

  .link-card > .specular-glow {
    display: none;
  }
}
