/*
 * (Un)stable — site-wide dark colour system
 *
 * The hero's near-black is the shared canvas. Interactive and informational
 * surfaces step progressively lighter so the hierarchy remains visible without
 * introducing a separate colour family.
 */

:root {
  color-scheme: dark;

  --color-bg: #080b09;
  --color-bg-elevated: #101510;
  --color-text: #f3f5ef;
  --color-text-secondary: #aeb6ac;
  --color-text-muted: #798378;
  --color-border: rgba(239, 245, 235, 0.1);
  --color-border-light: rgba(239, 245, 235, 0.18);

  --unstable-canvas: #080b09;
  --unstable-surface-1: #101510;
  --unstable-surface-2: #161c16;
  --unstable-surface-3: #202820;
  --unstable-ink: #f3f5ef;
  --unstable-ink-soft: #aeb6ac;
  --unstable-ink-muted: #798378;
  --unstable-line: rgba(239, 245, 235, 0.1);
  --unstable-line-strong: rgba(239, 245, 235, 0.18);
  --unstable-shadow: rgba(0, 0, 0, 0.42);
}

html,
body,
main,
.section,
.memory-loop,
.connections,
.trust {
  background: var(--unstable-canvas);
  color: var(--unstable-ink);
}

body {
  background-color: var(--unstable-canvas);
}

::selection {
  color: var(--unstable-ink);
  background: #dce66d;
}

/* Header and navigation */
.page-header,
.page-header.is-scrolled,
.home--dark-hero .page-header:not(.is-scrolled),
.home--dark-hero .page-header.is-scrolled {
  background: rgba(9, 9, 9, 0.9);
  border-bottom: 1px solid var(--unstable-line);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

.memory-nav a,
.home--dark-hero .page-header:not(.is-scrolled) .memory-nav a {
  color: var(--unstable-ink-soft);
}

.memory-nav a:hover,
.memory-nav a:focus-visible,
.memory-nav a[aria-current="page"],
.memory-nav a.brand,
.memory-nav a.brand[aria-current="page"],
.home--dark-hero .page-header:not(.is-scrolled) .memory-nav a:hover,
.home--dark-hero .page-header:not(.is-scrolled) .memory-nav a:focus-visible,
.home--dark-hero .page-header:not(.is-scrolled) .memory-nav a.brand,
.home--dark-hero .page-header:not(.is-scrolled) .memory-nav a.brand[aria-current="page"] {
  color: var(--unstable-ink);
}

.memory-nav a.recall-button,
.recall-button,
.home--dark-hero .page-header:not(.is-scrolled) .memory-nav a.recall-button {
  color: var(--unstable-ink);
  border-color: var(--unstable-line-strong);
  background: var(--unstable-surface-2);
}

.memory-nav a.recall-button:hover,
.memory-nav a.recall-button:focus-visible,
.recall-button:hover,
.recall-button:focus-visible,
.home--dark-hero .page-header:not(.is-scrolled) .memory-nav a.recall-button:hover,
.home--dark-hero .page-header:not(.is-scrolled) .memory-nav a.recall-button:focus-visible {
  color: var(--unstable-canvas);
  border-color: var(--unstable-ink);
  background: var(--unstable-ink);
}

/* The raised dashboard must sit over the hero artwork; its negative margin
   controls position only, while this stacking order keeps the image below it. */
@media (min-width: 769px) {
  .hero__title {
    max-width: 1120px;
    font-size: clamp(2.21rem, 4.03vw, 4.16rem);
  }

  .product-window-wrap {
    z-index: 5;
  }
}

/* The hero is wider/taller than some desktop viewports. Position only the
   title against the visible screen, leaving the hero frame and following
   sections untouched. */
@media (min-width: 769px) {

  .product-window-wrap {
    margin-top: -75px;
  }
}

.hero__title,
.home--dark-hero .hero__title {
  color: var(--unstable-ink);
}

/* Section typography */
.section__title,
.memory-loop__title,
.trust__title {
  color: var(--unstable-ink);
}

.section__subtitle,
.memory-loop__description {
  color: var(--unstable-ink-soft);
}

.section--border {
  border-color: var(--unstable-line);
}

/* Product and content surfaces */
.product-window {
  color: var(--unstable-ink);
  background: var(--unstable-surface-1);
  border-color: var(--unstable-line);
  box-shadow:
    0 30px 80px -24px rgba(0, 0, 0, 0.72),
    0 8px 24px -8px rgba(0, 0, 0, 0.46);
}

.product-window__body {
  background: var(--unstable-surface-1);
}

/* Keep the light screenshot artwork itself unchanged, but give its frame a
   dark edge so it belongs to the surrounding page. */
.product-window__body--screenshot {
  background: var(--unstable-surface-2);
}

.memory-demo {
  background: var(--unstable-canvas);
}

.product-window__dynamic-line {
  color: rgba(243, 245, 239, 0.86);
}

.product-window__dynamic-line-content {
  background: var(--unstable-surface-1);
}

.product-window__dynamic-line-extra {
  color: rgba(243, 245, 239, 0.7);
}

.memory-loop__visual,
.bookmarks--trim {
  background: var(--unstable-surface-1);
  border-color: var(--unstable-line);
  box-shadow: 0 20px 55px -28px var(--unstable-shadow);
}

.connections__visual {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.memory-loop__column {
  border-color: var(--unstable-line);
}

.connections__path {
  stroke: rgba(214, 214, 214, 0.34);
}

/* Bookmark scene: preserve the illustration, but retheme the generated UI
   pieces so no light card looks pasted onto the dark page. */
.bmk {
  background: var(--unstable-surface-2);
  box-shadow: inset 0 0 0 1px var(--unstable-line);
}

.btn--white {
  color: var(--unstable-canvas);
  background: var(--unstable-ink);
  border-color: transparent;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.34);
}

.btn--white:hover {
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.44);
}

/* Footer */
.footer {
  min-height: clamp(630px, 48.8vw, 920px);
  overflow: hidden;
  color: var(--unstable-ink);
  background: var(--unstable-canvas);
  border-top: 0;
}

.footer__bg {
  align-items: stretch;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.055), transparent 46%),
    var(--unstable-canvas);
}

.footer__bg img {
  width: 100%;
  height: 333.3333%;
  object-fit: cover;
  object-position: center;
  clip-path: none;
  transform: translateY(-35%);
  opacity: 0.84;
  filter: saturate(0.88) brightness(0.72) contrast(1.06);
  mix-blend-mode: normal;
}

.footer__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    var(--unstable-canvas) 0%,
    rgba(8, 11, 9, 0.72) 14%,
    rgba(8, 11, 9, 0.16) 42%,
    rgba(8, 11, 9, 0.42) 100%
  );
}

/* The footer copy sits in a substantial black panel over the artwork. The
   oversized top corners echo the reference without adding its green mark. */
.footer__content {
  position: absolute;
  top: auto;
  right: clamp(18px, 2vw, 42px);
  bottom: 0;
  left: clamp(18px, 2vw, 42px);
  z-index: 2;
  width: auto;
  height: clamp(430px, 32vw, 592px);
  min-height: 0;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  padding: clamp(50px, 4.5vw, 78px) clamp(28px, 5vw, 92px) clamp(34px, 3.5vw, 58px);
  overflow: hidden;
  background: rgba(4, 5, 4, 0.98);
  border: 1px solid rgba(243, 245, 239, 0.09);
  border-bottom: 0;
  border-radius: clamp(58px, 6vw, 112px) clamp(58px, 6vw, 112px) 0 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 -24px 70px rgba(0, 0, 0, 0.3);
  transform: translate3d(0, var(--footer-rise-y, 36%), 0);
  will-change: transform;
}

.footer__top,
.footer__bottom {
  position: relative;
  z-index: 1;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) minmax(420px, 2fr);
  gap: clamp(46px, 8vw, 150px);
  align-items: start;
}

.footer__brand {
  max-width: 360px;
}

.footer__brand-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--unstable-ink);
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.footer__brand-name > span {
  display: inline-flex;
  align-items: center;
  height: 38px;
  line-height: 1;
}

.footer__brand-logo {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 5px;
  flex: none;
}

.footer__statement {
  max-width: 330px;
  margin: 0 0 26px;
  color: var(--unstable-ink-soft);
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.55;
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: clamp(24px, 4vw, 74px);
}

.footer__column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
}

.footer__column-title {
  margin: 0 0 7px;
  color: var(--unstable-ink-muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.footer__link,
.footer__placeholder,
.footer__legal-link {
  color: var(--unstable-ink-soft);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 180ms ease;
}

.footer__link:hover,
.footer__link:focus-visible,
.footer__legal-link:hover,
.footer__legal-link:focus-visible {
  color: var(--unstable-ink);
}

.footer__placeholder {
  opacity: 0.48;
  cursor: default;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(243, 245, 239, 0.09);
  transform: translateY(20px);
}

.footer__copyright {
  margin: 0;
  color: var(--unstable-ink-muted);
  font-size: 12px;
}

.footer__legal {
  display: flex;
  gap: 22px;
}

.footer__legal-link {
  font-size: 12px;
  opacity: 0.62;
}

.footer__watermark {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 100%;
  margin: clamp(26px, 2.4vw, 40px) 0 0;
  color: rgba(243, 245, 239, 0.045);
  font-size: clamp(54px, 6vw, 118px);
  line-height: 0.78;
  letter-spacing: -0.065em;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.footer__cta {
  color: #0a0c0b;
  background: #c7ff4a;
  border: 0;
  box-shadow: none;
}

.footer__cta:hover {
  background: #d3ff70;
}
@media (max-width: 768px) {
  .page-header,
.page-header.is-scrolled,
.home--dark-hero .page-header:not(.is-scrolled) {
    background: rgba(9, 9, 9, 0.97);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .footer {
    position: relative;
    display: block;
    min-height: 622px;
    padding-top: 102px;
  }

  .footer__bg {
    position: absolute;
    inset: 0;
    display: flex;
  }

  .footer__bg img {
    width: 100%;
    max-width: none;
    height: 333.3333%;
    object-fit: cover;
    object-position: center;
    transform: translateY(-35%);
  }

  .footer__content {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    min-height: 520px;
    margin: 0 10px;
    padding: 58px 24px 34px;
    border-radius: 48px 48px 0 0;
    transform: translate3d(0, var(--footer-rise-y, 36%), 0);
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .footer__brand {
    max-width: 310px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    align-items: center;
    display: flex;
    flex-direction: column;
  }

  .footer__brand-name {
    justify-content: center;
  }

  .footer__statement {
    margin-left: auto;
    margin-right: auto;
  }

  .footer__cta {
    align-self: center;
  }

  .footer__nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .footer__bottom {
    align-items: flex-start;
    margin-top: 52px;
  }

  .footer__legal {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 16px;
  }
}

.footer__watermark { display: none !important; }

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

/* ─── AtNy floating navigation ───
   Adapted from the AtNy landing page while retaining this site's own links.
   The blur remains constant between size states to keep Safari's compositor
   stable while the pill changes width. */
.page-header,
.page-header.is-scrolled,
.home--dark-hero .page-header:not(.is-scrolled),
.home--dark-hero .page-header.is-scrolled {
  position: fixed;
  top: 12px;
  left: 50%;
  right: auto;
  width: 12.79175625vw;
  min-width: 230px;
  min-height: 0;
  margin: 0;
  padding: 0;
  transform: translate3d(-50%, 0, 0);
  overflow: visible;
  isolation: isolate;
  backface-visibility: hidden;
  background: rgba(8, 11, 9, 0.94);
  border: 1px solid rgba(239, 245, 235, 0.1);
  border-radius: 100px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 28px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px) saturate(110%);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
  transition:
    width 0.58s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.42s ease,
    border-color 0.42s ease,
    box-shadow 0.42s ease;
}

.page-header.is-scrolled,
.home--dark-hero .page-header.is-scrolled {
  width: 12.79175625vw;
  min-width: 230px;
  background: rgba(8, 11, 9, 0.97);
  border-color: rgba(239, 245, 235, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 24px rgba(0, 0, 0, 0.18);
}

.page-header::before,
.page-header::after {
  display: none;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .page-header,
  .page-header.is-scrolled {
    background: rgba(15, 21, 16, 0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-header,
  .page-header.is-scrolled {
    transition: none;
  }
}

.memory-nav {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  max-width: none;
  min-height: 0;
  padding: 12px 14px 12px 28px;
  border: 0;
  border-radius: inherit;
}

.memory-nav a.brand,
.memory-nav a.brand[aria-current="page"] {
  grid-column: 1;
  font-size: 15px;
}

.brand__logo {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 5px;
}

.memory-nav a.recall-button,
.recall-button--atny,
.home--dark-hero .page-header:not(.is-scrolled) .memory-nav a.recall-button {
  position: relative;
  grid-column: 2;
  width: 121px;
  min-width: 121px;
  height: 41px;
  min-height: 41px;
  overflow: hidden;
  color: var(--unstable-ink);
  background: transparent;
  border: 1px solid rgba(239, 245, 235, 0.32);
  border-radius: 100px;
  box-shadow: none;
  transition:
    background 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.page-header.is-scrolled .memory-nav a.recall-button {
  color: #0b0f0c;
  background: #f3f5ef;
  border-color: transparent;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.16),
    0 4px 12px rgba(0, 0, 0, 0.12);
}

.recall-button__text,
.recall-button__hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease;
}

.recall-button__hover {
  font-size: 18px;
  transform: translateY(100%);
  opacity: 0;
}

.memory-nav a.recall-button:hover .recall-button__text,
.memory-nav a.recall-button:focus-visible .recall-button__text {
  transform: translateY(-100%);
  opacity: 0;
}

.memory-nav a.recall-button:hover .recall-button__hover,
.memory-nav a.recall-button:focus-visible .recall-button__hover {
  transform: translateY(0);
  opacity: 1;
}

.memory-nav a.recall-button:hover,
.memory-nav a.recall-button:focus-visible,
.home--dark-hero .page-header:not(.is-scrolled) .memory-nav a.recall-button:hover,
.home--dark-hero .page-header:not(.is-scrolled) .memory-nav a.recall-button:focus-visible {
  color: #0b0f0c;
  background: #f3f5ef;
  border-color: #f3f5ef;
}
/* The header pill is deliberately identical on mobile and desktop: every
   viewport uses the single .page-header rule above (width: 12.79175625vw,
   min-width: 230px). A max-width:768px block used to restate that rule with
   a different width formula, letting the two drift apart. */

@media (max-width: 768px) {
  /* Sized to meet the desktop floor (2.21rem at 769px) so the title doesn't
     jump across the breakpoint. The old 1.053rem-1.749rem range was tuned for
     a longer two-line headline and rendered this one at ~17px on a phone. */
  .hero__title {
    font-size: clamp(1.75rem, 7.4vw, 2.21rem);
  }
}
