/* =========================================================
   Zaur Mirzaev — Instagram bio link (taplink)
   Mobile-first, single-column, designed for thumb reach.
   Same brand palette as doctor-mirzaev.ru.
   ========================================================= */

:root {
  --bg: #f7f5f1;
  --bg-elev: #ffffff;
  --bg-deep: #0f2c2a;
  --ink: #14201f;
  --ink-soft: #3a4a48;
  --muted: #6b7977;
  --line: #e3ddd2;
  --line-soft: #ece6db;

  --teal: #1f4a47;
  --teal-deep: #0f2c2a;
  --sand: #d9c9a8;
  --sand-soft: #e8dcc1;

  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --shadow-sm: 0 1px 2px rgba(15, 44, 42, 0.04), 0 2px 8px rgba(15, 44, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 44, 42, 0.08), 0 2px 6px rgba(15, 44, 42, 0.05);
  --shadow-lg: 0 24px 60px rgba(15, 44, 42, 0.12), 0 4px 12px rgba(15, 44, 42, 0.06);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  /* Soft warm gradient — premium feel without being loud */
  background-image:
    radial-gradient(1200px 600px at 50% -200px, rgba(217, 201, 168, 0.35), transparent 60%),
    radial-gradient(800px 400px at 50% 100%, rgba(31, 74, 71, 0.06), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

a, button { font-family: inherit; touch-action: manipulation; }
img { max-width: 100%; height: auto; display: block; }

/* ---------- Layout ---------- */
.page {
  max-width: 460px;
  margin: 0 auto;
  padding:
    calc(28px + var(--safe-top))
    max(20px, var(--safe-right))
    calc(40px + var(--safe-bottom))
    max(20px, var(--safe-left));
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding-top: 8px;
}
.avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  margin: 0 auto;
  object-fit: cover;
  object-position: 50% 18%;
  border: 3px solid var(--bg-elev);
  box-shadow: var(--shadow-md);
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 18px 0 6px;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--teal); font-weight: 400; }
.hero__role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.hero__credentials {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  text-wrap: balance;
}

/* ---------- Stat strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 24px 0 28px;
  padding: 18px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.stat { text-align: center; }
.stat .v {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1;
  color: var(--teal);
  letter-spacing: -0.01em;
}
.stat .l {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* ---------- Primary CTA ---------- */
.cta-primary {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--teal-deep);
  color: #f0ece2;
  padding: 18px 22px;
  border-radius: 18px;
  text-decoration: none;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .2s ease;
  min-height: 64px;
}
.cta-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 0% 0%, rgba(217, 201, 168, 0.18), transparent 60%);
  pointer-events: none;
}
.cta-primary > * { position: relative; }
.cta-primary__ico {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--teal-deep);
  display: grid; place-items: center;
  flex: none;
}
.cta-primary__lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand);
  display: block;
  margin-bottom: 2px;
}
.cta-primary__title {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.cta-primary__title b { font-weight: 500; }
.cta-primary__price {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--sand);
  flex: none;
}

/* ---------- Link cards ---------- */
.section-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 12px 4px;
}

.cards { display: flex; flex-direction: column; gap: 10px; }

.card {
  display: grid;
  grid-template-columns: 44px 1fr 14px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink);
  min-height: 64px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .2s ease;
}
.card__ico {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sand-soft);
  color: var(--teal-deep);
  flex: none;
}
.card__ico--wa { background: #25d36620; color: #128c50; }
.card__ico--phone { background: rgba(31,74,71,0.12); color: var(--teal); }
.card__ico--site { background: rgba(31,74,71,0.10); color: var(--teal); }
.card__ico--star { background: rgba(212,160,23,0.15); color: #b58712; }
.card__ico--map { background: rgba(184,122,106,0.15); color: var(--teal); }
.card__ico--ig { background: linear-gradient(135deg, #ffd97e, #ff709a 50%, #b14ce6); color: #fff; }

.card__body { min-width: 0; }
.card__title {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  display: block;
}
.card__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
  display: block;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__chev { color: var(--muted); font-size: 18px; line-height: 1; }

/* ---------- Schedule chip ---------- */
.schedule {
  margin-top: 22px;
  padding: 16px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.schedule__row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 13.5px;
  color: var(--ink);
}
.schedule__row + .schedule__row { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.schedule__row svg { color: var(--teal); }
.schedule__row b { font-weight: 500; }
.schedule__row .t {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------- Map ---------- */
.map-card {
  margin-top: 22px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
}
.map-card__embed {
  position: relative;
  aspect-ratio: 5/3.4;
  background: var(--sand-soft);
}
.map-card__embed iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
}
.map-card__meta {
  padding: 14px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.map-card__addr {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--ink);
}
.map-card__addr small {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 4px;
}
.map-card__route {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 999px;
  white-space: nowrap;
  flex: none;
  background: var(--bg);
}

/* ---------- Footer ---------- */
.foot {
  text-align: center;
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.7;
}
.foot a { color: var(--teal); text-decoration: none; border-bottom: 1px solid currentColor; }
.foot__divider {
  display: block;
  width: 32px;
  height: 1px;
  background: var(--line);
  margin: 14px auto;
  border: 0;
}

/* ---------- Hover (only on real hover devices) ---------- */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-1px);
    border-color: var(--teal);
    box-shadow: var(--shadow-md);
  }
  .cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
  }
  .map-card__route:hover {
    background: var(--teal);
    color: var(--bg);
    border-color: var(--teal);
  }
}

/* ---------- Touch-active state (subtle press feedback) ---------- */
.card:active, .cta-primary:active {
  transform: scale(0.99);
  transition-duration: .05s;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Tablet (≥640px) — slight breathing room ---------- */
@media (min-width: 640px) {
  .page { max-width: 480px; padding-top: 48px; }
  .avatar { width: 144px; height: 144px; }
  .hero h1 { font-size: 36px; }
}

/* ---------- Tiny phones ---------- */
@media (max-width: 360px) {
  .page { padding: 20px 14px; }
  .avatar { width: 116px; height: 116px; }
  .hero h1 { font-size: 28px; }
  .cta-primary { padding: 16px 18px; gap: 12px; }
  .cta-primary__title { font-size: 19px; }
  .cta-primary__price { font-size: 12px; }
  .card { padding: 12px 14px; gap: 12px; }
  .stat .v { font-size: 19px; }
}

/* Force light theme regardless of system / Instagram in-app dark mode.
   Brand identity stays consistent (sand on teal) on every device.
   color-scheme: only-light tells the UA not to recolour form controls,
   scrollbars, or default text-shadows in the dark direction. */
:root { color-scheme: only light; }
