:root {
  --paper: #f6f2ea;
  --ink: #062438;
  --ink-soft: #4d5f6e;
  --accent: #cd5e15;
  --accent-deep: #a94a10;
  --rule: rgba(6, 36, 56, 0.18);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --column: 640px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px 32px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Cabeçalho */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}

.logo {
  display: block;
  flex-shrink: 0;
  width: 104px;
  aspect-ratio: 613 / 175;
  background: var(--ink);
  -webkit-mask: url("assets/abtd-logo.svg") center / contain no-repeat;
  mask: url("assets/abtd-logo.svg") center / contain no-repeat;
}

.edition {
  margin: 0;
  max-width: 15rem;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: right;
  text-wrap: balance;
  color: var(--ink-soft);
}

/* Carrossel do mês */

.carousel {
  margin-top: 24px;
}

.carousel__track {
  position: relative;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  margin: 0 -20px;
  padding: 0 20px;
  scroll-padding: 0 20px;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.slide {
  position: relative;
  flex: 0 0 86%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  min-height: 240px;
  padding: 22px 20px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink);
  background-size: cover;
  background-position: center;
  color: #fff;
}

.slide--laranja {
  background-color: var(--accent-deep);
}

.slide--ameixa {
  background-color: #432940;
}

.slide--imagem::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 36, 56, 0.92) 15%, rgba(6, 36, 56, 0.2));
}

.slide > * {
  position: relative;
}

.slide__kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f0a873;
}

.slide--laranja .slide__kicker {
  color: #ffe0c7;
}

.slide__title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 6.5vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.slide__meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.slide__cta {
  align-self: flex-start;
  margin-top: 10px;
  padding: 10px 20px;
  border-radius: 999px;
  background: #b9500f;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.slide--laranja .slide__cta {
  background: #fff;
  color: var(--accent-deep);
}

.slide:hover .slide__cta {
  background: var(--accent);
  color: #fff;
}

.carousel__controls[hidden] {
  display: none;
}

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.carousel__dots {
  display: flex;
  gap: 4px;
}

.carousel__dot {
  width: 28px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.carousel__dot::after {
  content: "";
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--rule);
  transition: background 0.2s ease;
}

.carousel__dot[aria-current="true"]::after {
  background: var(--ink);
}

.carousel__arrows {
  display: flex;
  gap: 8px;
}

.carousel__arrow {
  width: 40px;
  height: 40px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.carousel__arrow:hover {
  border-color: var(--ink);
  background: rgba(6, 36, 56, 0.05);
}

/* Links */

.index {
  display: grid;
  gap: 28px;
  max-width: var(--column);
  margin: 40px auto 0;
}

.section__title {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--accent-deep);
}

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

.entry {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--rule);
  transition: background 0.2s ease, padding 0.2s ease;
}

.entry__num {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.entry__title {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
}

.entry__tag {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-soft);
}

.entry__arrow {
  font-size: 1.1rem;
  color: var(--ink-soft);
  transition: transform 0.2s ease, color 0.2s ease;
}

.entry:hover {
  background: rgba(6, 36, 56, 0.05);
  padding-left: 10px;
  padding-right: 10px;
}

.entry:hover .entry__arrow {
  color: var(--accent-deep);
  transform: translate(2px, -2px);
}

/* Tagline */

.headline {
  max-width: var(--column);
  margin: 56px auto 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
}

.headline em {
  color: var(--accent-deep);
}

/* Rodapé */

.colophon {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
  font-size: 13px;
  text-align: center;
  color: var(--ink-soft);
}

.colophon p {
  margin: 0;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
  color: var(--ink);
}

.socials a {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
}

.socials a:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

@media (min-width: 900px) {
  .page {
    padding: 32px 40px 48px;
  }

  .logo {
    width: 132px;
  }

  .edition {
    max-width: none;
    font-size: 13px;
  }

  .carousel {
    margin-top: 36px;
  }

  .carousel__track {
    gap: 16px;
    margin: 0;
    padding: 0;
    scroll-padding: 0;
  }

  .slide {
    flex-basis: calc((100% - 16px) / 2);
    min-height: 300px;
    padding: 30px 28px;
  }

  .index {
    margin-top: 56px;
  }

  .headline {
    margin-top: 80px;
    max-width: 820px;
    font-size: clamp(2.6rem, 4.2vw, 3.6rem);
  }

  .colophon {
    margin-top: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

  .carousel__track {
    scroll-behavior: auto;
  }
}
