/* Fishrr — marketing site styles.
   Tokens mirror apps/mobile/src/theme/index.ts (the warm Fishrr design system):
   cream/sand base, single terracotta accent, Hanken Grotesk, soft brown shadows. */

:root {
  --bg: #ece3cb;
  --surface: #fbf7ee;
  --surface-alt: #f3ebd8;
  --border: #e1d6bd;

  --text: #1e1a14;
  --text-muted: #6b6354;
  --text-faint: #9e9684;

  --primary: #d86a2c;
  --primary-dark: #b5521e;
  --primary-tint: #f6e2d2;
  --on-primary: #fff8ee;

  --safe: #3e9e7a;
  --caution: #e0a02e;
  --danger: #d8442a;
  --water: #2e9d9a;

  --safe-bg: #e2f0e7;
  --caution-bg: #f8eccf;
  --danger-bg: #f7e0da;

  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(56, 42, 24, 0.1);
  --shadow-md: 0 4px 12px rgba(56, 42, 24, 0.12);
  --shadow-lg: 0 8px 20px rgba(56, 42, 24, 0.16);
  --shadow-xl: 0 18px 40px rgba(56, 42, 24, 0.18);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --maxw: 1120px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(236, 227, 203, 0.72);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease;
}
.topbar.scrolled {
  background: rgba(236, 227, 203, 0.92);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.3px;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
}
.brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease);
}
.brand:hover .logo {
  transform: rotate(-6deg) scale(1.06);
}
.brand .spark {
  color: var(--primary);
  display: inline-block;
  animation: twinkle 3.2s ease-in-out infinite;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topnav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  transition: color 0.2s ease, background 0.2s ease;
}
.topnav a:hover {
  color: var(--text);
  background: var(--surface-alt);
  text-decoration: none;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease,
    background 0.15s ease;
}
.btn:hover {
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
/* shine sweep */
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.38),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.65s ease;
}
.btn-primary:hover::after {
  left: 150%;
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  background: var(--surface-alt);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---------- Hero / main section ---------- */
.hero {
  position: relative;
  padding: 56px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-tint);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -1.2px;
  font-weight: 800;
  margin-bottom: 18px;
}
.hero h1 .accent {
  color: var(--primary);
}
.lede {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 36ch;
  margin-bottom: 26px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.fineprint {
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Hero art ---------- */
.hero-art {
  position: relative;
  background: linear-gradient(160deg, #f5d9bf 0%, var(--surface) 70%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  overflow: hidden;
}
.hero-art .mascot {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 320px;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  animation: float 6s ease-in-out infinite;
}
.status-chips {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 22px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease;
}
.chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  animation: ring 2.6s ease-out infinite;
}
.dot.safe {
  background: var(--safe);
  --ring: rgba(62, 158, 122, 0.5);
}
.dot.caution {
  background: var(--caution);
  --ring: rgba(224, 160, 46, 0.5);
}
.dot.danger {
  background: var(--danger);
  --ring: rgba(216, 68, 42, 0.5);
}
.chip:nth-child(2) .dot {
  animation-delay: 0.5s;
}
.chip:nth-child(3) .dot {
  animation-delay: 1s;
}

/* floating bubbles behind the mascot */
.bubbles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.bubble {
  position: absolute;
  bottom: -28px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 30%,
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.12)
  );
  opacity: 0;
  animation: rise-bubble linear infinite;
}
.bubble:nth-child(1) {
  left: 12%;
  width: 14px;
  height: 14px;
  animation-duration: 7s;
  animation-delay: 0s;
}
.bubble:nth-child(2) {
  left: 28%;
  width: 9px;
  height: 9px;
  animation-duration: 5.5s;
  animation-delay: 1.4s;
}
.bubble:nth-child(3) {
  left: 48%;
  width: 18px;
  height: 18px;
  animation-duration: 8.5s;
  animation-delay: 2.6s;
}
.bubble:nth-child(4) {
  left: 66%;
  width: 11px;
  height: 11px;
  animation-duration: 6.5s;
  animation-delay: 0.8s;
}
.bubble:nth-child(5) {
  left: 82%;
  width: 16px;
  height: 16px;
  animation-duration: 7.8s;
  animation-delay: 3.4s;
}
.bubble:nth-child(6) {
  left: 90%;
  width: 8px;
  height: 8px;
  animation-duration: 5s;
  animation-delay: 2s;
}

/* ---------- Feature grid ---------- */
.section-label {
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 56px 0 22px;
}
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease,
    border-color 0.35s ease, opacity 0.6s ease;
}
.feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-tint);
  transition-delay: 0s;
}
.feature .ico {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: var(--primary-tint);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  transition: transform 0.35s var(--ease), background 0.35s ease;
}
.feature:hover .ico {
  transform: scale(1.1) rotate(-4deg);
  background: #f1d2bc;
}
.feature h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}
.feature p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- Pricing ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease,
    border-color 0.35s ease, opacity 0.6s ease;
}
.plan:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transition-delay: 0s;
}
.plan.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  position: relative;
}
.plan.featured:hover {
  box-shadow: var(--shadow-xl);
}
.plan .tag {
  position: absolute;
  top: -11px;
  left: 22px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  animation: tag-bob 3s ease-in-out infinite;
}
.plan h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.plan .price {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
}
.plan .price small {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-faint);
}
.plan .note {
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 4px;
  min-height: 18px;
}

/* ---------- Billing policy ---------- */
.policy {
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s ease, transform 0.35s var(--ease);
}
.policy:hover {
  box-shadow: var(--shadow-md);
}
.policy h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.policy ul {
  list-style: none;
  display: grid;
  gap: 9px;
}
.policy li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  color: var(--text-muted);
}
.policy li::before {
  content: "✦";
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--primary);
  font-size: 13px;
}
.policy li strong {
  color: var(--text);
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.footer .links a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s ease;
}
.footer .links a:hover {
  color: var(--primary-dark);
}
.footer .copy {
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Legal pages ---------- */
.legal {
  padding: 48px 0 24px;
}
.legal .doc {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 44px 48px;
}
.legal h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 6px;
}
.legal .updated {
  color: var(--text-faint);
  font-size: 14px;
  margin-bottom: 28px;
}
.legal h2 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 28px 0 10px;
}
.legal p,
.legal li {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 10px;
}
.legal ul {
  padding-left: 22px;
  margin-bottom: 10px;
}
.legal li {
  margin-bottom: 6px;
}
.legal .back {
  display: inline-block;
  margin-bottom: 24px;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.2s var(--ease);
}
.legal .back:hover {
  transform: translateX(-3px);
}
.legal .callout {
  background: var(--primary-tint);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 18px 0;
}
.legal .callout p {
  color: var(--text);
  margin: 0;
  font-size: 14px;
}

/* ---------- Motion / micro-interactions ---------- */

/* Hero entrance — plays on load, staggered. */
.js .hero-copy > * {
  animation: rise 0.8s var(--ease) both;
}
.js .hero-copy > *:nth-child(1) {
  animation-delay: 0.05s;
}
.js .hero-copy > *:nth-child(2) {
  animation-delay: 0.14s;
}
.js .hero-copy > *:nth-child(3) {
  animation-delay: 0.23s;
}
.js .hero-copy > *:nth-child(4) {
  animation-delay: 0.32s;
}
.js .hero-copy > *:nth-child(5) {
  animation-delay: 0.41s;
}
.js .hero-art {
  animation: rise 0.9s var(--ease) 0.2s both;
}

/* Scroll reveal — progressive enhancement, only hides when JS is present. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* generic reveals get their own transition; cards already define one above. */
.js .reveal:not(.feature):not(.plan) {
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
/* gentle stagger across grid items */
.js .features .reveal:nth-child(2),
.js .plans .reveal:nth-child(2) {
  transition-delay: 0.06s;
}
.js .features .reveal:nth-child(3),
.js .plans .reveal:nth-child(3) {
  transition-delay: 0.12s;
}
.js .features .reveal:nth-child(4),
.js .plans .reveal:nth-child(4) {
  transition-delay: 0.18s;
}
.js .features .reveal:nth-child(5) {
  transition-delay: 0.24s;
}
.js .features .reveal:nth-child(6) {
  transition-delay: 0.3s;
}

/* ---------- Keyframes ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}
@keyframes ring {
  0% {
    box-shadow: 0 0 0 0 var(--ring);
  }
  70%,
  100% {
    box-shadow: 0 0 0 9px rgba(0, 0, 0, 0);
  }
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.55;
    transform: scale(1.25) rotate(20deg);
  }
}
@keyframes tag-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}
@keyframes rise-bubble {
  0% {
    transform: translateY(0) scale(0.7);
    opacity: 0;
  }
  12% {
    opacity: 0.55;
  }
  100% {
    transform: translateY(-340px) scale(1.15);
    opacity: 0;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-art {
    order: -1;
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .topnav a {
    padding: 8px 8px;
  }
  .features,
  .plans {
    grid-template-columns: 1fr;
  }
  .legal .doc {
    padding: 28px 22px;
  }
  .cta-row .btn {
    flex: 1 1 auto;
  }
}

/* ---------- Respect reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal,
  .js .hero-copy > *,
  .js .hero-art {
    opacity: 1 !important;
    transform: none !important;
  }
  .bubble {
    display: none;
  }
}
