/*
 * components.css
 * OWNS: reusable pieces. Logo, both navs, buttons, chips, alerts, cards,
 * tabs, terminal windows, code, inputs, accordion mechanics, step rail, footer.
 *
 * Measured from resend.com:
 *   nav       58px sticky bar, 14px/500 links in gray-11, black/60 + blur once
 *             content scrolls beneath
 *   buttons   16px radius frosted glass; 48px (lg) and 40px (sm); white on hover
 *   cards     24px radius, slate-6 hairline, open at the bottom
 *   code      24px radius window, tabs inside the header, Commit Mono
 */

/* ------------------------------------------------------------------ logo */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
}

.logo__mark {
  width: 26px;
  height: auto;
  flex: none;
}

.logo__word {
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: var(--fw-semibold);
  letter-spacing: -0.04em;
  line-height: 1;
}

/* ------------------------------------------------------------ nav shared */

.nav-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 48px;
  pointer-events: none;
}

.nav,
.navx {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: transparent;
  transition: background-color var(--dur-base) var(--ease),
    backdrop-filter var(--dur-base) var(--ease);
}

/* Once content runs beneath: black at 60%, blurred, with fine grain. */
.nav[data-scrolled="true"],
.navx[data-scrolled="true"] {
  background-color: var(--chrome-fill);
  background-image: var(--texture);
  backdrop-filter: blur(var(--chrome-blur));
  -webkit-backdrop-filter: blur(var(--chrome-blur));
}

/* ------------------------------------------------------------ solid nav */
/* success / cancel / 404 / account. */

.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--nav-h);
}

.nav__links {
  display: flex;
  align-items: center;
}

.nav__link,
.navx__link {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 4px 16px;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease);
}

.nav__link:hover,
.navx__link:hover {
  color: var(--text-emphasis);
}

.nav__actions,
.navx__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s-1);
}

.nav__menu {
  display: none;
  height: 40px;
  padding-inline: var(--s-4);
  border: 2px solid var(--line-glass);
  border-radius: var(--r-lg);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
}

.nav__menu:hover,
.nav__menu[aria-expanded="true"] {
  color: var(--text-emphasis);
}

/* ------------------------------------------------------ overlay nav (home) */

.navx {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--nav-h);
  padding-inline: max(var(--gutter), calc((100% - var(--page-max)) / 2));
}

/* The hero is the first thing in <main>; pull it up under the sticky bar. */
.has-overlay-nav main {
  margin-top: calc(var(--nav-h) * -1);
}

.navx__logo {
  justify-self: start;
}

.navx__links {
  display: flex;
  align-items: center;
}

/* ---------------------------------------------------------------- buttons */
/* .btn, .herobtn and .navbtn share one engine. Variants:
     primary  frosted glass; solid white with a glow on hover
     ghost    quiet bordered glass for secondary actions
     text     no surface at all, gray-11 to gray-12 (hero "How it works") */

.btn,
.herobtn,
.navbtn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  height: 48px;
  padding: 0 20px;
  border: 2px solid transparent;
  border-radius: var(--r-lg);
  background-color: transparent;
  color: var(--text-muted);
  font-family: var(--font-text);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  line-height: 1.5;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  transition: background-color var(--dur-base) ease-in-out,
    color var(--dur-base) ease-in-out,
    border-color var(--dur-base) ease-in-out,
    box-shadow var(--dur-base) ease-in-out,
    transform var(--dur-press) var(--ease-press);
}

.btn:hover,
.herobtn:hover,
.navbtn:hover {
  color: var(--text-emphasis);
}

.btn[data-pressed="true"],
.herobtn[data-pressed="true"],
.navbtn[data-pressed="true"] {
  transform: scale(var(--press-scale));
}

.btn:focus-visible,
.herobtn:focus-visible,
.navbtn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgb(255 255 255 / 0.3);
}

/* ---- primary: frosted glass ---- */
.btn--primary,
.herobtn--primary,
.navbtn--brand {
  color: #ffffff;
  border-color: var(--line-glass);
  background-image: var(--glass);
  background-origin: border-box;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-sm);
}

.btn--primary::after,
.herobtn--primary::after,
.navbtn--brand::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: var(--r-lg);
  background-image: var(--texture);
  pointer-events: none;
}

.btn--primary:not(:disabled):hover,
.herobtn--primary:hover,
.navbtn--brand:hover,
.btn--primary:focus-visible,
.herobtn--primary:focus-visible,
.navbtn--brand:focus-visible {
  background-color: rgb(255 255 255 / 0.9);
  color: #000000;
  box-shadow: var(--shadow-button);
}

/* ---- ghost: quiet glass ---- */
.btn--ghost {
  color: var(--text-muted);
  border-color: var(--line-glass);
}

.btn--ghost:not(:disabled):hover {
  color: var(--text-emphasis);
  background-color: rgb(255 255 255 / 0.05);
}

/* ---- text ---- */
.herobtn--secondary,
.navbtn--light {
  color: var(--text-muted);
}

.herobtn--secondary:hover,
.navbtn--light:hover {
  color: var(--text-emphasis);
}

/* ---- sizes ---- */
.btn--sm,
.navbtn {
  height: 40px;
  padding: 0 var(--s-4);
  font-size: var(--text-sm);
  line-height: 1.43;
}

.btn--block,
.navbtn--block {
  width: 100%;
}

.navbtn--block {
  height: 48px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn--primary:disabled {
  color: rgb(255 255 255 / 0.5);
}

.btn[aria-busy="true"] {
  opacity: 1;
  cursor: progress;
}

.btn__label {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex: none;
  margin-right: var(--s-1);
}

.btn__arrow {
  transition: transform var(--dur-fast) var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(2px);
}

/* ------------------------------------------------------------ hamburger */

.navx__burger {
  display: none;
  position: relative;
  justify-self: end;
  width: var(--tap);
  height: var(--tap);
  border: 2px solid var(--line-glass);
  border-radius: var(--r-lg);
  background-image: var(--glass);
}

.navx__burger-bar {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 1.5px;
  margin-left: -8px;
  background: var(--text-emphasis);
  transition: transform var(--dur-base) var(--ease-out);
}

.navx__burger-bar:nth-child(1) {
  top: calc(50% - 4px);
}

.navx__burger-bar:nth-child(2) {
  top: calc(50% + 3px);
}

.navx__burger[aria-expanded="true"] .navx__burger-bar:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}

.navx__burger[aria-expanded="true"] .navx__burger-bar:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Menu sheet. Transform and opacity are driven by nav.js from a spring, so
   there is deliberately no transition on either here. */
.navx-menu {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) - 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + var(--s-7)) var(--gutter) var(--s-8);
  background-color: var(--sheet-fill);
  background-image: var(--texture);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  touch-action: none;
  will-change: transform, opacity;
}

.navx-menu__grabber {
  position: absolute;
  bottom: var(--s-3);
  left: 50%;
  width: 36px;
  height: 4px;
  margin-left: -18px;
  border-radius: var(--r-pill);
  background: var(--slate-7);
}

.navx-menu__panel {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  will-change: transform;
}

.navx-menu__links {
  display: flex;
  flex-direction: column;
}

.navx-menu__link {
  padding-block: var(--s-4);
  border-bottom: var(--hairline) solid var(--line-hairline);
  font-size: var(--text-2xl);
  letter-spacing: -0.03em;
  color: var(--text-emphasis);
}

.navx-menu__actions {
  display: grid;
  gap: var(--s-2);
}

/* ----------------------------------------------------------------- chips */

.chip,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 24px;
  padding: 2px var(--s-2);
  border-radius: var(--r-xs);
  background: var(--slate-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.33;
  color: var(--text-muted);
  white-space: nowrap;
}

.chip--note {
  color: var(--text-muted);
}

/* "Delivered"-style tinted badges, used for flagged scan data. */
.chip--signal {
  color: var(--flag);
  background: rgb(255 149 146 / 0.12);
}

.chip--signal::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge {
  white-space: normal;
  color: var(--warn);
  background: rgb(255 202 22 / 0.1);
}

/* Footer status pill: "Scanners operational" */
.status {
  min-height: 34px;
  padding: var(--s-2) var(--s-4) var(--s-2) 14px;
  gap: 10px;
  border: var(--hairline) solid var(--line-glass);
  border-radius: var(--r-pill);
  background: transparent;
  font-family: var(--font-text);
  color: var(--text-emphasis);
}

.status__box {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

.status__box::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--ok);
  opacity: 0;
  animation: status-ping 2.4s var(--ease-out) infinite;
}

@keyframes status-ping {
  0% {
    transform: scale(0.6);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* ----------------------------------------------------------------- alerts */

.alert {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-3);
  margin-block: var(--s-6);
  padding: var(--s-4) var(--s-5);
  border: var(--hairline) solid rgb(255 149 146 / 0.25);
  border-radius: var(--r-lg);
  background: var(--flag-wash);
  color: var(--text-emphasis);
  font-size: var(--text-sm);
}

.alert__code {
  color: var(--flag);
  font-size: var(--text-xs);
}

.alert__msg {
  flex: 1 1 20ch;
}

.alert__close {
  margin-inline-start: auto;
  color: var(--text-muted);
}

.alert__close:hover {
  color: var(--text-emphasis);
}

.alert--ok {
  border-color: rgb(58 211 137 / 0.25);
  background: var(--ok-wash);
}

/* Neutral notices, e.g. "Log in to open your dashboard." */
.alert--info {
  border-color: var(--line-soft);
  background: var(--slate-2);
}

.flash-messages {
  padding-top: var(--s-4);
}

.alert--flash {
  margin-block: 0;
}

/* ------------------------------------------------------------------ cards */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--card-pad);
  border: var(--hairline) solid var(--line);
  border-bottom-color: transparent;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.025), transparent 45%);
  transition: border-color var(--dur-base) var(--ease),
    background-color var(--dur-base) var(--ease);
}

/* Brighter centre on the top edge, like resend.com's feature cards. */
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: min(60%, 320px);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgb(143 143 143 / 0.6), transparent);
  pointer-events: none;
}

.card--interactive:hover {
  border-color: var(--slate-7);
  border-bottom-color: transparent;
}

.card--quiet {
  padding: var(--s-5) var(--s-6);
  border-radius: var(--r-lg);
  border-color: var(--line-soft);
  border-bottom-color: transparent;
  background: var(--card-sheen);
}

.card__icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  margin-bottom: var(--s-2);
  color: var(--text-emphasis);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card__name {
  font-family: var(--font-head);
  font-size: var(--text-xl);
  font-weight: var(--fw-regular);
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--slate-12);
}

.card__text {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  max-width: 46ch;
}

.card__detail {
  color: var(--text-faint);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  max-width: 56ch;
}

.card__stat {
  margin-top: auto;
}

/* ------------------------------------------------------------------- tabs */
/* Pill tabs, as in the header of resend.com's code window. */

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--s-1);
}

.tab {
  height: 32px;
  padding: 0 var(--s-3);
  border: var(--hairline) solid transparent;
  border-radius: 10px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    transform var(--dur-press) var(--ease-press);
}

.tab:hover {
  color: var(--text-emphasis);
}

.tab[aria-selected="true"] {
  border-color: var(--line);
  background: var(--slate-3);
  color: var(--text-emphasis);
}

.tab[data-pressed="true"] {
  transform: scale(var(--press-scale));
}

/* Tile tabs, as in resend.com's SDK picker: a bordered square with the
   label underneath. */
.tabs--tiles {
  gap: var(--s-4);
}

.tabs--tiles .tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  height: auto;
  padding: 0;
  border: 0;
  background: none;
}

.tabs--tiles .tab[aria-selected="true"] {
  background: none;
}

.tab__tile {
  display: grid;
  place-items: center;
  width: 60px;
  height: 56px;
  border: var(--hairline) solid var(--line);
  border-radius: var(--r-lg);
  color: var(--text-muted);
  transition: border-color var(--dur-base) ease-in-out,
    background-color var(--dur-base) ease-in-out,
    color var(--dur-base) ease-in-out;
}

.tab__tile svg {
  width: 22px;
  height: 22px;
}

.tab__label {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
  transition: color var(--dur-base) ease-in-out;
}

.tabs--tiles .tab:hover .tab__label,
.tabs--tiles .tab[aria-selected="true"] .tab__label {
  color: var(--text-emphasis);
}

.tabs--tiles .tab[aria-selected="true"] .tab__tile {
  border-color: var(--line-strong);
  background: linear-gradient(to bottom, rgb(255 255 255 / 0.03), transparent);
  color: var(--text-emphasis);
}

.tabpanel[hidden] {
  display: none !important;
}

.tabpanel:focus-visible {
  outline-offset: 6px;
  border-radius: var(--r-xl);
}

/* ------------------------------------------------------- terminal window */

.term-window {
  position: relative;
  overflow: hidden;
  border: var(--hairline) solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg);
}

.term-window__bar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 56px;
  padding: 0 var(--s-3);
  border-bottom: var(--hairline) solid var(--line-soft);
}

/* resend.com's code window has no traffic lights. */
.term-window__dots {
  display: none;
}

/* The window title reads as the one selected tab. */
.term-window__title {
  display: inline-flex;
  align-items: center;
  height: 32px;
  min-width: 0;
  max-width: 100%;
  padding: 0 var(--s-3);
  border: var(--hairline) solid var(--line);
  border-radius: 10px;
  background: var(--slate-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-text);
  font-size: var(--text-sm);
  color: var(--text-emphasis);
}

.term-window__status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-inline-start: auto;
  padding-inline-end: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.term-window__status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-8);
}

.term-window[data-state="running"] .term-window__status {
  color: var(--info);
}

.term-window[data-state="running"] .term-window__status::before {
  background: var(--info);
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  to {
    visibility: hidden;
  }
}

.term-window__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-top: var(--hairline) solid var(--line-soft);
}

/* ------------------------------------------------------------------- code */
/* Monochrome, as on resend.com: identifiers bright, strings dimmer,
   comments dimmest. */

.code {
  margin: 0;
  padding: var(--s-6);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.72;
  color: var(--text-emphasis);
  white-space: pre;
  tab-size: 2;
}

.code__c {
  color: var(--gray-9);
}

.code__s {
  color: var(--text-muted);
}

.code__k {
  color: var(--text-emphasis);
}

/* ----------------------------------------------------------------- inputs */
/* resend.com's text field: 48px, 16px radius, glass with grain. */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.field__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.input {
  width: 100%;
  height: 48px;
  padding: 0 var(--s-4);
  border: 2px solid var(--line-glass);
  border-radius: var(--r-lg);
  background-image: var(--texture), var(--glass);
  background-origin: border-box;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: #ffffff;
  font-size: var(--text-base);
  transition: box-shadow var(--dur-base) ease-in-out;
}

.input::placeholder {
  color: var(--gray-9);
}

.input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.2);
}

/* ------------------------------------------------------------ accordion */
/* Grid row 0fr -> 1fr animates a real height change without measuring. */

.qa__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-slow) var(--ease-out);
}

.qa__panel > div {
  overflow: hidden;
}

.qa[data-open="true"] .qa__panel {
  grid-template-rows: 1fr;
}

/* -------------------------------------------------------------- step rail */
/* Sits between the pinned cards and the pipeline progress line, right
   aligned with the page frame, so it never covers a card. */

.step-rail {
  position: fixed;
  right: max(var(--gutter), calc((100vw - var(--page-max)) / 2));
  bottom: calc(var(--s-9) + var(--s-5));
  z-index: var(--z-rail);
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}

.step-rail[data-visible="true"] {
  opacity: 1;
}

.step-rail__label {
  margin-right: var(--s-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.step-rail__dash {
  position: relative;
  width: 2px;
  height: 12px;
  overflow: hidden;
  background: var(--line);
}

.step-rail__dash i {
  position: absolute;
  inset: 0;
  background: var(--text-emphasis);
  transform: scaleY(0);
  transform-origin: top center;
}

/* ----------------------------------------------------------------- footer */

.site-footer {
  position: relative;
  margin-top: var(--s-10);
  padding-block: var(--s-12) var(--s-9);
  overflow: hidden;
}

/* A full-width hairline with light pooling beneath its centre. */
.site-footer::before,
.site-footer::after {
  content: "";
  position: absolute;
  top: 0;
  pointer-events: none;
}

.site-footer::before {
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent);
}

.site-footer::after {
  left: 50%;
  width: min(1000px, 100%);
  height: 220px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 100% at 50% 0%, rgb(255 255 255 / 0.06), transparent 70%);
}

.site-footer__top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr));
  gap: var(--s-8) var(--s-6);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-4);
}

.site-footer__tag {
  max-width: 30ch;
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: 1.5;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
}

.site-footer__head {
  margin: 0 0 var(--s-2) 4px;
  font-family: var(--font-text);
  font-size: var(--text-sm);
  font-weight: var(--fw-regular);
  color: var(--text-emphasis);
}

.site-footer__col a {
  padding: 2px 4px;
  border-radius: var(--r-xs);
  font-size: var(--text-sm);
  color: var(--text-link);
}

.site-footer__col a:hover {
  color: var(--slate-12);
}

.site-footer__base {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-4) var(--s-8);
  margin-top: var(--s-11);
}

.site-footer__base .meta {
  font-size: var(--text-xs);
  color: var(--gray-9);
}

.site-footer__disclaimer {
  max-width: 70ch;
}

/* ------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .status__box::after,
  .term-window[data-state="running"] .term-window__status::before {
    animation: none;
  }
}

/* ------------------------------------------------------------ nav menus */
/* resend.com's dropdowns: a trigger with a small chevron, and a panel of
   icon + title + description items on blurred black glass. Driven by
   menu.js (hover intent, click, Escape, outside click). */

.navx {
  overflow: visible;
}

.menu {
  position: relative;
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

.menu__trigger {
  gap: 4px;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu__chev {
  width: 12px;
  height: 12px;
  opacity: 0.7;
  transition: transform var(--dur-base) var(--ease);
}

.menu[data-open="true"] .menu__trigger {
  color: var(--text-emphasis);
}

.menu[data-open="true"] .menu__chev {
  transform: rotate(180deg);
}

.menu__panel {
  position: absolute;
  top: calc(100% - 6px);
  left: 50%;
  z-index: calc(var(--z-nav) + 1);
  padding: var(--s-2);
  border: var(--hairline) solid var(--line);
  border-radius: var(--r-lg);
  background-color: rgb(0 0 0 / 0.92);
  background-image: var(--texture), linear-gradient(180deg, rgb(255 255 255 / 0.04), transparent 40%);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 16px 48px rgb(0 0 0 / 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -4px) scale(0.98);
  transform-origin: top center;
  transition: opacity var(--dur-base) var(--ease),
    transform var(--dur-base) var(--ease),
    visibility 0s linear var(--dur-base);
}

/* Bridges the gap between trigger and panel so hover isn't lost crossing it. */
.menu__panel::before {
  content: "";
  position: absolute;
  inset: -12px 0 auto;
  height: 12px;
}

.menu[data-open="true"] .menu__panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
  transition: opacity var(--dur-base) var(--ease),
    transform var(--dur-base) var(--ease),
    visibility 0s;
}

.menu__panel--wide {
  width: 560px;
}

.menu__panel--narrow {
  width: 300px;
}

.menu__grid {
  display: grid;
  gap: 2px;
}

.menu__panel--wide .menu__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.menu__item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: 10px var(--s-3);
  border-radius: var(--r-md);
  transition: background-color var(--dur-fast) var(--ease);
}

.menu__item:hover,
.menu__item:focus-visible {
  background: var(--slate-3);
}

.menu__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: var(--hairline) solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #17191c, #08090a);
  color: var(--text-emphasis);
  transition: border-color var(--dur-fast) var(--ease);
}

.menu__item:hover .menu__icon {
  border-color: var(--slate-8);
}

.menu__icon svg {
  width: 16px;
  height: 16px;
}

.menu__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-top: 1px;
}

.menu__title {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-emphasis);
}

.menu__desc {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}

/* ---- the mobile sheet groups the same menus ---- */

.navx-menu__label {
  margin: var(--s-5) 0 var(--s-1);
  font-size: var(--text-xs);
  color: var(--gray-9);
}

.navx-menu__label:first-child {
  margin-top: 0;
}

.navx-menu__sublink {
  padding-block: 6px;
  font-size: var(--text-lg);
  color: var(--text-emphasis);
}

.navx-menu__panel {
  max-height: calc(100dvh - var(--nav-h) - 80px);
  overflow-y: auto;
}

@media (prefers-reduced-motion: reduce) {
  .menu__panel,
  .menu[data-open="true"] .menu__panel {
    transition: none;
  }
}

/* ---------------------------------------------------------- cookie banner */
/* A 16px glass card in the bottom-left corner, as small and quiet as the
   rest of resend.com's chrome. Full width (with gutters) on phones. */

.consent {
  position: fixed;
  left: var(--s-6);
  bottom: var(--s-6);
  z-index: calc(var(--z-overlay) - 1);
  width: min(400px, calc(100vw - var(--s-6) * 2));
  padding: var(--s-5);
  border: var(--hairline) solid var(--line);
  border-radius: var(--r-lg);
  background-color: rgb(0 0 0 / 0.86);
  background-image: var(--texture), linear-gradient(180deg, rgb(255 255 255 / 0.05), transparent 45%);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.55);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}

/* Brightest at the top centre, like resend.com's panels. */
.consent::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 60%;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.55), transparent);
  pointer-events: none;
}

.consent[data-state="in"] {
  opacity: 1;
  transform: none;
}

.consent__head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.consent__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: var(--hairline) solid var(--line);
  border-radius: 9px;
  background: linear-gradient(180deg, #17191c, #08090a);
  color: var(--text-emphasis);
}

.consent__mark svg {
  width: 15px;
  height: 15px;
}

.consent__title {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  letter-spacing: -0.01em;
  color: var(--text-emphasis);
}

.consent__text {
  margin-top: var(--s-3);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.consent__text a {
  color: var(--text-emphasis);
  font-weight: var(--fw-medium);
  text-decoration: underline;
  text-decoration-color: var(--slate-7);
  text-underline-offset: 2px;
}

.consent__text a:hover {
  text-decoration-color: var(--text-emphasis);
}

.consent__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-4);
}

@media (max-width: 640px) {
  .consent {
    left: var(--s-4);
    right: var(--s-4);
    bottom: var(--s-4);
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent {
    transition: none;
  }
}

.site-footer__btn {
  padding: 2px 4px;
  border-radius: var(--r-xs);
  font-size: var(--text-sm);
  color: var(--text-link);
  text-align: left;
  cursor: pointer;
}

.site-footer__btn:hover {
  color: var(--slate-12);
}

.pricing__foot a {
  color: var(--text-emphasis);
  text-decoration: underline;
  text-decoration-color: var(--slate-7);
  text-underline-offset: 2px;
}
