/* Self-hosted Google Fonts (SIL Open Font License 1.1, see /fonts/LICENSE.txt). Latin subset. */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700 900; font-display: swap; src: url("/fonts/nunito-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/fraunces-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 700; font-display: swap; src: url("/fonts/fraunces-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root { --lqip-garage: url("data:image/webp;base64,UklGRmYAAABXRUJQVlA4IFoAAADQAwCdASoYAA4APu1krU6ppaSiMAgBMB2JQBOgBEDfUHXClB8znWgA/mFKX7c1d8zifwsjCqiEO1PqoZ6b7q2Ubrc/ibzqqz1fLtbEwjpcpsQ8juGbMKR8AAA="); --lqip-estate: url("data:image/webp;base64,UklGRmQAAABXRUJQVlA4IFgAAADQAwCdASoYAA4APu1kqU2ppaQiMAgBMB2JYwCdMoACD9+mGXI7IwAA/Cq+ZQsnJl3owp4052I4ihW5zWaqq7kWsCsssbMVXmuzXJTpvT6xZi4TacvWAAAA"); }

/* SaleFans.com: the front door to GarageSaleFans and EstateSaleFans. */

:root {
  /* SaleFans logo */
  --sf-blue: #0069fe;
  --sf-orange: #fe672d;
  --sf-navy: #092c57;

  /* GarageSaleFans (the logo's orange, plus the app's garage palette) */
  --gsf-orange: #ef450a;
  --gsf-brand: #c2410c;
  --gsf-brand-strong: #9a3412;
  --gsf-ink: #131312;
  --gsf-tan: #ba906e;
  --gsf-sun: #f59e0b;

  /* EstateSaleFans (matches the app's estate palette) */
  --esf-navy: #1e3a5f;
  --esf-navy-strong: #14283f;
  --esf-gold: #7a6013;
  --esf-gold-bright: #d9a441;

  --paper: #fff9f1;
  --paper-deep: #fdeedd;
  --ink: #1b2233;
  --ink-muted: #4a5468;
  --card: #ffffff;

  --font-sans: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --r-door: 28px;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--sf-blue);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--sf-navy);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: top 0.2s var(--ease-out);
}

.skip-link:focus {
  top: 12px;
}

/* ------------------------------------------------------------------ */
/* Backdrop: drifting color blobs and floating price tags              */
/* ------------------------------------------------------------------ */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 50% -10%, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
}

.blob {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}

.blob--blue {
  background: var(--sf-blue);
  top: -18vmax;
  left: -14vmax;
  opacity: 0.2;
  animation: drift-a 26s ease-in-out infinite alternate;
}

.blob--orange {
  background: var(--sf-orange);
  top: 8vmax;
  right: -18vmax;
  opacity: 0.24;
  animation: drift-b 30s ease-in-out infinite alternate;
}

.blob--sun {
  background: var(--gsf-sun);
  bottom: -26vmax;
  left: 22vw;
  opacity: 0.16;
  animation: drift-c 34s ease-in-out infinite alternate;
}

@keyframes drift-a {
  to { transform: translate(10vw, 8vh) scale(1.12); }
}

@keyframes drift-b {
  to { transform: translate(-12vw, 10vh) scale(0.92); }
}

@keyframes drift-c {
  to { transform: translate(-10vw, -8vh) scale(1.08); }
}

/* Paper price tags that float up the page. Pure decoration. */
.float-tag {
  --rot: -12deg;
  position: absolute;
  bottom: -80px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px 6px 22px;
  border-radius: 6px 12px 12px 6px;
  background: #fff;
  color: var(--sf-navy);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px -6px rgba(9, 44, 87, 0.35);
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
  opacity: 0;
  animation: tag-float 22s linear infinite;
}

.float-tag::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--paper-deep);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.float-tag--1 { left: 2.5vw; --rot: -14deg; animation-delay: -2s; background: #fff4d6; }
.float-tag--1::after { content: "$1"; }
.float-tag--2 { left: 90vw; --rot: 12deg; animation-delay: -9s; animation-duration: 26s; background: #e7f0ff; }
.float-tag--2::after { content: "Vintage!"; }
.float-tag--3 { left: 85vw; --rot: -8deg; animation-delay: -15s; animation-duration: 24s; background: #ffe6dc; }
.float-tag--3::after { content: "50\00a2"; }
.float-tag--4 { left: 6vw; --rot: 16deg; animation-delay: -20s; animation-duration: 28s; background: #e3f5f1; }
.float-tag--4::after { content: "Rare find"; }

@keyframes tag-float {
  0% { transform: translate3d(0, 0, 0) rotate(var(--rot)); opacity: 0; }
  8% { opacity: 0.75; }
  50% { transform: translate3d(1.5vw, -58vh, 0) rotate(calc(var(--rot) * -1)); }
  92% { opacity: 0.75; }
  100% { transform: translate3d(-2vw, -118vh, 0) rotate(var(--rot)); opacity: 0; }
}

/* ------------------------------------------------------------------ */
/* Layout                                                              */
/* ------------------------------------------------------------------ */

.masthead,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.masthead {
  display: flex;
  justify-content: center;
  padding: clamp(16px, 2.4vw, 30px) 16px 0;
}

.brand {
  display: block;
  width: clamp(220px, 28vw, 370px);
  border-radius: 18px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.brand svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

main {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ------------------------------------------------------------------ */
/* Intro                                                               */
/* ------------------------------------------------------------------ */

.intro {
  text-align: center;
  padding: clamp(10px, 1.4vw, 16px) 0 clamp(20px, 2.2vw, 26px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 0 rgba(9, 44, 87, 0.06), 0 6px 18px -10px rgba(9, 44, 87, 0.4);
  color: var(--sf-navy);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sf-orange);
  box-shadow: 0 0 0 4px rgba(254, 103, 45, 0.18);
}

.intro__title {
  margin: 0;
  color: var(--sf-navy);
  font-size: clamp(2.05rem, 4.6vw, 3.5rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.squiggle-word {
  position: relative;
  display: inline-block;
  color: var(--sf-blue);
  white-space: nowrap;
}

.squiggle {
  position: absolute;
  left: -2%;
  bottom: -0.2em;
  width: 104%;
  height: 0.34em;
  overflow: visible;
}

.squiggle path {
  fill: none;
  stroke: var(--sf-orange);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 360;
  stroke-dashoffset: 0;
  animation: squiggle-draw 1.1s 0.75s var(--ease-out) backwards;
}

@keyframes squiggle-draw {
  from { stroke-dashoffset: 360; }
}

.intro__lede {
  max-width: 40rem;
  margin: 14px auto 0;
  color: var(--ink-muted);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  font-weight: 700;
}

/* 404 page */
.intro--404 {
  padding-top: clamp(40px, 8vw, 96px);
  padding-bottom: clamp(60px, 10vw, 120px);
}

.home-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 28px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--sf-blue);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 26px -14px rgba(0, 105, 254, 0.8);
  transition: transform 0.45s var(--ease-spring), background-color 0.3s ease;
}

.home-cta:hover {
  background: #0053c9;
  transform: translateY(-2px) scale(1.03);
}

/* ------------------------------------------------------------------ */
/* Doors: the two marketplace cards                                    */
/* ------------------------------------------------------------------ */

.doors {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(22px, 3vw, 36px);
  padding-bottom: clamp(36px, 6vw, 64px);
}

@media (min-width: 900px) {
  .doors {
    grid-template-columns: 1fr 1fr;
  }

  /* Wide screens: a slightly letterboxed crop keeps both buttons above the fold on laptops. */
  .doors .door__media {
    aspect-ratio: 2 / 1;
  }
}

.door {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --lift: 0px;
  --glow-x: 50%;
  --glow-y: 30%;
  position: relative;
  display: block;
  border-radius: var(--r-door);
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.door:focus-visible {
  outline: none;
}

/* Listed with .is-live so the keyboard focus ring wins over the hover shadow. */
.door:focus-visible .door__frame,
.door.is-live:focus-visible .door__frame {
  box-shadow:
    0 0 0 4px var(--paper),
    0 0 0 8px var(--door-ring),
    0 30px 60px -24px var(--door-shadow);
}

.door--garage {
  --door-ring: var(--gsf-orange);
  --door-shadow: rgba(154, 52, 18, 0.55);
  --door-tint: #f3e6d6;
}

.door--estate {
  --door-ring: var(--esf-navy);
  --door-shadow: rgba(20, 40, 63, 0.6);
  --door-tint: #e4e2dc;
}

.door__frame {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--r-door);
  background: var(--card);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 2px 6px rgba(27, 34, 51, 0.06),
    0 18px 40px -22px var(--door-shadow);
  transform: perspective(1100px) translateY(var(--lift)) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition:
    transform 0.55s var(--ease-spring),
    box-shadow 0.45s var(--ease-out);
  will-change: transform;
}

.door.is-live .door__frame {
  --lift: -10px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 4px 10px rgba(27, 34, 51, 0.08),
    0 40px 70px -28px var(--door-shadow);
}

.door.is-tilting .door__frame {
  transition:
    transform 0.12s linear,
    box-shadow 0.45s var(--ease-out);
}

.door:active .door__frame {
  --lift: -4px;
  transition-duration: 0.12s;
}

.door__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--door-tint) center / cover no-repeat;
  isolation: isolate;
}

.door--garage .door__media {
  background-image: var(--lqip-garage);
}

.door--estate .door__media {
  background-image: var(--lqip-estate);
}

.door__media picture,
.door__media img,
.door__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.door__media img {
  transform: scale(1.01);
  transition: transform 1.4s var(--ease-out);
}

.door.is-live .door__media img {
  transform: scale(1.06);
}

.door__video {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.4s var(--ease-out);
}

.door__video.is-playing {
  opacity: 1;
}

.door.is-live .door__video {
  transform: scale(1.04);
}

/* Pointer-following sheen over the photo. */
.door__shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(520px circle at var(--glow-x) var(--glow-y), rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.door.is-live .door__shine {
  opacity: 1;
}

.door__badge {
  position: absolute;
  z-index: 3;
  left: 16px;
  top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.45);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.door__badge .dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--door-ring);
}

.door.is-live .door__badge .dot {
  animation: dot-pulse 1.4s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.6); }
}

.door__body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: clamp(18px, 2vw, 26px) clamp(20px, 2.6vw, 32px) clamp(20px, 2.2vw, 28px);
}

.door--garage .door__body {
  background:
    radial-gradient(420px 160px at 100% 0%, rgba(245, 158, 11, 0.12), transparent 70%),
    #fffaf5;
}

.door--estate .door__body {
  background:
    radial-gradient(420px 160px at 100% 0%, rgba(217, 164, 65, 0.16), transparent 70%),
    #fffdf7;
}

.door__name {
  margin: 0;
  width: 100%;
  font-size: 1rem;
  line-height: 1;
}

.door__logo {
  display: block;
}

.door__logo--garage svg {
  width: clamp(210px, 52%, 300px);
  height: auto;
  overflow: visible;
}

/* Typographic lockups (EstateSaleFans, and GarageSaleFans if its SVG is missing). */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  line-height: 0.98;
  letter-spacing: -0.012em;
}

.wordmark__line {
  display: block;
  white-space: nowrap;
}

.wordmark--estate {
  color: var(--esf-navy);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.05rem, 3vw, 2.6rem);
}

.wordmark--estate .accent {
  display: inline-block;
  margin-right: -0.03em;
  padding-right: 0.07em;
  color: var(--esf-gold);
  font-style: italic;
  background: linear-gradient(100deg, var(--esf-gold) 0%, var(--esf-gold) 40%, #f4d98b 50%, var(--esf-gold) 60%, var(--esf-gold) 100%);
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .wordmark--estate .accent {
    color: transparent;
  }
}

.wordmark--estate .tld {
  color: var(--esf-gold);
  font-style: italic;
  font-size: 0.5em;
  letter-spacing: 0;
}

.wordmark--estate::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 12px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--esf-gold-bright), rgba(217, 164, 65, 0));
  transition: width 0.6s var(--ease-out);
}

.door--estate.is-live .wordmark--estate::after {
  width: 120px;
}

.door--estate.is-live .wordmark--estate .accent {
  animation: gold-shimmer 1.8s ease-in-out;
}

@keyframes gold-shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0% 0; }
}

.wordmark--garage {
  color: var(--gsf-ink);
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(2.05rem, 3vw, 2.6rem);
}

.wordmark--garage .accent,
.wordmark--garage .tld {
  color: var(--gsf-orange);
}

.wordmark--garage .tld {
  font-size: 0.5em;
}

.door__tagline {
  margin: 4px 0 0;
  font-size: clamp(0.78rem, 1.05vw, 0.86rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.door__tagline--garage {
  color: var(--gsf-ink);
}

.door__tagline--garage .accent {
  color: var(--gsf-brand);
}

.door__tagline--estate {
  color: var(--esf-navy);
}

.door__tagline--estate .accent {
  color: var(--esf-gold);
}

.door__desc {
  margin: 0;
  max-width: 30rem;
  color: var(--ink-muted);
  font-size: clamp(1rem, 1.3vw, 1.08rem);
  font-weight: 700;
}

.door__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 13px 20px 13px 22px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  font-size: 1.02rem;
  letter-spacing: 0.005em;
  box-shadow: 0 10px 22px -12px var(--door-shadow);
  transition: transform 0.45s var(--ease-spring), box-shadow 0.3s ease, background-color 0.3s ease;
}

.door--garage .door__cta {
  background: var(--gsf-brand);
}

.door--estate .door__cta {
  background: var(--esf-navy);
}

.door.is-live .door__cta {
  transform: translateY(-2px) scale(1.03);
}

.door--garage.is-live .door__cta {
  background: var(--gsf-brand-strong);
}

.door--estate.is-live .door__cta {
  background: var(--esf-navy-strong);
}

.door__cta .arrow {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.45s var(--ease-spring);
}

.door.is-live .door__cta .arrow {
  transform: translateX(4px);
}

/* GarageSaleFans logo: the pin hops and the treasure trail redraws itself. */
#gsf-pin,
#gsf-pin-shadow,
#gsf-x,
.gsf-dash {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

#gsf-pin {
  transform-origin: 50% 100%;
}

.door--garage.is-live #gsf-pin {
  animation: pin-hop 1.1s var(--ease-out);
}

.door--garage.is-live #gsf-pin-shadow {
  animation: shadow-breathe 1.1s var(--ease-out);
}

.door--garage.is-live .gsf-dash {
  animation: dash-in 0.42s calc(var(--i, 0) * 38ms + 120ms) var(--ease-out) backwards;
}

.door--garage.is-live #gsf-x {
  animation: x-pop 0.7s calc(var(--dash-count, 20) * 38ms + 200ms) var(--ease-spring) backwards;
}

@keyframes pin-hop {
  0% { transform: none; }
  16% { transform: scale(1.08, 0.9); }
  42% { transform: translateY(-16%) scale(0.96, 1.05); }
  64% { transform: translateY(0) scale(1.06, 0.93); }
  80% { transform: translateY(-4%) scale(0.99, 1.02); }
  100% { transform: none; }
}

@keyframes shadow-breathe {
  0%, 100% { transform: none; opacity: 1; }
  42% { transform: scale(0.62); opacity: 0.55; }
  64% { transform: scale(1.06); opacity: 1; }
}

@keyframes dash-in {
  from { opacity: 0; transform: scale(0.4); }
}

@keyframes x-pop {
  from { opacity: 0; transform: scale(0.2) rotate(-90deg); }
}

/* ------------------------------------------------------------------ */
/* Entrance animation                                                  */
/* ------------------------------------------------------------------ */

.reveal {
  animation: rise-in 0.9s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 110ms + 150ms);
}

.reveal[data-reveal="1"] { --i: 1; }
.reveal[data-reveal="2"] { --i: 2; }
.reveal[data-reveal="3"] { --i: 3; }
.reveal[data-reveal="4"] { --i: 4; }
.reveal[data-reveal="5"] { --i: 5.4; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.98);
  }
}

/* ------------------------------------------------------------------ */
/* SaleFans logo motion. app.js toggles these classes on the SVG.      */
/* ------------------------------------------------------------------ */

#sf-s-blue,
#sf-s-orange,
#sf-mark,
#sf-wordmark {
  transform-box: fill-box;
  transform-origin: center;
}

/* Intro: the two halves of the S fly in from opposite sides and click together. */
.logo-intro #sf-s-blue {
  animation: s-in-blue 1.1s var(--ease-spring) both;
}

.logo-intro #sf-s-orange {
  animation: s-in-orange 1.1s 0.08s var(--ease-spring) both;
}

.logo-intro #sf-wordmark {
  animation: word-in 0.9s 0.35s var(--ease-out) both;
}

@keyframes s-in-blue {
  from { transform: translate(-60%, -40%) rotate(-160deg) scale(0.4); opacity: 0; }
  60% { opacity: 1; }
}

@keyframes s-in-orange {
  from { transform: translate(60%, 40%) rotate(160deg) scale(0.4); opacity: 0; }
  60% { opacity: 1; }
}

@keyframes word-in {
  from { transform: translateX(-4%); opacity: 0; clip-path: inset(0 100% 0 0); }
  to { transform: none; opacity: 1; clip-path: inset(0 0 0 0); }
}

/* Idle flourish 1: the S spins a full turn and bounces. */
.logo-spin #sf-mark {
  animation: s-spin 1.25s var(--ease-spring);
}

@keyframes s-spin {
  0% { transform: rotate(0) scale(1); }
  30% { transform: rotate(-24deg) scale(0.9); }
  75% { transform: rotate(372deg) scale(1.08); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Idle flourish 2: the halves pull apart, tilt, and snap back together. */
.logo-split #sf-s-blue {
  animation: s-split-blue 1.3s var(--ease-out);
}

.logo-split #sf-s-orange {
  animation: s-split-orange 1.3s var(--ease-out);
}

@keyframes s-split-blue {
  0% { transform: none; }
  35% { transform: translate(-16%, -12%) rotate(-18deg); }
  60% { transform: translate(-16%, -12%) rotate(-18deg); }
  82% { transform: translate(2%, 2%) rotate(3deg); }
  100% { transform: none; }
}

@keyframes s-split-orange {
  0% { transform: none; }
  35% { transform: translate(16%, 12%) rotate(-18deg); }
  60% { transform: translate(16%, 12%) rotate(-18deg); }
  82% { transform: translate(-2%, -2%) rotate(3deg); }
  100% { transform: none; }
}

/* Idle flourish 3: a happy hop with a squash and stretch. */
.logo-hop #sf-mark {
  animation: s-hop 1.1s cubic-bezier(0.3, 0.7, 0.4, 1);
  transform-origin: 50% 100%;
}

@keyframes s-hop {
  0% { transform: none; }
  18% { transform: translateY(0) scale(1.12, 0.84); }
  45% { transform: translateY(-22%) scale(0.92, 1.1) rotate(-8deg); }
  66% { transform: translateY(0) scale(1.1, 0.9); }
  80% { transform: translateY(-5%) scale(0.98, 1.03) rotate(3deg); }
  100% { transform: none; }
}

/* A light sheen sweeps across the wordmark with every flourish. */
.sf-sheen {
  opacity: 0;
}

.logo-spin .sf-sheen,
.logo-split .sf-sheen,
.logo-hop .sf-sheen {
  animation: sheen 1.2s 0.25s ease-in-out;
}

@keyframes sheen {
  0% { opacity: 0; transform: translateX(0); }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateX(var(--sheen-travel, 1400px)); }
}

/* Confetti launched from the logo when it is tapped. */
.confetti {
  position: fixed;
  z-index: 30;
  left: 0;
  top: 0;
  width: 12px;
  height: 7px;
  border-radius: 2px;
  pointer-events: none;
  will-change: transform, opacity;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid rgba(9, 44, 87, 0.08);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.site-footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 16px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  color: var(--ink-muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.site-footer__legal {
  margin: 0;
  color: var(--sf-navy);
  font-weight: 800;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.site-footer__group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.site-footer a {
  color: var(--sf-navy);
  text-decoration: underline;
  text-decoration-color: rgba(9, 44, 87, 0.3);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.site-footer a:hover {
  color: var(--sf-blue);
  text-decoration-color: currentColor;
}

.site-footer .sep {
  color: rgba(9, 44, 87, 0.35);
}

@media (max-width: 640px) {
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer .sep {
    display: none;
  }

  .float-tag--3,
  .float-tag--4 {
    display: none;
  }

  .door__badge {
    left: 12px;
    top: 12px;
    font-size: 0.8rem;
  }

  .door__tagline {
    letter-spacing: 0.14em;
  }
}

/* ------------------------------------------------------------------ */
/* Motion preferences                                                  */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }

  .float-tag {
    display: none;
  }

  .door__frame {
    transform: none !important;
  }
}
