:root {
  color-scheme: dark;
  --purple-taupe: #462f41;
  --old-heliotrope: #694f6a;
  --rum: #7d698c;
  --amethyst-smoke: #9f9cb7;
  --gray-suit: #b7b8cc;
  --background: #261e29;
  --surface: #332635;
  --ink: #f4eff5;
  --heading: Georgia, 'Times New Roman', serif;
  --motion-ease: cubic-bezier(.2, .7, .25, 1);
  --page-width: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: 1rem / 1.6 'Segoe UI', system-ui, sans-serif;
}

a { color: inherit; }

a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gray-suit);
  outline-offset: 4px;
}

img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd { margin: 0; }

h1, h2 {
  font-family: var(--heading);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.055em;
}

h2 { font-size: clamp(2.25rem, 4.4vw, 3.65rem); }
h3 { font-size: 1.2rem; line-height: 1.35; }

.wrap { width: min(var(--page-width), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.section { margin-block-start: clamp(4.5rem, 8vw, 7rem); }
.section-note { margin-top: .75rem; color: var(--gray-suit); }
[id] { scroll-margin-top: 1.5rem; }

.skip-link {
  position: fixed;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  padding: .5rem 1rem;
  transform: translateY(-180%);
  border-radius: .5rem;
  background: var(--surface);
}

.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--old-heliotrope); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  width: fit-content;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 2.35rem;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 50%;
  background: var(--purple-taupe);
  color: var(--gray-suit);
  transition: background-color .19s ease, transform .3s var(--motion-ease);
}

.brand:is(:hover, :focus-visible) .brand-mark { background: var(--old-heliotrope); }

.paw {
  position: relative;
  width: 1.125rem;
  height: 1.125rem;
  transform: rotate(-13deg);
}

.paw::before, .paw::after { position: absolute; content: ''; background: currentColor; }

.paw::before {
  inset: .55rem .22rem .07rem;
  border-radius: 55% 55% 42% 42%;
}

.paw::after {
  inset: .32rem auto auto 0;
  width: .24rem;
  height: .29rem;
  border-radius: 50%;
  box-shadow: .28rem -.25rem, .60rem -.25rem, .88rem 0;
}

.site-nav { display: flex; flex-wrap: wrap; gap: .3rem clamp(1rem, 2.5vw, 2.25rem); }

.site-nav a {
  position: relative;
  padding-block: .5rem;
  color: var(--gray-suit);
  font-size: .9375rem;
  text-decoration: none;
  transition: color .16s ease;
}

.site-nav a::after {
  position: absolute;
  inset: auto 0 .25rem;
  height: 1px;
  border-radius: 1px;
  background: var(--amethyst-smoke);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s var(--motion-ease);
  content: '';
}

.site-nav a:is(:hover, :focus-visible) { color: var(--ink); }
.site-nav a:is(:hover, :focus-visible)::after { transform: scaleX(1); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3.15rem;
  padding: .6rem 1.3rem;
  border: 1px solid var(--amethyst-smoke);
  border-radius: 99rem;
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .22s ease, transform .22s var(--motion-ease);
}

.button:is(:hover, :focus-visible) { border-color: var(--gray-suit); background: var(--old-heliotrope); }
.button-primary { border-color: var(--gray-suit); background: var(--gray-suit); color: var(--background); }
.button-primary:is(:hover, :focus-visible) { border-color: var(--ink); background: var(--ink); }
.button-small { min-height: 2.5rem; padding-inline: 1.1rem; font-size: .875rem; }

.hero {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(3rem, 6vw, 5.25rem) 0;
}

.hero-label {
  margin-bottom: 1rem;
  color: var(--gray-suit);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero h1 { font-size: clamp(4rem, 8vw, 7.2rem); }
.hero h1 em { display: block; color: var(--amethyst-smoke); }

.hero-description {
  max-width: 26rem;
  margin-block: 1.4rem 1.7rem;
  color: var(--gray-suit);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.hero-photo {
  padding: .55rem;
  border: 1px solid var(--rum);
  border-radius: 2.45rem;
  background: var(--purple-taupe);
}

.hero-photo-frame { overflow: hidden; border-radius: 1.9rem; }

.hero-photo img {
  width: 100%;
  height: auto;
}

.about h2, .team h2, .team .section-note { text-align: center; }

.about-grid, .team-grid, .getting-started {
  display: grid;
  gap: 1rem;
}

.about-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.8rem; }

.about-card {
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid var(--old-heliotrope);
  border-radius: 1.5rem;
  background: var(--surface);
}

.about-card:nth-child(even) { background: var(--purple-taupe); }
.about-card p { margin-top: .55rem; color: var(--gray-suit); }

.team {
  padding-block: clamp(3rem, 6vw, 5rem);
  border-block: 1px solid var(--old-heliotrope);
  background: var(--surface);
}

.team-grid, .getting-started { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.team-grid { align-items: start; margin-top: 1.8rem; }

.disclosure summary {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-height: 3.75rem;
  cursor: pointer;
  list-style: none;
  transition: color .16s ease;
}

.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary:is(:hover, :focus-visible) { color: var(--gray-suit); }
.disclosure summary:is(:hover, :focus-visible) .toggle { background: var(--old-heliotrope); }

.toggle {
  display: grid;
  flex: 0 0 2rem;
  aspect-ratio: 1;
  place-items: center;
  margin-left: auto;
  border-radius: 50%;
  background: var(--purple-taupe);
  color: var(--ink);
  transition: transform .19s ease, background-color .19s ease;
}

.toggle::before, .toggle::after {
  grid-area: 1 / 1;
  width: .72rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: '';
}

.toggle::after { transform: rotate(90deg); transition: transform .22s var(--motion-ease); }
.disclosure[open] .toggle { background: var(--old-heliotrope); }
.disclosure[open] .toggle::after { transform: rotate(0); }

.disclosure-body { padding-block: 0 1.25rem; color: var(--gray-suit); }

.admin-card {
  border: 1px solid var(--old-heliotrope);
  border-radius: 1.25rem;
  background: var(--purple-taupe);
}

.admin-card summary { padding: 1rem; border-radius: inherit; }
.admin-card .disclosure-body { padding-inline: 1.1rem; }
.admin-card .toggle { border: 1px solid var(--rum); }

.admin-icon {
  display: grid;
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: .95rem;
  background: var(--old-heliotrope);
  color: var(--ink);
  font: 1.55rem / 1 var(--heading);
}

.admin-label { display: grid; gap: .1rem; min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
.admin-label span { color: var(--gray-suit); font-size: .9rem; }

.schedule, .faq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 5rem);
}

.schedule { align-items: center; }
.hours { margin-top: 1.35rem; }

.hours > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .2rem 1rem;
  padding-block: .6rem;
  border-bottom: 1px solid var(--old-heliotrope);
}

.hours dt { font-weight: 650; }
.hours dd { color: var(--gray-suit); }

.schedule-photo {
  width: 100%;
  height: auto;
  max-height: 17rem;
  object-fit: cover;
  border-radius: 1.6rem;
}

.info-card {
  padding: clamp(1.4rem, 4vw, 2.3rem);
  border: 1px solid var(--old-heliotrope);
  border-radius: 1.5rem;
  background: var(--surface);
}

.info-card:nth-child(2) { background: var(--purple-taupe); }
.info-card h2 { font-size: clamp(1.9rem, 3.7vw, 2.8rem); }
.info-card :is(ol, ul) { margin: 1rem 0 0; padding-left: 1.45rem; color: var(--gray-suit); }
.info-card li { padding-left: .3rem; }
.info-card li + li { margin-top: .4rem; }
.info-card li::marker { color: var(--gray-suit); font-weight: 700; }

.faq { grid-template-columns: .85fr 1.15fr; }
.faq-list { border-top: 1px solid var(--old-heliotrope); }
.faq-list .disclosure { border-bottom: 1px solid var(--old-heliotrope); transition: border-color .22s ease; }
.faq-list .disclosure[open] { border-color: var(--amethyst-smoke); }
.faq-list summary { padding-block: .65rem; font-weight: 650; line-height: 1.4; }

.contacts { margin-top: clamp(3.5rem, 7vw, 6rem); }

.contacts-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.35rem;
  padding: clamp(1.6rem, 4vw, 3.2rem);
  border: 1px solid var(--old-heliotrope);
  border-radius: 1.65rem;
  background: var(--purple-taupe);
}

.site-footer {
  display: flex;
  padding-block: 1.7rem;
}

@media (max-width: 53rem) {
  .hero { gap: 2rem; }
  .hero h1 { font-size: clamp(3.5rem, 9.4vw, 5.5rem); }
  .hero-photo { border-radius: 1.85rem; }
  .hero-photo-frame { border-radius: 1.35rem; }
}

@media (max-width: 47rem) {
  .header-inner { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; padding-block: .75rem .45rem; }
  .site-nav { grid-area: 2 / 1 / auto / -1; margin-top: .15rem; }
  .site-nav a { font-size: .875rem; }
  .hero, .schedule, .faq { grid-template-columns: 1fr; }
  .hero { padding-top: 2.5rem; }
  .hero h1 { font-size: clamp(3.75rem, 11vw, 5.5rem); }
  .hero h1 em { display: inline; }
  .hero-photo img { aspect-ratio: 3 / 2; object-fit: cover; }
  .schedule-photo { max-height: 15rem; }
}

@media (max-width: 34rem) {
  .about-grid, .team-grid, .getting-started { grid-template-columns: 1fr; }
  .hero h1 em { display: block; }
  .team h2 { overflow-wrap: anywhere; }
}

@keyframes appear {
  from { opacity: 0; translate: 0 var(--enter-distance, .85rem); }
  to { opacity: 1; translate: 0; }
}

@keyframes enter-view {
  from { opacity: var(--enter-opacity, .8); translate: 0 var(--enter-distance, 1rem); }
  to { opacity: 1; translate: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .header-inner,
  .hero :is(.hero-label, h1, .hero-description, .actions, .hero-photo) {
    animation: appear .55s var(--motion-ease) var(--enter-delay, 0s) backwards;
  }

  .header-inner { --enter-distance: -.5rem; }
  .hero-label { --enter-delay: .06s; }
  .hero h1 { --enter-delay: .12s; }
  .hero-photo { --enter-delay: .15s; --enter-distance: 1.3rem; }
  .hero-description { --enter-delay: .19s; }
  .hero .actions { --enter-delay: .25s; }

  /* Firefox требует ненулевую длительность для анимаций прокрутки. */
  @supports (animation-timeline: view()) and (animation-range: entry 0% entry 75%) {
    :is(.about h2, .about-card, .schedule > div, .schedule-photo, .info-card,
        .contacts-inner, .site-footer):not(:focus-within) {
      animation: enter-view 1ms var(--motion-ease) backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 75%;
    }
  }

  :is(.team h2, .team .section-note, .faq h2, .admin-card, .faq-list .disclosure) {
    --enter-opacity: .62;
    --enter-distance: 1.5rem;
  }

  @supports (animation-timeline: view()) and (animation-range: entry 0% cover 12rem) {
    :is(.team h2, .team .section-note, .faq h2, .admin-card, .faq-list .disclosure):not(:focus-within) {
      animation: enter-view 1ms ease-out backwards;
      animation-timeline: view();
      animation-range: entry 0% cover 12rem;
    }
  }

  @supports not ((animation-timeline: view()) and (animation-range: entry 0% cover 12rem)) {
    :is(.team:target .admin-card, .faq:target .disclosure):not(:focus-within) {
      animation: enter-view .56s ease-out .18s backwards;
    }
  }

  .brand:is(:hover, :focus-visible) .brand-mark { transform: rotate(12deg) scale(1.08); }

  .button:is(:hover, :focus-visible) {
    transform: translateY(-2px);
    box-shadow: 0 .35rem .85rem #0003;
  }

  .button:active, summary:active .toggle { transform: scale(.94); }

  .disclosure[open] .disclosure-body {
    --enter-distance: -.6rem;
    animation: appear .33s var(--motion-ease);
  }

  @supports selector(details::details-content) and (transition-behavior: allow-discrete) {
    .disclosure { --disclosure-duration: .38s; }

    .disclosure::details-content {
      display: grid;
      grid-template-rows: 0fr;
      transition:
        grid-template-rows var(--disclosure-duration) ease-in-out,
        content-visibility var(--disclosure-duration) allow-discrete;
    }

    .disclosure[open]::details-content { grid-template-rows: 1fr; }

    .disclosure-panel {
      min-block-size: 0;
      overflow: hidden;
    }

    .disclosure-body {
      translate: 0 -.6rem;
      opacity: 0;
      transition: translate .33s var(--motion-ease), opacity .29s ease;
    }

    .disclosure[open] .disclosure-body {
      animation: none;
      translate: 0;
      opacity: 1;
    }
  }

  @media (hover: hover) {
    :is(.about-card, .admin-card, .info-card, .contacts-inner, .hero-photo) {
      transition: transform .26s var(--motion-ease), box-shadow .26s ease, border-color .26s ease;
    }

    :is(.about-card, .admin-card, .info-card, .contacts-inner):hover {
      transform: translateY(-4px);
      border-color: var(--rum);
      box-shadow: 0 .75rem 1.5rem #0003;
    }

    .hero-photo:hover { border-color: var(--amethyst-smoke); box-shadow: 0 .75rem 1.5rem #0003; }
    .hero-photo img, .schedule-photo { transition: transform .56s var(--motion-ease); }
    .hero-photo:hover img { transform: scale(1.045); }
    .schedule-photo:hover { transform: scale(1.025); }

    .hours > div { transition: border-color .21s ease; }
    .hours > div:hover { border-color: var(--amethyst-smoke); }
  }
}

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