/* Palette taken from the Deste app (YDTCards/Theme.swift), light theme first. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f3f4fb;
  --card: #ffffff;
  --ink: #141a33;
  --muted: #5d6483;
  --line: #e0e4f2;
  --blue: #2540f0;
  --purple: #6d3cf0;
  --pink: #d92d82;
  --orange: #e9702b;
  --green: #1f9a74;
  --amber: #c47f0e;
  --mint: #a8f0d0;
  --cream: #fff7e8;
  --lavender: #d0b4f5;
  --gradient: linear-gradient(90deg, var(--blue), var(--pink));
  --radius: 20px;
  --shadow: 0 1px 2px rgba(20, 26, 51, .05), 0 10px 30px -12px rgba(37, 64, 240, .18);
  --shadow-lift: 0 2px 4px rgba(20, 26, 51, .06), 0 22px 44px -16px rgba(37, 64, 240, .28);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1020;
  --surface: #0d1020;
  --card: #1a1e38;
  --ink: #f1f3ff;
  --muted: #9ea5c9;
  --line: #2c3153;
  --blue: #6f86ff;
  --pink: #ff5fa5;
  --purple: #9b7bff;
  --orange: #ff9156;
  --green: #3fc79c;
  --mint: #1e4a3d;
  --cream: #3a2f1f;
  --lavender: #2f2750;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); overflow-wrap: anywhere; }

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

.wrap {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand-dot {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--gradient);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.brand:hover .brand-dot { transform: rotate(-12deg) scale(1.08); }

.nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] {
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 10%, transparent);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 72px;
  isolation: isolate;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  pointer-events: none;
}
.hero::before {
  background: var(--mint);
  top: -180px;
  left: -140px;
  animation: drift 18s ease-in-out infinite alternate;
}
.hero::after {
  background: var(--lavender);
  bottom: -220px;
  right: -120px;
  animation: drift 22s ease-in-out infinite alternate-reverse;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .86rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.eyebrow .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent);
  animation: pulse 2.2s infinite;
}

h1, h2, h3 { letter-spacing: -.035em; line-height: 1.1; margin: 0; }

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  margin: 20px 0 18px;
  max-width: 760px;
}
.gradient-text {
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--pink), var(--blue));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 9s ease-in-out infinite;
}

.hero p.lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 600px;
  margin: 0 0 32px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, background .2s;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px -10px var(--blue);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px var(--blue); }
.btn-ghost {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--blue); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* Hero visual: app mark floating above a card stack */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.visual {
  position: relative;
  aspect-ratio: 1;
  max-width: 420px;
  width: 100%;
  justify-self: center;
}
.visual .mark {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: contain;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 30px 40px rgba(37, 64, 240, .18));
}
.visual .chip {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: var(--shadow-lift);
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
  animation: float 7s ease-in-out infinite;
}
.visual .chip small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: .78rem;
}
.chip-a { top: 6%; right: -2%; animation-delay: -2s !important; }
.chip-b { bottom: 8%; left: -4%; animation-delay: -4s !important; }
.chip-b .bar {
  height: 6px;
  width: 110px;
  border-radius: 999px;
  background: var(--line);
  margin-top: 8px;
  overflow: hidden;
}
.chip-b .bar i {
  display: block;
  height: 100%;
  width: 72%;
  background: linear-gradient(90deg, var(--orange), #f5a524);
  border-radius: inherit;
  animation: grow 2.4s cubic-bezier(.2, .8, .2, 1) both;
}

/* ---------- Sections ---------- */
section.block { padding: 88px 0; }
section.block.alt { background: var(--surface); }

.section-head {
  max-width: 620px;
  margin-bottom: 40px;
}
.section-head .kicker {
  color: var(--blue);
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
  display: block;
}
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 12px;
}
.section-head p {
  color: var(--muted);
  margin: 0;
  font-size: 1.05rem;
}

.cards {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, border-color .35s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--blue) 30%, var(--line));
}
.card .icon-tile {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  font-size: 1.3rem;
}
.tile-blue { background: color-mix(in srgb, var(--blue) 12%, transparent); }
.tile-green { background: color-mix(in srgb, var(--green) 14%, transparent); }
.tile-orange { background: color-mix(in srgb, var(--orange) 14%, transparent); }
.tile-purple { background: color-mix(in srgb, var(--purple) 14%, transparent); }

.card h3 { font-size: 1.2rem; margin-bottom: 8px; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); }
.card a.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-weight: 700;
  text-decoration: none;
  color: var(--blue);
}
.card a.more span { transition: transform .2s; }
.card:hover a.more span { transform: translateX(4px); }

/* Product card: the app itself */
.product {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  padding: 36px;
}
.product .app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 16px 30px -12px rgba(37, 64, 240, .45);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.product:hover .app-icon { transform: rotate(-6deg) scale(1.04); }
.product h3 { font-size: 1.6rem; }
.product p { margin: 6px 0 16px; color: var(--muted); font-size: 1.02rem; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: .82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* Coming soon card */
.card.soon {
  border-style: dashed;
  background: transparent;
  box-shadow: none;
}
.card.soon:hover { transform: none; box-shadow: none; }
.card.soon .tag { background: transparent; }

/* Contact strip */
.contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--gradient);
  color: #fff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 24px 50px -24px var(--pink);
}
.contact h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); }
.contact p { margin: 6px 0 0; opacity: .9; }
.contact a.btn-light {
  background: #fff;
  color: var(--ink);
  padding: 13px 22px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s;
}
.contact a.btn-light:hover { transform: translateY(-2px); }

/* ---------- App screenshot gallery ---------- */
.gallery {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px max(20px, calc((100% - 1040px) / 2 + 20px)) 32px;
  scroll-padding-inline: max(20px, calc((100% - 1040px) / 2 + 20px));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.gallery figure {
  flex: 0 0 min(260px, 72vw);
  margin: 0;
  scroll-snap-align: start;
}
.gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 639 / 1390;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  background: var(--card);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.gallery figure:hover img { transform: translateY(-6px); }
.gallery figcaption {
  margin-top: 14px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--d, 0s);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Document pages (privacy, support) ---------- */
.doc {
  padding: 56px 0 88px;
  max-width: 760px;
}
.doc h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 10px 0 8px;
}
.doc h2 {
  font-size: 1.2rem;
  margin: 2rem 0 .4rem;
  letter-spacing: -.02em;
}
.doc p, .doc li { color: var(--muted); font-size: 1.02rem; }
.doc p.meta { color: var(--muted); font-size: .92rem; }
.doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.8rem 0;
}
.crumbs { font-size: .95rem; margin: 0; }
.crumbs a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  gap: 4px;
  margin: 18px 0 0;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang-switch button {
  font: inherit;
  font-weight: 700;
  font-size: .9rem;
  padding: 7px 16px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.js .lang-block { display: none; }
.js .lang-block.on { display: block; animation: fadeIn .4s ease both; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: .92rem;
  background: var(--bg);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
}
.site-footer a:hover { color: var(--blue); }

/* ---------- Motion ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(60px, 40px); }
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes grow {
  from { width: 0; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hero .rise {
  animation: rise .9s cubic-bezier(.2, .8, .2, 1) both;
}
.hero .rise.d1 { animation-delay: .08s; }
.hero .rise.d2 { animation-delay: .18s; }
.hero .rise.d3 { animation-delay: .28s; }
.hero .rise.d4 { animation-delay: .38s; }

@media (max-width: 820px) {
  .hero { padding: 56px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .visual { max-width: 320px; }
  .product { grid-template-columns: 1fr; text-align: left; }
  section.block { padding: 64px 0; }
  .nav a { padding: 6px 8px; font-size: .88rem; }
  .site-footer a { margin: 0 14px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
