/* Youple landing page. Colors follow the app icon (lib/ui/brand.dart). */
:root {
  --indigo: #4338ca;
  --violet: #9333ea;
  --coral: #ff6b6b;
  --mint: #34d399;
  --bg: #fbf9ff;
  --surface: #ffffff;
  --tint: #f1edff;
  --text: #1c1b24;
  --muted: #5b5870;
  --line: #e4e0f2;
  --shadow: 0 12px 40px rgba(67, 56, 202, 0.14);
  --radius: 20px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Sans",
    "Noto Sans JP", "Noto Sans", "Noto Sans Arabic", "Noto Sans Thai",
    "Noto Sans KR", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12111a;
    --surface: #1c1a28;
    --tint: #1a1830;
    --text: #ece9f8;
    --muted: #aaa6c2;
    --line: #2e2b42;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12111a;
  --surface: #1c1a28;
  --tint: #1a1830;
  --text: #ece9f8;
  --muted: #aaa6c2;
  --line: #2e2b42;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
:lang(ur) body, body:lang(ur) { line-height: 2.1; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
img { max-width: 100%; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px max(16px, calc((100% - 1120px) / 2));
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.brand img { border-radius: 9px; }
.brand span {
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand span {
    background-image: linear-gradient(90deg, #a5b4fc, #d8b4fe);
  }
}
.links { display: flex; gap: 20px; margin-inline-start: auto; }
.links a { text-decoration: none; color: var(--muted); font-size: 0.95rem; }
.links a:hover { color: var(--text); }

.lang { position: relative; margin-inline-start: 8px; }
.lang summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}
.lang summary::-webkit-details-marker { display: none; }
.lang ul {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 2px;
}
.lang li a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.92rem;
}
.lang li a:hover { background: var(--tint); }
.lang li a[aria-current] { background: var(--tint); font-weight: 700; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 16px 56px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--indigo), var(--violet) 60%, var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero h1 {
    background-image: linear-gradient(120deg, #a5b4fc, #d8b4fe 60%, #fda4af);
  }
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 36em; }
.note { color: var(--muted); font-size: 0.92rem; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 10px 18px;
  border-radius: 14px;
  background: #111;
  color: #fff;
  text-decoration: none;
  line-height: 1.2;
}
.store svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store small { display: block; font-size: 0.72rem; opacity: 0.8; }
.store strong { font-size: 1.08rem; }
.store.soon { opacity: 0.85; cursor: default; }
.store-badge { display: inline-flex; align-items: center; }
.store-badge img { height: 54px; width: auto; display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .store { background: #fff; color: #111; }
}

/* A screenshot of the app in a phone frame (lp/tool/screens.sh) */
.phone {
  position: relative;
  width: min(290px, 70vw);
  padding: 9px;
  border-radius: 46px;
  background: #15131f;
  box-shadow: 0 0 0 2px #2f2b45, 0 30px 70px rgba(67, 56, 202, 0.28);
  margin-inline: auto;
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 1385;
  border-radius: 37px;
  background: var(--tint);
}
/* The camera, over the screenshot's empty status bar. */
.phone::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 50%;
  width: 30%;
  height: 22px;
  translate: -50% 0;
  border-radius: 12px;
  background: #15131f;
}
.visual { position: relative; }
.visual::before {
  content: "";
  position: absolute;
  inset: 6% -8%;
  z-index: -1;
  border-radius: 45%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--violet) 26%, transparent), transparent);
}

/* Swipe directions around the hero's phone. Right adds and left passes in
   every language, as in the app, so these use physical sides. */
.gesture {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
  animation: float 4s ease-in-out infinite;
}
.gesture.add { right: -16%; top: 30%; color: #16a34a; }
.gesture.pass { left: -16%; top: 50%; color: #dc2626; animation-delay: -1.3s; }
.gesture.skip { left: 50%; bottom: -18px; translate: -50% 0; color: var(--muted); animation-delay: -2.6s; }
@keyframes float {
  50% { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .gesture { animation: none; }
}

/* Sections */
.section { max-width: 1120px; margin: 0 auto; padding: 72px 16px; }
.section > h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  text-align: center;
  margin-bottom: 40px;
}
.tinted {
  max-width: none;
  background: var(--tint);
  padding-inline: max(16px, calc((100% - 1120px) / 2));
}
.narrow { max-width: 760px; }

/* Three short steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.steps li {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.steps h3 { font-size: 1.12rem; }
.steps p { color: var(--muted); margin: 0; }
.num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
}

/* A picture and a few words, alternating sides */
.hero, .show { overflow-x: clip; }
.show {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 16px;
}
.show.flip .show-text { order: 2; }
.show h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.show p { font-size: 1.1rem; color: var(--muted); max-width: 30em; }
.chips { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.chips li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.chips svg { flex: none; width: 22px; height: 22px; margin-top: 2px; fill: var(--indigo); }
.chips strong { display: block; }
.chips span { color: var(--muted); font-size: 0.95rem; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chips svg { fill: #a5b4fc; }
}
:root[data-theme="dark"] .chips svg { fill: #a5b4fc; }

/* Privacy, in three short cards */
.grid { display: grid; gap: 20px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }

/* What is new: a pill above the headline, and a label over new sections. */
.new-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 0 0 1px var(--line);
}
.new-badge span {
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}
.new-badge:hover { box-shadow: 0 0 0 1px var(--violet); }
.eyebrow {
  margin: 0 0 6px;
  font-size: 0.85rem !important;
  font-weight: 800;
  letter-spacing: 0.12em;
  background: linear-gradient(90deg, var(--indigo), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.trust {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.trust h3 { font-size: 1.1rem; }
.trust p { color: var(--muted); margin: 0; }

#faq details {
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
#faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 0;
  list-style-position: inside;
}
#faq details p { color: var(--muted); }
.languages { font-size: 0.95rem; }

.cta { text-align: center; }
.cta .stores { justify-content: center; }

.bottom {
  padding: 40px 16px 56px;
  text-align: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.bottom .small { font-size: 0.8rem; max-width: 720px; margin-inline: auto; }

/* Narrow screens */
@media (max-width: 900px) {
  .links { display: none; }
  .lang { margin-inline-start: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 40px; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero .stores { justify-content: center; }
  .grid.three, .steps { grid-template-columns: 1fr; }
  .grid.four { grid-template-columns: repeat(2, 1fr); }
  .show { grid-template-columns: 1fr; gap: 36px; padding-block: 48px; text-align: center; }
  .show.flip .show-text { order: 0; }
  .show p { margin-inline: auto; }
  .chips { text-align: start; max-width: 30em; margin-inline: auto; }
}
@media (max-width: 560px) {
  .section { padding-block: 56px; }
  .grid.four { grid-template-columns: 1fr; }
  .new-badge { font-size: 0.85rem; }
  .store { min-width: 0; flex: 1 1 160px; }
  .lang ul { grid-template-columns: 1fr 1fr; }
  .lang ul li a { padding: 8px; }
  .phone { width: min(250px, 66vw); border-radius: 40px; }
  .phone img { border-radius: 32px; }
  .gesture { padding: 6px 10px; font-size: 0.85rem; }
  .gesture.add { right: -12%; }
  .gesture.pass { left: -12%; }
}
.store { justify-content: center; }
/* Japanese breaks headings between phrases, not mid-word. */
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { word-break: auto-phrase; }
h1, h2 { text-wrap: balance; }

/* Footer links to the legal pages */
.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-bottom: 1em;
}
.legal-links a { text-decoration: none; }
.legal-links a:hover { text-decoration: underline; }

/* Legal pages: terms of use, privacy policy, commerce notice */
.doc-langs { display: flex; gap: 4px; margin-inline-start: auto; }
.doc-langs a {
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
}
.doc-langs a[aria-current="page"] { background: var(--tint); color: var(--text); font-weight: 700; }
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 16px 64px;
  overflow-wrap: anywhere;
}
.legal h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); margin-bottom: 0.8em; }
.legal h2 {
  font-size: 1.2rem;
  margin-top: 2.2em;
  padding-top: 1.2em;
  border-top: 1px solid var(--line);
}
.legal ul { padding-inline-start: 1.4em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4em; }
.legal a { color: var(--indigo); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .legal a { color: #a5b4fc; }
}
:root[data-theme="dark"] .legal a { color: #a5b4fc; }
.legal .updated { margin-top: 3em; color: var(--muted); font-size: 0.9rem; }
