/* Home shares the site's markup and navigation with other discovery pages. */
:root {
  --paper: #fffefa;
  --ink: #232720;
  --blue: #173fae;
  --line: #dedfd5;
  --home-gutter: clamp(24px, 5vw, 68px);
  --home-width: 1120px;
  --home-inset: max(var(--home-gutter), calc((100% - var(--home-width)) / 2));
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body { background: var(--paper); word-break: keep-all; overflow-wrap: anywhere; }

.masthead {
  height: 61px;
  padding-inline: var(--home-inset);
  gap: 32px;
  background: #ffe188;
  border-bottom: 1px solid #edcf73;
}
.brand img { width: 150px; }
.site-nav { gap: 26px; }
.site-nav a { color: var(--ink); font-size: 14px; font-weight: 590; }
.site-nav a[aria-current] { color: var(--blue); }
.site-nav a[aria-current]::after, .menu-toggle::before { display: none; }
.tools { border: 0; padding: 0; }
.lang-toggle { font-size: 12px; }

.hero {
  overflow: hidden;
  height: clamp(216px, 20vw, 326px);
  background: #382f29;
}
.hero picture img { object-position: center 53%; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgb(14 15 23 / .52), transparent 62%),
              linear-gradient(0deg, rgb(12 13 20 / .25), transparent 43%);
}
.hero-copy {
  z-index: 1;
  left: var(--home-inset);
  right: var(--home-gutter);
  bottom: clamp(16px, 2.2vw, 34px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-shadow: none;
}
#hero-title {
  font-size: clamp(29px, 3.05vw, 47px);
  font-weight: 650;
  line-height: 1.17;
  letter-spacing: -.05em;
  margin: 0;
}
.night-link {
  min-height: 30px;
  border: 0;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.6;
  letter-spacing: -.025em;
  text-decoration: underline;
  text-decoration-color: #ffffffa6;
  text-underline-offset: 4px;
}
.night-link:hover { color: #ffdf78; text-decoration-color: currentColor; }
.night-link:focus-visible { outline-color: white; }
.night-link img { width: 13px; filter: brightness(0) invert(1); }

.discovery {
  width: calc(100% - 2 * var(--home-gutter));
  max-width: var(--home-width);
  padding: 0;
}
.search-row { min-height: 0; padding: 36px 0 20px; gap: 25px; }
#discovery-title {
  font-size: clamp(32px, 3.85vw, 51px);
  font-weight: 655;
  line-height: 1.15;
  letter-spacing: -.065em;
}
.search {
  width: min(39%, 365px);
  height: 42px;
  padding: 0;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid #8a9085;
  border-radius: 0;
  background: transparent;
}
.search:focus-within { outline: 0; box-shadow: 0 1px var(--blue); }
.search input { letter-spacing: -.018em; }
.search input::placeholder { color: #73796f; }
.search button {
  min-width: 44px;
  height: 40px;
  padding: 0 4px;
  color: var(--blue);
  background: transparent;
  border-radius: 0;
  font-size: 14px;
  font-weight: 650;
}
.categories {
  min-height: 0;
  gap: 0 8px;
  padding: 16px 0 22px;
  border-top: 0;
}
.categories a {
  min-height: 74px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.3;
  letter-spacing: -.045em;
}
.categories a img { height: 49px; }

.stories { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 23px 0 40px; }
.story { grid-template-columns: minmax(0, 1fr) 17px; gap: 9px 5px; }
.story picture, .story .fallback-art { aspect-ratio: 2.9; border-radius: 2px; }
.story-title {
  padding: 0;
  font-size: clamp(16px, 1.55vw, 21px);
  font-weight: 610;
  letter-spacing: -.045em;
}
.story .arrow { width: 15px; margin: 0; }

@media (max-width: 700px) {
  :root { --home-gutter: 20px; }

  .masthead { height: 54px; padding-inline: var(--home-gutter); gap: 12px; }
  .brand img { width: 137px; }
  .tools { gap: 10px; }
  .menu-toggle { width: 33px; padding: 0; }
  .menu-toggle img { width: 21px; min-width: 21px; }

  .hero { height: clamp(168px, 49.25vw, 265px); }
  .hero-copy { bottom: 11px; gap: 0; }
  #hero-title { font-size: clamp(24px, 6.25vw, 30px); }
  .night-link { min-height: 34px; font-size: 13px; }
  .night-link img { width: 12px; }

  .search-row { padding: 25px 0 0; }
  #discovery-title { font-size: clamp(28px, 7.75vw, 37px); }
  .search { width: 100%; height: 37px; margin-top: 10px; gap: 8px; }
  .search button { height: 35px; font-size: 13px; }
  .categories { gap: 12px 5px; padding: 16px 0 17px; }
  .categories a { min-height: 54px; gap: 2px; justify-content: flex-start; font-size: 12px; }
  .categories span, .categories a:nth-child(3) span { max-width: 100%; }
  .categories a img { width: 57px; height: 38px; }

  .stories { display: block; padding: 5px 0 11px; }
  .story { grid-template-columns: 80px minmax(0, 1fr) 15px; gap: 11px; padding: 10px 0; }
  .story + .story { border-top: 1px solid #e9e9e0; }
  .story picture, .story .fallback-art { aspect-ratio: 1.8; }
  .story-title { font-size: 15px; font-weight: 560; line-height: 1.4; }
  .story .arrow { width: 13px; }

  .bottom-nav { margin: 0; padding: 10px 0 max(12px, env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottom-nav a { gap: 3px; font-size: 11px; font-weight: 530; }
  .bottom-nav img { width: 17px; height: 17px; }
}
@media (max-width: 350px) {
  :root { --home-gutter: 16px; }
  .categories { column-gap: 2px; }
}
