:root {
  /* Palette sampled from the shrimp mascot */
  --navy-950: #14203f;
  --navy-800: #233358;
  --navy-600: #314878;
  --cream: #fbf1e0;
  --cream-deep: #eedbc1;
  --yellow: #fcc35f;
  --orange: #fb9e48;
  --red: #fa5339;
  --red-deep: #eb4733;
  --ink: var(--navy-950);
  --paper: var(--cream);
  --muted: var(--navy-600);
  --line: color-mix(in srgb, var(--navy-600) 28%, var(--cream));
  --bubble: #fffdf8;
  --spark: var(--yellow);
  --spark-edge: var(--red-deep);
  --font-ui: 'Pixelify Sans', 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color: var(--ink);
  font-family: var(--font-ui);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--navy-800);
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

#app {
  position: relative;
  isolation: isolate;
}

/* Landing = app-like fixed viewport only */
.landing {
  position: relative;
  min-height: 100dvh;
  height: 100svh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-x: clip;
}

/* Atmosphere */
.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, var(--cream) 0%, transparent 58%),
    radial-gradient(ellipse 50% 35% at 18% 30%, color-mix(in srgb, var(--yellow) 35%, transparent), transparent 70%),
    linear-gradient(
      180deg,
      var(--cream) 0%,
      var(--cream-deep) 28%,
      var(--navy-600) 62%,
      var(--navy-950) 100%
    );
}

.sky__wash {
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(ellipse 42% 28% at 22% 24%, var(--cream) 0%, transparent 70%),
    radial-gradient(ellipse 36% 24% at 58% 18%, var(--yellow) 0%, transparent 70%),
    radial-gradient(ellipse 48% 32% at 78% 30%, var(--orange) 0%, transparent 72%),
    radial-gradient(ellipse 55% 40% at 40% 48%, var(--navy-600) 0%, transparent 70%),
    radial-gradient(ellipse 70% 45% at 55% 78%, var(--navy-950) 0%, transparent 68%),
    radial-gradient(ellipse 50% 35% at 15% 85%, var(--navy-800) 0%, transparent 70%);
  filter: blur(34px) contrast(1.12) saturate(1.05);
  animation: drift 28s ease-in-out infinite alternate;
  transform: scale(1.1);
  opacity: 0.75;
}

.sky__grain {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Hero fills remaining viewport */
.hero {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(0.75rem, 2vw, 1.5rem) clamp(0.75rem, 3vw, 2rem)
    clamp(8rem, 28vh, 16rem);
  gap: 0;
  overflow: hidden;
}

.thought {
  position: relative;
  width: min(92vw, 680px);
  z-index: 10;
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(58dvh, 100%);
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation: rise-in 900ms var(--ease-out) 120ms forwards;
}

.bubble {
  position: relative;
  background: var(--bubble);
  border: 5px solid var(--ink);
  border-radius: clamp(16px, 3vw, 24px);
  padding: clamp(0.85rem, 2.2vw, 1.35rem) clamp(0.9rem, 2.4vw, 1.5rem)
    clamp(0.8rem, 2vw, 1.2rem);
  box-shadow:
    5px 5px 0 color-mix(in srgb, var(--navy-950) 18%, transparent),
    0 22px 48px color-mix(in srgb, var(--navy-950) 16%, transparent);
  overflow: auto;
  min-height: 0;
}

.bubble__date {
  margin: 0 0 0.45rem;
  font-size: clamp(0.6rem, 1.5vw, 0.7rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.bubble__title {
  margin: 0 0 clamp(0.7rem, 1.8vw, 1.15rem);
  font-size: clamp(1.25rem, 3.4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.stories {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(0.45rem, 1.4vw, 0.95rem);
}

.story__link {
  display: grid;
  grid-template-columns: auto 1px minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.65rem;
  padding: 0.1rem 0;
  transition: transform 180ms var(--ease-out);
}

.story__link:hover {
  transform: translateX(3px);
}

.story__link:hover .story__arrow {
  transform: translateX(3px);
}

.story__num {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-top: 0.15rem;
}

.story__rule {
  width: 1px;
  align-self: stretch;
  background: var(--line);
  min-height: 1.2rem;
}

.story__title {
  font-size: clamp(0.84rem, 1.8vw, 1.08rem);
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.story__arrow {
  font-size: 0.95rem;
  line-height: 1.2;
  transition: transform 180ms var(--ease-out);
}

.bubble__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: clamp(0.7rem, 1.8vw, 1.1rem);
  font-size: clamp(0.78rem, 1.6vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--red-deep);
  transition: opacity 160ms ease;
}

.bubble__cta:hover {
  opacity: 0.55;
}

.bubble__cta-icon {
  display: grid;
  place-items: center;
}

.thought__dots {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.35rem 0 0;
  flex: 0 0 auto;
}

.thought__dots span {
  display: block;
  width: 8px;
  height: 8px;
  background: #fff;
  border: 0;
  box-shadow: none;
  animation: bob 2.8s ease-in-out infinite;
}

/* Big bottom peek — same idea as Finanching login finny */
.mascot {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 5;
  margin: 0;
  width: clamp(320px, 48vw, 700px);
  max-width: 700px;
  max-height: none;
  line-height: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  animation: mascot-rise 1000ms var(--ease-out) 280ms forwards;
  filter: drop-shadow(0 10px 18px color-mix(in srgb, var(--navy-950) 28%, transparent));
}

.mascot img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  user-select: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Motion */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mascot-rise {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes drift {
  from {
    transform: scale(1.08) translate3d(-1.5%, -1%, 0);
  }
  to {
    transform: scale(1.12) translate3d(1.5%, 1.5%, 0);
  }
}

/* Large mobile / tablet */
@media (min-width: 480px) {
  .thought {
    width: min(92vw, 600px);
  }
}

@media (min-width: 768px) {
  .thought {
    width: min(92vw, 640px);
  }

  .mascot {
    width: clamp(280px, 42vw, 560px);
  }
}

@media (min-width: 1024px) {
  .thought {
    width: min(92vw, 680px);
  }

  .bubble {
    border-width: 5px;
  }

  .mascot {
    width: clamp(360px, 48vw, 700px);
  }
}

/* Short viewports — reduce whitespace / density first */
@media (max-height: 760px) {
  .hero {
    padding-bottom: clamp(5rem, 22vh, 10rem);
    justify-content: flex-start;
    padding-top: 0.75rem;
  }

  .bubble {
    padding: 0.75rem 0.9rem 0.7rem;
    border-width: 3px;
  }

  .bubble__title {
    font-size: clamp(1.05rem, 4.2vw, 1.45rem);
    margin-bottom: 0.55rem;
  }

  .stories {
    gap: 0.4rem;
  }

  .story__title {
    font-size: 0.84rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .bubble__cta {
    margin-top: 0.55rem;
  }

  .thought__dots {
    margin: 0.25rem 0 0;
  }

  .mascot {
    width: clamp(180px, 32vw, 320px);
  }
}

@media (max-height: 640px) {
  .bubble__date {
    margin-bottom: 0.25rem;
  }

  .bubble__title {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
  }

  .stories {
    gap: 0.28rem;
  }

  .mascot {
    width: clamp(140px, 28vw, 220px);
  }
}

@media (max-width: 640px) {
  .hero {
    padding-bottom: clamp(5.5rem, 26vh, 11rem);
  }

  .mascot {
    width: clamp(220px, 62vw, 340px);
  }
}

@media (max-width: 479px) {
  .story__arrow {
    display: none;
  }

  .story__link {
    grid-template-columns: auto 1px minmax(0, 1fr);
    gap: 0.5rem;
  }

  .bubble {
    border-width: 3px;
    box-shadow: 3px 3px 0 color-mix(in srgb, var(--navy-950) 20%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sky__wash,
  .thought,
  .mascot,
  .thought__dots span {
    animation: none !important;
  }

  .thought,
  .mascot {
    opacity: 1;
  }
}
