/*
  BB Anonym Pro (Bold Studio) is a commercial font and is git-ignored.
  Only the Medium style is installed, so it is declared across the whole
  weight range to avoid faux-bold and Inter mixing. Add more styles here
  (e.g. SemiBold at 600, Bold at 700) when they are licensed.
*/
@font-face {
  font-family: 'BB Anonym Pro';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/BBAnonymPro-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --ink: #050505;
  --ink-soft: #1c1c1e;
  --muted: #767676;
  --paper: #ffffff;
  --font: 'BB Anonym Pro', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* The design is laid out at 1440px wide (1rem = 16px) and scales with the viewport. */
html {
  font-size: clamp(10px, 1.1112vw, 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--paper);
}

/* Navigation ----------------------------------------------------------- */

.nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  height: 5.5rem;
  padding: 0 3.2rem 0 3.45rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand__mark {
  width: 2.7rem;
  height: auto;
  transform-origin: 50% 70%;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand__mark,
.brand:focus-visible .brand__mark {
  transform: rotate(-9deg) scale(1.06);
}

.brand__name {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--ink);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.9rem;
  margin-left: auto;
  margin-right: 4.6rem;
}

.menu {
  position: relative;
}

.menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  cursor: pointer;
}

.menu__label {
  position: relative;
}

.menu__label::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2rem;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu__trigger:hover .menu__label::after,
.menu__trigger:focus-visible .menu__label::after,
.menu.is-open .menu__label::after {
  transform: scaleX(1);
}

.chevron {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.menu.is-open .chevron,
.menu:hover .chevron {
  transform: rotate(180deg);
}

.menu__panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: -1rem;
  min-width: 13rem;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 1rem;
  box-shadow: 0 1.25rem 2.5rem -0.75rem rgba(0, 0, 0, 0.18),
    0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.35rem);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.menu::after {
  content: '';
  position: absolute;
  inset: 100% 0 auto;
  height: 0.6rem;
}

.menu:hover .menu__panel,
.menu:focus-within .menu__panel,
.menu.is-open .menu__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.menu__panel a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.2s ease;
}

.menu__panel a:hover,
.menu__panel a:focus-visible {
  background: #f3f3f4;
  outline: none;
  transform: translateX(0.2rem);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 2.45rem;
}

.nav__login {
  position: relative;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 0.9rem 1.1rem rgba(0, 0, 0, 0.1);
}

.nav__login::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.3rem;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav__login:hover::after,
.nav__login:focus-visible::after {
  transform: scaleX(1);
}

/* Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:focus-visible,
.menu__trigger:focus-visible,
.nav__login:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn--small {
  height: 2.9rem;
  padding: 0 1.3rem;
  font-size: 1.08rem;
  box-shadow: 0 0.6rem 1.4rem -0.4rem rgba(0, 0, 0, 0.35),
    0 0 0 0.3rem rgba(0, 0, 0, 0.04);
}

.btn--large {
  gap: 0.7rem;
  height: 4.15rem;
  padding: 0 1.3rem 0 1.4rem;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
  box-shadow: 0 0.35rem 1.2rem rgba(0, 0, 0, 0.45),
    0 0 0.9rem 0.25rem rgba(0, 0, 0, 0.22),
    inset 0 0.08rem 0 rgba(255, 255, 255, 0.14),
    inset 0 -0.35rem 0.8rem rgba(255, 255, 255, 0.05);
}

.btn--large:hover {
  box-shadow: 0 0.5rem 1.6rem rgba(0, 0, 0, 0.5),
    0 0 1.1rem 0.3rem rgba(0, 0, 0, 0.25),
    inset 0 0.08rem 0 rgba(255, 255, 255, 0.16),
    inset 0 -0.35rem 0.8rem rgba(255, 255, 255, 0.06);
}

.btn__icon {
  width: 1.2rem;
  height: 1.2rem;
  fill: #fff;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn--large:hover .btn__icon:first-of-type {
  transform: translateY(-1px) scale(1.14) rotate(-6deg);
}

.btn--large:hover .btn__icon--download {
  transform: translateY(2px);
}

.btn__divider {
  align-self: center;
  width: 1px;
  height: 1.5rem;
  margin: 0 -0.05rem;
  background: rgba(255, 255, 255, 0.28);
}

/* Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero__content > * {
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__content > :nth-child(1) {
  animation-delay: 0.05s;
}

.hero__content > :nth-child(2) {
  animation-delay: 0.12s;
}

.hero__content > :nth-child(3) {
  animation-delay: 0.2s;
}

.hero__content > :nth-child(4) {
  animation-delay: 0.28s;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  position: relative;
  margin: 0 0 1.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
}

.eyebrow::after {
  content: '';
  position: absolute;
  left: 5%;
  right: 5%;
  top: calc(100% + 0.55rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.06), transparent);
  box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.04);
  transform-origin: center;
  animation: draw 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.hero__title {
  margin: 0;
  font-size: 6.1rem;
  font-weight: 700;
  line-height: 1.045;
  letter-spacing: -0.045em;
  color: #000;
  /* Only BB Anonym Pro Medium is installed; the stroke thickens it into a bold. */
  -webkit-text-stroke: 0.013em currentColor;
  paint-order: stroke fill;
  stroke-linejoin: miter;
}

.hero__lead {
  max-width: 32rem;
  margin: 0.85rem 0 0;
  font-size: 1.46rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--muted);
  text-wrap: balance;
}

.hero__content .btn--large {
  margin-top: 3.2rem;
}

/* Phones --------------------------------------------------------------- */

.phone {
  --phone-scale: 1;
  position: absolute;
  bottom: 5.3rem;
  z-index: 1;
  font-size: 1.09rem;
  width: 22.5em;
  height: 39em;
  padding: 0.65em;
  border-radius: 3.7em;
  background: linear-gradient(145deg, #4a4a4d 0%, #0d0d0e 38%, #26262a 100%);
  box-shadow: 0 0 0 0.12em #0a0a0b, 0 2.5em 4em -1em rgba(0, 0, 0, 0.35),
    inset 0 0 0 0.1em rgba(255, 255, 255, 0.18);
  pointer-events: none;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.phone::before {
  content: '';
  position: absolute;
  inset: 0.28em;
  border-radius: 3.45em;
  background: #000;
}

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 3.05em;
  background: #000;
}

.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.phone__island {
  position: absolute;
  top: 1.45em;
  left: 50%;
  width: 6.6em;
  height: 1.9em;
  border-radius: 999px;
  background: #000;
  transform: translateX(-50%);
}

.phone--left {
  left: -0.6rem;
  transform: translate(var(--dx, 0px), var(--dy, 0px)) translate(-50%, 50%) rotate(41deg)
    scale(var(--phone-scale));
  animation: phone-in-left 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.phone--right {
  right: 0;
  transform: translate(var(--dx, 0px), var(--dy, 0px)) translate(50%, 50%) rotate(-40deg)
    scale(var(--phone-scale));
  animation: phone-in-right 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* Responsive ----------------------------------------------------------- */

@media (max-width: 860px) {
  html {
    font-size: 16px;
  }

  .nav {
    height: 4.5rem;
    padding: 0 1.25rem;
  }

  .nav__links,
  .nav__login {
    display: none;
  }

  .nav__actions {
    margin-left: auto;
  }

  .brand__mark {
    width: 2.2rem;
  }

  .brand__name {
    font-size: 1.6rem;
  }

  .btn--small {
    height: 2.6rem;
    padding: 0 1.3rem;
    font-size: 1rem;
  }

  .hero {
    justify-content: flex-start;
    padding: 5rem 1.25rem 17rem;
  }

  .eyebrow {
    font-size: 0.8rem;
  }

  .hero__title {
    font-size: clamp(2.9rem, 13vw, 4.6rem);
  }

  .hero__lead {
    max-width: 22rem;
    font-size: 1.15rem;
  }

  .hero__content .btn--large {
    height: 3.5rem;
    margin-top: 2.25rem;
    padding: 0 1.6rem;
    font-size: 1.3rem;
  }

  .phone {
    --phone-scale: 0.66;
    bottom: 1.5rem;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 1rem;
  }
}

@keyframes draw {
  from {
    opacity: 0;
    transform: scaleX(0.2);
  }
}

@keyframes phone-in-left {
  from {
    opacity: 0;
    translate: -4rem 4rem;
  }
}

@keyframes phone-in-right {
  from {
    opacity: 0;
    translate: 4rem 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
