/*
  Аватарка не розкаже — styles.css
  Професійний, чистий дизайн з акцентом на читабельність і теплу атмосферу
*/
:root {
  /* Light palette per request */
  --bg: #FDF8F4;
  /* Світлий кремовий */
  --surface: #FFFFFF;
  /* Основні картки */
  --surface-2: #F8E3DA;
  /* Пудрово-бежевий */
  --text: #3F3F3F;
  /* Теплий графітовий */
  --muted: #6B6B6B;
  --primary: #7BAFC4;
  /* Ніжний блакитний */
  --primary-600: #6aa1b8;
  /* Темніший блакитний */
  --accent: #F6A6A6;
  /* Пастельно-кораловий */
  --ok: #66BFA0;
  --danger: #E67C7C;
  --shadow: 0 10px 30px rgba(25, 25, 25, .08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(123, 175, 196, .15), transparent 60%),
    radial-gradient(800px 400px at 90% 10%, rgba(246, 166, 166, .12), transparent 60%),
    var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: linear-gradient(0deg, rgba(123, 175, 196, .06), rgba(246, 166, 166, .06));
}

.lead {
  font-size: 2rem;
  color: var(--muted);
  max-width: 62ch;
}

.small {
  font-size: .9rem;
}

.muted {
  color: var(--muted);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 16px;
}

h1 {
  font-family: Spectral, Georgia, serif;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.2rem);
  letter-spacing: -.02em;
}

h2 {
  font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Header */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: 16px;
  top: 8px;
  background: var(--text);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(253, 248, 244, .7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(63, 63, 63, .08);
  padding: 16px 24px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .2px;
}

.nav-toggle {
  display: none;
}

.nav-list {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
}

.nav-list a:hover,
.nav-list a:focus {
  background: rgba(123, 175, 196, .15);
}

/* Hero */
.hero {
  padding: 96px 0 72px;
}

.hero .lead {
  margin: 10px 0 24px;
  font-size: 0.92rem;
}

.hero h1 {
  font-size: clamp(1.4rem, 1rem + 1.5vw, 2rem);
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Subtle underline for hero title */
h1 {
  position: relative;
}

h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 72px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* Grid */
.grid {
  display: grid;
  gap: 22px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 860px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid rgba(63, 63, 63, .06);
  border-radius: 14px;
  padding: 18px 18px;
  box-shadow: var(--shadow);
}

.card.soft {
  background: var(--surface-2);
}

.card.accent {
  border-color: rgba(246, 166, 166, .35);
  background: linear-gradient(0deg, rgba(246, 166, 166, .10), rgba(246, 166, 166, .10)), var(--surface);
}

/* Lists */
.bullet-list {
  padding-left: 18px;
}

.bullet-list li {
  margin: 10px 0;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check-list li {
  padding-left: 28px;
  position: relative;
  margin: 8px 0;
}

.check-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--ok);
}

.schedule {
  list-style: none;
  padding: 0;
  margin: 0;
}

.schedule li {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(63, 63, 63, .18);
}

.schedule li:last-child {
  border-bottom: none;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  background: rgba(123, 175, 196, .15);
  border: 1px solid rgba(123, 175, 196, .25);
  padding: 8px 12px;
  border-radius: 999px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: #2a2a2a;
  background: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .35);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-600));
  color: #0d2a34;
}

.btn-accent {
  background: var(--accent);
  color: #4a1f1f;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(63, 63, 63, .18);
}

.btn-small {
  padding: 8px 12px;
  font-size: .95rem;
}

/* (Form styles removed as no form is used) */

/* Handle button */
.handle {
  border: 1px solid rgba(63, 63, 63, .12);
  background: rgba(123, 175, 196, .15);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.handle.inline {
  display: inline;
  font: inherit;
}

.big-handle {
  font-size: 1.2rem;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  border-color: rgba(63, 63, 63, .12);
}

.handle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(63, 63, 63, .06);
  background: rgba(123, 175, 196, .06);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 24px 0;
}

.back-to-top {
  color: var(--muted);
  text-decoration: none;
}

.back-to-top:hover {
  color: var(--text);
}

/* Mobile Nav */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    background: rgba(123, 175, 196, .15);
    color: var(--text);
    border: 1px solid rgba(63, 63, 63, .12);
    padding: 8px 12px;
    border-radius: 8px;
  }

  .nav-list {
    position: absolute;
    right: 16px;
    top: 64px;
    flex-direction: column;
    background: var(--surface);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(63, 63, 63, .12);
    box-shadow: var(--shadow);
    display: none;
  }

  .nav-list.open {
    display: flex;
  }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn:hover {
    transform: none;
  }
}

/* Author */
.author-figure {
  margin: 12px 0 16px;
}

.author-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  box-shadow: var(--shadow);
  border: 1px solid rgba(63, 63, 63, .08);
  object-fit: cover;
  background: #eee;
  max-width: 340px;
  margin-inline: auto;
  display: block;
}

.photo-fallback {
  display: none;
}

.author-figure img:not([src]),
.author-figure img[src=""],
.author-figure img[onerror]~.photo-fallback {
  display: inline-block;
}

.author-figure .photo-fallback {
  display: none;
  margin-top: 8px;
  font-size: .9rem;
  color: var(--muted);
}

/* Author layout helpers */
.author-left,
.author-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-right {
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
}

@media (max-width: 860px) {
  .author-right {
    align-items: center;
    text-align: center;
  }
}

/* New author layout tweaks */
#author .author-name {
  margin-top: 6px;
}

#author .author-contact {
  margin-top: 14px;
}

#author .author-contact .handle {
  margin-left: 6px;
}

/* --- Visual Enhancements Overrides --- */
/* Hero panel */
.hero-panel {
  background: linear-gradient(180deg, rgba(123, 175, 196, .10), rgba(248, 227, 218, .10));
  border: 1px solid rgba(63, 63, 63, .08);
  padding: 28px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

/* Slightly larger section breathing room */
.section {
  padding: 84px 0;
}

/* Softer cards */
.card {
  border: 1px solid rgba(63, 63, 63, .08);
  border-radius: 16px;
  padding: 20px;
}

/* Upgraded schedule look */
.schedule {
  display: grid;
  gap: 10px;
}

.schedule li {
  padding: 12px 14px;
  border: 1px dashed rgba(63, 63, 63, .18);
  border-radius: 10px;
  background: rgba(123, 175, 196, .06);
}

/* Testimonials */
.testimonials {
  margin-top: 8px;
}

.testimonial {
  position: relative;
}

.testimonial blockquote {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

.testimonial blockquote p {
  margin: 0;
}

.testimonial::before {
  content: "\201C";
  position: absolute;
  top: -12px;
  left: -8px;
  font-size: 3rem;
  color: rgba(123, 175, 196, .4);
  font-family: Georgia, 'Times New Roman', Times, serif;
}

.testimonial figcaption {
  margin-top: 12px;
  font-weight: 600;
  color: var(--muted);
}

.testimonial figcaption {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--text);
}

@media (max-width: 860px) {
  .testimonials {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Carousel */
.carousel {
  position: relative;
}

.carousel-viewport {
  overflow: hidden;
  outline: none;
}

.carousel-track {
  display: flex;
  gap: 16px;
  padding: 4px;
  transition: transform 500ms cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

.carousel [data-slide] {
  min-width: 100%;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.carousel-prev,
.carousel-next {
  border: 1px solid rgba(63, 63, 63, .18);
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
}

.carousel-prev:hover,
.carousel-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .12);
}

.carousel-prev:disabled,
.carousel-next:disabled {
  opacity: .5;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.carousel-status {
  color: var(--muted);
  font-size: .95rem;
}

.carousel-viewport:focus-visible {
  box-shadow: 0 0 0 3px rgba(123, 175, 196, .35);
  border-radius: 12px;
}

/* Fancy slide-in animation for testimonials */
.carousel [data-slide] {
  opacity: .6;
  transform: scale(.98);
  transition: opacity 420ms ease, transform 420ms ease;
}

.carousel .carousel-track {
  counter-reset: slide;
}

.carousel [data-slide][aria-hidden="false"] {
  opacity: 1;
  transform: scale(1);
}

/* Tighter testimonial typography for smaller blocks */
#testimonials .testimonial blockquote p {
  font-size: 1rem;
}

#testimonials .testimonial figcaption {
  margin-top: 10px;
  font-size: .95rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    transition: none;
  }
}

/* Optional: testimonial aesthetics (works with carousel too) */
.testimonials {
  margin-top: 8px;
}

.testimonial {
  position: relative;
}

.testimonial blockquote {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

.testimonial::before {
  content: "“";
  position: absolute;
  top: -12px;
  left: -8px;
  font-size: 3rem;
  color: rgba(123, 175, 196, .4);
  font-family: Georgia, 'Times New Roman', Times, serif;
}

.testimonial figcaption {
  margin-top: 12px;
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 860px) {
  .carousel [data-slide] {
    min-width: 100%;
  }
}

/* Hide any typical "site name" elements in the header */
.site-title,
.site-name,
header h1.site-title,
header .site-name {
  display: none !important;
}

/* Hero tagline line above the main heading */
.hero-tagline {
  display: inline-block;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
  letter-spacing: .02em;
  background: rgba(123, 175, 196, .15);
  border: 1px solid rgba(123, 175, 196, .25);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: clamp(1.1rem, 1rem + 1.2vw, 1.6rem);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .5);
}

/* Make join-section lead text smaller */
#join .lead {
  font-size: clamp(.8rem, .75rem + .2vw, .9rem);
}