/* Extra styles that Tailwind utilities don't cover cleanly */
:root {
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background-image: radial-gradient(rgba(23, 53, 46, 0.045) 0.7px, transparent 0.7px);
  background-size: 7px 7px;
}

::selection {
  color: #17352e;
  background: #d6e55a;
}

a,
button {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease,
    transform 180ms ease, opacity 180ms ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #e45b35;
  outline-offset: 3px;
}

img {
  background: #dcd8cf;
}

.nav-link {
  position: relative;
  padding-block: 0.35rem;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link[aria-current="page"] {
  color: #e45b35;
}

.prose-lead:first-letter {
  float: left;
  margin: 0.06em 0.12em 0 0;
  color: #e45b35;
  font-size: 3.25em;
  line-height: 0.75;
}

.editorial-card:nth-child(2) {
  transform: translateY(1.5rem);
}

.editorial-card:nth-child(2):hover {
  transform: translateY(1.25rem);
}

.writing-vertical {
  writing-mode: vertical-rl;
}

.plan-btn.active {
  background-color: #d6e55a;
}

#site-nav.open {
  display: flex;
}

@media (min-width: 768px) {
  #site-nav {
    display: flex !important;
  }
}

.cookie-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1rem;
  background: rgba(7, 24, 20, 0.33);
}

.cookie-panel {
  width: min(620px, calc(100vw - 1.5rem));
  border-top: 5px solid #d6e55a;
  background: #f2eee5;
  padding: 1.5rem;
  box-shadow: 0 15px 70px rgba(0, 0, 0, 0.25);
}

@media (max-width: 640px) {
  .editorial-card:nth-child(2),
  .editorial-card:nth-child(2):hover {
    transform: none;
  }

  .cookie-backdrop {
    padding: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
