/* The home page hero: the beta ask over a wall of race cards and gear cards, in the cream room. */
:root {
  --hero:1;
  background:var(--night);
  overscroll-behavior-y:none
}
.cards-page {
  --spring:linear(0,.0534,.173,.316,.4574,.5844,.6915,.7778,.8448,.8951,.9317,.9577,.9754,.9872,.9946,.999,1.0015,1.0026,1.003,1.0029,1.0025,1.0021,1.0017,1.0013,1);
  --ease:cubic-bezier(.2,.8,.2,1);
  --glass:rgba(239,236,229,.72);
  --glass-line:rgba(25,21,18,.1);
  background:var(--paper);
  color:var(--ink)
}
.cards-page .header {
  position:relative;
  z-index:2;
  border-color:transparent;
  /* A black band, so the foil wordmark reads and the links never sit straight on a card. */
  background:var(--night);
  /* Solid night above it too, so a pull past the top never shows the wall. */
  box-shadow:0 -50vh 0 50vh var(--night);
  color:var(--cream)
}
.cards-page .header .nav-cta {
  border-color:var(--cream)
}
.glass {
  background:var(--glass);
  -webkit-backdrop-filter:blur(16px) saturate(1.6);
  backdrop-filter:blur(16px) saturate(1.6);
  box-shadow:inset 0 0 0 1px var(--glass-line),0 12px 32px -14px rgba(25,21,18,.28)
}

/* ---------- The wall ---------- */
.wall {
  position:fixed;
  inset:0;
  overflow:hidden;
  opacity:0;
  transition:opacity 1.2s ease
}
.wall-ready .wall {
  opacity:1
}
.col {
  position:absolute;
  top:0;
  will-change:transform
}
.tile {
  display:block;
  position:relative;
  width:100%;
  padding:0;
  border:0;
  background:none;
  color:inherit;
  cursor:pointer;
  border-radius:6%/4.3%;
  transition:transform .5s var(--spring),box-shadow .5s var(--ease);
  -webkit-tap-highlight-color:transparent
}
.tile img {
  display:block;
  width:100%;
  height:100%;
  border-radius:inherit;
  object-fit:cover;
  box-shadow:0 10px 24px -6px rgba(25,21,18,.22);
  user-select:none
}
.tile:hover {
  z-index:1;
  transform:scale(1.035)
}
.tile:hover img {
  box-shadow:0 26px 50px -14px rgba(25,21,18,.4)
}
.tile:active {
  transform:scale(.985);
  transition-duration:.16s
}
.tile:focus-visible {
  outline:2px solid var(--ink);
  outline-offset:4px;
  z-index:1
}
/* The scrim dims the wall so the cream copy reads, and thins out once the hero has gone. */
.scrim {
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:rgba(18,16,13,.66);
  opacity:calc(.12 + .88 * var(--hero))
}

/* ---------- The hero, over the wall ---------- */
.cards-page main {
  position:relative;
  z-index:2;
  pointer-events:none
}
.wall-copy {
  min-height:calc(100svh - 100px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:40px 20px 80px;
  opacity:var(--hero);
  transform:translateY(calc((1 - var(--hero)) * -40px))
}
.wall-copy a {
  pointer-events:auto
}
.wall-chip {
  display:inline-flex;
  align-items:center;
  margin:0 0 28px;
  padding:8px 16px;
  border:1px solid rgba(237,230,218,.2);
  border-radius:999px;
  background:rgba(237,230,218,.14);
  color:var(--cream);
  font-size:13px;
  line-height:1.3
}
.wall-copy h1 {
  font-size:clamp(64px,7.8vw,112px);
  line-height:.95;
  letter-spacing:-.055em;
  font-weight:800;
  margin:0;
  max-width:820px;
  color:var(--cream)
}
/* "kept." is the hero’s serif accent. */
.wall-copy h1 em {
  font-family:var(--serif);
  font-weight:400;
  letter-spacing:-.04em
}
/* Over the dimmed wall the pill takes solid amber with ink type. */
.wall-copy .noun {
  background:rgba(240,189,79,.9);
  color:var(--ink)
}
.wall-intro {
  color:var(--cream);
  font-family:var(--serif);
  font-size:27px;
  line-height:1.35;
  margin:26px auto 30px;
  max-width:16em;
  text-wrap:balance
}
.road {
  height:70svh
}

/* ---------- The dock: the beta ask once the hero has gone, and the motion toggle ---------- */
.dock {
  position:fixed;
  z-index:3;
  left:12px;
  right:12px;
  bottom:max(14px,env(safe-area-inset-bottom));
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  pointer-events:none;
  transition:opacity .25s var(--ease)
}
.viewing .dock {
  opacity:0
}
.join-bar {
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
  height:52px;
  padding:0 5px 0 20px;
  border-radius:999px;
  opacity:0;
  transform:translateY(14px);
  transition:opacity .3s var(--ease),transform .5s var(--spring)
}
.bar-on .join-bar {
  opacity:1;
  transform:none;
  pointer-events:auto
}
.join-bar-title {
  font-weight:700;
  font-size:15px;
  letter-spacing:-.02em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}
.join-bar-cta {
  flex:none;
  display:inline-flex;
  align-items:center;
  height:42px;
  padding:0 18px;
  border-radius:999px;
  background:var(--action);
  color:var(--on-action);
  font-weight:700;
  font-size:14px
}
.join-bar-cta:focus-visible {
  outline:2px solid var(--ink);
  outline-offset:3px
}
.dock-motion {
  position:absolute;
  right:0;
  flex:none;
  width:44px;
  height:44px;
  border:0;
  border-radius:999px;
  color:var(--ink);
  display:grid;
  place-items:center;
  pointer-events:auto;
  cursor:pointer
}
/* Two bars to pause; a triangle to resume. */
.dock-motion span {
  width:12px;
  height:14px;
  background:linear-gradient(90deg,currentColor 35%,#0000 0 65%,currentColor 0)
}
.paused .dock-motion span {
  width:12px;
  height:14px;
  margin-left:3px;
  background:currentColor;
  clip-path:polygon(0 0,100% 50%,0 100%)
}
.now {
  position:fixed;
  z-index:3;
  left:14px;
  bottom:max(18px,env(safe-area-inset-bottom));
  display:flex;
  align-items:baseline;
  gap:10px;
  margin:0;
  padding:11px 16px;
  border-radius:999px;
  max-width:calc(50vw - 230px);
  font-size:13px;
  pointer-events:none;
  opacity:0;
  transform:translateY(8px);
  transition:opacity .25s var(--ease),transform .4s var(--ease)
}
.now.on {
  opacity:1;
  transform:none
}
.now b,.now span {
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}
.now span {
  color:var(--muted)
}
@media(max-width:1000px),(hover:none) {
  .now {
    display:none
  }
}

/* ---------- One card, brought forward ---------- */
.view {
  position:fixed;
  inset:0;
  z-index:5
}
.view[hidden] {
  display:none
}
.veil {
  position:absolute;
  inset:0;
  background:rgba(239,236,229,.8);
  -webkit-backdrop-filter:blur(22px) saturate(1.1);
  backdrop-filter:blur(22px) saturate(1.1);
  opacity:0;
  transition:opacity .35s var(--ease)
}
.view.on .veil {
  opacity:1
}
.big {
  position:absolute;
  transform-origin:0 0;
  perspective:1600px;
  touch-action:pan-y;
  user-select:none;
  cursor:pointer
}
.big-tilt,.big-turn {
  position:absolute;
  inset:0;
  transform-style:preserve-3d
}
.big-tilt {
  transition:transform .6s var(--ease)
}
.big-turn {
  transition:transform .8s var(--spring)
}
.turned .big-turn {
  transform:rotateY(180deg)
}
.big-front,.big-back {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border-radius:6%/4.3%;
  -webkit-backface-visibility:hidden;
  backface-visibility:hidden;
  box-shadow:0 2px 4px rgba(25,21,18,.12),0 40px 80px -30px rgba(25,21,18,.45)
}
.big-back {
  transform:rotateY(180deg)
}
/* A gear card has no back, as in the app's Closet: a tap does not turn it. */
.flat {
  cursor:default
}
.bar {
  position:absolute;
  left:50%;
  bottom:max(16px,env(safe-area-inset-bottom));
  display:flex;
  align-items:center;
  gap:2px;
  height:56px;
  padding:0 6px;
  border-radius:999px;
  width:max-content;
  max-width:calc(100vw - 24px);
  opacity:0;
  transform:translate(-50%,14px);
  transition:opacity .3s var(--ease),transform .5s var(--spring)
}
.view.on .bar {
  opacity:1;
  transform:translate(-50%,0);
  transition-delay:.08s
}
.bar .btn {
  flex:none;
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border:0;
  border-radius:999px;
  background:none;
  color:var(--ink);
  font-size:17px;
  cursor:pointer;
  transition:background .16s var(--ease)
}
.bar .btn:hover,.bar .pill:hover {
  background:rgba(25,21,18,.06)
}
.bar-label {
  min-width:0;
  margin:0 10px;
  display:flex;
  flex-direction:column;
  font-size:14px;
  line-height:1.25
}
.bar-label b,.bar-label span {
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:300px
}
.bar-label span {
  color:var(--muted);
  font-size:12px
}
.bar .pill {
  flex:none;
  height:40px;
  padding:0 16px;
  margin:0 4px;
  border:1px solid var(--hair);
  border-radius:999px;
  background:none;
  color:var(--ink);
  font:600 13px/1 Hanken,Arial,sans-serif;
  cursor:pointer
}
.bar .pill[hidden] {
  display:none
}
.bar button:focus-visible {
  outline:2px solid var(--ink);
  outline-offset:2px
}

/* ---------- Footer ---------- */
.cards-page footer {
  position:relative;
  z-index:4;
  background:var(--night);
  /* And below it, so a pull past the end never shows the wall. */
  box-shadow:0 50vh 0 50vh var(--night);
  color:var(--cream)
}
.cards-page footer .legal {
  border-color:rgba(237,230,218,.16);
  color:var(--night-muted)
}
.cards-page footer a:focus-visible { outline-color:var(--cream) }
.cards-page button:focus-visible,.cards-page a:focus-visible {
  outline-color:var(--ink)
}
@media(max-width:700px) {
  .wall-copy {
    min-height:calc(100svh - 78px)
  }
  .wall-intro {
    font-size:21px
  }
  .join-bar {
    margin-right:52px;
    padding-left:16px;
    gap:10px
  }
  .join-bar-title {
    font-size:14px
  }
  .bar-label {
    margin:0 4px
  }
  .bar-label b,.bar-label span {
    max-width:none
  }
  .bar .pill {
    padding:0 12px
  }
}
@media(prefers-reduced-motion:reduce) {
  .wall,.tile,.veil,.bar,.join-bar,.now,.dock,.big-tilt,.big-turn {
    transition:none
  }
  .tile:hover,.tile:active {
    transform:none
  }
  .wall-copy {
    transform:none
  }
  .dock-motion {
    display:none
  }
}

/* ---------- Home: the sections scroll up over the wall on paper ---------- */
.home .sheet {
  position:relative;
  z-index:3;
  pointer-events:auto;
  background:var(--paper);
  border-radius:28px 28px 0 0;
  box-shadow:0 -24px 60px -30px rgba(25,21,18,.3)
}
.cards-page .wall-copy a:focus-visible,.cards-page .header a:focus-visible,.cards-page .tile:focus-visible { outline-color:var(--cream) }
