/* Tenor Sans — SIL Open Font License. Roboto — Apache License 2.0. Local copies from Google Fonts. */

@font-face {
  font-family: "Tenor Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/tenor-sans-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Tenor Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/tenor-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Tenor Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/tenor-sans-latin.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;
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/roboto-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

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

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/roboto-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/roboto-latin.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 {
  --color-bg: #dfe4e8;
  --color-text: #3a3a3a;
  --color-text-strong: #1c1c1c;
  --color-accent: rgba(245, 237, 226, 0.9);
  --color-accent-solid: #f5ede2;
  --color-accent-hover: rgba(245, 237, 226, 0.98);
  --color-on-photo: rgba(255, 255, 255, 0.9);
  --color-focus: #2a2a2a;
  --font-display: "Tenor Sans", "Palatino Linotype", Palatino, serif;
  --font-body: "Roboto", "Segoe UI", Arial, sans-serif;
  --container-width: 100%;
  --radius: 0.5rem;
  --shadow-link: 0 2px 10px rgba(28, 24, 20, 0.07);
  --space: 0.7rem;
  --page-pad-x: 1.25rem;
  --page-pad-top: max(3.15rem, env(safe-area-inset-top, 0px) + 1.75rem);
  --page-pad-bottom: max(1.45rem, env(safe-area-inset-bottom, 0px) + 0.85rem);
  --photo-position: center 14%;
  --icon-size: 1.125rem;
  --transition: 200ms ease;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  width: 100%;
  min-height: 100%;
  background-color: var(--color-bg);
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: transparent;
  overflow-x: hidden;
}

img:not(.page__photo) {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 20;
  padding: 0.5rem 0.85rem;
  background: var(--color-accent-solid);
  color: var(--color-text-strong);
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 0.75rem;
}

.page {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow-x: hidden;
  background-color: var(--color-bg);
  background-image: url("../assets/images/hero.jpg");
  background-position: var(--photo-position);
  background-size: cover;
  background-repeat: no-repeat;
}

img.page__photo {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: var(--photo-position);
  pointer-events: none;
}

.page__overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  width: auto;
  height: auto;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.02) 20%,
      rgba(18, 20, 24, 0) 48%,
      rgba(18, 20, 24, 0.16) 78%,
      rgba(18, 20, 24, 0.3) 100%
    );
}

.page__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--container-width);
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  margin-inline: auto;
  padding: var(--page-pad-top) var(--page-pad-x) var(--page-pad-bottom);
}

.header {
  flex-shrink: 0;
  width: 100%;
  text-align: center;
}

.header__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18em;
  margin: 0;
  max-width: 16rem;
  font-family: var(--font-display);
  font-size: clamp(1.42rem, 4.6vw, 1.8rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0.08em;
  color: var(--color-text-strong);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.75), 0 1px 10px rgba(255, 255, 255, 0.35);
}

.header__title span {
  display: block;
}

.page__portrait {
  flex: 1 1 auto;
  width: 100%;
  min-height: 7.5rem;
}

.page__content {
  flex: 0 0 auto;
  width: 100%;
  margin-top: auto;
}

.main {
  flex: 0 0 auto;
  width: 100%;
}

.social-links__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.4rem;
  padding: 0.42rem 0.9rem;
  background-color: var(--color-accent);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-link);
  transition:
    background-color var(--transition),
    color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.social-link__content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
}

.social-link:hover,
.social-link:focus-visible {
  background-color: var(--color-accent-hover);
  color: #1a1a1a;
  box-shadow: 0 4px 14px rgba(28, 24, 20, 0.14);
}

.social-link:hover {
  transform: translateY(-1px);
}

.social-link:active {
  transform: translateY(0);
}

.social-link__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--icon-size);
  height: var(--icon-size);
}

.social-link__icon img {
  display: block;
  width: var(--icon-size);
  height: var(--icon-size);
  max-width: none;
  object-fit: contain;
}

.social-link__icon--vk {
  width: 1.05rem;
  height: 1.05rem;
}

.social-link__icon--vk img {
  width: 1.05rem;
  height: 1.05rem;
}

.social-link__text {
  line-height: 1;
}

.footer {
  flex-shrink: 0;
  width: min(16rem, 100%);
  margin-top: 1.35rem;
  margin-inline: auto;
  text-align: center;
}

.footer__text {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--color-on-photo);
  text-wrap: balance;
  overflow-wrap: break-word;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

@media (max-width: 1024px) {
  :root {
    --container-width: 100%;
    --space: 0.65rem;
    --page-pad-x: clamp(1.2rem, 5.5vw, 2rem);
    --page-pad-top: max(3.1rem, env(safe-area-inset-top, 0px) + 1.65rem);
    --page-pad-bottom: max(1.3rem, env(safe-area-inset-bottom, 0px) + 0.75rem);
    --photo-position: center 12%;
  }

  .page__inner {
    max-width: none;
  }

  .page__portrait {
    min-height: 6.5rem;
  }

  .social-link {
    min-height: 2.55rem;
  }

  .footer {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .header__title {
    letter-spacing: 0.05em;
    font-size: 1.32rem;
  }

  .footer__text {
    font-size: 0.74rem;
  }
}

@media (min-width: 1025px) {
  :root {
    --container-width: 17rem;
    --page-pad-x: 0rem;
    --page-pad-top: max(4.25rem, 11vh);
    --photo-position: center top;
  }

  .header__title {
    letter-spacing: 0.1em;
    font-size: 1.75rem;
  }

  .page__portrait {
    min-height: 14rem;
  }
}

@media (min-width: 1025px) and (max-height: 800px) {
  :root {
    --page-pad-top: 2.75rem;
    --photo-position: center top;
  }

  .page__portrait {
    min-height: 8rem;
  }

  .social-link {
    min-height: 2.2rem;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  html,
  body,
  .page {
    height: auto;
    min-height: 100%;
  }

  .page {
    overflow: auto;
  }

  .page__inner {
    padding-block: 1rem;
  }

  .page__portrait {
    min-height: 0.75rem;
  }

  .social-links__list {
    gap: 0.45rem;
  }

  .social-link {
    min-height: 2.15rem;
  }

  .footer {
    margin-top: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .social-link {
    transition: none;
    transform: none;
  }
}
