/* ─────────────────────────────────────────────────────────────
   Азиз / SUNBLOCK — link-in-bio card. Variant 1a, "свет сквозь жалюзи".
   ───────────────────────────────────────────────────────────── */

/* Self-hosted from Google Fonts (all three families are OFL-licensed).
   Only the cyrillic and latin subsets ship; the unicode-range on each face
   means the browser still downloads only what the page actually renders.
   Filenames carry Google's content hash, so they are safe to cache forever. */

/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8-qxTPlOVgaY.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8-qxTOlOV.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* cyrillic */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/xn7gYHE41ni1AdIRggOxSuXd.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/xn7gYHE41ni1AdIRggexSg.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* cyrillic */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/EJRSQgYoZZY2vCFuvAnt66qWVyvHpA.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* latin */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/EJRSQgYoZZY2vCFuvAnt66qSVys.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Accent. Validated pairs — swap both lines together, never compute at runtime:
       #6B7F5E / #46543C   (green, default)
       #3B6E8F / #27485E   (blue)
       #A8532F / #6E361F   (terracotta)
       #4A4E45 / #30332D   (graphite)                                          */
  --accent: #6B7F5E;
  --accent-deep: #46543C;

  --ink: #23261F;
  --body: #5C6055;
  --muted: #7C8074;
  --muted-2: #8E9184;
  --chevron: #A9AC9F;

  --card: #FDFCF8;
  --tint: #EDF1E6;
  --tint-hover: #F4F6EF;
  --hairline: #E4E1D6;
  --divider: #EAE7DC;
  --page: #EFE9DC;
  --open: #5C8A5E;

  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'PT Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(.2, .8, .2, 1);
}

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

/* Inline icon sprite — carries <symbol> defs only, must never take up space. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Read by screen readers, invisible on screen. Used to say "opens in a new tab"
   on the external links, which otherwise announce with no warning. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

/* ── Page ─────────────────────────────────────────────────────
   The tinted "wall": slat bands at 177deg (1° off horizontal,
   deliberate) on a wide 15/29px rhythm — narrower bands read as a
   filmstrip edge, not as light. The bands are static; the sun glow
   that used to live in this background is now in .sun layers below,
   because gradients don't interpolate reliably.                    */
body {
  position: relative; /* containing block for the .sun layers */
  margin: 0;
  min-height: 100dvh;
  padding: 46px 34px 34px;
  font-family: var(--font-sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background-color: var(--page);
  background-image:
    repeating-linear-gradient(177deg,
      rgba(255, 255, 255, .96) 0px, rgba(255, 255, 255, .96) 15px,
      rgba(163, 146, 110, .10) 15px, rgba(163, 146, 110, .10) 44px);
}

/* ── Sunlight arriving ────────────────────────────────────────
   Own layers so only opacity/transform animate and the compositor
   can carry them — the primary target is the Instagram in-app
   browser on mid-range Android, where anything else janks.
   The bands must never animate; moving bands look like a bug.     */
.sun {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Arrives first, then hands off: pale near-white light peaks around 0.9s and
   recedes across the amber's rise, so the corner warms *into* amber rather than
   resting on pale-plus-amber. Without the handoff the resting corner sits ~4.5
   luminance above the approved static 1a.
   The explicit opacity:0 is the resting state — see the reduced-motion note. */
.sun--wash {
  opacity: 0;
  background-image: radial-gradient(115% 74% at 82% -8%,
    rgba(255, 247, 225, .85) 0%, rgba(255, 247, 225, 0) 60%);
  animation: sunWake 2.9s ease-out .1s both;
}

/* The warm-up itself: eases down and outward from the top-right. */
.sun--warm {
  transform-origin: 82% 0%;
  background-image: radial-gradient(120% 78% at 82% -8%,
    rgba(226, 199, 132, .62) 0%, rgba(226, 199, 132, 0) 64%);
  animation: sunWarm 2.6s cubic-bezier(.33, .06, .2, 1) .3s both;
}

::selection { background: #D5DDC9; }

/* Single column at every width; only the card's cap changes. */
.shell {
  max-width: 430px;
  margin-inline: auto;
}

/* ── Card ─────────────────────────────────────────────────── */
.card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border-radius: 22px;
  padding: 0 22px 26px;
  box-shadow:
    0 18px 40px -16px rgba(35, 38, 31, .30),
    0 1px 3px rgba(35, 38, 31, .06);
  animation: riseIn .55s var(--ease) both;
}

/* The same light field, carried inside the card and faded out before
   it reaches the CTA. Split in two for the same reason as the page:
   static bands underneath, animated glow over them. */
.card__light,
.card__sun {
  position: absolute;
  inset: 0 0 auto;
  height: 230px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .6) 52%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .6) 52%, rgba(0, 0, 0, 0) 100%);
}

.card__light {
  background-image:
    repeating-linear-gradient(177deg,
      rgba(255, 255, 255, 0) 0px, rgba(255, 255, 255, 0) 16px,
      rgba(170, 152, 113, .16) 16px, rgba(170, 152, 113, .16) 21px);
}

/* Follows the page glow 150ms later, so the light reads as one gesture
   crossing the card rather than two separate fades. */
.card__sun {
  transform-origin: 76% 0%;
  background-image: radial-gradient(95% 120% at 76% -14%,
    rgba(226, 199, 132, .55) 0%, rgba(226, 199, 132, 0) 62%);
  animation: sunWarm 2.6s cubic-bezier(.33, .06, .2, 1) .45s both;
}

.card__header {
  position: relative; /* sits above .card__light */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 26px;
}

/* ── Portrait ─────────────────────────────────────────────── */
.portrait {
  width: 104px;
  height: 104px;
  padding: 4px;
  border-radius: 50%;
  background: var(--card);
  box-shadow:
    0 0 0 1px var(--hairline),
    0 10px 22px -10px rgba(35, 38, 31, .35);
}

.portrait__inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #EDEAE0;
}

.portrait__inner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Identity ─────────────────────────────────────────────── */
.eyebrow {
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--accent);
}

.name {
  margin: 6px 0 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.tagline {
  margin: 9px 0 0;
  max-width: 280px;
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: var(--body);
  text-wrap: pretty;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--accent-deep);
  font-size: 11.5px;
  font-weight: 600;
}

/* Bleeds through the card's 22px side padding. */
.divider {
  height: 1px;
  margin: 22px -22px 20px;
  border: 0;
  background: var(--divider);
}

/* ── Primary CTA ──────────────────────────────────────────── */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 16px;
  border-radius: 15px;
  background: var(--accent);
  color: var(--card);
  text-decoration: none;
  transition: background .18s, transform .18s;
}

.cta__icon { flex: none; }

.cta__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.cta__title {
  font-size: 15px;
  font-weight: 800;
}

.cta__number {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  opacity: .85;
}

/* ── Secondary pair ───────────────────────────────────────── */
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 9px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 10px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  transition: border-color .18s, background .18s;
}

/* ── Link rows ────────────────────────────────────────────── */
.rows {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 18px;
}

.row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 1px solid var(--hairline);
  border-radius: 15px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .18s, background .18s;
}

.row__icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--tint);
  color: var(--accent-deep);
}

.row__text {
  flex: 1;
  min-width: 0;
}

.row__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.row__sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

/* 500 is the only JetBrains Mono weight shipped — without this the row inherits
   400 and the browser renders a synthesized weight instead. */
.row__sub--mono {
  font-family: var(--font-mono);
  font-weight: 500;
}

.row__sub--truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row__arrow {
  flex: none;
  display: block;
  color: var(--chevron); /* the <symbol> strokes with currentColor */
}

/* ── Status ───────────────────────────────────────────────── */
.status {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Fits on one line at the 430px design width. Below ~380px the hours
     drop to their own line rather than breaking mid-phrase. */
  flex-wrap: wrap;
  gap: 4px 9px;
  margin: 18px 0 0;
  padding: 11px;
  border-radius: 13px;
  background: var(--tint-hover);
}

.status__dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--open);
  animation: dotPulse 2.4s ease-in-out infinite;
}

.status__text {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.status__hours {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Save contact ─────────────────────────────────────────── */
.save {
  display: flex;
  justify-content: center;
  margin: 16px 0 0;
}

.save__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px;
  color: var(--accent-deep);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  transition: color .18s;
}

/* Borderless, so its painted box is only ~30px tall. Extend the hit area
   to the 44px minimum without moving anything on screen. */
.save__link::after {
  content: '';
  position: absolute;
  inset: -8px -12px;
}

/* ── Footer ───────────────────────────────────────────────────
   Sits on the page background rather than in the card, so it needs
   to be positioned to stay above the .sun layers. */
.footer {
  position: relative;
  margin-top: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--muted-2);
}

/* ── Interaction ──────────────────────────────────────────────
   Hover only where a real pointer exists, so tapping on a phone
   doesn't leave a row stuck in its hover state.                  */
@media (hover: hover) {
  .cta:hover {
    background: var(--accent-deep);
    transform: translateY(-1px);
  }

  .btn:hover,
  .row:hover {
    border-color: var(--accent);
    background: var(--tint-hover);
  }

  .save__link:hover { color: var(--ink); }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Motion ───────────────────────────────────────────────── */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}

@keyframes sunWake {
  0%   { opacity: 0; }
  28%  { opacity: 1; }  /* ≈0.9s — pale light fully arrived */
  100% { opacity: 0; }  /* ≈3.0s — handed off to the amber */
}

@keyframes sunWarm {
  from { opacity: 0; transform: scale(.86) translate(10px, -16px); }
  to   { opacity: 1; transform: none; }
}

/* Killing the animations drops every layer onto its *base* state, not onto a
   keyframe — so each base state has to equal where that layer's keyframes end:
   .sun--wash ends invisible and declares opacity 0; .sun--warm and .card__sun
   end fully on and so declare nothing. Get this wrong and reduced-motion users
   land on the start of the animation — a blank corner — instead of the warm
   resting state. */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .cta { transition: background .18s; }
  .cta:hover { transform: none; }
}
