/* The Resources menu in the site's nav (scripts/nav.mjs writes it into every page that has the nav): a white panel under
 * the nav pill, like the site's own white menu and button. On the left the blog, with the newest article's cover; on the
 * right the comparisons. Below 992px the nav pill is hidden and the same links live in the burger menu and the footer,
 * in the site's own classes, so they need nothing from this sheet. */

:root {
  --eres-ink: #060606;
  --eres-ink-60: #06060699;
  --eres-ink-30: #0606064d;
  --eres-line: #0606061a;
  --eres-paper: #ffffff;
  --eres-hover: #f5f4f6;
  --eres-tile: #f2f1f3;
  --eres-tint: #fcf1fd;
  --eres-pink: #f350f7;
  --eres-pink-deep: #bd23c2;
  --eres-claude: #d97757;
  --eres-shadow: 0 28px 70px #00000073, 0 2px 10px #00000040;
  --eres-sans: Geist, sans-serif;
  --eres-mono: Ppsupplymono, Arial, sans-serif;
  --eres-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* the pill's own section clips what overflows it (Webflow: overflow-x: hidden !important); the panel hangs below it */
.page-section.header.menu-only:has(.eres) { overflow: visible !important; }
.eres { display: inline-block; }
.eres-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; font-family: var(--eres-mono); line-height: inherit; letter-spacing: inherit; }
.eres-toggle svg { width: 9px; height: 9px; transition: transform 0.2s var(--eres-ease); }
.eres[data-open] .eres-toggle { color: #fff; }
.eres[data-open] .eres-toggle svg { transform: rotate(180deg); }
.eres-toggle:focus-visible { outline: 2px solid var(--eres-pink); outline-offset: 4px; border-radius: 4px; }

.eres-panel {
  position: absolute; top: calc(100% + 12px); left: 50%;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px;
  width: min(680px, calc(100vw - 48px)); padding: 10px;
  background: var(--eres-paper); color: var(--eres-ink); border-radius: 20px; box-shadow: var(--eres-shadow);
  text-transform: none; text-align: left; font: 400 15px/1.35 var(--eres-sans); letter-spacing: -0.01em;
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px);
  transition: opacity 0.18s ease, transform 0.25s var(--eres-ease), visibility 0s linear 0.25s;
}
/* a bridge over the gap, so the pointer can travel from the pill to the panel */
.eres-panel::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
/* nav.js opens it (hover with a grace period, click, keyboard) and marks the menu data-js; without the script, hover
   and focus open it */
.eres[data-open] .eres-panel,
.eres:not([data-js]):focus-within .eres-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity 0.18s ease, transform 0.25s var(--eres-ease), visibility 0s; }
@media (hover: hover) {
  .eres:not([data-js]):hover .eres-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity 0.18s ease, transform 0.25s var(--eres-ease), visibility 0s; }
}

/* the blog: the cover of the newest article, then a link to it */
.eres-blog { display: flex; flex-direction: column; min-width: 0; border-radius: 14px; overflow: clip; background: var(--eres-tint); }
.eres-blog__main { display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; }
.eres-blog__main img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; margin-bottom: 8px; transition: transform 0.5s var(--eres-ease); }
.eres-blog__main:hover img { transform: scale(1.03); }
.eres-blog__title { padding: 0 18px; font: 600 22px/1.1 var(--eres-sans); letter-spacing: -0.03em; }
.eres-blog__dek { padding: 0 18px; color: var(--eres-ink-60); font-size: 14px; }
.eres-blog__new { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 10px 18px 18px; color: var(--eres-pink-deep); font-size: 14px; font-weight: 500; text-decoration: none; }
.eres-blog__new:hover { text-decoration: underline; text-underline-offset: 3px; }
.eres-blog__main:focus-visible, .eres-blog__new:focus-visible { outline: 2px solid var(--eres-pink); outline-offset: 2px; border-radius: 6px; }

/* the comparisons */
.eres-list { display: flex; flex-direction: column; min-width: 0; padding: 4px 2px 2px; }
.eres-label { padding: 8px 10px 6px; color: var(--eres-ink-30); font: 400 12px/1 var(--eres-mono); text-transform: uppercase; }
.eres-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) 14px; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; color: var(--eres-ink); text-decoration: none; font-weight: 500; transition: background-color 0.15s; }
.eres-item:hover { background: var(--eres-hover); }
.eres-item:focus-visible { outline: 2px solid var(--eres-pink); outline-offset: 0; }
.eres-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--eres-tile); color: var(--eres-ink); }
.eres-ico svg { width: 18px; height: 18px; }
.eres-ico--claude { color: var(--eres-claude); }
.eres-ico img { width: 26px; height: 26px; border-radius: 50%; }
.eres-arrow { width: 14px; height: 14px; color: var(--eres-ink-30); transition: transform 0.2s var(--eres-ease), color 0.2s; }
.eres-item:hover .eres-arrow { transform: translateX(3px); color: var(--eres-ink); }
.eres-more { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--eres-line); }
.eres-more .eres-item { grid-template-columns: 34px minmax(0, 1fr); }
.eres-more__sub { display: block; margin-top: 3px; color: var(--eres-ink-60); font-size: 13px; font-weight: 400; }

@media (prefers-reduced-motion: reduce) {
  .eres-panel, .eres-toggle svg, .eres-blog__main img, .eres-arrow { transition: none; }
  .eres-blog__main:hover img, .eres-item:hover .eres-arrow { transform: none; }
}

/* The footer (the site's own markup). Since the product pages it has five link columns, and the site's rules give each
 * one 25%, so the columns pushed into the logo. Here the logo keeps a fixed column and the five share what is left. */
section.page-section.footer .footer-logo-img { display: block; width: 100%; height: auto; }
@media (min-width: 1280px) {
  section.page-section.footer .content-wrapper.horizontal.top > .heading-wrap.footer:not(.horizontal) { flex: 0 0 280px; min-width: 0; max-width: 280px; padding-right: 24px; }
  section.page-section.footer .footer-logo-wrap { max-width: 160px; }
  section.page-section.footer .heading-wrap.footer.horizontal.left { flex: 1 1 0; min-width: 0; max-width: none; justify-content: flex-start; }
}
/* narrower desktops: the logo on its own row above the columns, as the site already does on tablets */
@media (min-width: 992px) and (max-width: 1279px) {
  section.page-section.footer .content-wrapper.horizontal.top { flex-direction: column; }
  section.page-section.footer .content-wrapper.horizontal.top > .heading-wrap.footer { flex: none; width: 100%; min-width: 0; max-width: none; }
  section.page-section.footer .heading-wrap.footer.horizontal.left { justify-content: flex-start; padding-top: 0; padding-bottom: 0; border-top: 1px solid #0606061a; }
  section.page-section.footer .heading-wrap.footer.horizontal.left > .footer-menu-links:first-child { border-left: 0; padding-left: 0; }
}
@media (min-width: 768px) {
  section.page-section.footer .heading-wrap.footer.horizontal > .footer-menu-links { flex: 1 1 auto; min-width: 0; max-width: none; }
}
@media (min-width: 480px) and (max-width: 767px) {
  section.page-section.footer .heading-wrap.footer.horizontal.left { flex-wrap: wrap; justify-content: flex-start; }
  section.page-section.footer .heading-wrap.footer.horizontal > .footer-menu-links { min-width: 33.333%; max-width: 33.333%; }
}
