/* ============================================================================
   RideNest site footer (rn-footer.css) — 2026-07-10
   Port of Nico's paper-card footer sketch (Telegram 2026-07-10) to the site's
   plain-CSS conventions + RideNest tokens. Markup is injected on every page
   by /js/rn-footer.js. Layout / spacing / hierarchy / interaction states
   follow the sketch faithfully: paper card + tape strips, sticker buttons
   with hard offset shadows, pill links with underline reveal, waitlist
   confirm flow, bob/twinkle ambience, staggered scroll reveal (spring).
   ============================================================================ */

@import url("https://api.fontshare.com/v2/css?f[]=neco@400,500,700&display=swap");

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/caveat-latin-var.woff2?v=20260721rc1") format("woff2");
}

.rn-foot {
  --f-paper: #fff9ee;
  --f-beige: #f3e5c5;
  --f-ink: #0a2d44;
  --f-ink-soft: rgba(10, 45, 68, .72);
  --f-honey: #f1c75c;
  --f-coral: #F27255;
  --f-coral-hover: #D95241;
  --f-coral-deep: #C8443A;
  --f-coral-text: #C8443A;
  --f-coral-hover-ink: #001124;
  --f-sky: #4ebdf7;
  --f-sky-hover: #45a8dc;
  --f-sky-deep: #4EBDF7;
  --f-teal: var(--f-sky-deep);
  --f-display: "Neco", Georgia, serif;
  --f-body: var(--font, "Pally", "Segoe UI", Arial, sans-serif);
  --f-hand: "Caveat", "Comic Sans MS", cursive;

  position: relative;
  overflow: hidden;
  /* slide up over the sand section and fade the footer's top edge IN, so the
     beach sand melts into the footer cream (crossfade) instead of butting
     against it as a hard tan/cream line — same "both edges fade" seam the other
     sections use. Nico: the two colors at the seam must not read as a step. */
  margin-top: -74px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 92px);
  mask-image: linear-gradient(180deg, transparent 0, #000 92px);
  padding: clamp(72px, 9vw, 116px) 5% clamp(48px, 6vw, 76px);
  font-family: var(--f-body);
  color: var(--f-ink);
  /* San Diego sunset over sand: the column eases out of the page's cream at
     the seam (no hard cutoff), deepens into warm sand, and a low sun of honey
     + coral glows up from the horizon. On-brand, cohesive, beachy — the old
     mix leaned on off-brand blue corner glows that read greenish here and
     nowhere else on the page (Nico #7). */
  background:
    radial-gradient(118% 74% at 50% 122%, rgba(242, 114, 85, .42) 0%, rgba(242, 114, 85, 0) 56%),
    radial-gradient(94% 60% at 50% 116%, rgba(250, 204, 57, .50) 0%, rgba(250, 204, 57, 0) 60%),
    /* soft San Diego sky-blue horizon behind the card, echoing the hero's
       ocean-meets-sand — eases in low so the page-cream seam at the top stays
       clean (Nico: footer must match the hero, not read as a flat off-brand slab). */
    radial-gradient(135% 58% at 50% 82%, rgba(78, 189, 247, .24) 0%, rgba(78, 189, 247, 0) 58%),
    /* top stop MUST equal the section-above cream (#fff8ec) so the feathered
       seam is truly invisible — a warmer #fef2dd top left a faint tonal step
       even after the fade (Nico: "close but colors aren't the same"). */
    linear-gradient(180deg, #fff8ec 0%, #fdeecd 20%, #fbe6c2 46%, #f6d59d 86%, #f2c98f 100%);
}

/* Ralphie lives BOTTOM-LEFT (the widget already ships data-position="bottom-left").
   The earlier right-side + 60px-shrink overrides are removed: Nico wants him
   bottom-left and at an intentional size, not tiny in the right corner
   (desktop #1, mobile #15). The widget's own CSS handles placement/size
   (desktop 164px, phones 120px, both left).
   On phones, sizing is page-scoped: rn-footer.css is shared by ~12 pages, and
   on the content pages (companies, pricing, faq, …) the larger launcher covered
   hero/body copy at 390px — so every non-homepage page keeps the safe 60px
   launcher. Only the HOMEPAGE (body.rn-home) gets Nico's intentional 108px
   bottom-left placement, where the hero art leaves the corner clear. */
@media (max-width: 520px) {
  /* Every non-homepage page: proven-safe 60px launcher tucked into the
     bottom-RIGHT corner. The larger left-side launcher covered the left-aligned
     hero/body copy at 390px (companies hero paragraph, pricing Pay-Per-Ride
     copy, faq question tails); the small right-corner tuck clears every flagged
     line at scroll-top with the copy itself untouched. */
  /* Nico 2026-07-13: Ralphie must be BIG + bottom-LEFT on mobile across ALL
     pages, not the tiny right-corner tuck. (Home already gets 108px-left below;
     this makes every inner page match at a copy-safe 92px.) */
  html body #rn-ralphie-mascot {
    width: 100px !important;
    height: 92px !important;
    left: 8px !important;
    right: auto !important;
    bottom: 8px !important;
  }
  /* keep the chat panel anchored just above the smaller mascot (non-home) */
  body:not(.rn-home) #rn-ralphie-panel {
    bottom: 108px !important;
  }
  /* HOMEPAGE ONLY: Nico's intentional 108px launcher, bottom-left, where the
     hero art leaves the corner clear. */
  html body.rn-home #rn-ralphie-mascot {
    width: 108px !important;
    height: 108px !important;
    left: 8px !important;
    right: auto !important;
    bottom: 10px !important;
  }
}

/* tiny white speckle dots over the dawn — drift slowly like distant sea sparkle */
.rn-foot::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, .8) 1px, transparent 1.5px),
    radial-gradient(rgba(255, 255, 255, .55) 1px, transparent 1.5px);
  background-size: 190px 190px, 230px 230px;
  background-position: 20px 30px, 110px 140px;
  opacity: .5;
  animation: rn-foot-drift 46s linear infinite;
}
@keyframes rn-foot-drift {
  from { background-position: 20px 30px, 110px 140px; }
  to   { background-position: 210px -20px, 340px 90px; }
}

/* animated San Diego surf at the base — three layered waves gently rolling,
   echoing the hero's ocean-meets-sand so the footer reads as the same beach
   (Nico: footer background must match + move, not sit flat). */
.rn-foot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  pointer-events: none;
  z-index: 0;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%271200%27%20height%3D%27140%27%20viewBox%3D%270%200%201200%20140%27%20preserveAspectRatio%3D%27none%27%3E%3Cpath%20fill%3D%27%234ebdf7%27%20fill-opacity%3D%270.42%27%20d%3D%27M0%2C64%20C160%2C34%20340%2C94%20600%2C64%20C860%2C34%201040%2C94%201200%2C64%20L1200%2C140%20L0%2C140%20Z%27%2F%3E%3Cpath%20fill%3D%27%230877b0%27%20fill-opacity%3D%270.34%27%20d%3D%27M0%2C90%20C200%2C64%20400%2C116%20600%2C90%20C800%2C64%201000%2C116%201200%2C90%20L1200%2C140%20L0%2C140%20Z%27%2F%3E%3Cpath%20fill%3D%27%23ffffff%27%20fill-opacity%3D%270.30%27%20d%3D%27M0%2C108%20C240%2C88%20420%2C128%20600%2C108%20C820%2C86%20980%2C128%201200%2C108%20L1200%2C140%20L0%2C140%20Z%27%2F%3E%3C%2Fsvg%3E") repeat-x bottom / 1200px 140px;
  animation: rn-foot-surf 22s linear infinite;
}
@keyframes rn-foot-surf {
  from { background-position: 0 bottom; }
  to   { background-position: -1200px bottom; }
}

/* --- paper card ------------------------------------------------------------ */
.rn-foot-card {
  position: relative;
  z-index: 1; /* float the paper card above the animated surf + speckles */
  max-width: 1024px;
  margin: 0 auto;
  padding: clamp(32px, 4.5vw, 56px) clamp(22px, 4vw, 56px) clamp(24px, 3vw, 36px);
  background: var(--f-paper);
  border: 1px solid rgba(10, 45, 68, .8);
  border-radius: 2rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .85),
    0 24px 48px rgba(10, 45, 68, .16),
    0 8px 18px rgba(10, 45, 68, .1);
}

/* tape strips */
.rn-foot-tape {
  position: absolute;
  top: -16px;
  width: 112px;
  height: 32px;
  background: linear-gradient(105deg, rgba(241, 199, 92, .9), rgba(241, 199, 92, .62));
  border-left: 2px dashed rgba(255, 255, 255, .65);
  border-right: 2px dashed rgba(255, 255, 255, .65);
  box-shadow: 0 2px 6px rgba(10, 45, 68, .12);
  opacity: .92;
}

.rn-foot-tape.tl { left: 8%;  transform: rotate(-8deg); }
.rn-foot-tape.tr { right: 8%; transform: rotate(8deg); }

/* --- main zones: brand | link columns -------------------------------------- */
.rn-foot-main {
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 5vw, 64px);
}

@media (min-width: 960px) {
  .rn-foot-main { flex-direction: row; justify-content: space-between; }
}

.rn-foot-brand { max-width: 24rem; }

.rn-foot-brandrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.rn-foot-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 66px;
  height: 66px;
  border-radius: 18px;
  background: var(--f-honey);
  border: 2px solid var(--f-ink);
  box-shadow: 0 5px 0 var(--f-ink), 0 10px 18px rgba(10, 45, 68, .16);
  transform: rotate(-6deg);
  transition: transform .3s cubic-bezier(.2, .8, .3, 1.2);
}

.rn-foot.is-revealed .rn-foot-logo:hover { transform: rotate(-6deg) translateY(-2px); }

.rn-foot-logo img { width: 78%; height: 78%; object-fit: contain; }

.rn-foot-name {
  font-family: var(--f-body);
  font-size: clamp(30px, 3vw, 38px);
  font-weight: 900;
  line-height: 1;
  color: var(--f-ink);
}

.rn-foot-name b { color: var(--f-coral); font-weight: 900; }

.rn-foot-name em {
  display: block;
  margin-top: 2px;
  font-family: var(--f-hand);
  font-style: normal;
  font-size: 22px;
  font-weight: 600;
  color: var(--f-coral-text);
  transform: rotate(-2deg);
  transform-origin: left center;
}

.rn-foot-brand > p {
  margin: 0 0 24px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--f-ink-soft);
}

/* --- waitlist (sketch's newsletter zone) ------------------------------------ */
.rn-foot-wait label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--f-hand);
  font-size: 23px;
  font-weight: 600;
  color: var(--f-ink);
  transform: rotate(-1deg);
  transform-origin: left center;
}

.rn-foot-waitrow { display: flex; gap: 10px; flex-wrap: wrap; }

.rn-foot-wait input {
  flex: 1 1 150px;
  min-width: 0;
  height: 52px;
  padding: 0 20px;
  border: 2px solid rgba(10, 45, 68, .28);
  border-radius: 999px;
  background: #fff;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--f-ink);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.rn-foot-wait input::placeholder { color: rgba(10, 45, 68, .38); }

.rn-foot-wait input:focus-visible {
  border-color: var(--f-coral-deep);
  box-shadow: 0 0 0 4px rgba(242, 114, 85, .2);
}

.rn-foot-wait button {
  flex: 0 0 auto;
  height: 52px;
  padding: 0 24px;
  border: 2px solid var(--f-ink);
  border-radius: 999px;
  background: var(--f-coral);
  color: var(--f-ink);
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--f-coral-deep), 0 12px 20px rgba(242, 114, 85, .3);
  transition: transform .3s cubic-bezier(.2, .8, .3, 1.2), box-shadow .3s cubic-bezier(.2, .8, .3, 1.2);
  -webkit-tap-highlight-color: transparent;
}

.rn-foot-wait button:hover {
  color: var(--f-coral-hover-ink);
  background: var(--f-coral-hover);
  transform: translateY(-2px) rotate(-1deg);
}

.rn-foot-wait button:active {
  transform: translateY(2px) rotate(0);
  box-shadow: 0 3px 0 var(--f-coral-deep), 0 6px 10px rgba(242, 114, 85, .25);
}

.rn-foot-wait button:focus-visible {
  outline: 4px solid rgba(242, 114, 85, .3);
  outline-offset: 3px;
}

.rn-foot-confirm {
  margin: 10px 0 0;
  font-family: var(--f-hand);
  font-size: 21px;
  font-weight: 600;
  color: var(--f-teal);
  opacity: 0;
  transform: rotate(-1deg);
  transform-origin: left center;
  transition: opacity .4s ease;
}

.rn-foot-confirm.is-on { opacity: 1; }

/* --- link columns ------------------------------------------------------------ */
.rn-foot-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 24px;
  flex: 1 1 auto;
  max-width: 34rem;
}

@media (min-width: 700px) {
  .rn-foot-cols { grid-template-columns: repeat(3, 1fr); }
}

.rn-foot-cols h3 {
  margin: 0 0 14px;
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.rn-foot-cols .c-coral { color: var(--f-coral-text); }
.rn-foot-cols .c-teal  { color: var(--f-teal); }
.rn-foot-cols .c-navy  { color: var(--f-ink); }

.rn-foot-cols ul { list-style: none; margin: 0; padding: 0; }
.rn-foot-cols li { margin: 0 0 10px; }

.rn-foot-cols a {
  position: relative;
  display: inline-block;
  padding: 2px 0;
  color: var(--f-ink-soft);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: color .2s ease;
}

.rn-foot-cols a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: var(--f-coral);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .28s ease;
}

.rn-foot-cols a:hover,
.rn-foot-cols a:focus-visible { color: var(--f-ink); }

.rn-foot-cols a:hover::after,
.rn-foot-cols a:focus-visible::after { transform: scaleX(1); }

/* --- divider + sticker dot ---------------------------------------------------- */
.rn-foot-divider {
  position: relative;
  height: 1px;
  margin: clamp(30px, 4vw, 44px) 0 clamp(20px, 3vw, 30px);
  background: linear-gradient(90deg, transparent, rgba(10, 45, 68, .3), transparent);
}

.rn-foot-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--f-honey);
  border: 2px solid var(--f-ink);
  box-shadow: 0 3px 0 var(--f-ink);
  transform: translate(-50%, -55%);
}

/* --- bottom row ---------------------------------------------------------------- */
.rn-foot-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

@media (min-width: 760px) {
  .rn-foot-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

.rn-foot-copy {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--f-ink-soft);
}

.rn-foot-social { display: flex; gap: 12px; }

.rn-foot-social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid var(--f-ink);
  color: #fff;
  text-decoration: none;
  transition: transform .3s cubic-bezier(.2, .8, .3, 1.2);
  -webkit-tap-highlight-color: transparent;
}

.rn-foot-social a:hover { transform: translateY(-2px) rotate(-1deg); }
.rn-foot-social a:active { transform: none; }

.rn-foot-social a:focus-visible {
  outline: 4px solid rgba(242, 114, 85, .3);
  outline-offset: 3px;
}

.rn-foot-social a.sc-sky   { color: var(--f-ink); background: var(--f-sky); box-shadow: 0 4px 0 var(--f-sky-hover); }
.rn-foot-social a.sc-coral { color: var(--f-ink); background: var(--f-coral); box-shadow: 0 4px 0 var(--f-coral-deep); }
.rn-foot-social a.sc-coral:hover { color: var(--f-coral-hover-ink); background: var(--f-coral-hover); }

.rn-foot-social svg { width: 20px; height: 20px; fill: currentColor; }

.rn-foot-legal { margin: 0; font-size: 13.5px; font-weight: 700; }

.rn-foot-legal a {
  color: var(--f-ink-soft);
  text-decoration: none;
  transition: color .2s ease;
}

.rn-foot-legal a:hover,
.rn-foot-legal a:focus-visible { color: var(--f-coral-text); }

.rn-foot-legal i { font-style: normal; color: rgba(10, 45, 68, .3); padding: 0 6px; }

.rn-foot-compliance {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--f-ink-soft);
}

.rn-foot-compliance a { color: inherit; text-decoration: none; }
.rn-foot-compliance a:hover { color: var(--f-coral-text); }

/* --- handwritten caption under the card ------------------------------------------ */
.rn-foot-caption {
  position: relative;
  margin: 28px auto 0;
  max-width: 1024px;
  text-align: center;
  font-family: var(--f-hand);
  font-size: 24px;
  font-weight: 600;
  color: var(--f-ink);
  transform: rotate(-1deg);
}

.rn-foot-caption b { color: var(--f-coral-text); font-weight: 600; }

/* --- scroll reveal: staggered entrance, spring settle ------------------------------ */
.rn-foot .rn-fr {
  opacity: 0;
  transform: translateY(28px) scale(.98);
  transition:
    opacity .5s ease var(--fr-d, 0ms),
    transform .8s cubic-bezier(.3, 1.18, .4, 1) var(--fr-d, 0ms);
}

.rn-foot .rn-fr-pop {
  opacity: 0;
  transform: scale(.5);
  transition:
    opacity .35s ease var(--fr-d, 0ms),
    transform .6s cubic-bezier(.3, 1.3, .42, 1) var(--fr-d, 0ms);
}

/* tape keeps its rotation while popping */
.rn-foot-tape.rn-fr-pop.tl { transform: rotate(-20deg) scale(.6); }
.rn-foot-tape.rn-fr-pop.tr { transform: rotate(20deg) scale(.6); }

.rn-foot.is-revealed .rn-fr { opacity: 1; transform: translateY(0) scale(1); }
.rn-foot.is-revealed .rn-fr-pop { opacity: 1; transform: scale(1); }
.rn-foot.is-revealed .rn-foot-tape.tl { opacity: .92; transform: rotate(-8deg) scale(1); }
.rn-foot.is-revealed .rn-foot-tape.tr { opacity: .92; transform: rotate(8deg) scale(1); }
.rn-foot.is-revealed .rn-foot-logo { transform: rotate(-6deg) scale(1); }
.rn-foot.is-revealed .rn-foot-dot { transform: translate(-50%, -55%) scale(1); }

/* pop-elements that carry their own resting transform */
.rn-foot-logo.rn-fr-pop { transform: rotate(-6deg) scale(.5); }
.rn-foot-dot.rn-fr-pop { transform: translate(-50%, -55%) scale(.3); }

/* --- mobile ----------------------------------------------------------------------- */
@media (max-width: 760px) {
  .rn-foot-tape { width: 88px; height: 26px; top: -13px; }
  .rn-foot-tape.tl { left: 5%; }
  .rn-foot-tape.tr { right: 5%; }
  .rn-foot-caption { font-size: 21px; }
}

/* --- reduced motion: fades only, no bob/twinkle/springs ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  .rn-foot::before,
  .rn-foot::after { animation: none; }

  .rn-foot .rn-fr,
  .rn-foot .rn-fr-pop,
  .rn-foot-tape.rn-fr-pop.tl,
  .rn-foot-tape.rn-fr-pop.tr,
  .rn-foot-logo.rn-fr-pop,
  .rn-foot-dot.rn-fr-pop {
    transform: none;
    transition: opacity .3s ease;
  }

  .rn-foot.is-revealed .rn-foot-tape.tl { transform: rotate(-8deg); }
  .rn-foot.is-revealed .rn-foot-tape.tr { transform: rotate(8deg); }
  .rn-foot.is-revealed .rn-foot-logo { transform: rotate(-6deg); }
  .rn-foot.is-revealed .rn-foot-dot { transform: translate(-50%, -55%); }

  .rn-foot-wait button,
  .rn-foot-social a,
  .rn-foot-logo { transition: none; }
}
