:root {
  font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  color: #222;
  min-height: 100%;
  background: #faf9f7;
  --paper-size: cover;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  isolation: isolate;
}

/* Extend the decorative paper beyond the page's safe-area edges. */
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: calc(-1 * env(safe-area-inset-top, 0px));
  bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  min-height: 100vh;
  min-height: calc(100lvh + env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px));
  background: #faf9f7 url("/binder-paper-v3.png") left top / var(--paper-size) no-repeat;
}

@media (max-width: 700px), (max-height: 500px) and (pointer: coarse) {
  :root {
    overscroll-behavior: none;
    /* Prevent one-finger panning without clipping the paper Safari renders
       behind its controls. Keep pinch-to-zoom available. */
    touch-action: pinch-zoom;
    /* Use the large viewport so browser toolbar changes don't rescale the paper. */
    --paper-size: max(100vw, 200vh) auto;
  }
  body {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overscroll-behavior: none;
    touch-action: pinch-zoom;
  }
  @supports (height: 100lvh) {
    :root { --paper-size: max(100vw, 200lvh) auto; }
  }
}

.landing {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  width: min(100%, 440px);
  margin-inline: auto;
  padding: max(32px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}

.brand {
  align-self: center;
  text-align: center;
  padding-block: 24px;
}

.brand-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 380px, 58svh);
  margin-inline: auto;
}

@media (max-width: 700px), (max-height: 500px) and (pointer: coarse) {
  .landing {
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .brand-art { width: min(85%, 323px, 49.3svh); }
}

.brand-art img { display: block; height: auto; }
.brand-smiley { width: 61%; margin-block: 12px; }
.brand-lettering { width: 70%; position: relative; aspect-ratio: 2 / 1; }
.brand-lettering img { position: absolute; inset: 0; width: 100%; }
/* Keep the approved wordmark intact while using the lighter generated subtitle.
   The stepped cut follows the transparent gap around the y's descender. */
.brand-word { clip-path: polygon(0 0, 100% 0, 100% 74%, 75% 74%, 75% 66%, 0 66%); }
.brand-subtitle { clip-path: polygon(0 66%, 75% 66%, 75% 74%, 100% 74%, 100% 100%, 0 100%); }

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

.text-remy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 16px 24px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 16px rgb(0 0 0 / 12%);
}

.setup-arrow {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("/arrow-right-heavy.png") center / contain no-repeat;
  mask: url("/arrow-right-heavy.png") center / contain no-repeat;
}

.text-remy:hover { background: #222; }
.text-remy:active { background: #111; }
.text-remy:focus-visible { outline: 3px solid #222; outline-offset: 5px; }
