/* Fish Sort Master — deep teal, coral accents, bubble cyan, foam backgrounds */

:root {
  --foam: #e8f6f8;
  --foam-deep: #d4ecef;
  --foam-light: #f4fbfc;
  --teal: #0a4d5c;
  --teal-mid: #0d6b7a;
  --teal-soft: #1a8a9a;
  --teal-glow: rgba(46, 196, 207, 0.22);
  --coral: #ff6f61;
  --coral-deep: #e85d4f;
  --coral-soft: #ff9a8f;
  --bubble: #5ce1e6;
  --bubble-deep: #2ec4cf;
  --bubble-pale: #b8f4f7;
  --ink: #0c2e38;
  --ink-soft: rgba(12, 46, 56, 0.74);
  --white: #ffffff;
  --shadow: 0 18px 44px rgba(10, 77, 92, 0.14);
  --shadow-soft: 0 10px 28px rgba(10, 77, 92, 0.09);
  --radius: 1.25rem;
  --radius-pill: 999px;
  --font-display: "Baloo 2", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --leading-body: 1.72;
  --leading-title: 1.26;
  --header-h: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: var(--leading-body);
  color: var(--ink);
  background: var(--foam-light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: var(--leading-title);
  font-weight: 700;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal-mid);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--teal);
  color: var(--white);
  border-radius: 8px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Ambient reef background */
.reef-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, var(--bubble-pale) 0%, transparent 55%),
    linear-gradient(180deg, var(--foam-light) 0%, var(--foam) 42%, var(--foam-deep) 100%);
}

.reef-bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  animation: reef-drift 18s ease-in-out infinite;
}

.reef-bg__glow--teal {
  width: 320px;
  height: 320px;
  top: 8%;
  left: -8%;
  background: rgba(13, 107, 122, 0.35);
}

.reef-bg__glow--coral {
  width: 260px;
  height: 260px;
  top: 42%;
  right: -6%;
  background: rgba(255, 111, 97, 0.38);
  animation-delay: -6s;
}

.reef-bg__glow--cyan {
  width: 220px;
  height: 220px;
  bottom: 12%;
  left: 20%;
  background: rgba(92, 225, 230, 0.45);
  animation-delay: -11s;
}

.reef-bg__foam {
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.65), transparent);
}

@keyframes reef-drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(0, -16px);
  }
}

/* Sticky navigation */
.fsm-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem 0;
}

.fsm-nav__bubble-rail {
  max-width: 1120px;
  margin: 0 auto;
  height: 7px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--teal-mid), var(--bubble), var(--coral));
  opacity: 0.92;
}

.fsm-nav__bar {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid rgba(46, 196, 207, 0.22);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  transition: box-shadow 0.28s ease, border-color 0.28s ease;
}

.fsm-nav.is-scrolled .fsm-nav__bar {
  box-shadow: var(--shadow);
  border-color: rgba(46, 196, 207, 0.35);
}

.fsm-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.fsm-nav__brand span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fsm-nav__brand img {
  border-radius: 12px;
  box-shadow: 0 4px 14px var(--teal-glow);
  flex-shrink: 0;
}

.fsm-nav__links {
  display: none;
  align-items: center;
  gap: 0.1rem;
  margin-left: auto;
  margin-right: 0.35rem;
}

.fsm-nav__links a {
  padding: 0.45rem 0.72rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.fsm-nav__links a:hover {
  background: var(--foam);
  color: var(--coral-deep);
  text-decoration: none;
}

.fsm-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.fsm-nav__links ~ .fsm-nav__actions {
  margin-left: 0;
}

.fsm-nav__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(13, 107, 122, 0.28);
  border-radius: 11px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fsm-nav__burger:hover {
  border-color: var(--bubble-deep);
  box-shadow: 0 4px 12px var(--teal-glow);
}

.fsm-nav__burger span {
  display: block;
  height: 2px;
  margin: 0 10px;
  background: var(--teal);
  border-radius: 2px;
}

@media (min-width: 920px) {
  .fsm-nav__links {
    display: flex;
  }

  .fsm-nav__burger {
    display: none;
  }
}

.nav-sheet {
  position: fixed;
  inset: 0;
  z-index: 99;
  padding: 5.5rem 1.25rem 2rem;
  background: rgba(232, 246, 248, 0.98);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  backdrop-filter: blur(8px);
}

.nav-sheet[hidden] {
  display: none;
}

.nav-sheet a {
  font-weight: 700;
  padding: 0.85rem 1rem;
  background: var(--white);
  border: 2px solid var(--foam-deep);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}

.nav-sheet a:hover {
  border-color: var(--bubble-deep);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn--sm {
  font-size: 0.88rem;
  padding: 0.5rem 1rem;
}

.btn--lg {
  font-size: 1rem;
  padding: 0.78rem 1.35rem;
}

.btn--xl {
  font-size: 1.05rem;
  padding: 0.92rem 1.65rem;
}

.btn--block {
  width: 100%;
}

.btn--coral {
  background: linear-gradient(135deg, var(--coral), var(--teal-mid));
  color: var(--white);
  box-shadow: 0 10px 30px rgba(255, 111, 97, 0.35);
}

.btn--coral:hover {
  box-shadow: 0 14px 36px rgba(255, 111, 97, 0.42);
}

.btn--foam {
  background: var(--white);
  color: var(--teal);
  border: 2px solid rgba(46, 196, 207, 0.38);
  box-shadow: 0 6px 20px rgba(10, 77, 92, 0.07);
}

.btn--foam:hover {
  background: var(--foam);
}

.btn svg,
.btn i svg {
  width: 1.15em;
  height: 1.15em;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* Hero */
.hero {
  padding-top: 0.5rem;
}

.hero__banner {
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid var(--white);
  box-shadow: var(--shadow);
}

.hero__banner img {
  display: block;
  width: 100%;
  max-height: min(42vw, 320px);
  object-fit: cover;
  object-position: center 40%;
}

.hero__stage {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero__stage {
    grid-template-columns: 1.06fr 0.84fr;
    gap: 2.5rem;
  }
}

.hero__copy {
  padding: 1.45rem 1.35rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--foam-deep);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.hero__copy::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--bubble), var(--coral));
}

.hero__kicker {
  margin: 0.35rem 0 0.6rem;
  font-weight: 700;
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--coral-deep);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.2vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 0.85rem;
}

.hero h1 span {
  display: block;
  margin-top: 0.22rem;
  line-height: 1.24;
  background: linear-gradient(90deg, var(--teal-mid), var(--bubble-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  margin: 0 0 1.05rem;
  color: var(--ink-soft);
  line-height: 1.76;
  font-size: 1.02rem;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.hero__chips span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.38rem 0.78rem;
  background: var(--foam);
  border: 1px solid var(--bubble-pale);
  border-radius: var(--radius-pill);
  color: var(--ink);
}

.hero__chips svg {
  width: 16px;
  height: 16px;
  color: var(--teal-mid);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__phone {
  position: relative;
  margin: 0 auto;
  max-width: 285px;
  padding: 0.55rem;
  background: linear-gradient(145deg, var(--teal), #063540);
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(92, 225, 230, 0.25);
}

.hero__phone-bubble {
  position: absolute;
  border-radius: 50%;
  border: 2px solid;
  pointer-events: none;
  animation: bubble-pulse 4s ease-in-out infinite;
}

.hero__phone-bubble--a {
  width: 46px;
  height: 46px;
  right: -18px;
  top: 14%;
  border-color: var(--bubble);
  box-shadow: inset 0 0 12px rgba(92, 225, 230, 0.4);
}

.hero__phone-bubble--b {
  width: 32px;
  height: 32px;
  left: -14px;
  bottom: 24%;
  border-color: var(--coral-soft);
  animation-delay: -1.8s;
}

@keyframes bubble-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.hero__phone img {
  width: 100%;
  border-radius: 22px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: var(--teal);
}

@media (min-width: 900px) {
  .hero__phone {
    margin: 0;
    justify-self: end;
  }
}

/* Section headers */
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
}

.section-head .eyebrow,
.eyebrow {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--teal-mid);
  margin: 0 0 0.45rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.28rem);
  margin: 0;
  line-height: 1.24;
}

.section-head h2 span {
  color: var(--coral);
}

.section-head__lead {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

/* Features — equal 2×2 grid */
.features-grid {
  margin-top: 4.5rem;
}

.features-grid__cells {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .features-grid__cells {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
  }
}

.feature-card {
  padding: 1.4rem 1.3rem;
  background: var(--white);
  border: 1px solid var(--foam-deep);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  text-align: left;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.feature-card__icon {
  width: 50px;
  height: 50px;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--bubble-deep), var(--teal-mid));
  color: var(--white);
  box-shadow: 0 6px 18px var(--teal-glow);
}

.feature-card__icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.14rem;
  margin: 0 0 0.5rem;
  line-height: 1.3;
  color: var(--teal);
}

.feature-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
}

/* How to play */
.howto {
  margin-top: 3.75rem;
}

.howto__panel {
  padding: 1.55rem 1.4rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(92, 225, 230, 0.14), transparent 45%),
  linear-gradient(120deg, rgba(13, 107, 122, 0.08), rgba(255, 111, 97, 0.1));
  border: 2px dashed rgba(46, 196, 207, 0.42);
  border-radius: var(--radius);
}

.howto__panel h2 {
  font-family: var(--font-display);
  margin: 0 0 0.85rem;
  font-size: 1.38rem;
  color: var(--teal);
}

.howto__list {
  margin: 0 0 1.1rem;
  padding-left: 1.3rem;
  color: var(--ink-soft);
}

.howto__list li {
  margin-bottom: 0.55rem;
  padding-left: 0.15rem;
}

.howto__list li::marker {
  color: var(--coral);
  font-weight: 700;
}

.howto__cta-line {
  margin: 0;
  font-weight: 700;
  color: var(--teal-mid);
  font-size: 1.02rem;
}

/* Screenshot grid */
.screen-grid {
  margin-top: 4.5rem;
}

.screen-grid__wall {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.screen-tile {
  flex: 0 0 min(68vw, 190px);
  margin: 0;
  scroll-snap-align: center;
  padding: 0.45rem;
  background: linear-gradient(145deg, var(--teal-mid), var(--teal));
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(92, 225, 230, 0.2);
}

.screen-tile img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 12px;
  background: var(--teal);
}

.screen-tile figcaption {
  margin: 0.5rem 0 0.12rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bubble-pale);
}

@media (min-width: 720px) {
  .screen-grid__wall {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    overflow: visible;
    padding-bottom: 0;
    max-width: 720px;
    margin: 0 auto;
  }

  .screen-tile {
    flex: unset;
    min-width: 0;
  }
}

@media (min-width: 1100px) {
  .screen-grid__wall {
    max-width: none;
    grid-template-columns: repeat(5, 1fr);
    justify-items: center;
  }
}

/* Download */
.download {
  margin-top: 4.5rem;
}

.download__card {
  text-align: center;
  padding: 2.55rem 1.5rem;
  background: var(--white);
  border: 2px solid var(--foam-deep);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.download__card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 3px;
  background: linear-gradient(135deg, var(--teal-mid), var(--bubble), var(--coral));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.75;
}

.download__card::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  width: 280px;
  height: 280px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--teal-glow), transparent 70%);
  pointer-events: none;
}

.download__icon {
  margin: 0 auto 1rem;
  border-radius: 18px;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 24px var(--teal-glow);
}

.download__card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin: 0 0 0.35rem;
  position: relative;
  z-index: 1;
  color: var(--teal);
}

.download__lead {
  font-weight: 700;
  line-height: 1.5;
  color: var(--coral-deep);
  margin: 0 0 0.35rem;
  position: relative;
  z-index: 1;
}

.download__card > p {
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
  position: relative;
  z-index: 1;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.download__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Footer */
.footer {
  margin-top: 3rem;
  padding: 2rem 1.25rem;
  background: var(--white);
  border-top: 2px solid var(--foam-deep);
}

.footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--teal);
}

.footer__brand img {
  border-radius: 10px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.footer__links a {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--teal-mid);
}

.footer__links a:hover {
  color: var(--coral-deep);
}

.footer__copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Coming soon modal */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 46, 56, 0.55);
  backdrop-filter: blur(4px);
}

.modal__panel {
  position: relative;
  max-width: 400px;
  width: 100%;
  padding: 2rem 1.75rem;
  background: var(--white);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 28px 64px rgba(10, 77, 92, 0.22);
  border: 1px solid var(--foam-deep);
}

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: var(--foam);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  transition: background 0.2s ease;
}

.modal__close:hover {
  background: var(--bubble-pale);
}

.modal__mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--bubble-deep), var(--coral));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 8px 22px rgba(255, 111, 97, 0.32);
}

.modal__mark svg {
  width: 28px;
  height: 28px;
}

.modal__panel h2 {
  font-family: var(--font-display);
  margin: 0 0 0.75rem;
  color: var(--teal);
}

.modal__panel p {
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
  line-height: 1.68;
}

/* Focus visibility */
:focus-visible {
  outline: 3px solid var(--bubble-deep);
  outline-offset: 2px;
}

.btn:focus-visible,
.fsm-nav__burger:focus-visible,
.modal__close:focus-visible {
  outline-offset: 3px;
}

/* Fine-tuning for very small screens */
@media (max-width: 380px) {
  .fsm-nav__brand span {
    font-size: 0.95rem;
  }

  .hero__copy {
    padding: 1.2rem 1.05rem;
  }

  .hero h1 {
    font-size: 1.65rem;
  }

  .btn--lg {
    width: 100%;
  }
}

/* Wide desktop breathing room */
@media (min-width: 1200px) {
  main {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .feature-card {
    padding: 1.5rem 1.4rem;
  }

  .howto__panel {
    padding: 1.75rem 1.65rem;
  }
}

/* Print — hide chrome */
@media print {
  .fsm-nav,
  .nav-sheet,
  .modal,
  .reef-bg,
  .hero__cta,
  .download__actions {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .hero__banner img {
    max-height: 200px;
  }
}