/* ============================================================
   Doorbin — shared foundation
   tokens · reset · nav component · pull-down menu
   ============================================================ */

:root {
  --ink:            #f2efe9;
  --ink-dim:        #cfc9bd;
  --ink-faint:      #8f887a;
  --ground:         #08080a;
  --ground-page:    #0b0b09;
  --ground-card:    #14140f;
  --ground-frame:   #16150f;
  --accent:         #b5946a;

  --rule:           rgba(242, 239, 233, 0.3);
  --rule-soft:      rgba(242, 239, 233, 0.14);
  --wash:           rgba(242, 239, 233, 0.16);
  --wash-strong:    rgba(242, 239, 233, 0.26);

  --font-sans:      Jost, sans-serif;
  --font-serif:     'Instrument Serif', serif;

  --gutter:         42px;
  --gutter-sm:      22px;
  --measure:        1640px;

  --ease:           cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: #ffffff; }
::selection { background: var(--accent); color: var(--ground); }

.u-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------
   pill — one shape, three states
   ------------------------------------------------------------ */
.pill {
  display: block;
  padding: 8px 22px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.pill:hover { background: var(--wash); color: var(--ink); }
.pill:active { background: var(--wash-strong); }
.pill--current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ground);
}
.pill--current:hover { background: var(--ink); color: var(--ground); opacity: 0.84; }
.pill--current:active { opacity: 0.72; }

/* ------------------------------------------------------------
   nav — <doorbin-nav>
   ------------------------------------------------------------ */
doorbin-nav { display: block; }

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px var(--gutter);
}
.nav--overlay { background: none; pointer-events: none; }
.nav--overlay > * { pointer-events: auto; }
.nav--solid { background: var(--ground-page); }

.nav__group {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav__logo { display: block; color: currentColor; }
.nav__logo svg { width: 122px; height: auto; display: block; }

.nav__pills {
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav__burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.3s ease;
}
.nav__burger:hover { background: var(--wash); }
.nav__burger:active { background: var(--wash-strong); }
.nav__burger svg { width: 17px; height: 11px; display: block; }
.nav__burger path { transition: opacity 0.3s ease, transform 0.4s var(--ease); }

/* ------------------------------------------------------------
   pull-down menu — touch widths only
   ------------------------------------------------------------ */
.menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 50vh;
  z-index: 90;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 86px var(--gutter-sm) 26px;
  background: var(--ground);
  border-bottom: 1px solid var(--rule-soft);
  transform: translateY(-101%);
  transition: transform 0.55s var(--ease);
}
.menu.is-open { transform: translateY(0); }

.menu__logo {
  position: absolute;
  top: 26px; left: var(--gutter-sm);
  display: block;
  color: var(--ink);
}
.menu__logo svg { width: 104px; height: auto; display: block; }

.menu__close {
  position: absolute;
  top: 18px; right: var(--gutter-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.3s ease;
}
.menu__close:hover { background: var(--wash); }
.menu__close:active { background: var(--wash-strong); }
.menu__close svg { width: 14px; height: 14px; display: block; }

.menu__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu__link {
  display: block;
  width: 100%;
  padding: 16px 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  text-align: center;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.2;
  transition: background 0.3s ease, transform 0.25s var(--ease);
}
.menu__link:hover { background: var(--wash); }
.menu__link:active { background: var(--wash-strong); transform: scale(0.985); }
.menu__link--current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ground);
}
.menu__link--current:hover { background: var(--ink); color: var(--ground); opacity: 0.84; }

@media (max-width: 1024px) {
  .nav { padding: 18px var(--gutter-sm); gap: 14px; }
  .nav__group { gap: 14px; }
  .nav__logo svg { width: 104px; }
  .nav__pills { display: none; }
  .nav .pill--connect { display: none; }
  .nav__burger { display: flex; }
  .menu { display: flex; }
}

/* ============================================================
   day / night — the switch, and the day tokens every inner page uses
   ============================================================ */
.nav__end { display: flex; align-items: center; gap: 10px; }
.theme-switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: none;
  color: inherit;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.theme-switch:hover { background: var(--wash); }
.theme-switch:active { background: var(--wash-strong); }
.theme-switch:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
.theme-switch > span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: rotate(-70deg) scale(0.6);
  transition: opacity 0.35s ease, transform 0.5s var(--ease);
}
.theme-switch > span.is-on { opacity: 1; transform: none; }
.theme-switch svg { width: 17px; height: 17px; display: block; }
@media (max-width: 1024px) { .nav__end { gap: 8px; } }

html.is-theming body,
html.is-theming body * {
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, fill 0.45s ease, stroke 0.45s ease !important;
}

html[data-theme="light"] body {
  --ink: #16150f;
  --ink-dim: #56524a;
  --ink-faint: #8b857a;
  --ground: #ece9e2;
  --ground-page: #ece9e2;
  --ground-card: #dedad1;
  --ground-frame: #dedad1;
  --rule: rgba(22, 21, 15, 0.26);
  --rule-soft: rgba(22, 21, 15, 0.12);
  --wash: rgba(22, 21, 15, 0.07);
  --wash-strong: rgba(22, 21, 15, 0.13);
}
html[data-theme="light"] a:hover { color: #000000; }

/* arrows that have nowhere to go are removed, not greyed */
[data-step][hidden], [data-more-step][hidden], [data-showcase-step][hidden] { display: none !important; }
