:root {
  --bg: #f6f5f2;
  --ink: #1c1b18;
  --muted: #514c45;
  --line: #ddd9d1;
  --sans: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Literata", "Iowan Old Style", Palatino, Georgia, serif;
  --column: 40rem;
  --pad-x: 1.25rem;
  --accent: #6a45c4;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #e3ded6;
  color: var(--ink);
}

.page {
  max-width: var(--column);
  margin: 0 auto;
  padding: 0.85rem var(--pad-x) 3.5rem;
}

a {
  color: inherit;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

h1,
h2,
h3,
.who,
.speaker-name {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 1.35rem + 1.8vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-optical-sizing: auto;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 2.5rem;
  margin-bottom: 2.25rem;
}

.home .top {
  margin-bottom: 2rem;
}

.home .top h1 {
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: max-content;
  line-height: 1;
  color: var(--accent);
}

.logo-place {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--muted);
  margin-bottom: -0.18rem;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  margin-left: auto;
  font-size: 1rem;
}

.menu a {
  white-space: nowrap;
}

.lead {
  margin: 1.15rem 0 0;
  max-width: 34em;
  font-size: 1.25rem;
  line-height: 1.45;
}

.home .lead {
  margin-top: 1.15rem;
}

.city {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.programs {
  margin-top: 3.5rem;
}

.programs h2,
footer h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.programs ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.programs li {
  border-top: 1px solid var(--line);
}

.card {
  display: block;
  padding: 1.7rem 0 1.55rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.programs h3 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.25;
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
  transition: color 0.3s ease;
}

.card:hover h3,
.card:focus-visible h3 {
  color: var(--accent);
}

.desc {
  margin: 0.45rem 0 0;
  max-width: 38em;
}

.who {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.9rem 0 0;
  font-size: 1.2rem;
  line-height: 1.35;
}

.who-text {
  min-width: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.who-text span {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0;
  color: var(--muted);
}

.avatar {
  display: block;
  object-fit: cover;
  background: var(--line);
}

.avatar-sm {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  flex: none;
}

.avatar-program {
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 3;
  object-fit: cover;
  border-radius: 20px;
  margin: 0 0 1.15rem;
}

.avatar-author {
  width: 7rem;
  height: 8.75rem;
  border-radius: 20px;
  flex: none;
}

.buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.15rem;
  margin: 1rem 0 0;
}

.facts {
  margin: 0;
  margin-right: auto;
  color: var(--muted);
}

button {
  font: inherit;
  font-size: 1rem;
  line-height: 1.2;
  color: #f6f5f2;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 1.05rem;
  min-height: 2.75rem;
  cursor: pointer;
}

button:active {
  background: #5836a8;
}

.program .lead {
  margin-top: 1rem;
  font-size: 1.2rem;
}

.program .buy {
  margin-top: 1.15rem;
}

.speaker {
  margin-top: 3.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.speaker h2 {
  margin: 0 0 0.25rem;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--muted);
}

.speaker-main {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.speaker-name {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.2;
}

.speaker-bio {
  margin: 0.4rem 0 0;
  max-width: 36em;
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0.2rem 0;
}

footer .city {
  margin-top: 0.7rem;
}

.program footer {
  margin-top: 3.25rem;
}

.program footer p {
  color: var(--muted);
}

@media (min-width: 800px) {
  .page {
    padding-top: 0.85rem;
  }

  .top {
    width: min(64rem, calc(100vw - 4rem));
    margin-left: calc((100% - min(64rem, 100vw - 4rem)) / 2);
    margin-right: calc((100% - min(64rem, 100vw - 4rem)) / 2);
  }
}

@media (max-width: 560px) {
  .home .top h1,
  .brand {
    font-size: 1.15rem;
  }

  .menu {
    gap: 0.85rem;
    font-size: 0.95rem;
  }

  .buy .facts,
  .program .facts {
    flex-basis: 100%;
    margin-right: 0;
  }

  .buy button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .top {
    flex-wrap: wrap;
    row-gap: 0.15rem;
  }

  .menu {
    width: 100%;
    margin-left: 0;
  }
}
