/* pocketly.lat: the app's palette (Palette.swift) and Fredoka, soft plastic cards, rhinestones
   that twinkle with the kirakira glint. */
@font-face {
  font-family: "Fredoka";
  src: url("/assets/Fredoka-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bubblegum: #F7A8C8;
  --lilac: #C7B3F0;
  --mint: #A8E6CF;
  --butter: #FFE8A3;
  --sky: #A9D8F5;
  --coral: #FF9E8A;
  --pearl: #FFF7FB;
  --night: #3B3360;
  --pink: #E8508F;
  --ink-soft: #5E557F;
  --shadow: 0 18px 40px rgba(59, 51, 96, 0.16), 0 3px 8px rgba(59, 51, 96, 0.08);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Fredoka", ui-rounded, system-ui, sans-serif;
  font-weight: 500;
  color: var(--night);
  background: linear-gradient(180deg, #FCE4EF 0%, var(--bubblegum) 45%, var(--lilac) 100%) fixed;
  background-color: var(--bubblegum);
  overflow-x: hidden;
  position: relative;
}

body.privacy, body.terms { background: linear-gradient(180deg, #FCE4EF 0%, #F3D9F0 50%, var(--lilac) 100%) fixed; }

a { color: var(--pink); }

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

/* Header */
.bar {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--night);
  font-weight: 700;
  font-size: 22px;
}

.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 4px 10px rgba(59, 51, 96, 0.18); }

.langs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 247, 251, 0.75);
  box-shadow: 0 2px 8px rgba(59, 51, 96, 0.1);
}

.langs a {
  padding: 6px 11px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
}

.langs a[aria-current] { background: var(--pink); color: #fff; }

main { position: relative; z-index: 1; }

/* Rhinestones scattered behind the hero, each with a glint that twinkles in turn. */
.stones { position: absolute; inset: 0 0 auto 0; height: 980px; pointer-events: none; z-index: 0; overflow: hidden; }

.stone {
  position: absolute;
  width: var(--s);
  transform: translateX(-50%) rotate(var(--r));
  filter: drop-shadow(0 6px 6px rgba(59, 51, 96, 0.22));
}

.stone img { display: block; width: 100%; }

.stone::after {
  content: "";
  position: absolute;
  left: 24%;
  top: 18%;
  width: 60%;
  aspect-ratio: 1;
  background:
    radial-gradient(circle, #fff 0 8%, rgba(255, 255, 255, 0.55) 14%, transparent 30%),
    linear-gradient(45deg, transparent 47%, rgba(255, 255, 255, 0.95) 50%, transparent 53%),
    linear-gradient(-45deg, transparent 47%, rgba(255, 255, 255, 0.95) 50%, transparent 53%);
  mask-image: radial-gradient(circle, #000 0 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, #000 0 30%, transparent 70%);
  opacity: 0;
  animation: glint 4.2s ease-in-out infinite;
  animation-delay: var(--d);
}

@keyframes glint {
  0%, 62%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  72% { opacity: 1; transform: scale(1.1) rotate(20deg); }
  84% { opacity: 0; transform: scale(0.6) rotate(35deg); }
}

/* Hero */
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  text-align: center;
}

.appicon {
  width: 132px;
  height: 132px;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.hero h1 { margin: 18px auto 0; max-width: 560px; line-height: 0; }

.hero h1 img { width: 100%; filter: drop-shadow(0 10px 14px rgba(59, 51, 96, 0.25)); }

.tagline {
  margin: 10px 0 0;
  font-weight: 700;
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1.15;
}

.intro {
  margin: 14px auto 0;
  max-width: 540px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 15px 26px 15px 22px;
  border-radius: 999px;
  background: var(--night);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  box-shadow: var(--shadow), inset 0 -3px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease;
}

.cta:hover { transform: translateY(-2px); }

.cta svg { width: 22px; height: 22px; fill: currentColor; }

/* Screenshots: a row on wide screens, a swipeable strip on phones. */
.shots {
  display: flex;
  gap: 20px;
  justify-content: center;
  max-width: 1120px;
  margin: 10px auto 0;
  padding: 10px 20px 30px;
}

.shots img {
  width: clamp(150px, 21vw, 240px);
  flex: 0 0 auto;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

/* Feature cards like the app's pearl panels */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  max-width: 1080px;
  margin: 20px auto 0;
  padding: 0 20px 40px;
}

.card {
  flex: 1 1 190px;
  max-width: 300px;
  background: var(--pearl);
  border-radius: 28px;
  padding: 22px 20px 24px;
  text-align: center;
  box-shadow: var(--shadow), inset 0 -4px 0 rgba(232, 80, 143, 0.12);
}

.card img { width: 72px; height: 72px; }

.card h3 { margin: 10px 0 6px; font-size: 20px; font-weight: 700; line-height: 1.2; }

.card p { margin: 0; color: var(--ink-soft); line-height: 1.45; font-size: 16px; }

/* Privacy and terms */
.paper {
  max-width: 760px;
  margin: 10px auto 40px;
  padding: 36px 40px 40px;
  background: var(--pearl);
  border-radius: 32px;
  box-shadow: var(--shadow);
  line-height: 1.6;
  font-size: 17px;
}

.paper h1 { margin: 0; font-size: clamp(30px, 6vw, 42px); line-height: 1.1; font-weight: 700; }

.paper .updated { margin: 6px 0 18px; color: var(--ink-soft); font-size: 15px; }

.paper h2 { margin: 28px 0 6px; font-size: 22px; font-weight: 700; color: var(--pink); }

.paper p { margin: 0 0 12px; color: #463E68; font-weight: 400; }

body.privacy .stones, body.terms .stones { height: 420px; opacity: 0.85; }

/* Footer */
footer {
  position: relative;
  z-index: 1;
  padding: 20px 20px 40px;
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
}

footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }

footer a { color: var(--night); font-weight: 600; text-decoration: none; }

footer a:hover { color: var(--pink); }

footer p { margin: 14px 0 0; }

body.root .hero { padding-top: 22vh; }

body.root .tagline { font-size: 22px; }

@media (max-width: 720px) {
  .bar { padding: 14px 16px; }
  .brand span { display: none; }
  .langs a { padding: 6px 9px; font-size: 13px; }
  .hero { padding: 12px 16px 28px; }
  .appicon { width: 104px; height: 104px; border-radius: 24px; }
  .intro { font-size: 17px; }
  .shots {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 6px 16px 24px;
    scrollbar-width: none;
  }
  .shots::-webkit-scrollbar { display: none; }
  .shots img { width: 64vw; max-width: 260px; scroll-snap-align: center; border-radius: 22px; }
  .cards { padding: 0 16px 30px; gap: 14px; }
  .card { flex-basis: 100%; max-width: 420px; }
  .paper { margin: 6px 12px 30px; padding: 26px 20px 28px; border-radius: 26px; font-size: 16px; }
  .stone { width: calc(var(--s) * 0.7); }
  .stone:nth-child(n+3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .stone::after { animation: none; }
  .cta { transition: none; }
}
