/* MiniSudoku - landing page
   The palette, the candy buttons and the ink outlines are taken straight from
   the game (scripts/palette.gd and scripts/pop_button.gd) so the page and the
   app read as one thing. */

/* ---------------------------------------------------------------- fonts -- */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "LoveYaLikeASister";
  src: url("../fonts/LoveYaLikeASister-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

/* --------------------------------------------------------------- tokens -- */

:root {
  --ink: #3b3663;
  --ink-soft: #6f6899;
  --cream: #fff6e7;
  --cream-deep: #ffe9c7;
  --white: #ffffff;

  --purple: #7c5cff;
  --purple-dark: #5b3fd6;
  --lilac: #c9b8ff;
  --pink: #ff6b9d;
  --pink-dark: #d94a7b;
  --yellow: #ffc93c;
  --yellow-dark: #e0a616;
  --mint: #2ed9a0;
  --mint-dark: #1bb07e;
  --sky: #4fc3f7;
  --sky-dark: #2a9fd6;
  --coral: #ff5e5b;
  --coral-dark: #d63f3c;
  --orange: #ff9f45;

  --radius-card: 34px;
  --radius-btn: 26px;
  --shell: 1080px;
}

/* ---------------------------------------------------------------- reset -- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

/* Persian needs its own face - the Latin stack has no Arabic glyphs - and a
   little more leading to stay comfortable. */
html[lang="fa"] body {
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  line-height: 2;
}

img {
  max-width: 100%;
  height: auto;   /* without this the width/height attributes stretch the shots */
  display: block;
}

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

/* The drifting pastel circles behind everything, drawn by main.js. */
#bubbles {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.5;
  filter: blur(6px);
}

.shell {
  width: min(100% - 40px, var(--shell));
  margin-inline: auto;
}

section {
  padding: 72px 0;
}

/* ------------------------------------------------------------ typography -- */

.game-font {
  font-family: "LoveYaLikeASister", "Vazirmatn", cursive;
  letter-spacing: 0.02em;
}

/* Cartoon sticker lettering: same ink outline the game draws behind labels. */
.outlined {
  -webkit-text-stroke: 7px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 rgba(59, 54, 99, 0.18);
}

h1,
h2,
h3 {
  line-height: 1.35;
  margin: 0 0 18px;
}

.section-title {
  font-family: "LoveYaLikeASister", "Vazirmatn", cursive;
  font-size: clamp(34px, 5vw, 52px);
  text-align: center;
  color: var(--purple);
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
  margin-bottom: 12px;
}

.section-lead {
  text-align: center;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto 44px;
}

/* --------------------------------------------------------------- button -- */

.candy {
  --btn: var(--purple);
  --btn-dark: var(--purple-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 34px;
  border: 0;
  border-bottom: 8px solid var(--btn-dark);
  border-radius: var(--radius-btn);
  background: var(--btn);
  color: var(--white);
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(59, 54, 99, 0.12), 0 12px 24px rgba(59, 54, 99, 0.16);
  transition: transform 0.12s ease, border-width 0.12s ease, filter 0.12s ease;
}

.candy:hover {
  filter: brightness(1.05);
}

/* Mirrors PopButton: squash down on press, spring back on release. */
.candy:active {
  transform: translateY(5px) scale(0.97);
  border-bottom-width: 3px;
}

.candy:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 4px;
}

.candy--mint {
  --btn: var(--mint);
  --btn-dark: var(--mint-dark);
}
.candy--sky {
  --btn: var(--sky);
  --btn-dark: var(--sky-dark);
}
.candy--pink {
  --btn: var(--pink);
  --btn-dark: var(--pink-dark);
}
.candy--yellow {
  --btn: var(--yellow);
  --btn-dark: var(--yellow-dark);
  color: var(--ink);
}
.candy--lilac {
  --btn: var(--lilac);
  --btn-dark: var(--purple-dark);
  color: var(--ink);
}
.candy--big {
  font-size: 24px;
  padding: 24px 52px;
}

/* -------------------------------------------------------- language -- */

.lang-toggle {
  position: fixed;
  top: 18px;
  inset-inline-end: 18px;
  z-index: 10;
  padding: 10px 22px;
  border: 4px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(59, 54, 99, 0.16);
  transition: transform 0.12s ease, background 0.12s ease;
}

.lang-toggle:hover {
  background: var(--cream-deep);
}

.lang-toggle:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(59, 54, 99, 0.16);
}

.lang-toggle:focus-visible {
  outline: 4px solid var(--purple);
  outline-offset: 3px;
}

/* ----------------------------------------------------------------- hero -- */

.hero {
  padding: clamp(48px, 8vw, 96px) 0 64px;
  text-align: center;
}

.hero__icon {
  width: 148px;
  height: 148px;
  margin: 0 auto 18px;
  border-radius: 34px;
  background: var(--white);
  border: 6px solid var(--ink);
  box-shadow: 0 12px 0 rgba(59, 54, 99, 0.14), 0 24px 40px rgba(59, 54, 99, 0.18);
  animation: float 4.5s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-14px) rotate(2deg);
  }
}

.hero__title {
  font-family: "LoveYaLikeASister", cursive;
  font-size: clamp(56px, 11vw, 118px);
  margin: 0;
  line-height: 1.05;
}

.hero__title .a {
  color: var(--pink);
  display: block;
}
.hero__title .b {
  color: var(--purple);
  display: block;
}

.hero__tagline {
  font-size: clamp(18px, 2.4vw, 23px);
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 20px auto 32px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 26px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.chip {
  background: var(--cream-deep);
  border-radius: 999px;
  padding: 7px 20px;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;
}

.chip--mint {
  background: rgba(46, 217, 160, 0.22);
}

/* ------------------------------------------------------------ galleries -- */

.shots {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding: 8px 4px 26px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.shot {
  flex: 0 0 auto;
  width: 260px;
  scroll-snap-align: center;
  text-align: center;
}

.shot__frame {
  border: 7px solid var(--ink);
  border-radius: 32px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 10px 0 rgba(59, 54, 99, 0.12), 0 20px 34px rgba(59, 54, 99, 0.18);
  transition: transform 0.25s ease;
}

.shot__frame:hover {
  transform: translateY(-8px);
}

.shot__label {
  margin-top: 14px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------- cards -- */

.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--white);
  border: 5px solid var(--ink);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: 0 8px 0 rgba(59, 54, 99, 0.1), 0 18px 30px rgba(59, 54, 99, 0.12);
}

.card h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

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

.card__dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-family: "LoveYaLikeASister", cursive;
  font-size: 30px;
  color: var(--white);
}

/* --------------------------------------------------------------- specs -- */

.specs {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 5px solid var(--ink);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.specs th,
.specs td {
  padding: 15px 22px;
  text-align: start;
  border-bottom: 2px solid rgba(59, 54, 99, 0.1);
  font-size: 16px;
}

.specs tr:last-child th,
.specs tr:last-child td {
  border-bottom: 0;
}

.specs th {
  width: 42%;
  color: var(--ink-soft);
  font-weight: 400;
}

.specs td {
  font-weight: 700;
}

.ltr {
  direction: ltr;
  display: inline-block;
  unicode-bidi: isolate;
}

/* --------------------------------------------------------------- steps -- */

.steps {
  counter-reset: step;
  display: grid;
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.steps li {
  position: relative;
  background: var(--white);
  border: 5px solid var(--ink);
  border-radius: var(--radius-card);
  padding-block: 22px;
  padding-inline: 96px 26px;
  box-shadow: 0 6px 0 rgba(59, 54, 99, 0.1);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  inset-inline-start: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--yellow);
  border: 4px solid var(--ink);
  display: grid;
  place-items: center;
  font-family: "LoveYaLikeASister", cursive;
  font-size: 26px;
}

/* --------------------------------------------------------------- links -- */

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.copy-hint {
  text-align: center;
  color: var(--mint-dark);
  min-height: 28px;
  margin-top: 14px;
  font-size: 15px;
}

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

footer {
  background: var(--cream-deep);
  border-top: 5px solid var(--ink);
  padding: 44px 0 34px;
  text-align: center;
}

footer p {
  margin: 6px 0;
  color: var(--ink-soft);
  font-size: 16px;
}

footer a {
  color: var(--purple-dark);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 3px solid var(--lilac);
}

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

/* ------------------------------------------------------------- entrance -- */
/* A one-shot fade-up on load. Deliberately NOT tied to scroll position or to
   JavaScript: an effect that can leave the whole page invisible when an
   observer does not fire is not worth the polish. */

.reveal {
  animation: rise 0.7s cubic-bezier(0.22, 1.2, 0.4, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    animation: none;
  }
  .hero__icon {
    animation: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  section {
    padding: 52px 0;
  }
  .outlined,
  .section-title {
    -webkit-text-stroke-width: 4px;
  }
  .steps li {
    padding-block: 20px;
    padding-inline: 84px 20px;
  }
}
