/* candycat.fun: one stylesheet for every page. Light and dark, mobile first, right to left for Arabic. */

@font-face {
  font-family: "Nunito";
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/nunito-black.woff2") format("woff2");
}

@font-face {
  font-family: "Baloo Bhaijaan 2";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/baloo-bhaijaan2-extrabold.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  --bg: #fff4fa;
  --bg-deep: #ffe3f1;
  --card: #ffffff;
  --text: #3b2149;
  --muted: #7a5b88;
  --pink: #f2448f;
  --pink-deep: #d42c76;
  --purple: #7b4ae2;
  --orange: #ff9a1f;
  --green: #2fbf4c;
  --blue: #2aa8f0;
  --yellow: #ffc61a;
  --line: #f5cbe1;
  --shadow: 0 10px 28px rgba(165, 40, 110, 0.16);
  --radius: 22px;
  --title: "Nunito", "Baloo Bhaijaan 2", ui-rounded, system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Arabic", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1029;
    --bg-deep: #26163a;
    --card: #2b1a42;
    --text: #f7ebff;
    --muted: #c6aed6;
    --pink: #ff6aaa;
    --pink-deep: #ff4f98;
    --purple: #a98bff;
    --line: #48305f;
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 8% 12%, rgba(242, 68, 143, 0.12) 0 70px, transparent 71px),
    radial-gradient(circle at 92% 6%, rgba(123, 74, 226, 0.12) 0 90px, transparent 91px),
    radial-gradient(circle at 85% 55%, rgba(255, 154, 31, 0.10) 0 60px, transparent 61px),
    radial-gradient(circle at 12% 80%, rgba(42, 168, 240, 0.10) 0 80px, transparent 81px);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

[dir="rtl"] body {
  line-height: 1.75;
}

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

a {
  color: var(--pink-deep);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--purple);
}

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3,
.brand,
.store,
.tagline,
summary {
  font-family: var(--title);
}

h1,
h2 {
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  hyphens: auto;
}

[lang="ar"] h1,
[lang="ar"] h2,
[lang="ar"] .brand,
[lang="ar"] .store,
[lang="ar"] .tagline,
[lang="ar"] summary {
  font-weight: 800;
  letter-spacing: 0;
}

.wrap {
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
  padding-inline: 16px;
}

.skip {
  position: absolute;
  inset-inline-start: 8px;
  top: -60px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  z-index: 10;
}

.skip:focus {
  top: 8px;
}

/* ---------------------------------------------------------------- header */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
}

.brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  font-size: 19px;
  white-space: nowrap;
  margin-inline-end: auto;
}

.brand img {
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(165, 40, 110, 0.2);
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 6px 10px;
  border-radius: 999px;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--bg-deep);
}

.lang {
  position: relative;
}

.lang summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  user-select: none;
}

.lang summary::-webkit-details-marker {
  display: none;
}

.lang[open] summary {
  border-color: var(--pink);
}

.lang ul {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.lang li a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}

.lang li a:hover {
  background: var(--bg-deep);
}

.lang li a[aria-current="true"] {
  font-weight: 700;
  color: var(--pink-deep);
}

.lang li a[aria-current="true"]::after {
  content: " ✓";
}

@media (max-width: 560px) {
  .top {
    position: static;
  }

  .top-row {
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
    row-gap: 6px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .nav a {
    padding: 4px 10px;
  }

  .doc section {
    scroll-margin-top: 12px;
  }
}

@media (max-width: 360px) {
  .lang-name {
    display: none;
  }
}

/* ---------------------------------------------------------------- home */

.hero {
  text-align: center;
  padding-top: 28px;
  padding-bottom: 12px;
}

.hero-icon {
  display: block;
  margin: 0 auto 4px;
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.logo {
  margin: 0 auto;
  max-width: 420px;
}

.logo img {
  display: block;
  width: 100%;
  filter: drop-shadow(0 8px 14px rgba(165, 40, 110, 0.18));
}

.tagline {
  margin: 4px 0 6px;
  font-size: 24px;
  font-weight: 900;
  color: var(--purple);
}

.lead {
  margin: 0 auto 22px;
  max-width: 560px;
  color: var(--muted);
}

.store {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6aa9 0%, var(--pink) 55%, var(--pink-deep) 100%);
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 6px 0 #a91f5e, 0 14px 24px rgba(212, 44, 118, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.store:hover {
  color: #fff;
  transform: translateY(-2px);
}

.store:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #a91f5e, 0 6px 12px rgba(212, 44, 118, 0.3);
}

.store-small {
  font-size: 17px;
  padding: 12px 24px;
}

.note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--muted);
}

section h2 {
  font-size: 28px;
  margin: 36px 0 16px;
}

.shots h2 {
  text-align: center;
}

.shot-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 62%;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 16px 18px;
  max-width: 1000px;
  margin-inline: auto;
  scrollbar-width: thin;
}

.shot-row figure {
  margin: 0;
  scroll-snap-align: center;
}

.shot-row img {
  display: block;
  width: 100%;
  border-radius: 22px;
  border: 4px solid var(--card);
  box-shadow: var(--shadow);
  background: var(--bg-deep);
}

@media (min-width: 640px) {
  .shot-row {
    grid-auto-columns: 40%;
  }
}

@media (min-width: 900px) {
  .shot-row {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
  }
}

.candy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

@media (min-width: 760px) {
  .candy-list {
    grid-template-columns: 1fr 1fr;
  }
}

.candy-list li {
  position: relative;
  padding: 14px 16px;
  padding-inline-start: 50px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.candy-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 16px;
  top: 17px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 18%, transparent 20%), var(--pink);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15);
}

.candy-list li:nth-child(6n + 2)::before { background-color: var(--orange); }
.candy-list li:nth-child(6n + 3)::before { background-color: var(--green); }
.candy-list li:nth-child(6n + 4)::before { background-color: var(--blue); }
.candy-list li:nth-child(6n + 5)::before { background-color: var(--purple); }
.candy-list li:nth-child(6n + 6)::before { background-color: var(--yellow); }

.fair {
  text-align: center;
  padding-bottom: 24px;
}

.fair p {
  max-width: 620px;
  margin-inline: auto;
}

/* ---------------------------------------------------------------- privacy and support */

.doc {
  max-width: 780px;
  padding-top: 24px;
  padding-bottom: 32px;
}

.doc h1 {
  font-size: clamp(26px, 7.4vw, 36px);
  margin: 8px 0 4px;
}

.doc h2 {
  font-size: 23px;
  margin: 32px 0 8px;
}

.updated {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.intro {
  font-size: 19px;
}

.doc ul {
  padding-inline-start: 22px;
}

.doc li {
  margin: 6px 0;
}

.doc section {
  scroll-margin-top: 76px;
}

.toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 20px 10px;
  margin: 22px 0;
}

.toc h2 {
  font-size: 18px;
  margin: 14px 0 6px;
}

.toc ol {
  margin: 0;
  padding-inline-start: 22px;
  columns: 2 220px;
  column-gap: 28px;
}

.toc li {
  margin: 4px 0;
  break-inside: avoid;
}

.contact {
  background: var(--card);
  border: 2px solid var(--pink);
  border-radius: var(--radius);
  padding: 8px 22px 14px;
  margin: 22px 0 8px;
  box-shadow: var(--shadow);
}

.contact-label {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.mail {
  font-family: var(--title);
  font-weight: 900;
  font-size: 24px;
  word-break: break-all;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin: 10px 0;
  padding: 0 18px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 900;
  font-size: 18px;
  padding: 14px 0;
  padding-inline-end: 28px;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 0;
  top: 10px;
  font-size: 24px;
  color: var(--pink);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  margin: 0 0 16px;
}

.nf {
  text-align: center;
}

.nf img {
  border-radius: 26px;
  box-shadow: var(--shadow);
  margin-top: 16px;
}

.nf-langs {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
}

/* ---------------------------------------------------------------- footer */

.foot {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 15px;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.foot a {
  color: var(--muted);
}

.foot p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
